Built with blockbuilder.org
forked from Yannael's block: fresh block
forked from Yannael's block: fresh block
xxxxxxxxxx
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.23/p5.min.js"></script>
</head>
<body>
<script>
wait=1000;
function setup() {
createCanvas(640, 480);
image(img,0,0,400,200);
now=millis()
}
function preload() {
img = loadImage("https://foodandcode.github.io/assets/images/footer_back.png");
}
function draw() {
if ((millis()-now)>wait) {
now=millis()
if (mouseIsPressed) {
background(255)
} else {
background(0)
}
tint(255,255,255); // Color, so plays like stroke and fill
image(img,random(width)-100, random(height)-50, 200, 100);
//ellipse(mouseX, mouseY, 80, 80);
}
} </script>
</body>
https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.23/p5.min.js