Adding ansilove.js

- admittedly this should probably be tracked via a link but
 ... not really sure how to do that and the last time I did it,
 I had massive issues with updating on other machines.
This commit is contained in:
Iam Naughton Phier 2014-10-10 00:57:21 +03:00
parent b014ad9dc9
commit 413a4dad3e
8 changed files with 2774 additions and 0 deletions

View file

@ -0,0 +1,25 @@
[?33hAnsiLove.render("cl!-al02.ans", function (canvas, sauce) {
document.getElementById("ansi-container").appendChild(canvas);
console.log(sauce);
}, {"bits": "9"});
// And for producing extremely long files,
// spanning multiple canvas elements by splitting every nth row...
[?33hAnsiLove.splitRender("long_ansi.ans", function (canvases, sauce) {
canvases.forEach(function (canvas) {
canvas.style.verticalAlign = "bottom"; // For perfect, gap-less viewing
document.getElementById("ansi-container").appendChild(canvas);
});
console.log(sauce);
}, 27, {"bits": "8"});
// And for ansimations...
var controller = [?33hAnsiLove.animate("ansimation.ans", function (canvas, sauce) {
document.getElementById("ansi-container").appendChild(canvas);
console.log(sauce);
controller.play(2800, function () {
console.log("Finished Playing");
});
}, {"bits": "9"});