Forge Viewer THREE.MeshLambertMaterial

半世苍凉 提交于 2019-12-20 06:00:17

问题


One of the properties available on the var material = NEW THREE.MeshLambertMaterial is texture maps: {( map: new THREE.TextureLoader().load('wool.jpg') )}

We're very curious whether it would be possible to load in a texture this way and apply it to a specific object in the model?


回答1:


Yes, but the way you modify materials in the Forge Viewer is a little bit different than what you would do in Three.js.

I have an extensive sample that illustrates how to modify materials, including custom textures here:

Viewing.Extension.Material

The live demo is there. To use it, load a model first with "Model Loader" +, then activate either "Theming color", "Material color" or "Texture" and pick a component of the loaded model. You can click in the square in each option to change color/texture.



来源:https://stackoverflow.com/questions/49094558/forge-viewer-three-meshlambertmaterial

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