Skip to content

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Apr 19, 2025

Description

Added Stack() and .toStack() functions for TSL core.

The append() function has been renamed to .toStack() which was useful for adding an expression or function call directly to the current stack which is a more advanced feature in cases where you need to manually control the sequence of declarations and function calls.

TSL void functions are added to the stack automatically.

@sunag sunag added this to the r176 milestone Apr 19, 2025
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.33
78.33
336.33
78.33
+0 B
+0 B
WebGPU 545.72
151.3
545.96
151.35
+240 B
+49 B
WebGPU Nodes 545.07
151.14
545.31
151.19
+240 B
+51 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.48
112.23
465.48
112.23
+0 B
+0 B
WebGPU 619.34
167.59
619.52
167.64
+175 B
+53 B
WebGPU Nodes 574.21
156.89
574.39
156.92
+175 B
+33 B

@sunag sunag marked this pull request as ready for review April 19, 2025 02:03
@sunag sunag mentioned this pull request Apr 6, 2025
12 tasks
@sunag sunag merged commit b730a20 into mrdoob:dev Apr 19, 2025
12 checks passed
@sunag sunag deleted the dev-stack branch April 19, 2025 04:04
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* add `Stack()`

* rev

* rev
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* add `Stack()`

* rev

* rev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant