伪造查看器THREE.MeshLambertMaterial [英] Forge Viewer THREE.MeshLambertMaterial

查看:120
本文介绍了伪造查看器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:

查看.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.

这篇关于伪造查看器THREE.MeshLambertMaterial的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆