What is the status on Multiple Materials?

自古美人都是妖i 提交于 2019-12-01 12:06:23

To apply multiple materials to an object, you are now able to assign them just as an array to the material property.

mesh.material = [material1, material2, material3];

See Migration Guide (r84 → r85):

MultiMaterial has been removed. Use an Array instead.

The faceVertexUvs is a multidimensional array, where the first index represents the material index.

geometry.faceVertexUvs[ materialIndex ][ faceIndex ][ vertexIndex ]

(Reference: three.js - geometry.faceVertexUvs[0][0][index] is not the same as geometry.vertices[index])

The Three.js Docs could be indeed a bit better in both cases.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!