Я хочу поместить текстуру в мой файл obj, но я получаю сообщение об ошибке.
Это мой код:
new THREE.MTLLoader()
.setPath( 'models/cool' )
.load( 'CobbleStones.mtl', function ( mat ) {
mat.preload();
var loader = new THREE.OBJLoader( loadingManager );
loader.load( 'models/cool.obj', function ( object ) {
object.traverse( function ( child ) {
if ( child instanceof THREE.Mesh ) {
child.material = gemBackMaterial;
child.material = material;
loader.setMaterials(mat);
var second = child.clone();
second.material = gemFrontMaterial;
var parent = new THREE.Group();
parent.add( second );
parent.add( child );
scene.add( parent );
objects.push( parent );
}
} );
} );
});
Сообщение об ошибке:
GET http://localhost/alpha/Alpha/models/coolCobbleStones.mtl 404 (Not Found)
Я был бы очень благодарен, если бы кто-нибудь мог помочь мне с моей проблемой.