0👍
You could use .traverse
or .traverseVisible
making sure that the object is a Mesh.
renderer.onBeforeRender(() => {
box.traverse((obj3D) => {
if (obj3D instanceof Mesh) {
// Make sure this object is a mesh.
obj3D.rotation.x += 0.01;
}
})
});
Callback would be invoked in the current object (box
in this case) and all its descendants.
https://threejs.org/docs/index.html?q=object#api/en/core/Object3D.traverse
- [Vuejs]-Cannot change anything in chart options
- [Vuejs]-How do I make a Vuejs value display in my html?
Source:stackexchange.com