48 lines
1.2 KiB
HTML
48 lines
1.2 KiB
HTML
|
|
<!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: 0 auto;
|
||
|
|
background-color: black;
|
||
|
|
padding: 16px;
|
||
|
|
}
|
||
|
|
#header {
|
||
|
|
width: 720px;
|
||
|
|
height: 464px;
|
||
|
|
}
|
||
|
|
#example {
|
||
|
|
width: 720px;
|
||
|
|
height: 384px;
|
||
|
|
overflow: hidden;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div id="header" class="center"></div>
|
||
|
|
|
||
|
|
<div id="example" class="center"></div>
|
||
|
|
|
||
|
|
<script type="text/javascript">
|
||
|
|
var controller, retina;
|
||
|
|
|
||
|
|
retina = window.devicePixelRatio > 1;
|
||
|
|
|
||
|
|
AnsiLove.render("cl!-al02.ans", function (canvas, sauce) {
|
||
|
|
document.getElementById("header").appendChild(canvas);
|
||
|
|
}, {"bits": "9", "2x": (retina ? 1 : 0)});
|
||
|
|
|
||
|
|
controller = AnsiLove.animate("example_usage.ans", function (canvas, sauce) {
|
||
|
|
document.getElementById("example").appendChild(canvas);
|
||
|
|
controller.play(2800);
|
||
|
|
}, {"bits": "9", "2x": (retina ? 1 : 0)});
|
||
|
|
</script>
|
||
|
|
|
||
|
|
</body>
|
||
|
|
</html>
|