importing_and_optimizing
Introduction 00:00
In the previous lessons, we created and exported our scene.
We can now import it into Three.js, but we will also make sure to optimize our model as best as we possibly can.
Setup 00:12
Currently, all we have in our scene is a white cube.
The loaders have already been added to the code, and Draco is already supported:
/**
* Loaders
*/
// Texture loader
const textureLoader = new THREE.TextureLoader()
// Draco loader
const dracoLoader = new DRACOLoader()
dracoLoader.setDecoderPath('draco/')
// GLTF loader
const gltfLoader = new GLTFLoader()
gltfLoader.setDRACOLoader(dracoLoader)
The portal.glb