xxxxxxxxxx
var x = 0;
var y = 0;
var easing = .01;
var last_clicked_x = 0;
var last_clicked_y = 0;
var img_width = 480/1.5;
var img_height = 480/1.5;
var positions = [];
var mouse_coords = [];
function preload() {
img = loadImage("GoodMothBoy3.png");
}
function setup() {
createCanvas(windowWidth,windowHeight);
noStroke();
background(95,78,145);
noStroke();
}
function draw() {
var targetX = last_clicked_x;
var dx = targetX - x;
x += dx * easing
var targetY = last_clicked_y;
var dy = targetY - y;
y += dy * easing;
fill(255);
background(95,78,145,99.99);
image(img, x, y, img_width, img_height);
colorMode(RGB, 255);
tint(255,128);
}
function mouseReleased() {
noStroke();
fill (236,205,60,2);
ellipse(mouseX, mouseY, 300, 300);
fill (236,205,60,10);
ellipse(mouseX, mouseY, 250, 250);
fill(236,205,70,20);
ellipse(mouseX, mouseY, 200, 200);
fill (236,205,60,30);
ellipse(mouseX, mouseY, 150, 150);
fill (236,205,60,40);
ellipse(mouseX, mouseY, 100, 100);
fill (236,205,60);
ellipse(mouseX, mouseY, 50, 50);
fill (255);
point (mouseX, mouseY);
}
function mouseClicked() {
last_clicked_x = mouseX;
last_clicked_y = mouseY;
}