فهرست منبع

Simplified scene example.

Now we can finally mess with car materials directly in the scene file.
alteredq 13 سال پیش
والد
کامیت
d97ce0ddd3
2فایلهای تغییر یافته به همراه6 افزوده شده و 12 حذف شده
  1. 6 1
      examples/scenes/test_scene.js
  2. 0 11
      examples/webgl_loader_scene.html

+ 6 - 1
examples/scenes/test_scene.js

@@ -145,7 +145,7 @@
 
 		"veyron" : {
 			"geometry" : "veyron",
-			"material" : "face",
+			"material" : "multi_veyron",
 			"position" : [ 40, -1, 0 ],
 			"rotation" : [ 0, 0.3, 0 ],
 			"scale"	   : [ 0.25, 0.25, 0.25 ],
@@ -696,6 +696,11 @@
 		"multi_2": {
 			"type": "MeshFaceMaterial",
 			"parameters": { "materials": [ "phong_compressed_cube", "phong_man", "phong_hand", "minecraft", "backsignals" ] }
+		},
+
+		"multi_veyron": {
+			"type": "MeshFaceMaterial",
+			"parameters": { "materials": [ "interior", "chrome", "darkerchrome", "glass", "chrome", "chrome", "backlights", "backsignals" ] }
 		}
 
 	},

+ 0 - 11
examples/webgl_loader_scene.html

@@ -299,17 +299,6 @@
 
 					loaded = result;
 
-					var mat_veyron = result.face_materials[ "veyron" ];
-
-					mat_veyron[ 0 ] = result.materials[ "interior" ];
-					mat_veyron[ 1 ] = result.materials[ "chrome" ];
-					mat_veyron[ 2 ] = result.materials[ "darkerchrome" ];
-					mat_veyron[ 3 ] = result.materials[ "glass" ];
-					mat_veyron[ 4 ] = result.materials[ "chrome" ];
-					mat_veyron[ 5 ] = result.materials[ "chrome" ];
-					mat_veyron[ 6 ] = result.materials[ "backlights" ];
-					mat_veyron[ 7 ] = result.materials[ "backsignals" ];
-
 					$( "message" ).style.display = "none";
 					$( "progressbar" ).style.display = "none";
 					$( "start" ).style.display = "block";