three.js
three.js copied to clipboard
MathNode: Add `rand()`.
Related issue: -
Description
This ports the rand() GLSL helper function from commons.glsl to TSL and adds it to MathNode.
rand() is used multiple times in the addons e.g. in FilmPass that I want to port next.
📦 Bundle size
Full ESM build, minified and gzipped.
Filesize dev |
Filesize PR | Diff |
|---|---|---|
| 682.2 kB (169 kB) | 682.2 kB (169 kB) | +0 B |
🌳 Bundle size after tree-shaking
Minimal build including a renderer, camera, empty scene, and dependencies.
Filesize dev |
Filesize PR | Diff |
|---|---|---|
| 459.4 kB (110.9 kB) | 459.4 kB (110.9 kB) | +0 B |
/cc @brunosimon