فهرست منبع

Merge pull request #2149 from sbtron/patch-1

add append example and playground link
David Catuhe 8 سال پیش
والد
کامیت
33c22acebd
1فایلهای تغییر یافته به همراه15 افزوده شده و 0 حذف شده
  1. 15 0
      loaders/src/glTF/README.md

+ 15 - 0
loaders/src/glTF/README.md

@@ -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.