我已经导入了一个 JSON 模型,导入了几何和材质。
loader = new THREE.JSONLoader();
loader.load( "alisopoli/alisopoli.js", function( geometry, materials ) {
for ( var i = 0; i < materials.length; i ++ ) {
materials[ i ].side = THREE.DoubleSide;
materials[ i ].alphaTest = 0.75;
materials[ i ].overdraw = true;
}
mesh = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial( materials ) );
mesh.overdraw = true;
scene.add( mesh );
} );
该模型有很多材质(超过 30 种),我需要在它们的每个纹理中添加“THREE.nearestFilter”。有可能做这样的事情吗?
loader.load( "model.js", function( geometry, materials ) {
var modelMaterials = new THREE.MeshFaceMaterial( materials );
var modelTextures = modelMaterials.map
moderTextures.minFilter = THREE.nearestFilter;
mesh = new THREE.Mesh( geometry, modelMaterials );
scene.add( mesh );
} );
我想编辑模型每个纹理的“minFilter”和“magFilter”(如果可能,所有渲染场景)。提前致谢!