Paste in a link to an image to paint. Some websites don't allow their images to be retrieved, so your painting will reveal a black background.
Retrieves a random image to paint from picsum.photos.
Scrolling up and down or using the slider changes the diameter of the brush.
For a more realistic and artistic painting experience, I averaged the RGBA values between pixels using this method. I also layered several strokes with different widths and low alpha values to create the watercolor effect.
p5's transform(), rotate(), and Math.atan2() are used to calculate the mouse angle and rotate the brush to match. Also, faster strokes create thinner ellipses!
Images are dynamically sized based on the user's screen
☒ upload image from device
☒ responsive resizing of uploaded or linked images
☒ fetch images from Unsplash instead of Picsum
☒ display "touch to start" for mobile
☒ fix source link wrong redirect on double click
☐ update README with gifs :)
made by Sophie Liu