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

Updated builds.

上级 e64dc034
......@@ -7183,9 +7183,15 @@ THREE.EventDispatcher.prototype = {
if ( attributes.index !== undefined ) {
var offsets = geometry.offsets;
var indices = attributes.index.array;
var positions = attributes.position.array;
var offsets = geometry.offsets;
if ( offsets.length === 0 ) {
offsets = [ { start: 0, count: positions.length, index: 0 } ];
}
for ( var oi = 0, ol = offsets.length; oi < ol; ++oi ) {
......@@ -32541,10 +32547,6 @@ THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) {
for ( var i = 0; i <= segments; i ++ ) {
indices[ offset ] = i + 1;
indices[ offset + 1 ] = i + 2;
indices[ offset + 2 ] = 0;
var segment = thetaStart + i / segments * thetaLength;
var x = radius * Math.cos( segment );
......@@ -32558,19 +32560,15 @@ THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) {
uvs[ offset2 ] = ( x / radius + 1 ) / 2;
uvs[ offset2 + 1 ] = ( y / radius + 1 ) / 2;
indices[ offset ] = i + 1;
indices[ offset + 1 ] = i + 2;
indices[ offset + 2 ] = 0;
offset += 3;
offset2 += 2;
}
for ( var i = 1; i <= segments; i ++ ) {
indices[ offset ] = i;
indices[ offset + 1 ] = i + 1;
indices[ offset + 2 ] = 0;
}
this.attributes[ 'index' ] = { array: indices, itemSize: 1 };
this.attributes[ 'position' ] = { array: vertices, itemSize: 3 };
this.attributes[ 'normal' ] = { array: normals, itemSize: 3 };
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册