Hi, I animate a cone (positions xyz, rotations xyz and scale xyz).
For now I create 4 meshes (external-cyan, base-white, internal-left-red, internal-right-texture) and animate them separately.
geometry.setAttribute(‘position’, new THREE.BufferAttribute( positions, 3));
It works, but now I would like to group these 4 meshes in one only object and animate the whole object in one shot e.g.
cone.rotation.x = rotX;
Can I merge the meshes in one and keep different materials on each single mesh (external, base, internal left and internal right)?
Furthermore I have to animate the cone angle and get geometries like the one here attached. This means that the “external” mesh geometry changes and the “base” mesh geometry changes too.
I guess I can use the vbo draw range method
But If I merge the geometries in one only mesh, does it still work? Should I change the start/count index with a mere sum? How to animate the two surfaces (external and base) at the same time?
Thank you!
That’s a great improvement. Now I know how to group meshes.
I’m still asking myself how to animate the angle phiLength along the time. Let’s say I have a vector phiLengths[frame] and I get the single value phiLength a the frame x in the animate function.
How to animate the geometries g, cg and eg within the mesh o?
I think about something like
Should I re-build the geometry at any frame, which means 60 times per second?
I think this would slow down the rendering performance.
On my OpenGL application I just glDrawRangeElements of the VBO from-to index to draw just the geometry I need on that frame but the whole geometry stays stuck. So at any frame I just set a new “from-to” indexes. That’s really fast.
Is a way to archive this on Three.js?
I saw a similar approach with