threejs移除对象

this.removeCube = function(){
             var allChildren = scene.children;
             var lastObject = allChildren[allChildren.length-1];
             if(lastObject instanceof THREE.Mesh){
                 scene.remove(lastObject);
                 this.numberOfObjects = scene.children.length;
		}
	}

你可能感兴趣的:(threejs)