【发布时间】:2015-12-21 19:43:20
【问题描述】:
这是我的代码的 sn-p -
materialArray=[];
materialArray.push(new THREE.MeshBasicMaterial({map:frontCounterTexture}));
materialArray.push(new THREE.MeshBasicMaterial({map:frontCounterTexture}));
materialArray.push(new THREE.MeshBasicMaterial({map:frontCounterTexture}));
materialArray.push(new THREE.MeshBasicMaterial({map:blackTexture}));
materialArray.push(new THREE.MeshBasicMaterial({map:blackTexture}));
materialArray.push(new THREE.MeshBasicMaterial({map:blackTexture}));
frontCounterMaterial=new THREE.MultiMaterial(materialArray);
frontCounter.material=frontCounterMaterial;
使用编辑器 (threejs/editor) 可以正确渲染场景,但是导出不起作用。 当我执行以下操作时 -
frontCounter.toJSON()
我得到以下 -
Uncaught TypeError: Cannot read property 'textures' of undefined(…)
我追溯到-
THREE.Texture.toJSON:
if ( meta.textures[ this.uuid ] !== undefined ) {
return meta.textures[ this.uuid ];
}
我不明白如何解决这个问题,即导出一个应用了 MultiMaterial 的网格。有什么帮助吗?
【问题讨论】:
标签: three.js