Examples: Make dynamic instancing demo more interesting.#31058
Examples: Make dynamic instancing demo more interesting.#31058Mugen87 merged 1 commit intomrdoob:devfrom
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.
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.
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.
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.
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().