This file contains hidden or 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
| noStroke(); | |
| var x = 150; | |
| var y = 250; | |
| var faceSize = 350; | |
| // ears | |
| var earSize=faceSize*1/2; | |
| fill(89, 52, 17); | |
| ellipse(x-faceSize*2/5, y-faceSize*2/5, earSize, earSize); | |
| ellipse(x+faceSize*2/5, y - faceSize*2/5, earSize, earSize); |
This file contains hidden or 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
| background(43, 171, 0); | |
| var add = function(num1, num2) { | |
| return num1 + num2; | |
| }; | |
| var subtract = function(num1, num2) { | |
| return num1 - num2; | |
| }; | |
| var multiply = function(num1, num2) { | |
| return num1 * num2; | |
| }; |
This file contains hidden or 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
| var bodyColor = color(235, 26, 26); | |
| for(var i = 0; i < 8; i+=1) { | |
| var bodyColor = color(235, 26, 26); | |
| } | |
| var drawMole = function(moleX, moleY) { | |
| noStroke(); | |
| fill(125, 93, 43); | |
| ellipse(moleX, moleY, 60, 60); // face |
This file contains hidden or 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
| var theNumber = 0<100; | |
| background(99, 134, 237); | |
| fill(184, 26, 184); | |
| textSize(30); | |
| text("Analysis of: " + theNumber, 10, 36); | |
| text("It's positive", 10, 90); | |
| text("It's negative", 10, 140); | |
| text("It's zero", 10, 190); |
This file contains hidden or 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
| draw = function() { | |
| background(17, 255, 0); | |
| fill(186, 48, 255); | |
| rect(20, 100, 364, 200); | |
| fill(0, 0, 0); | |
| textSize(20); | |
| if(mouseIsPressed){ | |
| text("It's called JavaScript. Duh...", 83, 200); |
This file contains hidden or 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
| background(0, 251, 255); | |
| fill(255, 0, 217); | |
| textSize(19); | |
| text("Check Out THIS AWESOME RULER!", 45, 101); | |
| text("Just KIDDING it's better than awesome.", 41, 133); | |
| text("Beat THAT!", 150, 285); | |
| noStroke(); | |
| fill(255, 245, 46); |
This file contains hidden or 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
| background(97, 0, 153); | |
| stroke(0, 255, 204); | |
| fill(242, 0, 255); | |
| ellipse(200, 200, 150, 150); | |
| fill(255, 255, 255); | |
| text("I'm behind lines!", 158, 296); | |
| fill(0, 0, 0); | |
| ellipse(167, 177, 20, 20); | |
| ellipse(229, 177, 20, 20); | |
| arc(201, 248, 70, 90, -180, 0); |
This file contains hidden or 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
| background(189, 189, 189); | |
| fill(252, 252, 252); | |
| ellipse(189, 246, 337, 238); | |
| fill(235, 146, 87); | |
| triangle(96, 153, 25, 216, 23, 70); | |
| triangle(341, 200, 262, 151, 360, 69); | |
| //eyes | |
| fill(0, 196, 255); | |
| ellipse(120, 214, 40, 40); |