Forge Viewer THREE.MeshLambertMaterial

2019-03-03 08:09发布

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条回答
Ridiculous、
2楼-- · 2019-03-03 08:42

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.

enter image description here

查看更多
登录 后发表回答