Ver código fonte

Fixed some more examples using vertexColors = true.

Mr.doob 13 anos atrás
pai
commit
5fbfc1f947
2 arquivos alterados com 16 adições e 16 exclusões
  1. 8 8
      examples/webgl_lines_colors.html
  2. 8 8
      examples/webgl_lines_splines.html

+ 8 - 8
examples/webgl_lines_colors.html

@@ -119,14 +119,14 @@
 
 				// lines
 
-				material = new THREE.LineBasicMaterial( { color: 0xffffff, opacity: 1, linewidth: 3 } );
-
-				var line, p, scale = 0.3, d = 225,
-					parameters =  [ [ material, scale*1.5, [-d,0,0],  geometry ],
-									[ material, scale*1.5, [0,0,0],  geometry2 ],
-									[ material, scale*1.5, [d,0,0],  geometry3 ] ];
-
-				material.vertexColors = true;
+				material = new THREE.LineBasicMaterial( { color: 0xffffff, opacity: 1, linewidth: 3, vertexColors: THREE.VertexColors } );
+
+				var line, p, scale = 0.3, d = 225;
+				var parameters =  [
+					[ material, scale*1.5, [-d,0,0],  geometry ],
+					[ material, scale*1.5, [0,0,0],  geometry2 ],
+					[ material, scale*1.5, [d,0,0],  geometry3 ]
+				];
 
 				for ( i = 0; i < parameters.length; ++i ) {
 

+ 8 - 8
examples/webgl_lines_splines.html

@@ -121,14 +121,14 @@
 
 				// lines
 
-				material = new THREE.LineBasicMaterial( { color: 0xffffff, opacity: 1, linewidth: 3 } );
-
-				var line, p, scale = 0.3, d = 225,
-					parameters =  [ [ material, scale*1.5, [-d,0,0],  geometry ],
-									[ material, scale*1.5, [0,0,0],  geometry2 ],
-									[ material, scale*1.5, [d,0,0],  geometry3 ] ];
-
-				material.vertexColors = true;
+				material = new THREE.LineBasicMaterial( { color: 0xffffff, opacity: 1, linewidth: 3, vertexColors: THREE.VertexColors } );
+
+				var line, p, scale = 0.3, d = 225;
+				var parameters =  [
+					[ material, scale*1.5, [-d,0,0],  geometry ],
+					[ material, scale*1.5, [0,0,0],  geometry2 ],
+					[ material, scale*1.5, [d,0,0],  geometry3 ]
+				];
 
 				for ( i = 0; i < parameters.length; ++ i ) {