我正在尝试克隆 ThreeJS Object3D 模型。我在这里和 GitHub 上找到了各种代码,但没有什么对我有用。下面的代码部分来自How to clone an object3d in Three.js?
var loader = new THREE.ColladaLoader();
loader.load('../Model.dae', function (result) {
var loadedMesh = // No sure where this comes from
// Create X of these
for ( var i = 0; i < 10; i ++ ) {
var mesh = new THREE.Mesh( loadedMesh.geometry, loadedMesh.material );
mesh.position.set( i * 100, 0, 0 );
scene.add( mesh );
}
}
你能帮忙填空吗?