asciify-engine 4.19.0 → 4.21.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/README.md +14 -0
- package/dist/{animation-presets-ZujFF3i8.d.ts → animation-presets-Bqupq1Gx.d.ts} +1 -1
- package/dist/{animation-presets-DhswE0D_.d.cts → animation-presets-DztfFvTc.d.cts} +1 -1
- package/dist/core.d.cts +4 -4
- package/dist/core.d.ts +4 -4
- package/dist/field.cjs +1 -1
- package/dist/field.d.cts +3 -1
- package/dist/field.d.ts +3 -1
- package/dist/field.js +1 -1
- package/dist/{hover-catalog-D85jh6dR.d.cts → hover-guide-DKRQPtDO.d.cts} +46 -8
- package/dist/{hover-catalog-D85jh6dR.d.ts → hover-guide-DKRQPtDO.d.ts} +46 -8
- package/dist/hover.cjs +1 -1
- package/dist/hover.d.cts +13 -6
- package/dist/hover.d.ts +13 -6
- package/dist/hover.js +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/kit.cjs +1 -1
- package/dist/kit.d.cts +10 -7
- package/dist/kit.d.ts +10 -7
- package/dist/kit.js +1 -1
- package/dist/{model-DXHhQhxP.d.ts → model-BNShxUhx.d.cts} +11 -2
- package/dist/{model-9SbRVqqI.d.cts → model-D2L86aNZ.d.ts} +11 -2
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.cts +4 -4
- package/dist/studio.d.ts +4 -4
- package/dist/studio.js +1 -1
- package/dist/{types-CM4452nD.d.ts → types-Bmu4dXdQ.d.ts} +1 -1
- package/dist/{types-FkqhgDYx.d.cts → types-Cn3wY-ST.d.cts} +1 -1
- package/package.json +1 -1
- package/skills/asciify-engine/SKILL.md +7 -7
- package/skills/asciify-engine/references/applying-asciify.md +2 -2
- package/skills/asciify-engine/references/components.md +2 -2
- package/skills/asciify-engine/references/design-matching.md +2 -1
- package/skills/asciify-engine/references/glyph-field.md +1 -1
- package/skills/asciify-engine/references/hero-finish.md +3 -0
- package/skills/asciify-engine/references/kit.md +3 -4
- package/skills/asciify-engine/references/looks.md +403 -71
- package/skills/asciify-engine/references/studio-effects.md +54 -20
|
@@ -30,26 +30,60 @@ The positioned host must fit the displayed source canvas. The surface appends a
|
|
|
30
30
|
|
|
31
31
|
## Hover choices
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
| `
|
|
36
|
-
|
|
|
37
|
-
| `
|
|
38
|
-
| `dissolve` |
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
33
|
+
Nineteen hovers plus Off, in three families. All share `strength` (0–1), `radius` (0.1–1), `decay` (0–1, default .5: lower snaps back, higher lingers), `edgeSafe` and `scope` (below), in both `mountStudio` settings (`hover: {...}`) and `mountHover` options.
|
|
34
|
+
|
|
35
|
+
| Module `effect` | Family | Behavior | Good for |
|
|
36
|
+
| --- | --- | --- | --- |
|
|
37
|
+
| `trail` | Change characters | Density wake with a fading tail; glyph grid stays fixed. The signature Asciify hover. | Any portrait or hero; the default. |
|
|
38
|
+
| `dissolve` | Change characters | Erases a soft path through the characters; the image reforms. | Quiet editorial pages. |
|
|
39
|
+
| `contour` | Change characters | Fine tonal rings trace the path. | Line-art and print looks. |
|
|
40
|
+
| `etch` | Change characters | Signed light-and-shadow impression (“Emboss”). | Engraving, paper. |
|
|
41
|
+
| `ripple` | Change characters | Expanding signed tonal wave packets; faster strokes ring stronger. | Dot, LED and tile looks. |
|
|
42
|
+
| `bleed` | Change characters | Ink bleed: ink wells up where the cursor rests, spreads along a fibrous paper grain, then dries back from its edges. | Sumi, woodcut, stipple, pen and ink. |
|
|
43
|
+
| `water` | Move the image | Damped height-field refraction that settles after the stroke. | Frosted glass, water, calm heroes. |
|
|
44
|
+
| `silk` | Move the image | Directional folds that follow the hand. | Fabric, fashion, slow motion. |
|
|
45
|
+
| `vortex` | Move the image | A swirling wake. | Playful, music. |
|
|
46
|
+
| `magnetic` | Move the image | The image gathers toward the stroke, then relaxes. | Product details. |
|
|
47
|
+
| `scatter` | Move the image | Characters scatter in soft low-frequency drifts and spring back with one rebound. | Playful campaigns. |
|
|
48
|
+
| `elastic` | Move the image | Pushes with the stroke, recoils past rest once, settles in about a second. | Toys, mascots. |
|
|
49
|
+
| `lens` | Move the image | Lens wake: a magnifying wake along the stroke. | Detail-rich photos. |
|
|
50
|
+
| `smudge` | Move the image | Drags the image along the stroke, no bounce. | Painterly looks. |
|
|
51
|
+
| `loupe` | Follow the cursor | A flat-topped glass loupe rides a slightly springy follow, magnifies what it covers and compresses through a soft rim with a faint glint. Shrinks a little while moving fast, settles when you stop. | Products, cut-outs, halo overlays. |
|
|
52
|
+
| `reveal` | Follow the cursor | A soft spotlight shows the original photograph through the thinned characters (Studio). On `/hover`, which has no photograph, it lights the characters instead. | Editorial, cinema, cut-outs (`scope: 'subject'`). |
|
|
53
|
+
| `repel` | Follow the cursor | Characters part around the cursor into a packed ring, leaving a soft clearing; on leave they spring back with one soft rebound. | Stickers, tiles, mosaics. |
|
|
54
|
+
| `tilt` | Follow the cursor | The image leans toward the cursor like a parallax card; bright areas sit nearer and move more (depth from smoothed brightness). | Album covers, posters, lock screens. |
|
|
55
|
+
| `haze` | Follow the cursor | Heat haze: a rising shimmer bends the characters above the cursor, livelier while moving, calm at rest. | Neon, broadcast, dusk gradients. |
|
|
56
|
+
| `none` | | No hover effect. | |
|
|
57
|
+
|
|
58
|
+
Retired: `rake` (its combed strips tore the image) now plays `silk`. Saved settings and old integrations keep working; `DEPRECATED_STUDIO_HOVERS` lists the mapping. Cursor hovers (`loupe`, `reveal`, `repel`, `tilt`, `haze`) store a fraction of the artwork, so they scale with it; stroke hovers keep their CSS-pixel reach.
|
|
50
59
|
|
|
51
60
|
These are `/hover` module `effect` IDs, not the root engine’s legacy `HoverEffect` values. For example, passing `hoverEffect: 'water'` to the published engine is invalid.
|
|
52
61
|
|
|
62
|
+
## Scope: on the subject, or around it
|
|
63
|
+
|
|
64
|
+
`scope: 'all' | 'subject' | 'outside'` (default `'all'`; labels in `HOVER_SCOPES`: Everywhere, Subject, Around) decides where a hover acts.
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
await mountStudio(canvas, '/product-on-black.jpg', {
|
|
68
|
+
settings: { style: 'mixed', backdrop: { mode: 'transparent' }, hover: { effect: 'reveal', scope: 'subject' } },
|
|
69
|
+
});
|
|
70
|
+
mountHover(host, canvas, { effect: 'trail', scope: 'outside' }); // a wake around a cut-out, never across it
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
How the subject is found, in order:
|
|
74
|
+
1. **Source alpha.** A transparent PNG, WebM or canvas: coverage is its alpha.
|
|
75
|
+
2. **A drawn Studio mask** (`mask.enabled`): the mask is the subject (inverted masks invert it), multiplied with alpha.
|
|
76
|
+
3. **A plain ground.** An opaque image whose border is one even tone (a product or figure on black or white, as the Cutout, Halo overlay and Mascot sticker looks expect) is keyed by each area's distance from that tone.
|
|
77
|
+
4. **Otherwise** (a busy edge-to-edge photo) there is no reliable subject, so every scope behaves like `'all'` rather than guessing.
|
|
78
|
+
|
|
79
|
+
Coverage is feathered over about 2% of the short side, so a scoped hover fades softly at the boundary and never clips hard. Displacement, tone and light are all weighted by it. With `'outside'` on a transparent ground, tone hovers (Trail, Contour, Emboss, Ripple, Ink bleed, Heat haze) draw their own marks in the ink colour on the empty ground. In `/hover` the subject is read from the drawn canvas once per still (`invalidate()` rereads it); for video the first frame's subject is kept.
|
|
80
|
+
|
|
81
|
+
## Smart behaviour
|
|
82
|
+
|
|
83
|
+
- Cursor hovers ease in on entry (no overshoot), start under the pointer instead of sliding in from the last exit, settle when the pointer rests and decay after it leaves; Repel releases with one soft rebound.
|
|
84
|
+
- Touch: `mountHover` follows a finger while it drags (`touch: false` turns this off) and lets go when it lifts; a vertical swipe still scrolls the page. `mountStudio` follows touch drags on its canvas.
|
|
85
|
+
- Reduced motion turns hovers off; hidden or offscreen surfaces stop drawing; a resting loupe stays drawn without redrawing every frame.
|
|
86
|
+
|
|
53
87
|
## Still-image motion and dither
|
|
54
88
|
|
|
55
89
|
The module's `motion` IDs are `none`, `caustics` (traveling light on a fixed grid), `current` (Slow Current), `reform` (Reveal & Reform), `sheen` (diagonal light sweep), `tidal` (Tidal Rings), and `grain` (Living Grain). 4.4 adds `parallax` (shallow drift), `weave` (interlaced flow), `print` (staggered row registration), and `trace` (light that follows source-image tonal contours). Sheen, Living Grain and Contour Light keep the grid anchored. Contour Light uses source luminance; pass `getFrame` for exact source tones when layering a surface over an existing canvas. Keep source-video motion alone unless the user intentionally wants another animation layered onto it. For a still, select one motion and a restrained `motionSpeed`, rather than stacking effects.
|
|
@@ -71,7 +105,7 @@ Version 1.3.0 adds text-shaped charcoal cutouts (`textMask`), peripheral scanlin
|
|
|
71
105
|
|
|
72
106
|
## Catalogs and useful combinations (4.4)
|
|
73
107
|
|
|
74
|
-
Build controls from `STUDIO_HOVERS` and `STUDIO_MOTIONS`, exported by `/studio` and `/hover`. Each entry includes `value`, `label
|
|
108
|
+
Build controls from `STUDIO_HOVERS`, `HOVER_SCOPES` and `STUDIO_MOTIONS`, exported by `/studio` and `/hover`. Each entry includes `value`, `label` and `description` (hovers also a `group`). Show the scope control as a segmented choice next to the hover settings. Use the `value` as the API ID; “Emboss” is `etch` and “Contour Light” is `trace`. Do not maintain a second hard-coded menu or use the legacy core hover IDs for these interactions.
|
|
75
109
|
|
|
76
110
|
For a fixed grid, try Contour Light with Emboss. For continuous spatial movement, try Parallax with Elastic. For a fabric-like treatment, try Woven Flow with Rake. These are combinations of two independent settings, not additional art styles. Keep strength restrained until you have checked the source at actual display size.
|
|
77
111
|
|
|
@@ -81,7 +115,7 @@ The pointer simulations have bounded storage. Elastic allocates its two velocity
|
|
|
81
115
|
|
|
82
116
|
## Lively images (4.10)
|
|
83
117
|
|
|
84
|
-
The catalogs contain
|
|
118
|
+
The catalogs contain nineteen active hover effects and fourteen active ambient motions, plus Off for each. New motion IDs are `relight`, `shimmer`, `breeze`, and `unfold`. Relight models midtones with a rotating light field; Shimmer slowly animates source highlights. Both keep geometry stationary. Breeze bends the image with a traveling sway. Unfold closes and opens staggered panels, then holds the complete image. All use deterministic 12-second base cycles; `motion.speed` changes cycle duration, `motion.amount` changes strength. These are local image treatments, not AI-generated scene or subject motion.
|
|
85
119
|
|
|
86
120
|
`STUDIO_ANIMATION_PRESETS` is exported by `/studio` and `/hover`. Its six entries have `id`, `label`, `description`, `motion: {type,speed,amount}`, and `hover: {effect,radius,strength}`. These are editable combinations, not additional renderer styles. Do not overwrite the rest of a user's settings to apply one:
|
|
87
121
|
|
|
@@ -101,6 +135,6 @@ For a complete integration with independent PNG/MP4 export, copy the repository'
|
|
|
101
135
|
|
|
102
136
|
For `/hover`, the same catalog needs an explicit shape conversion: `surface.update({ motion: preset.motion.type, motionSpeed: preset.motion.speed, effect: preset.hover.effect, radius: preset.hover.radius, strength: preset.hover.strength })`. `/hover` has no `motion.amount` option; use Studio for independently adjustable motion strength. Do not spread the nested Studio groups directly into surface options.
|
|
103
137
|
|
|
104
|
-
Ripple rings uses at most eight wave packets and a fixed-resolution field. It does not allocate particles per character. Lens and Smudge reuse the existing field; their release integrates elapsed time, not a fixed frame count. Zero strength suppresses hover input; completed wakes sleep. These bounds and tests are not a guaranteed frame rate on every device.
|
|
138
|
+
Every hover runs on one fixed field (128 cells on the long side) whatever the image size; cursor hovers are a few springs plus that field, and Ink bleed diffuses on it in fixed sub-steps. Measured in the Studio renderer at 640×480, 6px cells: 5–7ms per frame p50 for every hover, under 10ms p95. Ripple rings uses at most eight wave packets and a fixed-resolution field. It does not allocate particles per character. Lens and Smudge reuse the existing field; their release integrates elapsed time, not a fixed frame count. Zero strength suppresses hover input; completed wakes sleep. These bounds and tests are not a guaranteed frame rate on every device.
|
|
105
139
|
|
|
106
140
|
To export a loop of a photo, use duration `12 / speed`. Restrict the speed/duration to your encoder's limits and use a frame count that fits whole cycles. Film grain, dust, glitch, pattern animation and input videos may not loop at that boundary. Pointer paths are not included in offline export. Respect reduced motion and provide pause; do not advertise artificial depth as true scene reconstruction.
|