commit fa7ecab29a2fdc268fb3449b24e67275375e1dc4
parent d6d2c3c03c6472d0e27a547a16b14da64b13c3d3
Author: Andy Herbert <andy.herbert@gmail.com>
Date: Sun, 13 Oct 2013 18:49:49 +0100
Added documentations for animate().
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md
@@ -57,7 +57,16 @@ For extremely large files, which may silently fail on some browsers when produci
});
console.log(sauce);
}, 27, {"bits": "8"});
+
+And for ANSImations, the animate function returns a controller object which when issued with the play() call, renders an ANSI at a pre-determined baud rate, and can be passed an additional function which is called upon completion.
+ var controller = AnsiLove.animate("ansimation.ans", function (canvas, sauce) {
+ document.getElementById("example").appendChild(canvas);
+ console.log(sauce);
+ controller.play(14400, function () {
+ console.log("Finished!");
+ });
+ }, {"bits": "9"});
### PC font options: