Skip to content

Commit 91c5d7f

Browse files
committed
Update bezier() to use new bezierVetext
1 parent a19995f commit 91c5d7f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/core/p5.Renderer.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,13 @@ class Renderer {
213213
}
214214

215215
bezier(x1, y1, x2, y2, x3, y3, x4, y4) {
216+
const oldOrder = this._pInst.bezierOrder();
217+
this._pInst.bezierOrder(oldOrder);
216218
this._pInst.beginShape();
217-
this._pInst.vertex(x1, y1);
218-
this._pInst.bezierVertex(x2, y2, x3, y3, x4, y4);
219+
this._pInst.bezierVertex(x1, y1);
220+
this._pInst.bezierVertex(x2, y2);
221+
this._pInst.bezierVertex(x3, y3);
222+
this._pInst.bezierVertex(x4, y4);
219223
this._pInst.endShape();
220224
return this;
221225
}

0 commit comments

Comments
 (0)