将纹理更改为glb文件

时间:2019-10-17 08:56:04

标签: three.js

我试图更改包含有许多对象(网格)的地图的glb文件中的纹理。纹理已更改,但是在加载纹理之前几秒钟,纹理的一部分显示为黑色,然后加载良好。 由于glb很大,因此似乎是加载问题。  glb文件的大小为20MB,即时替换的纹理为1.8MB。如何消除这种影响。

const texture = new TextureLoader().load(this.config.service.baseURL + '/' +this.config.projectCurrent.path + '/' + immagine)

const plane = this.terrainDef.scene.getObjectByName(this.config.projectCurrent.mapLayer.object)

plane.material = new MeshLambertMaterial({map: texture})

0 个答案:

没有答案