Skip to content

Commit

Permalink
Refactored argument name for createGraphics
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaivignesh-afk committed Nov 13, 2023
1 parent 4ccfaab commit 25ce601
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/rendering.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,11 @@ p5.prototype.noCanvas = function() {
* @return {p5.Graphics} offscreen graphics buffer
*/
p5.prototype.createGraphics = function(w, h, renderer, canvas) {
if (arguments[2] instanceof HTMLCanvasElement) {
if (args[2] instanceof HTMLCanvasElement) {
renderer = constants.P2D;
canvas = arguments[2];
canvas = args[2];
}
p5._validateParameters('createGraphics', arguments);
p5._validateParameters('createGraphics', ...args);
return new p5.Graphics(w, h, renderer, this, canvas);
};

Expand Down

0 comments on commit 25ce601

Please sign in to comment.