@micahdb/tscon 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +44 -2
- package/dist/canvas.d.ts +147 -0
- package/dist/canvas.js +369 -0
- package/dist/colour.d.ts +56 -0
- package/dist/colour.js +77 -0
- package/dist/cp437.d.ts +48 -0
- package/dist/cp437.js +124 -0
- package/dist/glyphs.d.ts +222 -0
- package/dist/glyphs.js +449 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +9 -0
- package/dist/math.d.ts +214 -0
- package/dist/math.js +499 -0
- package/dist/moderndos.d.ts +1 -0
- package/dist/moderndos.js +322 -0
- package/dist/program.d.ts +72 -0
- package/dist/program.js +127 -0
- package/dist/rect.d.ts +26 -0
- package/dist/rect.js +1 -0
- package/dist/renderer.d.ts +59 -0
- package/dist/renderer.js +172 -0
- package/dist/shaders.d.ts +5 -0
- package/dist/shaders.js +470 -0
- package/dist/terminal.d.ts +92 -0
- package/dist/terminal.js +275 -0
- package/dist/texture.d.ts +66 -0
- package/dist/texture.js +119 -0
- package/package.json +44 -5
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
// source: https://github.com/susam/pcface/blob/main/out/moderndos-8x16/fontmap.js
|
|
2
|
+
const PC_FACE_MODERNDOS_8X16_FONT_MAP = [
|
|
3
|
+
[], // (0)
|
|
4
|
+
[0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00], // [☺] (1)
|
|
5
|
+
[0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00], // [☻] (2)
|
|
6
|
+
[0x00, 0x00, 0x00, 0x00, 0x6c, 0xee, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00], // [♥] (3)
|
|
7
|
+
[0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00], // [♦] (4)
|
|
8
|
+
[0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x5a, 0xff, 0xff, 0x5a, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00], // [♣] (5)
|
|
9
|
+
[0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0xfe, 0xee, 0x54, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00], // [♠] (6)
|
|
10
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [•] (7)
|
|
11
|
+
[0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff], // [◘] (8)
|
|
12
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00], // [○] (9)
|
|
13
|
+
[0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff], // [◙] (10)
|
|
14
|
+
[0x00, 0x00, 0x1e, 0x0e, 0x1a, 0x30, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00], // [♂] (11)
|
|
15
|
+
[0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00], // [♀] (12)
|
|
16
|
+
[0x00, 0x08, 0x0c, 0x0a, 0x0a, 0x0a, 0x08, 0x08, 0x08, 0x78, 0xf8, 0x70, 0x00, 0x00, 0x00, 0x00], // [♪] (13)
|
|
17
|
+
[0x00, 0x10, 0x18, 0x14, 0x12, 0x1a, 0x16, 0x12, 0x12, 0x72, 0xf2, 0x62, 0x0e, 0x1e, 0x1c, 0x00], // [♫] (14)
|
|
18
|
+
[0x00, 0x00, 0x00, 0x10, 0x92, 0x7c, 0x6c, 0xc6, 0x6c, 0x7c, 0x92, 0x10, 0x00, 0x00, 0x00, 0x00], // [☼] (15)
|
|
19
|
+
[0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf8, 0xfe, 0xf8, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00], // [►] (16)
|
|
20
|
+
[0x00, 0x00, 0x00, 0x02, 0x06, 0x0e, 0x3e, 0xfe, 0x3e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00], // [◄] (17)
|
|
21
|
+
[0x00, 0x00, 0x10, 0x38, 0x7c, 0xd6, 0x10, 0x10, 0xd6, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00], // [↕] (18)
|
|
22
|
+
[0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00], // [‼] (19)
|
|
23
|
+
[0x00, 0x00, 0x7f, 0xdb, 0xdb, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00], // [¶] (20)
|
|
24
|
+
[0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00], // [§] (21)
|
|
25
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00], // [▬] (22)
|
|
26
|
+
[0x00, 0x00, 0x10, 0x38, 0x7c, 0xd6, 0x10, 0x10, 0xd6, 0x7c, 0x38, 0x10, 0xfe, 0x00, 0x00, 0x00], // [↨] (23)
|
|
27
|
+
[0x00, 0x00, 0x10, 0x38, 0x7c, 0xd6, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00], // [↑] (24)
|
|
28
|
+
[0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xd6, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00], // [↓] (25)
|
|
29
|
+
[0x00, 0x00, 0x00, 0x00, 0x10, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00], // [→] (26)
|
|
30
|
+
[0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00], // [←] (27)
|
|
31
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [∟] (28)
|
|
32
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x42, 0xff, 0x42, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [↔] (29)
|
|
33
|
+
[0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00], // [▲] (30)
|
|
34
|
+
[0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00], // [▼] (31)
|
|
35
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [ ] (32)
|
|
36
|
+
[0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00], // [!] (33)
|
|
37
|
+
[0x00, 0x66, 0x66, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // ["] (34)
|
|
38
|
+
[0x00, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00], // [#] (35)
|
|
39
|
+
[0x00, 0x10, 0x10, 0x7c, 0xd6, 0xd6, 0x70, 0x38, 0x1c, 0xd6, 0xd6, 0x7c, 0x10, 0x10, 0x00, 0x00], // [$] (36)
|
|
40
|
+
[0x00, 0x00, 0x60, 0x92, 0x96, 0x6c, 0x18, 0x30, 0x6c, 0xd2, 0x92, 0x0c, 0x00, 0x00, 0x00, 0x00], // [%] (37)
|
|
41
|
+
[0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x30, 0x76, 0xdc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [&] (38)
|
|
42
|
+
[0x00, 0x18, 0x18, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // ['] (39)
|
|
43
|
+
[0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00], // [(] (40)
|
|
44
|
+
[0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00], // [)] (41)
|
|
45
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [*] (42)
|
|
46
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [+] (43)
|
|
47
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x10, 0x20, 0x00, 0x00], // [,] (44)
|
|
48
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [-] (45)
|
|
49
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00], // [.] (46)
|
|
50
|
+
[0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00], // [/] (47)
|
|
51
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xce, 0xde, 0xf6, 0xe6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [0] (48)
|
|
52
|
+
[0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00], // [1] (49)
|
|
53
|
+
[0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00], // [2] (50)
|
|
54
|
+
[0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [3] (51)
|
|
55
|
+
[0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xcc, 0xfe, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00], // [4] (52)
|
|
56
|
+
[0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [5] (53)
|
|
57
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [6] (54)
|
|
58
|
+
[0x00, 0x00, 0xfe, 0xc6, 0x06, 0x06, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00], // [7] (55)
|
|
59
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [8] (56)
|
|
60
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [9] (57)
|
|
61
|
+
[0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00], // [:] (58)
|
|
62
|
+
[0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x08, 0x10, 0x00, 0x00, 0x00], // [;] (59)
|
|
63
|
+
[0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00], // [<] (60)
|
|
64
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [=] (61)
|
|
65
|
+
[0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00], // [>] (62)
|
|
66
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x06, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00], // [?] (63)
|
|
67
|
+
[0x00, 0x00, 0x00, 0x3c, 0x42, 0x9d, 0xa5, 0xa5, 0xad, 0xb6, 0x40, 0x3c, 0x00, 0x00, 0x00, 0x00], // [@] (64)
|
|
68
|
+
[0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00], // [A] (65)
|
|
69
|
+
[0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00], // [B] (66)
|
|
70
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [C] (67)
|
|
71
|
+
[0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00], // [D] (68)
|
|
72
|
+
[0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00], // [E] (69)
|
|
73
|
+
[0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x78, 0x68, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00], // [F] (70)
|
|
74
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc0, 0xc0, 0xce, 0xc6, 0xc6, 0xc6, 0x7e, 0x00, 0x00, 0x00, 0x00], // [G] (71)
|
|
75
|
+
[0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00], // [H] (72)
|
|
76
|
+
[0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00], // [I] (73)
|
|
77
|
+
[0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00], // [J] (74)
|
|
78
|
+
[0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00], // [K] (75)
|
|
79
|
+
[0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00], // [L] (76)
|
|
80
|
+
[0x00, 0x00, 0x82, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00], // [M] (77)
|
|
81
|
+
[0x00, 0x00, 0x86, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00], // [N] (78)
|
|
82
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [O] (79)
|
|
83
|
+
[0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00], // [P] (80)
|
|
84
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xde, 0x7c, 0x06, 0x00, 0x00, 0x00], // [Q] (81)
|
|
85
|
+
[0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00], // [R] (82)
|
|
86
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [S] (83)
|
|
87
|
+
[0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00], // [T] (84)
|
|
88
|
+
[0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [U] (85)
|
|
89
|
+
[0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00], // [V] (86)
|
|
90
|
+
[0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xfe, 0xee, 0xc6, 0x82, 0x00, 0x00, 0x00, 0x00], // [W] (87)
|
|
91
|
+
[0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00], // [X] (88)
|
|
92
|
+
[0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00], // [Y] (89)
|
|
93
|
+
[0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00], // [Z] (90)
|
|
94
|
+
[0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00], // [[] (91)
|
|
95
|
+
[0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00], // [\] (92)
|
|
96
|
+
[0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x00], // []] (93)
|
|
97
|
+
[0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [^] (94)
|
|
98
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00], // [_] (95)
|
|
99
|
+
[0x00, 0x18, 0x18, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [`] (96)
|
|
100
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [a] (97)
|
|
101
|
+
[0x00, 0x00, 0xe0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00], // [b] (98)
|
|
102
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [c] (99)
|
|
103
|
+
[0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [d] (100)
|
|
104
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [e] (101)
|
|
105
|
+
[0x00, 0x00, 0x1c, 0x36, 0x30, 0x7c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00], // [f] (102)
|
|
106
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00], // [g] (103)
|
|
107
|
+
[0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00], // [h] (104)
|
|
108
|
+
[0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00], // [i] (105)
|
|
109
|
+
[0x00, 0x00, 0x0c, 0x0c, 0x00, 0x1c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0x78, 0x00], // [j] (106)
|
|
110
|
+
[0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00], // [k] (107)
|
|
111
|
+
[0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00], // [l] (108)
|
|
112
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00], // [m] (109)
|
|
113
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00], // [n] (110)
|
|
114
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [o] (111)
|
|
115
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00], // [p] (112)
|
|
116
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e, 0x00], // [q] (113)
|
|
117
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x76, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00], // [r] (114)
|
|
118
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [s] (115)
|
|
119
|
+
[0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x34, 0x18, 0x00, 0x00, 0x00, 0x00], // [t] (116)
|
|
120
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [u] (117)
|
|
121
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00], // [v] (118)
|
|
122
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00], // [w] (119)
|
|
123
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x38, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00], // [x] (120)
|
|
124
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00], // [y] (121)
|
|
125
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x8c, 0x18, 0x30, 0x60, 0xc2, 0xfe, 0x00, 0x00, 0x00, 0x00], // [z] (122)
|
|
126
|
+
[0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00], // [{] (123)
|
|
127
|
+
[0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00], // [|] (124)
|
|
128
|
+
[0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00], // [}] (125)
|
|
129
|
+
[0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [~] (126)
|
|
130
|
+
[0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00], // [⌂] (127)
|
|
131
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0, 0xc6, 0xc6, 0x7c, 0x10, 0x08, 0x70, 0x00], // [Ç] (128)
|
|
132
|
+
[0x00, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [ü] (129)
|
|
133
|
+
[0x00, 0x06, 0x0c, 0x10, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [é] (130)
|
|
134
|
+
[0x00, 0x30, 0x78, 0xcc, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [â] (131)
|
|
135
|
+
[0x00, 0x00, 0xcc, 0xcc, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [ä] (132)
|
|
136
|
+
[0x00, 0xc0, 0x60, 0x10, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [à] (133)
|
|
137
|
+
[0x00, 0x30, 0x48, 0x30, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [å] (134)
|
|
138
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x10, 0x08, 0x70, 0x00], // [ç] (135)
|
|
139
|
+
[0x00, 0x18, 0x3c, 0x66, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [ê] (136)
|
|
140
|
+
[0x00, 0x00, 0xc6, 0xc6, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [ë] (137)
|
|
141
|
+
[0x00, 0xc0, 0x60, 0x10, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [è] (138)
|
|
142
|
+
[0x00, 0x00, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00], // [ï] (139)
|
|
143
|
+
[0x00, 0x18, 0x3c, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00], // [î] (140)
|
|
144
|
+
[0x00, 0xc0, 0x60, 0x10, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00], // [ì] (141)
|
|
145
|
+
[0xc6, 0xc6, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00], // [Ä] (142)
|
|
146
|
+
[0x38, 0x44, 0x38, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00], // [Å] (143)
|
|
147
|
+
[0x0c, 0x18, 0x20, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00], // [É] (144)
|
|
148
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x12, 0x72, 0x9e, 0x90, 0x92, 0x7c, 0x00, 0x00, 0x00, 0x00], // [æ] (145)
|
|
149
|
+
[0x00, 0x00, 0x3e, 0x6a, 0xc8, 0xc8, 0xcc, 0xfc, 0xc8, 0xc8, 0xca, 0xce, 0x00, 0x00, 0x00, 0x00], // [Æ] (146)
|
|
150
|
+
[0x00, 0x18, 0x3c, 0x66, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [ô] (147)
|
|
151
|
+
[0x00, 0x00, 0xc6, 0xc6, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [ö] (148)
|
|
152
|
+
[0x00, 0xc0, 0x60, 0x10, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [ò] (149)
|
|
153
|
+
[0x00, 0x30, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [û] (150)
|
|
154
|
+
[0x00, 0xc0, 0x60, 0x10, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [ù] (151)
|
|
155
|
+
[0x00, 0x00, 0xc6, 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0x78, 0x00], // [ÿ] (152)
|
|
156
|
+
[0xc6, 0xc6, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [Ö] (153)
|
|
157
|
+
[0xc6, 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [Ü] (154)
|
|
158
|
+
[0x00, 0x00, 0x10, 0x10, 0x7c, 0xd6, 0xd0, 0xd0, 0xd6, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00], // [¢] (155)
|
|
159
|
+
[0x00, 0x00, 0x38, 0x6c, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xf2, 0xdc, 0x00, 0x00, 0x00, 0x00], // [£] (156)
|
|
160
|
+
[0x00, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00], // [¥] (157)
|
|
161
|
+
[0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xf8, 0xc4, 0xcc, 0xde, 0xcc, 0xcc, 0xc6, 0x00, 0x00, 0x00, 0x00], // [₧] (158)
|
|
162
|
+
[0x00, 0x00, 0x0e, 0x1b, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0x70, 0x00], // [ƒ] (159)
|
|
163
|
+
[0x00, 0x06, 0x0c, 0x10, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [á] (160)
|
|
164
|
+
[0x00, 0x06, 0x0c, 0x10, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00], // [í] (161)
|
|
165
|
+
[0x00, 0x06, 0x0c, 0x10, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [ó] (162)
|
|
166
|
+
[0x00, 0x06, 0x0c, 0x10, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00], // [ú] (163)
|
|
167
|
+
[0x00, 0x00, 0x76, 0xdc, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00], // [ñ] (164)
|
|
168
|
+
[0x76, 0xdc, 0x00, 0x86, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00], // [Ñ] (165)
|
|
169
|
+
[0x00, 0x38, 0x0c, 0x3c, 0x6c, 0x36, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [ª] (166)
|
|
170
|
+
[0x00, 0x00, 0x3c, 0x66, 0x66, 0x3c, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [º] (167)
|
|
171
|
+
[0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xc0, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [¿] (168)
|
|
172
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00], // [⌐] (169)
|
|
173
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00], // [¬] (170)
|
|
174
|
+
[0x00, 0x60, 0xe0, 0x64, 0x6c, 0x78, 0x30, 0x60, 0xdc, 0xb6, 0x0c, 0x18, 0x3e, 0x00, 0x00, 0x00], // [½] (171)
|
|
175
|
+
[0x00, 0x60, 0xe0, 0x64, 0x6c, 0x78, 0x30, 0x6c, 0xdc, 0xac, 0x3e, 0x0c, 0x0c, 0x00, 0x00, 0x00], // [¼] (172)
|
|
176
|
+
[0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00], // [¡] (173)
|
|
177
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xd8, 0x6c, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [«] (174)
|
|
178
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, 0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [»] (175)
|
|
179
|
+
[0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88], // [░] (176)
|
|
180
|
+
[0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa], // [▒] (177)
|
|
181
|
+
[0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x7f], // [▓] (178)
|
|
182
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [│] (179)
|
|
183
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [┤] (180)
|
|
184
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [╡] (181)
|
|
185
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╢] (182)
|
|
186
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╖] (183)
|
|
187
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [╕] (184)
|
|
188
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╣] (185)
|
|
189
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [║] (186)
|
|
190
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╗] (187)
|
|
191
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [╝] (188)
|
|
192
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [╜] (189)
|
|
193
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [╛] (190)
|
|
194
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [┐] (191)
|
|
195
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [└] (192)
|
|
196
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [┴] (193)
|
|
197
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [┬] (194)
|
|
198
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [├] (195)
|
|
199
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [─] (196)
|
|
200
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [┼] (197)
|
|
201
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [╞] (198)
|
|
202
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╟] (199)
|
|
203
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [╚] (200)
|
|
204
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╔] (201)
|
|
205
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [╩] (202)
|
|
206
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╦] (203)
|
|
207
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╠] (204)
|
|
208
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [═] (205)
|
|
209
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╬] (206)
|
|
210
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [╧] (207)
|
|
211
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [╨] (208)
|
|
212
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [╤] (209)
|
|
213
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╥] (210)
|
|
214
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [╙] (211)
|
|
215
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [╘] (212)
|
|
216
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [╒] (213)
|
|
217
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╓] (214)
|
|
218
|
+
[0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36], // [╫] (215)
|
|
219
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [╪] (216)
|
|
220
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [┘] (217)
|
|
221
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [┌] (218)
|
|
222
|
+
[0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff], // [█] (219)
|
|
223
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff], // [▄] (220)
|
|
224
|
+
[0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0], // [▌] (221)
|
|
225
|
+
[0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f], // [▐] (222)
|
|
226
|
+
[0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [▀] (223)
|
|
227
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0xdc, 0xc8, 0xc8, 0xc8, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00], // [α] (224)
|
|
228
|
+
[0x00, 0x00, 0x78, 0xcc, 0xcc, 0xd8, 0xcc, 0xc6, 0xc6, 0xc6, 0xdc, 0xc0, 0x40, 0x00, 0x00, 0x00], // [ß] (225)
|
|
229
|
+
[0x00, 0x00, 0xfe, 0x62, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00], // [Γ] (226)
|
|
230
|
+
[0x00, 0x00, 0x00, 0x00, 0x02, 0x7e, 0xec, 0x6c, 0x6c, 0x6c, 0x6c, 0x48, 0x00, 0x00, 0x00, 0x00], // [π] (227)
|
|
231
|
+
[0x00, 0x00, 0xfe, 0xc2, 0x60, 0x30, 0x18, 0x30, 0x60, 0xc0, 0xc2, 0xfe, 0x00, 0x00, 0x00, 0x00], // [Σ] (228)
|
|
232
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xd0, 0xc8, 0xc8, 0xc8, 0xc8, 0x70, 0x00, 0x00, 0x00, 0x00], // [σ] (229)
|
|
233
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xf8, 0x80, 0x80, 0x00, 0x00], // [µ] (230)
|
|
234
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xd8, 0x18, 0x18, 0x18, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00], // [τ] (231)
|
|
235
|
+
[0x00, 0x00, 0x38, 0x10, 0x7c, 0xd6, 0xd6, 0xd6, 0xd6, 0x7c, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00], // [Φ] (232)
|
|
236
|
+
[0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00], // [Θ] (233)
|
|
237
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x28, 0x28, 0xee, 0x00, 0x00, 0x00, 0x00], // [Ω] (234)
|
|
238
|
+
[0x00, 0x00, 0x3c, 0x62, 0x30, 0x18, 0x7c, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00], // [δ] (235)
|
|
239
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0xdb, 0xdb, 0xdb, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [∞] (236)
|
|
240
|
+
[0x00, 0x00, 0x00, 0x02, 0x06, 0x7c, 0xce, 0xde, 0xd6, 0xf6, 0xe6, 0x7c, 0xc0, 0x80, 0x00, 0x00], // [φ] (237)
|
|
241
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x60, 0xc0, 0xf8, 0xc0, 0x60, 0x3c, 0x00, 0x00, 0x00, 0x00], // [ε] (238)
|
|
242
|
+
[0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00], // [∩] (239)
|
|
243
|
+
[0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00], // [≡] (240)
|
|
244
|
+
[0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00], // [±] (241)
|
|
245
|
+
[0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x18, 0x30, 0x60, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00], // [≥] (242)
|
|
246
|
+
[0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00], // [≤] (243)
|
|
247
|
+
[0x00, 0x00, 0x0e, 0x1b, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18], // [⌠] (244)
|
|
248
|
+
[0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00], // [⌡] (245)
|
|
249
|
+
[0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00], // [÷] (246)
|
|
250
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [≈] (247)
|
|
251
|
+
[0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [°] (248)
|
|
252
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [∙] (249)
|
|
253
|
+
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [·] (250)
|
|
254
|
+
[0x00, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xec, 0x6c, 0x6c, 0x3c, 0x1c, 0x00, 0x00, 0x00, 0x00], // [√] (251)
|
|
255
|
+
[0x00, 0xd8, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [ⁿ] (252)
|
|
256
|
+
[0x00, 0x38, 0x4c, 0x0c, 0x18, 0x30, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], // [²] (253)
|
|
257
|
+
[0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00], // [■] (254)
|
|
258
|
+
];
|
|
259
|
+
/*
|
|
260
|
+
The above binary font is layed out in a texture where a single glyph spans a column of four pixels;
|
|
261
|
+
each pixel is four bytes (expressed as RGBA), where each of these bytes forms a "stack" of a glyph.
|
|
262
|
+
Thus, as each glyph is 8 bits by 16 bits, each row of a glyph is 1 byte, and as there are 16 rows,
|
|
263
|
+
then it needs 16 bytes for the whole glyph; as each pixel is RGBA, then it needs 16 / 4 = 4 pixels
|
|
264
|
+
for the whole glyph. The layout where a single pixel in the texture is a stack for a single glyph
|
|
265
|
+
rather than side by side rows in four separate glyphs is so that the final texture size is 32 by 32,
|
|
266
|
+
which is much nicer than 8 by 128.
|
|
267
|
+
|
|
268
|
+
Following is an example 4x4 texture for the glyphs "ABCD" in the above font, where each pixel is
|
|
269
|
+
stacked in the proper representation into visual "blocks". Each block is a pixel in the texture,
|
|
270
|
+
and is therefore ordered in memory from left-to-right, top-to-bottom:
|
|
271
|
+
|
|
272
|
+
00000000 00000000 00000000 00000000
|
|
273
|
+
00000000 00000000 00000000 00000000
|
|
274
|
+
00111000 11111100 01111100 11111100
|
|
275
|
+
01101100 01100110 11000110 01100110
|
|
276
|
+
|
|
277
|
+
11000110 01100110 11000110 01100110
|
|
278
|
+
11000110 01100110 11000000 01100110
|
|
279
|
+
11000110 01111100 11000000 01100110
|
|
280
|
+
11111110 01100110 11000000 01100110
|
|
281
|
+
|
|
282
|
+
11000110 01100110 11000000 01100110
|
|
283
|
+
11000110 01100110 11000110 01100110
|
|
284
|
+
11000110 01100110 11000110 01100110
|
|
285
|
+
11000110 11111100 01111100 11111100
|
|
286
|
+
|
|
287
|
+
00000000 00000000 00000000 00000000
|
|
288
|
+
00000000 00000000 00000000 00000000
|
|
289
|
+
00000000 00000000 00000000 00000000
|
|
290
|
+
00000000 00000000 00000000 00000000
|
|
291
|
+
*/
|
|
292
|
+
export function loadModernDosTexture(gl) {
|
|
293
|
+
// see above comment for why the width/height of the texture is 32x32
|
|
294
|
+
const width = 32;
|
|
295
|
+
const height = 32;
|
|
296
|
+
// each pixel is RGBA and takes 4 bytes
|
|
297
|
+
const pixels = new Uint8Array(width * height * 4);
|
|
298
|
+
const cols = 32; // in terms of glyphs
|
|
299
|
+
//const rows = 8;
|
|
300
|
+
// for every glyph in the moderndos font
|
|
301
|
+
for (let i = 1; i < 255; i++) {
|
|
302
|
+
const x = i % cols;
|
|
303
|
+
const y = 4 * Math.floor(i / cols);
|
|
304
|
+
const bytes = PC_FACE_MODERNDOS_8X16_FONT_MAP[i];
|
|
305
|
+
// copy bytes from the font to the corresponding region in the texture
|
|
306
|
+
for (let j = 0; j < 4; j++) {
|
|
307
|
+
// sets 4 bytes at a time
|
|
308
|
+
const idx = ((y + j) * width + x) * 4;
|
|
309
|
+
pixels.set(bytes.slice(j * 4, j * 4 + 4), idx);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
// create and store texture as created
|
|
313
|
+
const tex = gl.createTexture();
|
|
314
|
+
gl.bindTexture(gl.TEXTURE_2D, tex);
|
|
315
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
|
|
316
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
|
|
317
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
318
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
319
|
+
gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
|
|
320
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA8UI, width, height, 0, gl.RGBA_INTEGER, gl.UNSIGNED_BYTE, pixels);
|
|
321
|
+
return tex;
|
|
322
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile, link, and return a WebGL2 shader program from GLSL source.
|
|
3
|
+
*
|
|
4
|
+
* Throws with the GL info log if either shader fails to compile or the
|
|
5
|
+
* program fails to link.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { compileProgram } from "@micahdb/tscon";
|
|
10
|
+
*
|
|
11
|
+
* const program = compileProgram(gl, vertSrc, fragSrc);
|
|
12
|
+
* gl.useProgram(program);
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @param gl The WebGL2 context.
|
|
16
|
+
* @param vertex_shader GLSL source for the vertex shader.
|
|
17
|
+
* @param fragment_shader GLSL source for the fragment shader.
|
|
18
|
+
* @returns The linked `WebGLProgram`.
|
|
19
|
+
* @throws If either shader fails to compile, or the program
|
|
20
|
+
* fails to link, with the GL info log in the message.
|
|
21
|
+
*/
|
|
22
|
+
export declare function compileProgram(gl: WebGL2RenderingContext, vertex_shader: string, fragment_shader: string): WebGLProgram;
|
|
23
|
+
/**
|
|
24
|
+
* Look up the locations of several vertex attributes at once.
|
|
25
|
+
*
|
|
26
|
+
* `mapping` is a record from an application-defined key to the GLSL attribute
|
|
27
|
+
* name as written in the shader. The returned record maps each key to the
|
|
28
|
+
* attribute's location.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { getAttribLocations } from "@micahdb/tscon";
|
|
33
|
+
*
|
|
34
|
+
* const attributes = getAttribLocations(gl, program, {
|
|
35
|
+
* position: "a_position",
|
|
36
|
+
* normal: "a_normal",
|
|
37
|
+
* uv: "a_uv_coord",
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @param gl The WebGL2 context.
|
|
42
|
+
* @param program The compiled/linked program to query.
|
|
43
|
+
* @param mapping Key -> GLSL attribute name.
|
|
44
|
+
* @returns Key -> attribute location.
|
|
45
|
+
* @throws If any attribute is not found (location < 0).
|
|
46
|
+
*/
|
|
47
|
+
export declare function getAttribLocations(gl: WebGL2RenderingContext, program: WebGLProgram, mapping: Record<string, string>): Record<string, number>;
|
|
48
|
+
/**
|
|
49
|
+
* Look up the locations of several uniforms at once.
|
|
50
|
+
*
|
|
51
|
+
* `mapping` is a record from an application-defined key to the GLSL uniform
|
|
52
|
+
* name as written in the shader. The returned record maps each key to the
|
|
53
|
+
* uniform's `WebGLUniformLocation`.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* import { getUniformLocations } from "@micahdb/tscon";
|
|
58
|
+
*
|
|
59
|
+
* const uniforms = getUniformLocations(gl, program, {
|
|
60
|
+
* projection: "u_projection_matrix",
|
|
61
|
+
* view: "u_view_matrix",
|
|
62
|
+
* model: "u_model_matrix",
|
|
63
|
+
* });
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @param gl The WebGL2 context.
|
|
67
|
+
* @param program The compiled/linked program to query.
|
|
68
|
+
* @param mapping Key -> GLSL uniform name.
|
|
69
|
+
* @returns Key -> uniform location.
|
|
70
|
+
* @throws If any uniform is not found.
|
|
71
|
+
*/
|
|
72
|
+
export declare function getUniformLocations(gl: WebGL2RenderingContext, program: WebGLProgram, mapping: Record<string, string>): Record<string, WebGLUniformLocation>;
|
package/dist/program.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile, link, and return a WebGL2 shader program from GLSL source.
|
|
3
|
+
*
|
|
4
|
+
* Throws with the GL info log if either shader fails to compile or the
|
|
5
|
+
* program fails to link.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { compileProgram } from "@micahdb/tscon";
|
|
10
|
+
*
|
|
11
|
+
* const program = compileProgram(gl, vertSrc, fragSrc);
|
|
12
|
+
* gl.useProgram(program);
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @param gl The WebGL2 context.
|
|
16
|
+
* @param vertex_shader GLSL source for the vertex shader.
|
|
17
|
+
* @param fragment_shader GLSL source for the fragment shader.
|
|
18
|
+
* @returns The linked `WebGLProgram`.
|
|
19
|
+
* @throws If either shader fails to compile, or the program
|
|
20
|
+
* fails to link, with the GL info log in the message.
|
|
21
|
+
*/
|
|
22
|
+
export function compileProgram(gl, vertex_shader, fragment_shader) {
|
|
23
|
+
const vert = gl.createShader(gl.VERTEX_SHADER);
|
|
24
|
+
if (!vert) {
|
|
25
|
+
throw new Error("When creating vertex shader");
|
|
26
|
+
}
|
|
27
|
+
gl.shaderSource(vert, vertex_shader);
|
|
28
|
+
gl.compileShader(vert);
|
|
29
|
+
if (!gl.getShaderParameter(vert, gl.COMPILE_STATUS)) {
|
|
30
|
+
throw new Error("When compiling vertex shader: " +
|
|
31
|
+
gl.getShaderInfoLog(vert));
|
|
32
|
+
}
|
|
33
|
+
const frag = gl.createShader(gl.FRAGMENT_SHADER);
|
|
34
|
+
if (!frag) {
|
|
35
|
+
throw new Error("When creating fragment shader");
|
|
36
|
+
}
|
|
37
|
+
gl.shaderSource(frag, fragment_shader);
|
|
38
|
+
gl.compileShader(frag);
|
|
39
|
+
if (!gl.getShaderParameter(frag, gl.COMPILE_STATUS)) {
|
|
40
|
+
throw new Error("When compiling fragment shader: " +
|
|
41
|
+
gl.getShaderInfoLog(frag));
|
|
42
|
+
}
|
|
43
|
+
const prog = gl.createProgram();
|
|
44
|
+
if (!prog) {
|
|
45
|
+
throw new Error("When creating GPU program");
|
|
46
|
+
}
|
|
47
|
+
gl.attachShader(prog, vert);
|
|
48
|
+
gl.attachShader(prog, frag);
|
|
49
|
+
gl.linkProgram(prog);
|
|
50
|
+
if (!gl.getProgramParameter(prog, gl.LINK_STATUS)) {
|
|
51
|
+
throw new Error("When linking shader program: " +
|
|
52
|
+
gl.getProgramInfoLog(prog));
|
|
53
|
+
}
|
|
54
|
+
return prog;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Look up the locations of several vertex attributes at once.
|
|
58
|
+
*
|
|
59
|
+
* `mapping` is a record from an application-defined key to the GLSL attribute
|
|
60
|
+
* name as written in the shader. The returned record maps each key to the
|
|
61
|
+
* attribute's location.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* import { getAttribLocations } from "@micahdb/tscon";
|
|
66
|
+
*
|
|
67
|
+
* const attributes = getAttribLocations(gl, program, {
|
|
68
|
+
* position: "a_position",
|
|
69
|
+
* normal: "a_normal",
|
|
70
|
+
* uv: "a_uv_coord",
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* @param gl The WebGL2 context.
|
|
75
|
+
* @param program The compiled/linked program to query.
|
|
76
|
+
* @param mapping Key -> GLSL attribute name.
|
|
77
|
+
* @returns Key -> attribute location.
|
|
78
|
+
* @throws If any attribute is not found (location < 0).
|
|
79
|
+
*/
|
|
80
|
+
export function getAttribLocations(gl, program, mapping) {
|
|
81
|
+
const attributes = {};
|
|
82
|
+
for (const key of Object.keys(mapping)) {
|
|
83
|
+
const name_in_program = mapping[key];
|
|
84
|
+
const location = gl.getAttribLocation(program, name_in_program);
|
|
85
|
+
if (location < 0) {
|
|
86
|
+
throw new Error(`When getting attribute location for ${name_in_program}`);
|
|
87
|
+
}
|
|
88
|
+
attributes[key] = location;
|
|
89
|
+
}
|
|
90
|
+
return attributes;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Look up the locations of several uniforms at once.
|
|
94
|
+
*
|
|
95
|
+
* `mapping` is a record from an application-defined key to the GLSL uniform
|
|
96
|
+
* name as written in the shader. The returned record maps each key to the
|
|
97
|
+
* uniform's `WebGLUniformLocation`.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* import { getUniformLocations } from "@micahdb/tscon";
|
|
102
|
+
*
|
|
103
|
+
* const uniforms = getUniformLocations(gl, program, {
|
|
104
|
+
* projection: "u_projection_matrix",
|
|
105
|
+
* view: "u_view_matrix",
|
|
106
|
+
* model: "u_model_matrix",
|
|
107
|
+
* });
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* @param gl The WebGL2 context.
|
|
111
|
+
* @param program The compiled/linked program to query.
|
|
112
|
+
* @param mapping Key -> GLSL uniform name.
|
|
113
|
+
* @returns Key -> uniform location.
|
|
114
|
+
* @throws If any uniform is not found.
|
|
115
|
+
*/
|
|
116
|
+
export function getUniformLocations(gl, program, mapping) {
|
|
117
|
+
const uniforms = {};
|
|
118
|
+
for (const key of Object.keys(mapping)) {
|
|
119
|
+
const name_in_program = mapping[key];
|
|
120
|
+
const location = gl.getUniformLocation(program, name_in_program);
|
|
121
|
+
if (!location) {
|
|
122
|
+
throw new Error(`When getting uniform location for ${name_in_program}`);
|
|
123
|
+
}
|
|
124
|
+
uniforms[key] = location;
|
|
125
|
+
}
|
|
126
|
+
return uniforms;
|
|
127
|
+
}
|
package/dist/rect.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A rectangular region of a terminal grid, expressed in cell coordinates.
|
|
3
|
+
*
|
|
4
|
+
* A `Rect` describes a region by its top-left origin (`row`, `col`) and its
|
|
5
|
+
* size in cells (`rows`, `cols`). It is used throughout tscon to describe both
|
|
6
|
+
* source regions of glyph data and destination regions on the canvas when
|
|
7
|
+
* blitting.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import type { Rect } from "@micahdb/tscon";
|
|
12
|
+
*
|
|
13
|
+
* // a 10x40 region starting at row 2, column 4
|
|
14
|
+
* const region: Rect = { row: 2, col: 4, rows: 10, cols: 40 };
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export type Rect = {
|
|
18
|
+
/** Row index (y) of the top-left cell of the region. */
|
|
19
|
+
row: number;
|
|
20
|
+
/** Column index (x) of the top-left cell of the region. */
|
|
21
|
+
col: number;
|
|
22
|
+
/** Height of the region, in cells (rows). */
|
|
23
|
+
rows: number;
|
|
24
|
+
/** Width of the region, in cells (columns). */
|
|
25
|
+
cols: number;
|
|
26
|
+
};
|
package/dist/rect.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Canvas } from "./canvas.ts";
|
|
2
|
+
import type { TexGlyphs } from "./glyphs.ts";
|
|
3
|
+
import type { Rect } from "./rect.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Renders a source texture as glyphs onto a {@link Canvas}.
|
|
6
|
+
*
|
|
7
|
+
* `Renderer` draws a grid of {@link TexGlyphs} cells, sampling an
|
|
8
|
+
* application-provided texture per cell according to each cell's
|
|
9
|
+
* {@link TexGlyphMode}. An application renders into a texture (e.g. a
|
|
10
|
+
* framebuffer object) and then calls {@link draw} with a matching
|
|
11
|
+
* {@link TexGlyphs} grid to draw that texture directly or as dithered
|
|
12
|
+
* coloured characters.
|
|
13
|
+
*/
|
|
14
|
+
export declare class Renderer {
|
|
15
|
+
private gl_program;
|
|
16
|
+
private attributes;
|
|
17
|
+
private uniforms;
|
|
18
|
+
private vao;
|
|
19
|
+
private vbo;
|
|
20
|
+
private resized;
|
|
21
|
+
/** The {@link Canvas} this renderer draws into. */
|
|
22
|
+
canvas: Canvas;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to use {@link Canvas.user_font} for non-box glyphs when
|
|
25
|
+
* available. Set to `true` by the application after assigning a font
|
|
26
|
+
* texture to `canvas.user_font`; automatically falls back to the bitmap
|
|
27
|
+
* font if `user_font` is `null`.
|
|
28
|
+
*/
|
|
29
|
+
use_user_font: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Initializes the renderer for use.
|
|
32
|
+
* Listens for `"resize"` events from the canvas.
|
|
33
|
+
*
|
|
34
|
+
* @param canvas The canvas to draw into.
|
|
35
|
+
*/
|
|
36
|
+
constructor(canvas: Canvas);
|
|
37
|
+
/**
|
|
38
|
+
* Draw a {@link TexGlyphs} grid sampling `texture` into a region of the
|
|
39
|
+
* canvas.
|
|
40
|
+
*
|
|
41
|
+
* `tglyphs.rows`/`cols` must match `dst.rows`/`cols`; otherwise the
|
|
42
|
+
* draw is skipped. `dst` is in canvas cell coordinates and may extend
|
|
43
|
+
* beyond the canvas; the shader clips via NDC. Use a `tglyphs` grid
|
|
44
|
+
* sized to the texture's aspect so the texture isn't distorted.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* renderer.draw(tglyphs, texture, {
|
|
49
|
+
* row: 0, col: 0,
|
|
50
|
+
* rows: tglyphs.rows, cols: tglyphs.cols,
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @param tglyphs Texture-glyph grid describing how to sample.
|
|
55
|
+
* @param texture Source texture to sample from.
|
|
56
|
+
* @param dst Destination region on the canvas (cells).
|
|
57
|
+
*/
|
|
58
|
+
draw(tglyphs: TexGlyphs, texture: WebGLTexture, dst: Rect): void;
|
|
59
|
+
}
|