You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which platform were you using when you encountered this?
Mobile/Tablet (touch devices)
Desktop/Laptop
Others (specify if possible)
Details about the bug:
p5.js version: 0.5.14
Web browser and it's version: Firefox 55.0.3 (64-bit)
Operating System: MacOS Sierra 10.12.6
Steps to reproduce this:
var img1;
function preload(){
img1= loadImage("module_1.svg");
}
function setup(){
createCanvas(800, 800);
console.log(img1);
noLoop();
}
function draw(){
image(img1, 0, 0);
}
Loading svg in Chrome seems to be working as expected.
However, Firefox returns: InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable when trying to run the image() function which is probably because there doesn't seem to contain anything loaded in the img1 variable.
Any chance we might be able to find out what's causing this to fail in Firefox? Thanks so much! 🙏
The text was updated successfully, but these errors were encountered:
Have a look at this stackoverflow question here. Basically it's a bug in Firefox that cause it to not draw SVG images onto canvas if the SVG themselves does not have a non-percentage width and height attribute. Simply adding on the width and height attribute onto the root <svg> tag will solve this.
Nature of issue?
Most appropriate sub-area of p5.js?
Which platform were you using when you encountered this?
Details about the bug:
svg file:
Feature enhancement details:
Loading svg in Chrome seems to be working as expected.
However, Firefox returns:
InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable
when trying to run theimage()
function which is probably because there doesn't seem to contain anything loaded in theimg1
variable.Any chance we might be able to find out what's causing this to fail in Firefox? Thanks so much! 🙏
The text was updated successfully, but these errors were encountered: