dimanche 20 juin 2021

three js can't load fbx function error 'loader.setRequestHeader is not a function'

I'm trying to load my model in fbx format but getting error code below (obj loader and mtl loader is working without problem but only fbx loader gives error)

ERROR

Uncaught TypeError: loader.setRequestHeader is not a function
    at FBXLoader.load (FBXLoader.js:38)
    at init (earthie.js:444)
    at EarthF (earthie.js:413)
    at HTMLDocument.<anonymous> (earthie.js:45)
    at i (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at Function.ready (jquery.min.js:2)
    at HTMLDocument.J (jquery.min.js:2)

HTML SCRIPTS

    <script src="_3rdparty/three.js/DDSLoader.js"></script>
    <script src="_3rdparty/three.js/MTLLoader.js"></script>
    <script src="_3rdparty/three.js/OBJLoader.js"></script>
    <script src="_3rdparty/three.js/FBXLoader.js"></script>
    <script src="_3rdparty/three.js/Detector.js"></script>
    <script src="earthie.js"></script>

EARTHIE.JS

const loader = new THREE.FBXLoader();
        
            loader.load( '_models/devilskullson.fbx', function ( object ) {

                scene.add( object );

            } );


        



Aucun commentaire:

Enregistrer un commentaire