User:Ember314/follow.js

/*** this is a simple script that uses p5js to add an object that follows your cursor * use as you like * see if I care ***/ $('body').prepend(' '); $('body').prepend(" "); $('body').prepend(' #funCanvas{ position: absolute; left: 0; right: 0;top: 0;bottom: 0;height: 200%;width: 100%; z-index: 1000000;pointer-events: none; overflow: auto;} '); var sketchHeight, sketchWidth; function setup { sketchWidth = document.getElementById("funCanvas").offsetWidth; sketchHeight = document.getElementById("funCanvas").offsetHeight; var canvas = createCanvas(sketchWidth, sketchHeight); canvas.parent('funCanvas'); }

function draw { //clear /*optional*/ circle(mouseX,mouseY,50,50); }