我无法在二十面体几何学的每个面上应用不同的材料。 这是我的code.below代码适用于boxgeometry。
var textureLoader = new THREE.TextureLoader();
var texture0 = textureLoader.load( 'google.png' );
...
var texture19 = textureLoader.load( 'google.png' );
var materials = [
new THREE.MeshBasicMaterial( { map: texture0 } ),
...
new THREE.MeshBasicMaterial( { map: texture19 } )
];
var faceMaterial = new THREE.MeshFaceMaterial( materials );
var globe = new THREE.IcosahedronGeometry(75,0);
var Ico = new THREE.Mesh(globe, faceMaterial);
Ico.rotation.z = 0.5;
scene.add(Ico);
还试图为每张脸设置材质索引而没有运气。见下面的代码。
var globe = new THREE.IcosahedronGeometry(75,0);
globe.materials =materials;
for( var i = 0; i < globe.faces.length; i ++ ) {
globe.faces[i].materialIndex = i;
}
var Ico = new THREE.Mesh(globe, globe.materials);
任何人都可以向我指出相关的例子或任何解决方案吗?
由于