/** * a very light wrapper around a PImage that tracks the mouse */ class MouseImage { PImage img; MouseImage(String filename) { img = loadImage(filename); } void draw() { translate(mouseX-img.width/2f, mouseY-img.height/2f, 0.1f); image(img, 0, 0); } }