I’m trying to use DRACOLoader- Even though’ll admit I’m only loading one simple GLB model.
I’m using Stats to spot a difference and there’s not much to be seen. A ms or two but it’s well within statisticals for false/positives and negatives/postives (I’m talking ± 2 ms).
[...]
var dracoLoader = new DRACOLoader();
// (symbolic link:
// ./js/draco -> ../../../../usr/share/nodejs/node_modules/three/examples/jsm/libs/draco/
// should I setDecoderPath like this:
dracoLoader.setDecoderPath('./js/draco/');
or this:
dracoLoader.setDecoderPath('./js/draco/gltf/');
var loader = new GLTFLoader();
setDRACOLoader(dracoLoader);
dracoLoader.preload();
model = new THREE.Object3D();
loader.load(
'./obj/molecules/heroin/5462328-sticks-color-vis.glb',
(gltf) => {
model = gltf.scene;
model = 'model';
model.traverse(
(child) => {
child.layers.enable(1);
if(child instanceof THREE.Mesh) {
child.castShadow = true;
child.receiveShadow= true;
}
}
);
[...]
Are there more recent decoders online, am I linking yo the wrong decoder lib?
Or will it first matter when loading several objects?
I'm not complaining about the time mind. 30 ms is well within my tolerance, but I like to preemptively optimize. Zo....
I've read that LoadingManager will help too. Is it worth the trouble yet?