luaacro b3cca4b911 Fixed IGLTFMesh interface to specifications 1.0 10 лет назад
..
README.md b3cca4b911 Fixed IGLTFMesh interface to specifications 1.0 10 лет назад
babylon.glTFFileLoader.js b3cca4b911 Fixed IGLTFMesh interface to specifications 1.0 10 лет назад
babylon.glTFFileLoader.ts b3cca4b911 Fixed IGLTFMesh interface to specifications 1.0 10 лет назад
babylon.glTFFileLoaderInterfaces.js 1ea40ffb9b Adding glTF file loader 10 лет назад
babylon.glTFFileLoaderInterfaces.ts b3cca4b911 Fixed IGLTFMesh interface to specifications 1.0 10 лет назад

README.md

Babylon.js glTF File Loader

Usage

The glTF file loader is a SceneLoader plugin. Just reference the loader in your HTML file:

<script src="babylon.2.2.js"></script>
<script src="babylon.glTFFileLoader.js"></script>

And then, call the scene loader:

BABYLON.SceneLoader.Load("./", "duck.gltf", engine, function (scene) { 
   // do somethings with the scene
});

You can also call the ImportMesh function and import specific meshes

// meshesNames can be set to "null" to load all meshes and skeletons
BABYLON.SceneLoader.ImportMesh(["myMesh1", "myMesh2", "..."], "./", "duck.gltf", scene, function (meshes, particleSystems, skeletons) { 
   // do somethings with the meshes, particleSystems (not handled in glTF files) and skeletons
});

Supported features

  • Load scenes (SceneLoader.Load and SceneLoader.Append)
  • Support of ImportMesh function
  • Import geometries
    • From binary files
    • From base64 buffers
  • Import lights
  • Import cameras
  • Import and set custom shaders (if no shaders, the Babylon.js default material is applied)
    • Automatically bind attributes
    • Automatically bind matrices
    • Set uniforms
  • Import and set animations
  • Skinning
    • Skeletons
    • Hardware skinning (shaders support)
    • Bones import
  • Handle dummy nodes (empty nodes)

To improve

  • Test on more models