Skip to content

Commit

Permalink
Update CylinderGeometry.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
lslzl3000 authored Oct 8, 2024
1 parent 87b35d1 commit 1e22450
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/shape/CylinderGeometry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,10 @@ export class CylinderGeometry extends GeometryBase {

for (let x = 0; x <= that.radialSegments; x++) {
const u = x / that.radialSegments;

let theta = u * that.thetaLength + that.thetaStart;

if (x == that.radialSegments && Math.abs(that.thetaLength - that.thetaStart) == Math.PI * 2) {
theta = 0 * that.thetaLength + that.thetaStart;
theta = 0;
}

const sinTheta = Math.sin(theta);
Expand All @@ -158,7 +157,6 @@ export class CylinderGeometry extends GeometryBase {

// uv
uvs.push(u, 1 - v);

indexRow.push(index++);
}

Expand Down

0 comments on commit 1e22450

Please sign in to comment.