webarkit / jsartoolkitNFT

jsartolkitNFT is a smaller version of jsartoolkit5 with only NFT support
GNU Lesser General Public License v3.0
132 stars 25 forks source link

loading a gltf model failed #111

Open jamess922 opened 2 years ago

jamess922 commented 2 years ago

Hi I want to run the example ARToolkitNFT_ES6_example.html with a gltf model ,but not lucky i was failed ,here is the code i am use

var loader = new THREE.GLTFLoader();
  loader.load( './Flamingo.glb', function ( gltf ) {
    gltf.scene.rotation.x = 0.5*Math.PI;
    gltf.scene.position.z = 40;
    gltf.scene.position.x = 80;
    gltf.scene.position.y = 80;
    gltf.scene.scale.set(80,80,80);});      
    var root3 = new THREE.Object3D();
        scene.add(root3);
        root3.matrixAutoUpdate = false;
        root3.add(gltf);

of course i have the GLTFLoader.js So please help me

kalwalt commented 2 years ago

What do you mean exactly? What Is failing?

jamess922 commented 2 years ago

I don't know if the code is right,just nothing show up , i can't see the model

jamess922 commented 2 years ago

Is there any ARToolkitNFT_ES6 gltf example?

kalwalt commented 2 years ago

@jamess922 try updating three.min.js and GLTFLoader.js to a newer version, maybe that was the issue.