Last active: 2 years ago
Load gLTF model with draco compressed
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader';
import { GLTF, GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
const manager = new THREE.LoadingManager();
const gltfLoader = new GLTFLoader(manager);
const dracoLoader = new DRACOLoader();
dracoLoader.setDecoderPath('./libs/draco/');
dracoLoader.setDecoderConfig({ type: 'wasm' });
gltfLoader.setDRACOLoader(dracoLoader);
gltfLoader.load('./models/just_a_hungry_cat/scene.gltf', handleLoad);