Skip to content

Instantly share code, notes, and snippets.

@autekroy
Created April 13, 2014 12:00
Show Gist options
  • Save autekroy/10581047 to your computer and use it in GitHub Desktop.
Save autekroy/10581047 to your computer and use it in GitHub Desktop.
Animate Your Name
<!DOCTYPE html>
<html>
<head>
<title>Animate Your Name</title>
<script type="text/javascript" src="http://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="./Animate_Your_Name.js"></script>
</body>
</html>
//change the string to your words!
var myName = "Hello wing";
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];
//strings' colors
letterColors = [red, orange, green, blue, purple]
//change the shpae to "square", then the string will surprice you
bubbleShape = "circle";
drawName(myName, letterColors);
bounceBubbles()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment