提交 f6d86171 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #10904 from efokschaner/patch-1

Don't push junk values into colors array
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册