所以我想要做的是
scene.forEachMeshInScene(function(mesh){
//And here I can do stuff
});
但是可悲的是,这并不存在。我该怎么做?
您可以使用以下模式来迭代图形中的Mesh
对象scene
:
scene.traverse( function( node ) {
if ( node instanceof THREE.Mesh ) {
// insert your code here, for example:
node.material = new THREE.MeshNormalMaterial()
}
} );
three.js r.69
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句