asciify-engine 1.0.96 → 1.0.97
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 +15 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -7
- package/dist/index.d.ts +24 -7
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/asciify-engine/SKILL.md +6 -6
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.97`
|
|
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.97
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
## Mental Model
|
|
@@ -64,15 +64,15 @@ Use legacy object frames only when you need per-cell mutation, dots mode, heavy
|
|
|
64
64
|
- `gifToAsciiFrames()`
|
|
65
65
|
- `renderFrameToCanvas()`
|
|
66
66
|
|
|
67
|
-
Use `options.sourceCrop` when the source media has empty edges or needs tighter framing without changing the destination canvas size. Percent values are normalized `0–1` by default.
|
|
67
|
+
Use `options.sourceCrop` when the source media has empty edges or needs tighter framing without changing the destination canvas size. Percent values are normalized `0–1` by default. Prefer CSS-like insets for readable framing; the engine preserves source proportions by default and auto-crops the opposite axis:
|
|
68
68
|
|
|
69
69
|
```ts
|
|
70
70
|
options: {
|
|
71
|
-
sourceCrop: {
|
|
71
|
+
sourceCrop: { top: 0.08, bottom: 0.22 },
|
|
72
72
|
}
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
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.
|
|
76
76
|
|
|
77
77
|
## Visual Target
|
|
78
78
|
|
|
@@ -221,7 +221,7 @@ await asciifyVideo(video, canvas, {
|
|
|
221
221
|
fitTo: hero,
|
|
222
222
|
options: {
|
|
223
223
|
chromaKey: true,
|
|
224
|
-
sourceCrop: {
|
|
224
|
+
sourceCrop: { top: 0.08, bottom: 0.22 },
|
|
225
225
|
},
|
|
226
226
|
});
|
|
227
227
|
```
|