使用 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 个不同的 canvas-obj
new THREE.Mesh(cuboidgeo, new THREE.MeshFaceMaterial(materials));
问题:
如何获取材质数组来更新这些纹理(例如更改 canvas-obj 的值)?我知道当我创建这样的网格时:
new THREE.Mesh(cubegeo, new THREE.MeshBasicMaterial({map: texture}));
我可以得到我的画布对象,如:
cubemeshobj.material.map.image
但是我从谁那里得到 THREE.MeshFaceMaterial 的纹理(材质数组)?