diff --git a/docs/examples/loaders/GLTFLoader.html b/docs/examples/loaders/GLTF2Loader.html similarity index 69% rename from docs/examples/loaders/GLTFLoader.html rename to docs/examples/loaders/GLTF2Loader.html index af8bb3e142424722555a2f56ada6f2675b1c6b8e..54b1fd913e33ffd4c36f9b9208f3fc1cd0d784c3 100644 --- a/docs/examples/loaders/GLTFLoader.html +++ b/docs/examples/loaders/GLTF2Loader.html @@ -12,22 +12,41 @@

[name]

- A loader for loading a *gltf* resource in JSON format. + A loader for *glTF* 2.0 resources.

- The glTF file format is a JSON file format to enable rapid delivery and loading of 3D content. + glTF (GL Transmission Format) is an open format + specification for efficient delivery and loading of 3D content. Assets may be provided either + in JSON (.gltf) or binary (.glb) format. External files store textures (.jpg, .png, ...) and + additional binary data (.bin). A glTF asset may deliver one or more scenes, including meshes, + materials, textures, shaders, skins, skeletons, animations, lights, and/or cameras. Morph target + animations are not yet finalized in the + glTF specification.
-

Notes

+

Extensions

- When using custom shaders provided within a glTF file [page:THREE.GLTFLoader.Shaders] should be updated on each render loop. See [example:webgl_loader_gltf] demo source code for example usage. + GLTF2Loader supports the following glTF extensions:
+ +

Example

// Instantiate a loader - var loader = new THREE.GLTFLoader(); + var loader = new THREE.GLTF2Loader(); // Load a glTF resource loader.load( 'models/gltf/duck/duck.gltf', function ( gltf ) { @@ -40,7 +59,7 @@ } ); - [example:webgl_loader_gltf] + [example:webgl_loader_gltf2]

Constructor

@@ -88,11 +107,11 @@ [page:String path] — The base path from which to find subsequent glTF resources such as textures, GLSL shaders and .bin data files.
- Parse a glTF-based JSON structure and fire [page:Function callback] when complete. The argument to [page:Function callback] will be an [page:object] that contains loaded parts: .[page:Scene scene], .[page:Array cameras], .[page:Array animations] and .[page:Array shaders] + Parse a glTF-based JSON structure and fire [page:Function callback] when complete. The argument to [page:Function callback] will be an [page:object] that contains loaded parts: .[page:Scene scene], .[page:Array scenes], .[page:Array cameras], and .[page:Array animations].

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/GLTFLoader.js examples/js/loaders/GLTFLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/GLTF2Loader.js examples/js/loaders/GLTF2Loader.js] diff --git a/docs/list.js b/docs/list.js index 765c52b9645874115a2ed0f5c3856f6cea5d1ea5..5ba0f6e45527fb8fc4f8484d3c1e15b4464c8fe7 100644 --- a/docs/list.js +++ b/docs/list.js @@ -340,7 +340,7 @@ var list = { "Loaders": [ [ "BabylonLoader", "examples/loaders/BabylonLoader" ], [ "ColladaLoader", "examples/loaders/ColladaLoader" ], - [ "GLTFLoader", "examples/loaders/GLTFLoader" ], + [ "GLTF2Loader", "examples/loaders/GLTF2Loader" ], [ "MTLLoader", "examples/loaders/MTLLoader" ], [ "OBJLoader", "examples/loaders/OBJLoader" ], [ "PCDLoader", "examples/loaders/PCDLoader" ], diff --git a/examples/files.js b/examples/files.js index eb3ee71f068a56f61cbeacb408101cb1c5ed72ab..4e16c55c281c630f74cbdd5307fdbfaa5896c6d5 100644 --- a/examples/files.js +++ b/examples/files.js @@ -89,6 +89,7 @@ var files = { "webgl_loader_ctm_materials", "webgl_loader_fbx", "webgl_loader_gltf", + "webgl_loader_gltf2", "webgl_loader_json_blender", "webgl_loader_json_claraio", "webgl_loader_json_objconverter", diff --git a/examples/webgl_loader_gltf.html b/examples/webgl_loader_gltf.html index 8718ca5f4492e622293a8c42f3fbf4d517feb6de..a5743a46c32677f741f601fe37ba272cacaf50d2 100644 --- a/examples/webgl_loader_gltf.html +++ b/examples/webgl_loader_gltf.html @@ -1,7 +1,7 @@ - three.js webgl - glTF + three.js webgl - glTF 1.0 + + + +
+ three.js - + glTF 2.0 loader +
+ BoomBox by Microsoft +
+
+
+
Loading...
+
+
+ Model + +
+
+ Camera + +
+
+ Animations + Play +
+
+ Extension + +
+
+ + + + + + + +