-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Examples: Make dynamic instancing demo more interesting. #31058
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
Conversation
| // animate camera | ||
|
|
||
| camera.position.x = Math.sin( time / 4 ) * 10; | ||
| camera.position.z = Math.cos( time / 4 ) * 10; | ||
| camera.position.y = 8 + Math.cos( time / 2 ) * 2; | ||
|
|
||
| cameraTarget.x = Math.sin( time / 4 ) * - 8; | ||
| cameraTarget.z = Math.cos( time / 2 ) * - 8; | ||
|
|
||
| camera.lookAt( cameraTarget ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please stop the unnecessary spinning? Keep the camera still. The demo will look very nice without it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, the animation makes the demo more exciting. Besides, the previous version of the demo also had an animation. Instead of rotating the entire instanced mesh, the camera is now animated. I would prefer to keep the status quo. Not just because it looks better but also to honor the style of the example's reference from oosmoxiecode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take it that is a "No."
The demo is nauseating to me, so I will have to avoid it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's unfortunate. I do understand your point though and also from a pure functional point of view it's indeed better if examples are static since that makes it easier to compare different versions across releases and spot visual differences.
However, #30695 (comment) outlines why we need more visual appealing demos. And depending on the scene, motion can be a good tool to make 3D scenes more exciting. I feel that's true for webgl_instancing_dynamic.
Related issue: -
Description
The PR improves
webgl_instancing_dynamicby introducing a dynamic cube setup with animated colors.I have not implemented the animation in the shader via TSL on purpose since the demo should showcase the usage of
setMatrixAt()andsetColorAt().