asciify-engine 1.0.98 → 1.0.100
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 +35 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/asciify-engine/SKILL.md +30 -2
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ description: Convert images, videos, GIFs, webcam streams, text, and animated ba
|
|
|
8
8
|
Use this skill for the `asciify-engine` npm package.
|
|
9
9
|
|
|
10
10
|
**Package:** `asciify-engine`
|
|
11
|
-
**Current version:** `1.0.
|
|
11
|
+
**Current version:** `1.0.100`
|
|
12
12
|
**Playground:** https://asciify.org
|
|
13
13
|
**GitHub:** https://github.com/ayangabryl/asciify-engine
|
|
14
14
|
|
|
@@ -36,7 +36,7 @@ npm install asciify-engine
|
|
|
36
36
|
For existing apps, install the latest tested version:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
npm install asciify-engine@1.0.
|
|
39
|
+
npm install asciify-engine@1.0.100
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
## Mental Model
|
|
@@ -90,6 +90,30 @@ options: {
|
|
|
90
90
|
|
|
91
91
|
For centered crops, `sourceCrop: { height: 0.7 }` keeps 70% of the source and crops equally from top/bottom plus left/right as needed. Set `preserveAspect: false` only when an exact source window is more important than avoiding stretch. `sourceCrop` is opt-in; when omitted, the engine samples the full source exactly as older versions did.
|
|
92
92
|
|
|
93
|
+
Use top-level `asciifyVideo` layout options when the destination needs full-bleed framing. These affect the visible canvas only, not the sampled media:
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
await asciifyVideo('/hero.mp4', canvas, {
|
|
97
|
+
fitTo: hero,
|
|
98
|
+
objectFit: 'cover',
|
|
99
|
+
objectPosition: 'center 62%',
|
|
100
|
+
scale: 1.06,
|
|
101
|
+
width: '100%',
|
|
102
|
+
height: '100%',
|
|
103
|
+
options: {
|
|
104
|
+
sourceCrop: { top: 0.08, bottom: 0.14 },
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Mental split:
|
|
110
|
+
|
|
111
|
+
- `sourceCrop` chooses the source window before ASCII conversion.
|
|
112
|
+
- `objectFit`, `objectPosition`, `scale`, `width`, and `height` place the rendered canvas in the page.
|
|
113
|
+
- Use `objectFit: 'cover'` for full-width/full-bleed heroes.
|
|
114
|
+
- Use `objectFit: 'contain'` for previews where the whole source should remain visible.
|
|
115
|
+
- Use `scale` for gentle overfill instead of CSS width hacks like `110vw`.
|
|
116
|
+
|
|
93
117
|
## Visual Target
|
|
94
118
|
|
|
95
119
|
Good ASCII media should feel intentional, not like a broken video filter.
|
|
@@ -139,6 +163,10 @@ Recommended starting point:
|
|
|
139
163
|
```ts
|
|
140
164
|
{
|
|
141
165
|
fitTo: hero,
|
|
166
|
+
objectFit: 'cover',
|
|
167
|
+
objectPosition: 'center bottom',
|
|
168
|
+
width: '100%',
|
|
169
|
+
height: '100%',
|
|
142
170
|
fontSize: 5,
|
|
143
171
|
fps: 60,
|
|
144
172
|
maxRenderDimension: 1280,
|