不管我用的是哪种搅拌器;我选择并导出了其他Blender文件,无论设置如何,它们都会产生这种效果。
下面是我用来放置对象和材质的代码。
var loader = new THREE.ObjectLoader();
loader.load("../js/lights.json", function(object) {
var material = new THREE.MeshToonMaterial( { color: 0x3f3f3f, alphaTest: 0.5 } );
object.traverse( function ( child ) {
if ( child instanceof THREE.Mesh ) {
child.material = material;
child.drawMode = THREE.TrianglesDrawMode;
};
});
object.scale.set(3, 3, 3);
object.position.x = 1;
object.position.y = 1;
object.position.z = 1;
object.rotation.set( 25, 25, 25 );
scene.add( object );
}
);
var loader = new THREE.ObjectLoader();
loader.load("../js/lights.json", function(object) {
var material = new THREE.MeshBasicMaterial( { color: 0x333333 } );
object.traverse( function ( child ) {
if ( child instanceof THREE.Mesh ) {
child.material = material;
child.geometry.computeFaceNormals();
child.material.overdraw = 0.5
};
});
object.scale.set(3, 3, 3);
object.position.x = 1;
object.position.y = 1;
object.position.z = 1;
object.rotation.set( 25, 25, 25 );
scene.add( object );
}
);