mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
13 lines
480 B
TypeScript
13 lines
480 B
TypeScript
import { THREE } from 'rua-three';
|
|
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader';
|
|
import { 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);
|
|
|
|
export { manager, gltfLoader, dracoLoader };
|