JavaScript - Interactive Name Animation 03-18-2014, 07:45 PM
#1
(From CodeCademy)
This is really simple, you just need to know how to use JavaScript. If you don't I'll be explaining to help you along the way.
We need to define the text we want to animate. In this case, I will use "Sinisterly" and make it black and red.
We've defined "text" to say "Sinisterly", now we define our colours. This is fairly easy.
We only have two colours, black and red, they will invert each letter.
Now we user drawName, but we need to use our colours and text. It's simple, put them in parentheses.
Lastly, we set our desired shape. I will use square for a pixel effect, but you can use circles and such.
We're done, now we set bounceBubbles, then we're done.
Now, we're done. Here's the full code if you want it, you can make so much more though.
Hope this fun little JavaScript code was useful. ~Dub
This is really simple, you just need to know how to use JavaScript. If you don't I'll be explaining to help you along the way.
We need to define the text we want to animate. In this case, I will use "Sinisterly" and make it black and red.
Code:
var text = 'Sinisterly';We've defined "text" to say "Sinisterly", now we define our colours. This is fairly easy.
Code:
var colours = [black,red];We only have two colours, black and red, they will invert each letter.
Now we user drawName, but we need to use our colours and text. It's simple, put them in parentheses.
Code:
drawName(text,colours);Lastly, we set our desired shape. I will use square for a pixel effect, but you can use circles and such.
Code:
bubbleShape = 'square';We're done, now we set bounceBubbles, then we're done.
Code:
bounceBubbles();Now, we're done. Here's the full code if you want it, you can make so much more though.
Spoiler:
Code:
var text = "Sinisterly";
var colours = [black,red];
drawName(text,colours);
bubbleShape = 'square';
bounceBubbles();Hope this fun little JavaScript code was useful. ~Dub
![[Image: BXqGARG.png]](https://i.imgur.com/BXqGARG.png)










![[+]](https://sinister.li/images/modern/collapse_collapsed.png)















![[Image: TeusoI9.png]](http://i.imgur.com/TeusoI9.png)