xxxxxxxxxx
28
/*
* https://findtheinvisiblecow.com/
*
* A clone of a popular game for first time coders
* (c) 2018 - Andrew Grosser - https://twitter.com/andrewgrosser
*/
//Share global variables
var cow;
//Do this before anything
function preload() {
//wikipedia
cow = loadImage('https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse4.mm.bing.net%2Fth%3Fid%3DOIP.1idIkw31tm8fDpZsf0s4QAHaFD%26pid%3DApi&f=1');
}
//Run p5js setup
function setup() {
createCanvas(600, 600);
}
//Here we draw/run our infinite loop
function draw() {
//background(255,0,0)
image(cow, mouseX, mouseY, 20, 20);
}