Steps
Compress GLB File to Draco Compressed Format Using optimizeglb.com
View Compressed Draco Files at 3dpea.com
Add Relevant Code to ThreeJS
import { GLTFLoader } from 'https://cdn.skypack.dev/three@0.136.0/examples/jsm/loaders/GLTFLoader.js';
import { DRACOLoader } from 'https://cdn.skypack.dev/three@0.136.0/examples/jsm/loaders/DRACOLoader.js';
const draco = new DRACOLoader();
draco.setDecoderPath('https://www.gstatic.com/draco/v1/decoders/');
const loader = new GLTFLoader(); // ADD DracoLoader to your Existing Loader
loader.setDRACOLoader(draco);
Replace Your Current 3D GLB File with Compressed Draco Format
Enjoy 90% Less in terms of The 3D File Size.
Top comments (0)