Browse Source

Merge pull request #11485 from donmccurdy/feat-gltf2-common-materials

[glTF] Implement glTF2.0 common materials, clean up loadMaterials().
Mr.doob 8 years ago
parent
commit
28ba5ed117

+ 8 - 11
docs/examples/loaders/GLTF2Loader.html

@@ -14,13 +14,12 @@
 		<div class="desc">
 		<div class="desc">
 		A loader for *glTF* 2.0 resources.
 		A loader for *glTF* 2.0 resources.
 		<br /><br />
 		<br /><br />
-		<a href="https://www.khronos.org/gltf">glTF</a> (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
-		<a href="https://github.com/KhronosGroup/glTF/tree/master/specification">glTF specification</a>.
+		<a href="https://www.khronos.org/gltf">glTF</a> (GL Transmission Format) is an
+		<a href="https://github.com/KhronosGroup/glTF/tree/master/specification/2.0">open format specification</a>
+		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, morph targets, animations, lights, and/or cameras.
 		</div>
 		</div>
 
 
 		<h2>Extensions</h2>
 		<h2>Extensions</h2>
@@ -31,9 +30,7 @@
 
 
 		<ul>
 		<ul>
 			<li>
 			<li>
-				<a target="_blank" href="https://github.com/KhronosGroup/glTF/blob/master/extensions/Khronos/KHR_binary_glTF">
-					KHR_binary_glTF
-				</a>
+				KHR_lights
 			</li>
 			</li>
 			<li>
 			<li>
 				<a target="_blank" href="https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_materials_common">
 				<a target="_blank" href="https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_materials_common">
@@ -41,7 +38,7 @@
 				</a>
 				</a>
 			</li>
 			</li>
 			<li>
 			<li>
-				<a target="_blank" href="https://github.com/KhronosGroup/glTF/tree/2.0/extensions/Khronos/KHR_materials_pbrSpecularGlossiness">
+				<a target="_blank" href="https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_materials_pbrSpecularGlossiness">
 					KHR_materials_pbrSpecularGlossiness
 					KHR_materials_pbrSpecularGlossiness
 				</a>
 				</a>
 			</li>
 			</li>

File diff suppressed because it is too large
+ 475 - 470
examples/js/loaders/GLTF2Loader.js


BIN
examples/models/gltf/Duck/glTF-MaterialsCommon/Duck.bin


File diff suppressed because it is too large
+ 168 - 222
examples/models/gltf/Duck/glTF-MaterialsCommon/Duck.gltf


BIN
examples/models/gltf/Duck/glTF-MaterialsCommon/Duck0.bin


BIN
examples/models/gltf/Duck/glTF-MaterialsCommon/DuckCM.png


+ 2 - 2
examples/webgl_loader_gltf2.html

@@ -437,8 +437,8 @@
 					addLights:true,
 					addLights:true,
 					addGround:true,
 					addGround:true,
 					shadows:true,
 					shadows:true,
-					// TODO: 'glTF-MaterialsCommon', 'glTF-techniqueWebGL'
-					extensions: ['glTF', 'glTF-Embedded', 'glTF-pbrSpecularGlossiness', 'glTF-Binary']
+					// TODO: 'glTF-techniqueWebGL'
+					extensions: ['glTF', 'glTF-Embedded', 'glTF-MaterialsCommon', 'glTF-pbrSpecularGlossiness', 'glTF-Binary']
 				},
 				},
 				{
 				{
 					name : "Monster", url : "./models/gltf/Monster/%s/Monster.gltf",
 					name : "Monster", url : "./models/gltf/Monster/%s/Monster.gltf",

Some files were not shown because too many files changed in this diff