Skip to content

Commit d97ce0d

Browse files
committed
Simplified scene example.
Now we can finally mess with car materials directly in the scene file.
1 parent a799323 commit d97ce0d

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

examples/scenes/test_scene.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145

146146
"veyron" : {
147147
"geometry" : "veyron",
148-
"material" : "face",
148+
"material" : "multi_veyron",
149149
"position" : [ 40, -1, 0 ],
150150
"rotation" : [ 0, 0.3, 0 ],
151151
"scale" : [ 0.25, 0.25, 0.25 ],
@@ -696,6 +696,11 @@
696696
"multi_2": {
697697
"type": "MeshFaceMaterial",
698698
"parameters": { "materials": [ "phong_compressed_cube", "phong_man", "phong_hand", "minecraft", "backsignals" ] }
699+
},
700+
701+
"multi_veyron": {
702+
"type": "MeshFaceMaterial",
703+
"parameters": { "materials": [ "interior", "chrome", "darkerchrome", "glass", "chrome", "chrome", "backlights", "backsignals" ] }
699704
}
700705

701706
},

examples/webgl_loader_scene.html

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -299,17 +299,6 @@
299299

300300
loaded = result;
301301

302-
var mat_veyron = result.face_materials[ "veyron" ];
303-
304-
mat_veyron[ 0 ] = result.materials[ "interior" ];
305-
mat_veyron[ 1 ] = result.materials[ "chrome" ];
306-
mat_veyron[ 2 ] = result.materials[ "darkerchrome" ];
307-
mat_veyron[ 3 ] = result.materials[ "glass" ];
308-
mat_veyron[ 4 ] = result.materials[ "chrome" ];
309-
mat_veyron[ 5 ] = result.materials[ "chrome" ];
310-
mat_veyron[ 6 ] = result.materials[ "backlights" ];
311-
mat_veyron[ 7 ] = result.materials[ "backsignals" ];
312-
313302
$( "message" ).style.display = "none";
314303
$( "progressbar" ).style.display = "none";
315304
$( "start" ).style.display = "block";

0 commit comments

Comments
 (0)