|
@@ -40,7 +40,7 @@ THREE.SphereBufferGeometry = function ( radius, widthSegments, heightSegments, p
|
|
var uvs = new THREE.InterleavedBufferAttribute( vertexBuffer, 2, 6 );
|
|
var uvs = new THREE.InterleavedBufferAttribute( vertexBuffer, 2, 6 );
|
|
this.addAttribute( 'uv', uvs );
|
|
this.addAttribute( 'uv', uvs );
|
|
|
|
|
|
- var x, y, u, v, px, py, px, index = 0, vertices = [], normal = new THREE.Vector3();
|
|
|
|
|
|
+ var x, y, u, v, px, py, pz, index = 0, vertices = [], normal = new THREE.Vector3();
|
|
|
|
|
|
for ( y = 0; y <= heightSegments; y ++ ) {
|
|
for ( y = 0; y <= heightSegments; y ++ ) {
|
|
|
|
|
|
@@ -73,7 +73,7 @@ THREE.SphereBufferGeometry = function ( radius, widthSegments, heightSegments, p
|
|
}
|
|
}
|
|
|
|
|
|
var indices = [];
|
|
var indices = [];
|
|
-
|
|
|
|
|
|
+ var ul;
|
|
for ( y = 0, ul = heightSegments - 1; y < ul; y++ ) {
|
|
for ( y = 0, ul = heightSegments - 1; y < ul; y++ ) {
|
|
|
|
|
|
for ( x = 0; x < widthSegments; x++ ) {
|
|
for ( x = 0; x < widthSegments; x++ ) {
|