WebGL_0006:PlayCan替换材质和贴图的方法
作者:互联网
// 6 9 0 10 8 // this.body2.model.model.meshInstances[22].material.emissive = new pc.Color(255, 0, 0); // 替换材质 mod.body.model.model.meshInstances[6].material = mod.MB_Mat[0].resource; mod.body.model.model.meshInstances[9].material = mod.MB_Mat[1].resource; mod.body.model.model.meshInstances[0].material = mod.MB_Mat[2].resource; mod.body.model.model.meshInstances[10].material = mod.MB_Mat[3].resource; // 替换贴图 mod.MB_Mat[4].resource && (mod.MB_Mat[4].resource.diffuseMap = mod.MB_Tex[0].resource, mod.MB_Mat[4].resource.emissiveMap = mod.MB_Tex[0].resource, mod.MB_Mat[4].resource.update());
标签:贴图,0006,resource,Mat,MB,WebGL,material,model,mod 来源: https://www.cnblogs.com/eliteboy/p/12950615.html