xxxxxxxxxx
63
var x;
var y;
var img0;
var cross;
var img1;
function preload(){
img0= loadImage("cross.png");
img1 = loadImage("jesus's sister1.png");
}
function setup() {
createCanvas(1080,810);
cross = new Cross();
background(img1);
}
function resetSketch(){
background(img1);
}
function draw() {
cross.show();
cross.move()
if (frameCount % 1000 === 0){
resetSketch();
}
}
class Cross{
constructor(){
this.x =400;
this.y= 300;
}
move(){
this.x= this.x+random(-2,2);
this.y= this.y +random (-2,2);
}
show(){
//blendMode(HARD_LIGHT);
image(img0, this.x,this.y);
}
}