Export the bike and load it back
The viewport shows the copy that came back from the bytes, not the original.
GLTFExporter turns any three.js scene into a .glb or .gltf: names, positions, standard materials, textures, lights and userData survive. Custom shaders do not, and textures are re-encoded, which can make the file bigger.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 4 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Write a downloadGlb(object, name) function for your project that exports and downloads a .glb.
Export the tyre from the second example with a price in userData, load it back, and print the price from the loaded copy.
Explain it without notes
What happens to a mesh with a ShaderMaterial when you export it to glTF, and why?
Why did exporting the bike make its file bigger than the textures it was built from?
Console
Nothing logged yet.Expected console output
exported: 71000 bytes
loaded back: 5 meshes: down-tube, top-tube, seat-tube, rear-wheel, front-wheel
front-wheel position: 0.58, 0.35, 0.00 | materials shared: true