Create Morphing ASCII Art Text Using Pure JavaScript – AsciiMorph

Category: Animation , Javascript , Recommended | November 21, 2016
Author:tholman
Views Total:1,479 views
Official Page:Go to website
Last Update:November 21, 2016
License:MIT

Preview:

Create Morphing ASCII Art Text Using Pure JavaScript – AsciiMorph

Description:

AsciiMorph is a plain JavaScript library that adds a morphing transition effect to your ASCII Art text when switching between them.

See Also:

How to use it:

To get started, you must include the main JavaScript asciiMorph.js right before the closing body tag.

<script src="asciiMorph.js"></script>

Create a container where you want to place your ASCII Art text.

<pre class="demo">
</pre>

Initialize the AsciiMorph with default options.

AsciiMorphvar element = document.querySelector('pre');
AsciiMorph(element);

Define an array of ASCII Art text you’d like to switch between.

var asciis = [[ 
    ...],
    [
    ...
    ],
]

Render the ASCII Art text in the container you just created.

AsciiMorph.render(asciis[0]);

Apply the morphing transition effect to the ASCII Art text.

AsciiMorph.morph(asciis[INDEX]);

Specify the rendering dimensions.

AsciiMorph(element, {x: 51,y: 28});

You Might Be Interested In:


One thought on “Create Morphing ASCII Art Text Using Pure JavaScript – AsciiMorph

Leave a Reply