textmode.js 0.1.9-beta.5 → 0.1.9
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 +14 -13
- package/dist/textmode.esm.js +1032 -1006
- package/dist/textmode.esm.min.js +952 -926
- package/dist/textmode.umd.js +14 -14
- package/dist/textmode.umd.min.js +16 -16
- package/dist/types/ColorPalette.d.ts +2 -5
- package/dist/types/export/txt/TXTDataExtractor.d.ts +3 -3
- package/dist/types/export/txt/types.d.ts +5 -3
- package/dist/types/index.d.ts +2 -1
- package/dist/types/rendering/core/Framebuffer.d.ts +140 -0
- package/dist/types/rendering/core/Shader.d.ts +59 -0
- package/dist/types/rendering/core/index.d.ts +2 -0
- package/dist/types/rendering/index.d.ts +3 -2
- package/dist/types/rendering/webgl/Framebuffer.d.ts +5 -20
- package/dist/types/rendering/webgl/Renderer.d.ts +9 -7
- package/dist/types/rendering/webgl/Shader.d.ts +23 -7
- package/dist/types/textmode/ConversionPipeline.d.ts +1 -1
- package/dist/types/textmode/Textmodifier.d.ts +4 -4
- package/dist/types/textmode/converters/BrightnessConverter.d.ts +25 -25
- package/dist/types/textmode/converters/Converter.d.ts +12 -5
- package/dist/types/textmode/converters/FeatureConverter.d.ts +27 -5
- package/dist/types/textmode/converters/index.d.ts +3 -3
- package/dist/types/textmode/font/TextmodeFont.d.ts +2 -2
- package/dist/types/textmode/font/TextureAtlas.d.ts +2 -2
- package/dist/types/textmode/font/utils/FontTableReader.d.ts +2 -7
- package/dist/types/textmode/mixins/RenderingMixin.d.ts +3 -3
- package/package.json +1 -1
- package/dist/types/rendering/core/AbstractFramebuffer.d.ts +0 -1
- package/dist/types/rendering/core/AbstractGeometry.d.ts +0 -1
- package/dist/types/rendering/core/AbstractShader.d.ts +0 -1
- package/dist/types/rendering/core/AbstractTexture.d.ts +0 -1
- package/dist/types/rendering/core/GraphicsContext.d.ts +0 -1
package/README.md
CHANGED
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
Transform any `<canvas>` or `<video>` element into dynamic ASCII representations with blazing-fast WebGL rendering. Whether you're using p5.js, three.js, or vanilla JavaScript, textmode.js seamlessly integrates with your existing projects to create interactive textmode games, live visual performances, and artistic installations.
|
|
16
16
|
|
|
17
|
-
For standalone projects, textmode.js provides its own p5.js-inspired drawing API, letting you create compelling ASCII experiences without additional dependencies.
|
|
17
|
+
For standalone projects, textmode.js provides its own p5.js-inspired drawing API, letting you create compelling ASCII experiences without additional dependencies.
|
|
18
|
+
|
|
19
|
+
The library powers live coding performances, interactive installations, and digital art projects worldwide, bringing the nostalgic aesthetic of textmode art into modern web development.
|
|
18
20
|
|
|
19
21
|
## Features
|
|
20
22
|
- **Dependency-free**: No external libraries required, making it lightweight and easy to integrate into any project.
|
|
@@ -23,7 +25,7 @@ For standalone projects, textmode.js provides its own p5.js-inspired drawing API
|
|
|
23
25
|
- **Standalone drawing API**: Use the built-in `p5.js`-like drawing API for creating textmode art without any other dependencies.
|
|
24
26
|
- **Injectable**: Easily inject `textmode.js` into websites like YouTube to convert `<video>` or `<canvas>` elements into textmode representations for a unique viewing experience.
|
|
25
27
|
- **WebGL1/WebGL2 support**: All shader code provided by `textmode.js` is written in `GLSL ES 1.0`, making it compatible with both `WebGL1` and `WebGL2` contexts, allowing for a wide range of devices to run your ASCII projects.
|
|
26
|
-
- **Exporting**: Export your creations to various image formats, and as `.txt`, `.svg` and
|
|
28
|
+
- **Exporting**: Export your creations to various image formats, and as `.txt`, `.svg` and image files for easy sharing, printing and plotting.
|
|
27
29
|
- **Typescript support**: Fully typed library with TypeScript definitions, making it easy to integrate into TypeScript projects and ensuring type safety.
|
|
28
30
|
|
|
29
31
|
## Installation
|
|
@@ -41,20 +43,18 @@ To get started with `textmode.js`, you'll need:
|
|
|
41
43
|
|
|
42
44
|
| Bundle type | File size | Font included? | Best for |
|
|
43
45
|
|-------------|-----------|---------------|----------|
|
|
44
|
-
| **Standard UMD
|
|
45
|
-
| **Standard ESM
|
|
46
|
-
| **Minified UMD
|
|
47
|
-
| **Minified ESM
|
|
46
|
+
| **Standard UMD** (`textmode.umd.js`) | ~111kB | ✅ [UrsaFont](https://ursafrank.itch.io/ursafont) embedded | Quick setup, prototyping |
|
|
47
|
+
| **Standard ESM** (`textmode.esm.js`) | ~128kB | ✅ [UrsaFont](https://ursafrank.itch.io/ursafont) embedded | Quick setup, prototyping |
|
|
48
|
+
| **Minified UMD** (`textmode.umd.min.js`) | ~64kB | ❌ Requires external font | Production apps, custom fonts |
|
|
49
|
+
| **Minified ESM** (`textmode.esm.min.js`) | ~82kB | ❌ Requires external font | Production apps, custom fonts |
|
|
48
50
|
|
|
49
|
-
**Choose
|
|
50
|
-
-
|
|
51
|
+
**Choose standard bundles for:**
|
|
52
|
+
- Quick setup with no additional configuration
|
|
51
53
|
- Everything embedded and ready to use
|
|
52
54
|
- Getting started without worrying about fonts
|
|
53
55
|
|
|
54
|
-
**Choose
|
|
55
|
-
-
|
|
56
|
-
- Custom fonts instead of the default
|
|
57
|
-
- Production applications requiring maximum performance
|
|
56
|
+
**Choose minified bundles for:**
|
|
57
|
+
- Production applications that don't use the embedded font
|
|
58
58
|
|
|
59
59
|
#### UMD
|
|
60
60
|
|
|
@@ -142,7 +142,8 @@ The documentation will help you unlock the full potential of `textmode.js` in yo
|
|
|
142
142
|
|
|
143
143
|
## Acknowledgements
|
|
144
144
|
|
|
145
|
-
`textmode.js` uses a custom-made minified version of [`Typr.js`](https://github.com/photopea/Typr.js) by [**Photopea**](https://github.com/photopea) for font loading and parsing, containing only the necessary components for our use case. `Typr.js` is licensed under the [**MIT License**](https://github.com/photopea/Typr.js/blob/main/LICENSE).
|
|
145
|
+
`textmode.js` uses a custom-made TypeScript rewrite and minified version of [`Typr.js`](https://github.com/photopea/Typr.js) by [**Photopea**](https://github.com/photopea) for font loading and parsing, containing only the necessary components for our use case. `Typr.js` is licensed under the [**MIT License**](https://github.com/photopea/Typr.js/blob/main/LICENSE).
|
|
146
|
+
|
|
146
147
|
|
|
147
148
|
The non-minified version of `textmode.js` ships with [`UrsaFont`](https://ursafrank.itch.io/ursafont) as the default font, created by [**UrsaFrank**](https://ursafrank.itch.io/). This font is available under the [**CC0 (Creative Commons Zero) license**](https://creativecommons.org/publicdomain/zero/1.0/).
|
|
148
149
|
|