Skip to content

Commit

Permalink
1.1.596
Browse files Browse the repository at this point in the history
  • Loading branch information
quinton-ashley committed Jul 6, 2023
1 parent 766e8a2 commit 2d2731b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@
"make": "electron-forge make",
"publish": "electron-forge publish"
},
"version": "1.1.595"
"version": "1.1.596"
}
7 changes: 5 additions & 2 deletions v3/p5play.js
Original file line number Diff line number Diff line change
Expand Up @@ -7341,7 +7341,7 @@ p5.prototype.registerMethod('init', function p5PlayInit() {
args[1] = h;
}
}
if (args.length < 3) args[2] = 'p2d';
args[2] = 'P2D';
let can = _createCanvas.call(pInst, ...args);
this.canvas.tabIndex = 0;
this.canvas.w = args[0];
Expand Down Expand Up @@ -7515,7 +7515,10 @@ canvas {
* @param {function} [callback]
*/
this.loadImg = this.loadImage = function () {
if (this.p5play.disableImages) return;
if (this.p5play.disableImages) {
// return a dummy image object to prevent errors
return { w: 16, width: 16, h: 16, height: 16, pixels: [] };
}
let args = arguments;
let url = args[0];
let img = pInst.p5play.images[url];
Expand Down
2 changes: 1 addition & 1 deletion v3/p5play.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions v3/q5.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ function Q5(scope, parent) {
// PUBLIC PROPERTIES
//================================================================
$.frameCount = 0;
$.deltaTime = 16;
$.mouseX = 0;
$.mouseY = 0;
$.pmouseX = 0;
Expand Down Expand Up @@ -249,6 +250,7 @@ function Q5(scope, parent) {
$.canvas.height = height * $._pixelDensity;
defaultStyle();
if (scope != 'graphics' && scope != 'image') $.pixelDensity(2);
return $.canvas;
};

$.resizeCanvas = (width, height) => {
Expand Down
2 changes: 1 addition & 1 deletion v3/q5.min.js

Large diffs are not rendered by default.

0 comments on commit 2d2731b

Please sign in to comment.