-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3D Tiles - ternary functions #4694
Comments
@lilleyse |
Also, here's something else:
Applying left, right, and test to them using a data driven approach doesn't make sense, since I'm assuming
and to use a data driven approach, I would write something like
and so the definitions of the functions, specifically, the ordering of the arguments, doesn't quite work out |
You can do it in this PR
We tend to side with the glsl naming, so go with
Yeah true... I'd be ok if the 1st and 2nd params go to left and right while the 3rd goes to test, regardless of the meaning of the parameters. |
@lilleyse |
@lilleyse OK to close this? |
@Dylan-Brown
Before getting into vector math, there are two more functions to handle. You'll need to add
TERNARY
toExpressionNodeType.js
. Handling three operators will be similar to here: #4688 except you'll useleft
,right
, andtest
. Thex
values below can be passed as thetest
argument fornew Node
.clamp(x, minVal, maxVal) - use
CesiumMath.clamp
mix(minVal, maxVal, x) - use
CesiumMath.lerp
Even though this is just two functions, use the data-driven approach like before so it is easy to add others.
The text was updated successfully, but these errors were encountered: