remainder
[DEPRECATED] A function node for calculating the remainder. Its functionality has been completely superseded by the more standard and correctly named `mod` node. Please use `mod` in all new code.
Core Advantages
Its primary value now is backward compatibility. It ensures that projects using this old node do not break immediately upon upgrading Three.js, and it explicitly guides developers to migrate to the modern `mod` node via console warnings.
Common Uses
Creating procedural tiled patterns (now achieved with `mod`)
Implementing periodic animations (now achieved with `mod`)
How to adjust
This node is deprecated and should no longer be adjusted. Its functionality is provided by the `mod` node. Adjusting the `mod` node's inputs controls repetition frequency: scaling the input value (e.g., `uv().mul(10)`) makes patterns denser, while adding time to the input creates a scrolling animation.
Code Examples
1// Deprecated: remainder( scaledUV.x, 1.0 );
2
3// Recommended: Use mod() to achieve the exact same effect
4const repeatingGradient = TSL.mod( scaledUV.x, 1.0 );