Quellcode durchsuchen

Examples: Moved webgl_instancing_modified to advanced.

Mr.doob vor 5 Jahren
Ursprung
Commit
6126da9809
2 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. 1 1
      examples/files.js
  2. 4 4
      examples/webgl_instancing_modified.html

+ 1 - 1
examples/files.js

@@ -48,7 +48,6 @@ var files = {
 		"webgl_geometry_text_stroke",
 		"webgl_helpers",
 		"webgl_instancing_dynamic",
-		"webgl_instancing_modified",
 		"webgl_instancing_performance",
 		"webgl_instancing_raycast",
 		"webgl_instancing_scatter",
@@ -298,6 +297,7 @@ var files = {
 		"webgl_gpgpu_birds",
 		"webgl_gpgpu_water",
 		"webgl_gpgpu_protoplanet",
+		"webgl_instancing_modified",
 		"webgl_lightningstrike",
 		"webgl_lightshafts",
 		"webgl_materials_modified",

+ 4 - 4
examples/webgl_instancing_modified.html

@@ -50,9 +50,9 @@
 
 					for ( var i = 0; i < count; i ++ ) {
 
-						instanceColors.push( 0.5 + 0.5 * Math.random() );
-						instanceColors.push( 0.5 + 0.5 * Math.random() );
-						instanceColors.push( 0.5 + 0.5 * Math.random() );
+						instanceColors.push( Math.random() );
+						instanceColors.push( Math.random() );
+						instanceColors.push( Math.random() );
 
 					}
 
@@ -168,7 +168,7 @@
 
 							for ( var z = 0; z < amount; z ++ ) {
 
-								dummy.position.set( offset - x, offset - y, offset - z ).multiplyScalar( 2 );
+								dummy.position.set( offset - x, offset - y, offset - z );
 								dummy.rotation.y = ( Math.sin( x / 4 + time ) + Math.sin( y / 4 + time ) + Math.sin( z / 4 + time ) );
 								dummy.rotation.z = dummy.rotation.y * 2;