Javascript library for fonts animation

Facebooktwitterlinkedinmail

Thanks to the ‘bubbles’ Javascript library, it is possible to do fonts animation without CSS:

See source code
<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>

 <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">
 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];

 var myName = "DigiTools";
 letterColors = [red, orange, green, blue, purple]

 if (15 > 5) {
 bubbleShape = "circle";
 } else {
 bubbleShape = "square";
 }

 drawName(myName, letterColors);
 bounceBubbles();
 </script>

Leave a Reply

Your email address will not be published. Required fields are marked *