-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
135 lines (128 loc) · 3.25 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>animated text framework</title>
<style>
html {
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
}
embed {
border: solid black 1px;
}
body {
max-width: 40em;
margin: auto;
}
</style>
</head>
<body>
<h1>
JavaScript Text Animation Framework
</h1>
<p>
A library that handles the DOM manipulation and update loop logic for monospaced text.
</p>
<h2>
Examples
</h2>
<ul>
<li>
<h3>
<a href="./examples/helloworld.js">
Hello World
</a>
</h3>
<iframe width="200px" height="150px" src="./examples/helloworld.html"></iframe>
</li>
<li>
<h3>
<a href="./examples/stacker.js">
Stacker
</a>
</h3>
<iframe width="120px" height="180px" src="./examples/stacker.html"></iframe>
<p>This game is interactive! Click <a href="./examples/stacker.html">here</a> to play.</p>
</li>
<li>
<h3>
<a href="./examples/platformer.js">
Platformer
</a>
</h3>
<iframe width="250px" height="150px" src="./examples/platformer.html"></iframe>
<p>This game is interactive! Click <a href="./examples/platformer.html">here</a> it to play.</p>
</li>
</ul>
<h2>
Documentation
</h2>
<ul>
<li>
<h3>
setSize ( width: int, height: int )
</h3>
<p>
Creates a text canvas with given width and height. Then adds pre element to body.
</p>
</li>
</ul>
<ul>
<li>
<h3>
setFPS ( fps: int )
</h3>
<p>
Sets the target framerate to fps and begins the animation loop.
</p>
</li>
</ul>
<ul>
<li>
<h3>
fillScreen ( brush: string )
</h3>
<p>
Fills screen with brush.
</p>
</li>
</ul>
<ul>
<li>
<h3>
print ( text: string, x: int, y: int )
</h3>
<p>
Prints text at given x, y. Text can contain new lines.
</p>
</li>
</ul>
<ul>
<li>
<h3>
get ( x: int, y: int )
</h3>
<p>
Gets the current character at x, y.
</p>
</li>
</ul>
<h2>
Code
</h2>
<ul>
<li>
<a href="./framework.js">
framework.js
</a>
</li>
<li>
<a href="https://github.com/onsclom/AnimatedTextFramework">
GitHub
</a>
</li>
</ul>
</body>
</html>