please format code with </> button * homework policy * asking questions
I’m beginning to explore p5.js web editor, and I was wondering if there is a way to reuse an image from a previous project without uploading it again, since it’s already in my assets folder.
Thank you!
You could host on something like dropbox …
let img, url = 'https://dl.dropboxusercontent.com/s/35drk9bes8j0ups/train.png?dl=0';
function preload() {
img = loadImage(url);
}
function setup() {
createCanvas(img.width * 0.25, img.height * 0.25);
img.resize(img.width * 0.25, img.height * 0.25);
}
function draw() {
image(img, 0, 0);
}
2 Likes
Thank you for the alternative.
The Assets folder has a Max of 250 MB, right?
1 Like