目前(2017 年 12 月)ImageUtils.loadTexture、MeshFaceMaterial 和 CubeGeometry 不再使用(已弃用)。https://threejs.org/docs/#api/deprecated/DeprecatedList
这样做的新方法是:
var geometry = new THREE.BoxGeometry( 10, 10, 10);
var material = [
new THREE.MeshBasicMaterial( { map: new THREE.TextureLoader().load( 'image1.jpg' ) } ),
new THREE.MeshBasicMaterial( { map: new THREE.TextureLoader().load( 'image2.jpg' ) } ),
new THREE.MeshBasicMaterial( { map: new THREE.TextureLoader().load( 'image3.jpg' ) } ),
new THREE.MeshBasicMaterial( { map: new THREE.TextureLoader().load( 'image4.jpg' ) } ),
new THREE.MeshBasicMaterial( { map: new THREE.TextureLoader().load( 'image5.jpg' ) } ),
new THREE.MeshBasicMaterial( { map: new THREE.TextureLoader().load( 'image6.jpg' ) } )
];
var mesh = new THREE.Mesh( geometry, material );
这是解释该过程的优秀简短教程的链接:
https ://www.youtube.com/watch?v=l77yAZ0E950