Skip to content

Commit

Permalink
Merge pull request #6580 from SlightlyEpic/polygon
Browse files Browse the repository at this point in the history
Remove references to non-existant constant
  • Loading branch information
limzykenneth committed Nov 24, 2023
2 parents a5fa292 + 83265fb commit 375c06a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/p5.Renderer2D.js
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ class Renderer2D extends p5.Renderer {
}
let i, j;
const numVerts = vertices.length;
if (isCurve && (shapeKind === constants.POLYGON || shapeKind === null)) {
if (isCurve && shapeKind === null) {
if (numVerts > 3) {
const b = [],
s = 1 - this._curveTightness;
Expand Down Expand Up @@ -923,7 +923,7 @@ class Renderer2D extends p5.Renderer {
}
} else if (
isBezier &&
(shapeKind === constants.POLYGON || shapeKind === null)
shapeKind === null
) {
if (!this._clipping) this.drawingContext.beginPath();
for (i = 0; i < numVerts; i++) {
Expand All @@ -947,7 +947,7 @@ class Renderer2D extends p5.Renderer {
this._doFillStrokeClose(closeShape);
} else if (
isQuadratic &&
(shapeKind === constants.POLYGON || shapeKind === null)
shapeKind === null
) {
if (!this._clipping) this.drawingContext.beginPath();
for (i = 0; i < numVerts; i++) {
Expand Down

0 comments on commit 375c06a

Please sign in to comment.