Forge Viewer THREE.MeshLambertMaterial [英] Forge Viewer THREE.MeshLambertMaterial
问题描述
var material = NEW THREE.MeshLambertMaterial
上可用的属性之一是纹理贴图:{( map: new THREE.TextureLoader().load('wool.jpg'))}
我们很好奇是否可以通过这种方式加载纹理并将其应用于模型中的特定对象?
是的,但是您在 Forge Viewer 中修改材料的方式与您在 Three.js 中所做的有点不同.
我有一个广泛的示例来说明如何修改材质,包括此处的自定义纹理:
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?
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:
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.
这篇关于Forge Viewer THREE.MeshLambertMaterial的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!