瀏覽代碼

Examples: Moved webgl_instancing_modified to advanced.

Mr.doob 5 年之前
父節點
當前提交
6126da9809
共有 2 個文件被更改,包括 5 次插入5 次删除
  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;