.glTF File Loader Plugin
You can find the loader here here
This loader supports both glTF 1.0 and 2.0 and will use the correct loader based on the glTF version string.
<script src="babylon.js"></script><script src="babylon.glTFFileLoader.js"></script>
A _root_ node is added to hold all the glTF and glb models and model parts are stored as sub-meshes. This is so applications that save models using a right handed system will be loaded correctly into Babylon.js when you add to your create scene function
scene.useRightHandedSystem = true;
This also means that loadedMeshes will point to the added _root_ node and loadedMeshes will point to your first loaded mesh.
Version 2 Only
This loader supports only glTF 2.0 and will fail to load glTF 1.0.
<script src="babylon.js"></script><script src="babylon.glTF2FileLoader.js"></script>
See Skinning for details on how skinning is implementated in Babylon.js for glTF 2.0.
Version 1 Only
This loader supports only glTF 1.0 and will fail to load glTF 2.0.
<script src="babylon.js"></script><script src="babylon.glTF1FileLoader.js"></script>
Loading the Scene
Use one of the static function on the
SceneLoader to load a glTF asset.
See Load from any file type.
API (Version 2)
Properties and Methods
See the available properties and methods from the API documentation.
See the available extensions from the API documentation.
API (Version 1)
Set this property to false to disable incremental loading which delays the loader from calling the success callback until after loading the meshes and shaders. Textures always loads asynchronously. For example, the success callback can compute the bounding information of the loaded meshes when incremental loading is disabled. Defaults to true.
BABYLON.GLTFFileLoader.IncrementalLoading = false;
Set this property to true in order to work with homogeneous coordinates, available with some converters and exporters. Defaults to false.
BABYLON.GLTFFileLoader.HomogeneousCoordinates = true;