使用r54:
立方体,每边都有不同的纹理。
var materials = [new THREE.MeshBasicMaterial({map: textureSmallSide}),
new THREE.MeshBasicMaterial({map: textureSmallSide}),
new THREE.MeshBasicMaterial({map: textureSmallSide}),
new THREE.MeshBasicMaterial({map: textureSmallSide}),
new THREE.MeshBasicMaterial({map: texture}),
new THREE.MeshBasicMaterial({map: texture})];
所以在这种情况下6个不同的画布-obj
new THREE.Mesh(cuboidgeo, new THREE.MeshFaceMaterial(materials));
问题:new THREE.Mesh(cubegeo, new THREE.MeshBasicMaterial({map: texture}));
我可以得到我的画布对象:
cubemeshobj.material.map.image
但是我从谁那里得到THREE.MeshFaceMaterial的纹理(材质数组)?
答案 0 :(得分:1)
在控制台中检查您的对象。现在你有了一系列材料
for(var i = 0; i < cubemeshobj.material.materials.length; i++){
cubemeshobj.material.materials[i].map.image;
}
R56