Skip to content

Commit da9a3dc

Browse files
change the behavior of the quad function.
The current definition of the quad function states that if there are 12 arguments, only the first 8 are used to specify the coordinates. I don't think this is the intended behavior, so I suggest changing it. It's easy to do, and it seems to be enough to remove the equals sign from the inequality sign.
1 parent f5a9828 commit da9a3dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/shape/2d_primitives.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ p5.prototype.quad = function(...args) {
532532
p5._validateParameters('quad', args);
533533

534534
if (this._renderer._doStroke || this._renderer._doFill) {
535-
if (this._renderer.isP3D && args.length <= 12) {
535+
if (this._renderer.isP3D && args.length < 12) {
536536
// if 3D and we weren't passed 12 args, assume Z is 0
537537
this._renderer.quad.call(
538538
this._renderer,

0 commit comments

Comments
 (0)