In this tutorial, I will show you how to use images with processing.js.
You can use an image from your computer or from a URL.
Let’s see one simple code example:
1 2 3 4 5 6 7 8 9 10 11 | PImage img; void setup() { background(10); size(300,300); img = loadImage("http://i.imgur.com/sb3qile.jpg"); } void draw() { image(img, 0,0); } |
You can see the same example on the openprocessing web tool.
The open processing web tool allows you to use Processing.js and P5.js.