Skip to content

Instantly share code, notes, and snippets.

@mpmckenna8
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpmckenna8/9057183 to your computer and use it in GitHub Desktop.
Save mpmckenna8/9057183 to your computer and use it in GitHub Desktop.
Gimmicky Text in a Canvas
<!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>
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