Clear and Clean use of Draco

Hi there,
I am using Three r124, tried to find a tutorial for using Draco but I couldn’t since almost all the links are 404 now. My gltfLoader is able to load animated from Blender as:

            model = gltfObject.load ( 'myRunningDog.gltf',
                    function (gltf)
                        {
                        gltf.scene.scale.set ( scale , scale , scale );
                        gltf.scene.name = name;
                        gltf.scene.visible = visibleAtLoad;
                        gltf.scene.children[0].traverse(n => { if ( n.isMesh ) {
                            n.castShadow = true;
                            n.receiveShadow = true;
                            if (n.material.map) n.material.map.anisotropy = 1;
                          }});
                        WebScene.add ( gltf.scene );
                        myMixer = new THREE.AnimationMixer(gltf.scene);
                        gltf.animations.forEach( ( clip ) =>
                            {
                            myMixer.clipAction( clip ).play();
                            });
                        }
                        );           

Now I have done the compression of my Blender asset, and have tried Draco from v1.4.0 to 1.5.4 to see which version works, but I get:
“Three is not defined” at “THREE.DRACOLoader = function ( manager ) {”
in DRACOLoader.js

  • I have added Draco as:
<script src="./jsm/loaders/DRACOLoader.js"></script>

The newest version of Draco as throws error too as module says:
LinearSRGBColorSpace is missing in Three
I am wondering if somebody out there can provide me a working path to get this done?
Thanks,

this one is still up :smiley: although it is r153 or something

1 Like