浏览代码

Don't push junk values into colors array

Minor bug fix that should have no effect on actual behaviour.
efokschaner 8 年之前
父节点
当前提交
4fc8d177a9
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      examples/webgl_interactive_raycasting_points.html

+ 1 - 5
examples/webgl_interactive_raycasting_points.html

@@ -187,13 +187,9 @@
 						var y = ( Math.cos( u * Math.PI * 8 ) + Math.sin( v * Math.PI * 8) ) / 20;
 						var z = v - 0.5;
 						var v = new THREE.Vector3( x,y,z );
+						geometry.vertices.push( v );
 
 						var intensity = ( y + 0.1 ) * 7;
-						colors[ 3 * k ] = color.r * intensity;
-						colors[ 3 * k + 1 ] = color.g * intensity;
-						colors[ 3 * k + 2 ] = color.b * intensity;
-
-						geometry.vertices.push( v );
 						colors[ k ] = ( color.clone().multiplyScalar( intensity ) );
 
 						k++;