Skip to content

Commit

Permalink
BoxGeometry: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed May 26, 2020
1 parent 62b9212 commit ea7eab8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/geometries/BoxGeometry.js
Expand Up @@ -108,17 +108,15 @@ class BoxBufferGeometry extends BufferGeometry {
let vertexCounter = 0;
let groupCount = 0;

let ix, iy;

const vector = new Vector3();

// generate vertices, normals and uvs

for ( iy = 0; iy < gridY1; iy ++ ) {
for ( let iy = 0; iy < gridY1; iy ++ ) {

const y = iy * segmentHeight - heightHalf;

for ( ix = 0; ix < gridX1; ix ++ ) {
for ( let ix = 0; ix < gridX1; ix ++ ) {

const x = ix * segmentWidth - widthHalf;

Expand Down Expand Up @@ -161,9 +159,9 @@ class BoxBufferGeometry extends BufferGeometry {
// 2. a single segment consists of two faces
// 3. so we need to generate six (2*3) indices per segment

for ( iy = 0; iy < gridY; iy ++ ) {
for ( let iy = 0; iy < gridY; iy ++ ) {

for ( ix = 0; ix < gridX; ix ++ ) {
for ( let ix = 0; ix < gridX; ix ++ ) {

const a = numberOfVertices + ix + gridX1 * iy;
const b = numberOfVertices + ix + gridX1 * ( iy + 1 );
Expand Down

0 comments on commit ea7eab8

Please sign in to comment.