소스 검색

Update demos for duck.

Don McCurdy 8 년 전
부모
커밋
b21159859d
2개의 변경된 파일16개의 추가작업 그리고 14개의 파일을 삭제
  1. 0 8
      examples/webgl_loader_gltf.html
  2. 16 6
      examples/webgl_loader_gltf2.html

+ 0 - 8
examples/webgl_loader_gltf.html

@@ -381,14 +381,6 @@
 					addGround:true,
 					extensions: ["glTF", "glTF-MaterialsCommon", "glTF-Binary"]
 				},
-				{
-					name : "Duck", url : "./models/gltf/duck/%s/duck.gltf",
-					cameraPos: new THREE.Vector3(0, 3, 5),
-					addLights:true,
-					addGround:true,
-					shadows:true,
-					extensions: ["glTF", "glTF-MaterialsCommon", "glTF-Binary"]
-				},
 				{
 					name : "Cesium Man", url : "./models/gltf/CesiumMan/%s/Cesium_Man.gltf",
 					 cameraPos: new THREE.Vector3(0, 3, 10),

+ 16 - 6
examples/webgl_loader_gltf2.html

@@ -86,10 +86,12 @@
 		<div>
 			Extension
 			<select id="extensions_list" onchange="selectExtension();">
-				<option value="glTF">None</option>
-				<option value="glTF-MaterialsCommon">Built-in shaders</option>
-				<option value="glTF-pbrSpecularGlossiness">Specular-Glossiness</option>
-				<option value="glTF-Binary">Binary</option>
+				<option value="glTF">None (Default)</option>
+				<option value="glTF-Embedded">None (Embedded)</option>
+				<option value="glTF-Binary">None (Binary)</option>
+				<option value="glTF-MaterialsCommon">Common Materials</option>
+				<option value="glTF-pbrSpecularGlossiness">Specular-Glossiness (PBR)</option>
+				<option value="glTF-techniqueWebGL">GLSL</option>
 			</select>
 		</div>
 	</div>
@@ -285,7 +287,7 @@
 						for (i = 0; i < len; i++) {
 
 							var addCamera = true;
-							var cameraName = gltf.cameras[i].parent.name;
+							var cameraName = gltf.cameras[i].parent.name || ('camera_' + i);
 
 							if (sceneInfo.cameras && !(cameraName in sceneInfo.cameras)) {
 									addCamera = false;
@@ -413,6 +415,14 @@
 			}
 
 			var sceneList = [
+				{
+					name : 'Duck', url : './models/gltf/Duck/%s/duck.gltf',
+					cameraPos: new THREE.Vector3(0, 3, 5),
+					addLights:true,
+					addGround:true,
+					shadows:true,
+					extensions: ['glTF', 'glTF-Embedded', 'glTF-MaterialsCommon', 'glTF-pbrSpecularGlossiness', 'glTF-Binary', 'glTF-techniqueWebGL']
+				},
 				{
 					name : 'BoomBox (PBR)', url : './models/gltf/BoomBox/%s/BoomBox.gltf',
 					cameraPos: new THREE.Vector3(2, 1, 3),
@@ -428,7 +438,7 @@
 					addLights:true,
 					extensions: ['glTF'],
 					addEnvMap: true
-				}
+				},
 			];
 
 			function buildSceneList() {