[animation] Geometries merged with animation
See original GitHub issueDue to the big amount of geometries that are in my scene, I tried to use the geometry-merger component (https://github.com/supermedium/superframe/tree/master/components/geometry-merger). The problem appears when I want to add animation to a geometry that has been merged, this an example, I want to add a rotation animation for the cylinder but it does not work:
<a-scene environment="preset: forest" cursor="rayOrigin: mouse" raycaster="objects: [geometry]">
<a-entity geometry-merger="preserveOriginal: true" material="vertexColors: face" merged-hover-highlight>
<a-entity geometry="primitive: box; buffer: false" material="visible: false" face-colors="color: red" position="-2 0.75 -3"></a-entity>
<a-entity geometry="primitive: sphere; buffer: false" material="visible: false" face-colors="color: blue" position="0 0.75 -3"></a-entity>
<a-entity geometry="primitive: cylinder; buffer: false" material="visible: false" face-colors="color: green"
animation="property: rotation; to: 360 360 0; loop: true; dur: 10000"
position="2 0.75 -3" scale="0.5 0.5 0.5"></a-entity>
</a-entity>
</a-scene>
Is there a specific way to add animation to a geometry that has been merged?. It is really important to me to have the functionality of merging geometries.
Btw, I see that at some point the “geometry merge” functionality was added to A-Frame, but I don’t know where it is in the current version or how to use it (https://github.com/aframevr/aframe/issues/1160), so I decided to use the Superframe one.
Description:
- A-Frame Version: 1.0.4
- Platform / Device: doesn’t matter
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
For usage support best is to open a question on https://stackoverflow.com/questions/tagged/aframe
Nice folks there to help.
Merging geometries, and animating those geometries independently, are mutually exclusive.
I could imagine a similar feature being built with instancing instead of merging (
geometry-instancer
?) based on THREE.InstancedMesh, but at the moment I’m not aware of such a component.