This is pretty much taken from a codecademy course http://www.codecademy.com/goals/animate-your-name. I think they'd be cool with you using it for whatever though. Especially if it's to help people learn!
Last active
August 29, 2015 13:56
-
-
Save mpmckenna8/9057183 to your computer and use it in GitHub Desktop.
Gimmicky Text in a Canvas
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script> | |
<script type="text/javascript" src="http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/alphabet.js"></script> | |
</head> | |
<body> | |
<canvas id="myCanvas"></canvas> | |
<script type="text/javascript" src="http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/bubbles.js"></script> | |
<script type="text/javascript" src="main.js"></script> | |
</body> | |
</html> |
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
var red = [0, 100, 63]; | |
var orange = [40, 100, 60]; | |
var green = [75, 100, 40]; | |
var blue = [196, 77, 55]; | |
var purple = [280, 50, 60]; | |
//put your gimmicky text = to bubbley | |
var bubbley = "Gimmicky Text"; | |
letterColors= [red,orange,green,blue,purple]; | |
if(29<2){ | |
bubbleShape="square";} | |
else{bubbleShape="cirle"} | |
drawName(bubbley, letterColors); | |
bounceBubbles(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment