Created
April 22, 2017 12:55
-
-
Save catarak/d3a74388b1edfb4896e0d0d417da2ae3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
createCanvas(400, 400); | |
noStroke(); | |
background(220); | |
} | |
function draw() { | |
var xColor = map(mouseX, 0, width, 0, 255); | |
var yColor = map(mouseY, 0, height, 0, 255); | |
fill(xColor, yColor, 200); | |
ellipse(mouseX, mouseY, 50, 50); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment