|
@@ -3,6 +3,8 @@
|
|
|
# Usage
|
|
|
The glTF file loader is a SceneLoader plugin.
|
|
|
|
|
|
+[glTF2 Playground example](http://www.babylonjs-playground.com/#6MZV8R)
|
|
|
+
|
|
|
## Step 1 - Include the glTF File Loader
|
|
|
|
|
|
**Full Version**
|
|
@@ -47,6 +49,19 @@ BABYLON.SceneLoader.ImportMesh(["myMesh1", "myMesh2", "..."], "./", "duck.gltf",
|
|
|
});
|
|
|
```
|
|
|
|
|
|
+You can also append a glTF file to a scene. When using `SceneLoader.Append`, configure the scene to use right handed system by setting the property `useRightHandedSystem` to true.
|
|
|
+
|
|
|
+```
|
|
|
+// glTF Files use right handed system
|
|
|
+scene.useRightHandedSystem = true;
|
|
|
+
|
|
|
+// Append sample glTF model to scene
|
|
|
+BABYLON.SceneLoader.Append("https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/BoomBox/glTF/", "BoomBox.gltf", scene, function (scene) {
|
|
|
+}, null, function (scene) {
|
|
|
+ alert("error");
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
## Step 3 (V1 Only) - Optionally Specify Flags
|
|
|
|
|
|
If you want to disable incremental loading, you can set the property `IncrementalLoading` to false.
|