Skip to content

Commit 747ab5a

Browse files
committed
Fixed GL warnings in scene loader example.
For some reason before it didn't make troubles when sharing the same geometry for objects with materials requiring different attributes. I guess order of initialization may had changed. Fixes mrdoob#1876.
1 parent 168aab5 commit 747ab5a

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

examples/scenes/test_scene.js

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"objects":
1212
{
1313
"cube1" : {
14-
"geometry" : "cube",
14+
"geometry" : "cubeNormals",
1515
"materials": [ "lambert_red" ],
1616
"position" : [ 0, 0, 0 ],
1717
"rotation" : [ 0, -0.3, 0 ],
@@ -20,7 +20,7 @@
2020
},
2121

2222
"cube2" : {
23-
"geometry" : "cube",
23+
"geometry" : "cubeWire",
2424
"materials": [ "basic_white" ],
2525
"position" : [ 0, 0, 0 ],
2626
"rotation" : [ 0, -0.3, 0 ],
@@ -153,6 +153,30 @@
153153
"sides" : { "px": true, "nx": true, "py": true, "ny": true, "pz": true, "nz": true }
154154
},
155155

156+
"cubeNormals": {
157+
"type" : "cube",
158+
"width" : 10,
159+
"height": 10,
160+
"depth" : 10,
161+
"segmentsWidth" : 1,
162+
"segmentsHeight" : 1,
163+
"segmentsDepth" : 1,
164+
"flipped" : false,
165+
"sides" : { "px": true, "nx": true, "py": true, "ny": true, "pz": true, "nz": true }
166+
},
167+
168+
"cubeWire": {
169+
"type" : "cube",
170+
"width" : 10,
171+
"height": 10,
172+
"depth" : 10,
173+
"segmentsWidth" : 1,
174+
"segmentsHeight" : 1,
175+
"segmentsDepth" : 1,
176+
"flipped" : false,
177+
"sides" : { "px": true, "nx": true, "py": true, "ny": true, "pz": true, "nz": true }
178+
},
179+
156180
"plane": {
157181
"type" : "plane",
158182
"width" : 10,

0 commit comments

Comments
 (0)