textmode.js 0.9.0-beta.4 → 0.9.0-beta.5
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/README.md +11 -3
- package/dist/textmode.esm.js +2607 -2454
- package/dist/textmode.umd.js +15 -15
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ The library is designed to be easy to use and accessible to developers of all sk
|
|
|
21
21
|
- Filter system with built-in filters and support for custom filter shaders
|
|
22
22
|
- Load images and videos as sources and render them in customizable textmode styles
|
|
23
23
|
- Author custom filter shaders in [`GLSL ES 3.00`](https://registry.khronos.org/OpenGL/specs/es/3.0/GLSL_ES_Specification_3.00.pdf) for advanced effects
|
|
24
|
-
- Flexible exporting: TXT, SVG, raster images *(PNG/JPG/WebP)*, animated GIFs, and video *(WebM)*
|
|
24
|
+
- Flexible exporting: TXT, SVG, raster images *(PNG/JPG/WebP)*, animated GIFs, and video *(WebM)* via [`textmode.export.js`](https://github.com/humanbydefinition/textmode.export.js)
|
|
25
25
|
- Animation loop control: `frameRate`, `loop`/`noLoop`, `redraw`, `frameCount`, etc.
|
|
26
26
|
- Framework-agnostic: Use `textmode.js` with any canvas-based framework or library
|
|
27
27
|
- Zero dependencies, written in TypeScript, with comprehensive type definitions
|
|
@@ -97,7 +97,11 @@ t.draw(() => {
|
|
|
97
97
|
t.background(32); // Dark gray background
|
|
98
98
|
|
|
99
99
|
t.char('A');
|
|
100
|
-
|
|
100
|
+
|
|
101
|
+
// Set drawing color to red
|
|
102
|
+
t.charColor(255, 0, 0);
|
|
103
|
+
|
|
104
|
+
// Draw a rectangle of 'A's in the top-left quarter
|
|
101
105
|
t.translate(-t.grid.cols / 4, -t.grid.rows / 4);
|
|
102
106
|
t.rect(t.grid.cols / 2, t.grid.rows / 2);
|
|
103
107
|
|
|
@@ -153,7 +157,11 @@ t.draw(() => {
|
|
|
153
157
|
t.background(32); // Dark gray background
|
|
154
158
|
|
|
155
159
|
t.char('A');
|
|
156
|
-
|
|
160
|
+
|
|
161
|
+
// Set drawing color to red
|
|
162
|
+
t.charColor(255, 0, 0);
|
|
163
|
+
|
|
164
|
+
// Draw a rectangle of 'A's in the top-left quarter
|
|
157
165
|
t.translate(-t.grid.cols / 4, -t.grid.rows / 4);
|
|
158
166
|
t.rect(t.grid.cols / 2, t.grid.rows / 2);
|
|
159
167
|
|