|
@@ -35995,7 +35995,7 @@ THREE.CylinderBufferGeometry = function ( radiusTop, radiusBottom, height, radia
|
|
|
|
|
|
// buffers
|
|
// buffers
|
|
|
|
|
|
- var indices = new THREE.BufferAttribute( new ( indexCount > 65535 ? Uint32Array : Uint16Array )( indexCount ) , 1 );
|
|
|
|
|
|
+ var indices = new THREE.BufferAttribute( new ( indexCount > 65535 ? Uint32Array : Uint16Array )( indexCount ), 1 );
|
|
var vertices = new THREE.BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
|
|
var vertices = new THREE.BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
|
|
var normals = new THREE.BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
|
|
var normals = new THREE.BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
|
|
var uvs = new THREE.BufferAttribute( new Float32Array( vertexCount * 2 ), 2 );
|
|
var uvs = new THREE.BufferAttribute( new Float32Array( vertexCount * 2 ), 2 );
|
|
@@ -36008,19 +36008,10 @@ THREE.CylinderBufferGeometry = function ( radiusTop, radiusBottom, height, radia
|
|
|
|
|
|
generateTorso();
|
|
generateTorso();
|
|
|
|
|
|
- if( openEnded === false ) {
|
|
|
|
-
|
|
|
|
- if( radiusTop > 0 ) {
|
|
|
|
-
|
|
|
|
- generateCap( true );
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if( radiusBottom > 0 ) {
|
|
|
|
-
|
|
|
|
- generateCap( false );
|
|
|
|
|
|
+ if ( openEnded === false ) {
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ if ( radiusTop > 0 ) generateCap( true );
|
|
|
|
+ if ( radiusBottom > 0 ) generateCap( false );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -36095,7 +36086,7 @@ THREE.CylinderBufferGeometry = function ( radiusTop, radiusBottom, height, radia
|
|
normal.copy( vertex );
|
|
normal.copy( vertex );
|
|
|
|
|
|
// handle special case if radiusTop/radiusBottom is zero
|
|
// handle special case if radiusTop/radiusBottom is zero
|
|
- if( ( radiusTop === 0 && y === 0 ) || ( radiusBottom === 0 && y === heightSegments ) ) {
|
|
|
|
|
|
+ if ( ( radiusTop === 0 && y === 0 ) || ( radiusBottom === 0 && y === heightSegments ) ) {
|
|
|
|
|
|
normal.x = Math.sin( u * thetaLength + thetaStart );
|
|
normal.x = Math.sin( u * thetaLength + thetaStart );
|
|
normal.z = Math.cos( u * thetaLength + thetaStart );
|
|
normal.z = Math.cos( u * thetaLength + thetaStart );
|
|
@@ -36134,14 +36125,14 @@ THREE.CylinderBufferGeometry = function ( radiusTop, radiusBottom, height, radia
|
|
var i4 = indexArray[ y ][ x + 1 ];
|
|
var i4 = indexArray[ y ][ x + 1 ];
|
|
|
|
|
|
// face one
|
|
// face one
|
|
- indices.setX( indexOffset, i1 ); indexOffset++;
|
|
|
|
- indices.setX( indexOffset, i2 ); indexOffset++;
|
|
|
|
- indices.setX( indexOffset, i4 ); indexOffset++;
|
|
|
|
|
|
+ indices.setX( indexOffset, i1 ); indexOffset ++;
|
|
|
|
+ indices.setX( indexOffset, i2 ); indexOffset ++;
|
|
|
|
+ indices.setX( indexOffset, i4 ); indexOffset ++;
|
|
|
|
|
|
// face two
|
|
// face two
|
|
- indices.setX( indexOffset, i2 ); indexOffset++;
|
|
|
|
- indices.setX( indexOffset, i3 ); indexOffset++;
|
|
|
|
- indices.setX( indexOffset, i4 ); indexOffset++;
|
|
|
|
|
|
+ indices.setX( indexOffset, i2 ); indexOffset ++;
|
|
|
|
+ indices.setX( indexOffset, i3 ); indexOffset ++;
|
|
|
|
+ indices.setX( indexOffset, i4 ); indexOffset ++;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -36174,7 +36165,7 @@ THREE.CylinderBufferGeometry = function ( radiusTop, radiusBottom, height, radia
|
|
normals.setXYZ( index, 0, sign, 0 );
|
|
normals.setXYZ( index, 0, sign, 0 );
|
|
|
|
|
|
// uv
|
|
// uv
|
|
- if( top === true ) {
|
|
|
|
|
|
+ if ( top === true ) {
|
|
|
|
|
|
uv.x = x / radialSegments;
|
|
uv.x = x / radialSegments;
|
|
uv.y = 0;
|
|
uv.y = 0;
|
|
@@ -36189,7 +36180,7 @@ THREE.CylinderBufferGeometry = function ( radiusTop, radiusBottom, height, radia
|
|
uvs.setXY( index, uv.x, uv.y );
|
|
uvs.setXY( index, uv.x, uv.y );
|
|
|
|
|
|
// increase index
|
|
// increase index
|
|
- index++;
|
|
|
|
|
|
+ index ++;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -36226,19 +36217,19 @@ THREE.CylinderBufferGeometry = function ( radiusTop, radiusBottom, height, radia
|
|
var c = centerIndexStart + x;
|
|
var c = centerIndexStart + x;
|
|
var i = centerIndexEnd + x;
|
|
var i = centerIndexEnd + x;
|
|
|
|
|
|
- if( top === true ) {
|
|
|
|
|
|
+ if ( top === true ) {
|
|
|
|
|
|
// face top
|
|
// face top
|
|
- indices.setX( indexOffset, i ); indexOffset++;
|
|
|
|
- indices.setX( indexOffset, i + 1 ); indexOffset++;
|
|
|
|
- indices.setX( indexOffset, c ); indexOffset++;
|
|
|
|
|
|
+ indices.setX( indexOffset, i ); indexOffset ++;
|
|
|
|
+ indices.setX( indexOffset, i + 1 ); indexOffset ++;
|
|
|
|
+ indices.setX( indexOffset, c ); indexOffset ++;
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
// face bottom
|
|
// face bottom
|
|
- indices.setX( indexOffset, i + 1); indexOffset++;
|
|
|
|
- indices.setX( indexOffset, i ); indexOffset++;
|
|
|
|
- indices.setX( indexOffset, c ); indexOffset++;
|
|
|
|
|
|
+ indices.setX( indexOffset, i + 1 ); indexOffset ++;
|
|
|
|
+ indices.setX( indexOffset, i ); indexOffset ++;
|
|
|
|
+ indices.setX( indexOffset, c ); indexOffset ++;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|