伪造查看器THREE.MeshLambertMaterial [英] Forge Viewer THREE.MeshLambertMaterial
问题描述
var material = NEW THREE.MeshLambertMaterial
上可用的属性之一是纹理贴图:{( map: new THREE.TextureLoader().load('wool.jpg') )}
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?
推荐答案
是的,但是在Forge Viewer中修改材质的方式与在Three.js中进行的方式有些不同.
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.
这篇关于伪造查看器THREE.MeshLambertMaterial的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!