lessThanEqual
Performs a 'less than or equal to' (<=) comparison, a precise node for conditional logic and range checks that must include the boundary value.
Core Advantages
Provides the most intuitive and efficient way to perform precise, inclusive boundary comparisons. It avoids the complexity of combining multiple nodes to handle critical values, ensuring logical correctness in scenarios like the last frame of an animation or the end of a range.
Common Uses
Creating inclusive range masks, such as checking if a value falls within a `[min, max]` interval.
Building progress bars or fill effects, ensuring they are completely full when reaching 100%.
Precisely triggering or locking an animation state at or after a specific moment in time.
Reliably capturing boundary conditions in procedural geometry, avoiding failures due to floating-point inaccuracies.
How to adjust
Adjust its threshold input (B), like the `progress` value in a progress bar. Dynamically changing `progress` controls the height of the filled area. Using `lessThanEqual` ensures that when the bar is full (`progress`=1.0), the very top row of pixels (`uv.y`=1.0) is correctly filled, preventing visual artifacts.
Code Examples
1// progress is a uniform value from 0 to 1
2// The area is filled where the pixel's Y coordinate is less than or equal to the progress
3const isFilled = uv().y.lessThanEqual(progress);