A Pen by Ryan Allred on CodePen.
Created
January 1, 2016 00:08
-
-
Save Synvox/9b155081feb26659b339 to your computer and use it in GitHub Desktop.
GorRQz
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
| <script type="text/processing" data-processing-target="mycanvas"> | |
| int eyeSize = 20; | |
| int x = 5; | |
| noStroke(); | |
| void setup() { | |
| size(400,400) | |
| } | |
| void draw() { | |
| background(random(1,255), random(1,255), random(1,255)); | |
| // face | |
| fill(255, 255, 0); | |
| ellipse(202, 208, 300, 300); | |
| fill(247, 247, 247); | |
| ellipse(157,151, eyeSize+50*2,eyeSize+50*2); | |
| ellipse(304,142,eyeSize+56,eyeSize+52); | |
| // eyes | |
| fill(46, 46, 41); | |
| ellipse(157, 151, eyeSize*2, eyeSize*2); | |
| ellipse(304, 142, eyeSize, eyeSize); | |
| // mouth | |
| fill(252, 65, 65); | |
| ellipse(257, 240, eyeSize*1, eyeSize*0.5); | |
| fill(0, 0, 0); | |
| ellipse(257,240,eyeSize-10,eyeSize*0.5-10); | |
| eyeSize = eyeSize + x; | |
| if (eyeSize>75){x = -5;} | |
| if (eyeSize<5){x =6; } | |
| textSize(45); | |
| text("DON'T DO DRUGS!", -2,388 ); | |
| }; | |
| </script> | |
| <canvas id="mycanvas"></canvas> |
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
| <script src="https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.16/processing.js"></script> |
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
| canvas { | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment