Explorar o código

Changed order of materials in WebGL materials demo.

As now buffers are created based on first material that is encountered per shared Geometry, most complex material should go first.
alteredq %!s(int64=14) %!d(string=hai) anos
pai
achega
25b47616fa
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/webgl_materials.html

+ 1 - 1
examples/webgl_materials.html

@@ -71,6 +71,7 @@
 				generatedTexture.needsUpdate = true;
 
 				var materials = [];
+				materials.push( new THREE.MeshLambertMaterial( { map: generatedTexture } ) );
 				materials.push( new THREE.MeshLambertMaterial( { color: 0xdddddd, shading: THREE.FlatShading } ) );
 				materials.push( new THREE.MeshPhongMaterial( { ambient: 0x030303, color: 0xdddddd, specular: 0x009900, shininess: 30, shading: THREE.FlatShading } ) );
 				materials.push( new THREE.MeshNormalMaterial( ) );
@@ -84,7 +85,6 @@
 
 				materials.push( new THREE.MeshDepthMaterial() );
 				materials.push( new THREE.MeshBasicMaterial( { map: generatedTexture } ) );
-				materials.push( new THREE.MeshLambertMaterial( { map: generatedTexture } ) );
 
 				// Spheres geometry