ansilove.js

A script to display ANSi and artscene related file formats on web pages
Log | Files | Refs | README | LICENSE

commit 1f503fc4113e635d52df2d9dacc34dad4fff32df
parent 7ae8497bfe1aca4caa721f8ed88c1350b210a371
Author: Andy Herbert <andy.herbert@gmail.com>
Date:   Tue, 24 Sep 2013 19:40:09 +0100

Added example file to demonstrate usage.

Diffstat:
Aexample/cl!-al02.ans | 19+++++++++++++++++++
Aexample/example_usage.ans | 3+++
Aexample/index.html | 49+++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/example/cl!-al02.ans b/example/cl!-al02.ans @@ -0,0 +1,18 @@ + +  +߲      +    ۲  +     ۲  +      +               +                  +       ۲     +       ߲  +        +  ۲         +     ۱ܲ       +   ۰          Cl!                                ܲ                  ߲                 ANSiLOVE۲ + Just create your own world,Cleaner(27")  August 2004 + for the sake of art...http://cleaner.planet-d.net + A N S i  ++ \ No newline at end of file diff --git a/example/example_usage.ans b/example/example_usage.ans @@ -0,0 +1,3 @@ +[?33hAnsilove.render("cl!-al02.ans", function (canvas, sauce) { + document.getElementById("ansi-container").appendChild(canvas); +}, {"bits": "9"}); diff --git a/example/index.html b/example/index.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html> +<head> + <meta http-equiv="Content-type" content="text/html; charset=utf-8"> + <title>ansilove.js</title> + <script src="../ansilove.js" type="text/javascript" charset="utf-8"></script> + <style type="text/css" media="screen"> + body { + background: black; + } + .center { + margin: 16px auto; + background-color: black; + padding: 16px; + } + #header { + width: 720px; + border: 1px solid #aaaaaa; + } + #example { + width: 528px; + overflow: hidden; + } + </style> +</head> + <body> + <div id="header" class="center"></div> + +<script type="text/javascript"> + +AnsiLove.render("cl!-al02.ans", function (canvas, sauce) { + document.getElementById("header").appendChild(canvas); +}, {"bits": "9"}); + +</script> + + <div id="example" class="center"></div> + +<script type="text/javascript"> + +AnsiLove.render("example_usage.ans", function (canvas, sauce) { + document.getElementById("example").appendChild(canvas); +}); + +</script> + + </body> +</html>+ \ No newline at end of file