August 2018
Intermediate to advanced
528 pages
10h 58m
English
Loading a model from a COLLADA file works in the same manner as for the other formats. First, you have to include the correct loader JavaScript file:
<script type="text/javascript" src="../libs/ColladaLoader.js"></script>
While the normal COLLADA models aren't compressed (and they can get quite large) there is also a KMZLoader available in Three.js. This is basically a compressed COLLADA model, so if you run into Keyhole Markup language Zipped (KMZ) models, you can follow the steps here, and use the KMZLoader instead of the ColladaLoader.
Now we create a loader and use it to load the model file:
var loader = new THREE.ColladaLoader(); loader.load('../../assets/models/monster/monster.dae', function ...Read now
Unlock full access