three.js icon indicating copy to clipboard operation
three.js copied to clipboard

MathNode: Add `rand()`.

Open Mugen87 opened this issue 1 year ago • 1 comments

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.

Mugen87 avatar Jun 30 '24 09:06 Mugen87

📦 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

github-actions[bot] avatar Jun 30 '24 09:06 github-actions[bot]

/cc @brunosimon

sunag avatar Jun 30 '24 17:06 sunag