Threejs .glb loading textures issue, texures not loaded

23 Views Asked by At

I am new to the three.js world. I created a 3d model with this AI https://lumalabs.ai/genie and exported in .gbl format. This file extension should contains also textures and shaders informations. The model is loaded, the scene is rendered and all the camera and light works. But the textures are gone. The error is: "GLTFLoader.js:2618 THREE.GLTFLoader: Couldn't load texture blob:...".

Can someone please help me finding some error in my code or providing a example working code?

This is the .glb: https://drive.google.com/file/d/19zU9MonEgyMTF18UbVAUH9yDgA6-RVhr/view?usp=sharing

This is the code I use:

window.createImageBitmap = undefined;
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(10, 1, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ alpha: true });
renderer.setSize(300, 300);
renderer.setClearColor(0x000000, 0);
document.getElementById('myID').appendChild(renderer.domElement);

const light = new THREE.DirectionalLight(0x00ff00, 1);
light.position.set(-1, -1, 1);
scene.add(light);

const mtlLoader = new THREE.GLTFLoader();

mtlLoader.load(
    'assets/3d/model/fielname.glb',
    function (gltf) {
        const model = gltf;
        scene.add(model.scene);

        [...]
0

There are 0 best solutions below