asciify-engine 4.23.0 → 4.24.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 +7 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/field.cjs +1 -1
- package/dist/field.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/kit/chunk-2CF4PX6U.js +1 -0
- package/dist/kit/chunk-2NVKPXPL.js +1 -0
- package/dist/kit/chunk-3473NPIN.js +1 -0
- package/dist/kit/chunk-3A5LID2G.js +1 -0
- package/dist/kit/chunk-3PCKMO6I.js +1 -0
- package/dist/kit/chunk-4HWMQCAM.js +1 -0
- package/dist/kit/chunk-4OT66HSZ.js +1 -0
- package/dist/kit/chunk-4QHFEMFS.js +1 -0
- package/dist/kit/chunk-4ZQFDFEH.js +1 -0
- package/dist/kit/chunk-5BEBNKYM.js +1 -0
- package/dist/kit/chunk-5I4IZTL5.js +1 -0
- package/dist/kit/chunk-5QE6UMXN.js +1 -0
- package/dist/kit/chunk-5Z2EJAUV.js +1 -0
- package/dist/kit/chunk-73M2OESE.js +1 -0
- package/dist/kit/chunk-7ABNWOW4.js +1 -0
- package/dist/kit/chunk-AIM3J2US.js +1 -0
- package/dist/kit/chunk-BN7HL52Z.js +1 -0
- package/dist/kit/chunk-BNVRKD3V.js +1 -0
- package/dist/kit/chunk-BQZCLGCY.js +1 -0
- package/dist/kit/chunk-BR6ZNJZW.js +1 -0
- package/dist/kit/chunk-BTD6EFAW.js +1 -0
- package/dist/kit/chunk-C3C7AYKL.js +1 -0
- package/dist/kit/chunk-C4KZYCPF.js +1 -0
- package/dist/kit/chunk-DFOWXOZR.js +1 -0
- package/dist/kit/chunk-DZ5XGHTJ.js +1 -0
- package/dist/kit/chunk-E3TUOX2A.js +1 -0
- package/dist/kit/chunk-ENTDGT2V.js +1 -0
- package/dist/kit/chunk-FR3ZJNOY.js +1 -0
- package/dist/kit/chunk-FUI5AVIF.js +1 -0
- package/dist/kit/chunk-G57QACJG.js +1 -0
- package/dist/kit/chunk-H2UZBVKE.js +1 -0
- package/dist/kit/chunk-HTUGMGVA.js +1 -0
- package/dist/kit/chunk-I4QVLLRQ.js +1 -0
- package/dist/kit/chunk-IPVN22ZM.js +1 -0
- package/dist/kit/chunk-IQTGJRDX.js +1 -0
- package/dist/kit/chunk-IUKSHYED.js +1 -0
- package/dist/kit/chunk-J2YZBT3N.js +1 -0
- package/dist/kit/chunk-K563CCOL.js +1 -0
- package/dist/kit/chunk-KWTF6Q5W.js +1 -0
- package/dist/kit/chunk-MGVPLQ3Z.js +1 -0
- package/dist/kit/chunk-MIZ2DUHU.js +1 -0
- package/dist/kit/chunk-MQJQIDO5.js +1 -0
- package/dist/kit/chunk-NURPDP3Y.js +1 -0
- package/dist/kit/chunk-O7SGY4YJ.js +1 -0
- package/dist/kit/chunk-OWEZV7TQ.js +1 -0
- package/dist/kit/chunk-PCIAA2LL.js +1 -0
- package/dist/kit/chunk-PFKYKAIP.js +1 -0
- package/dist/kit/chunk-PIU2BMFU.js +1 -0
- package/dist/kit/chunk-QALCXKU6.js +1 -0
- package/dist/kit/chunk-QRCXXS5Z.js +1 -0
- package/dist/kit/chunk-RFLIFKZ4.js +1 -0
- package/dist/kit/chunk-ROR6MG3K.js +1 -0
- package/dist/kit/chunk-S62H7ZIU.js +1 -0
- package/dist/kit/chunk-S7RZP2MT.js +1 -0
- package/dist/kit/chunk-SARCZMLN.js +1 -0
- package/dist/kit/chunk-SNCXU7KF.js +1 -0
- package/dist/kit/chunk-T3GWGPST.js +1 -0
- package/dist/kit/chunk-TTGMK4EA.js +1 -0
- package/dist/kit/chunk-UML6XQAR.js +1 -0
- package/dist/kit/chunk-UO7RB7RC.js +1 -0
- package/dist/kit/chunk-VC2ZQG63.js +1 -0
- package/dist/kit/chunk-VVW7LZT2.js +1 -0
- package/dist/kit/chunk-W2STAN6V.js +1 -0
- package/dist/kit/chunk-WJLZM3DR.js +1 -0
- package/dist/kit/chunk-XANKANGR.js +1 -0
- package/dist/kit/chunk-XB4DKPGL.js +1 -0
- package/dist/kit/chunk-XDKKCIIL.js +1 -0
- package/dist/kit/chunk-XM56OTYT.js +1 -0
- package/dist/kit/chunk-XPXMCXYI.js +1 -0
- package/dist/kit/chunk-YBRP6BFW.js +1 -0
- package/dist/kit/chunk-YCWMOTYH.js +1 -0
- package/dist/kit/chunk-ZCHGV2CV.js +1 -0
- package/dist/kit/chunk-ZRJVOUWH.js +1 -0
- package/dist/kit.cjs +1 -1
- package/dist/kit.js +1 -1
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +1 -1
- package/package.json +2 -2
- package/skills/asciify-engine/SKILL.md +3 -3
- package/skills/asciify-engine/references/performance.md +30 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asciify-engine",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.24.0",
|
|
4
4
|
"description": "Framework-agnostic ASCII art engine. Convert images, videos, and GIFs into ASCII art rendered on canvas, or run full-bleed GPU character fields with a fluid cursor wake.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"files": [
|
|
72
72
|
"dist",
|
|
73
|
-
"!dist
|
|
73
|
+
"!dist/**/*.map",
|
|
74
74
|
"skills/asciify-engine",
|
|
75
75
|
"README.md",
|
|
76
76
|
"LICENSE",
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
name: asciify-engine
|
|
3
3
|
description: Apply Asciify the way asciify.org does - ASCII components and backgrounds that belong in a real interface, inked from the theme, clear around text, inside the page's radii and motion. Use for UI components in characters (loading, status, toasts, tabs, AI states, charts, transitions, pages), animated ASCII backgrounds, and also photo, video and GIF conversion, GPU character fields, artwork looks for wallpapers, posters and prints, art styles and export, hover and motion, layered typography and rendering performance.
|
|
4
4
|
metadata:
|
|
5
|
-
tested-engine: "4.
|
|
5
|
+
tested-engine: "4.24.0"
|
|
6
6
|
updated: "2026-10-17"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Asciify Engine
|
|
10
10
|
|
|
11
|
-
Use the published `asciify-engine` npm package. Tested against **4.
|
|
11
|
+
Use the published `asciify-engine` npm package. Tested against **4.24.0**. Check the application's installed version and its public types before using newer options; a local checkout can contain unpublished changes.
|
|
12
12
|
|
|
13
13
|
- Agent entry: https://asciify.org/skill (redirects to this Markdown document).
|
|
14
14
|
- Components: https://asciify.org/components · Looks: https://asciify.org/looks · Backgrounds: https://asciify.org/backgrounds
|
|
@@ -84,7 +84,7 @@ This uses the Vercel Skills CLI to install the repository skill and its linked r
|
|
|
84
84
|
|
|
85
85
|
## Verify before handing off
|
|
86
86
|
|
|
87
|
-
Run the checklist at the end of [applying-asciify.md](references/applying-asciify.md#10-checklist-before-you-finish) for kit work. For any integration, check the real page: readable subject and text in both themes, no stretching or unintended margins, working pointer and keyboard controls, mobile crop, reduced motion, autoplay failure, WebGL off, and cleanup after navigation. Observe several seconds of motion and a loop boundary. State the measured device and settings with any FPS figure; screenshots alone do not establish performance.
|
|
87
|
+
Run the checklist at the end of [applying-asciify.md](references/applying-asciify.md#10-checklist-before-you-finish) for kit work. For any integration, check the real page: readable subject and text in both themes, no stretching or unintended margins, working pointer and keyboard controls, mobile crop, reduced motion, autoplay failure, WebGL off, and cleanup after navigation. Observe several seconds of motion and a loop boundary. State the measured device and settings with any FPS figure; screenshots alone do not establish performance. What the engine guarantees a host page, and its default budgets, are in [performance.md](references/performance.md).
|
|
88
88
|
|
|
89
89
|
Do not import nonexistent helpers such as `createRecorder` or `recordAndDownload`.
|
|
90
90
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Performance guarantees
|
|
2
|
+
|
|
3
|
+
What `asciify-engine` promises a host page, and the default budgets. Measured by `tests/host-cost-browser.mjs` and `scripts/bundle-cost.mjs` in the engine repository, and held by its unit tests.
|
|
4
|
+
|
|
5
|
+
## Import and bundle
|
|
6
|
+
|
|
7
|
+
- **No work at import.** Every entry (`asciify-engine`, `/core`, `/field`, `/hover`, `/studio`, `/kit`) only defines code: no DOM, canvas, WebGL, observer, timer, frame or global is touched until you call something. Safe under SSR (Next.js, Remix, Astro) without a `window` guard on the import.
|
|
8
|
+
- **`sideEffects: false`, and the kit is split per component.** A route that imports one kit component downloads that component, the shared kit core (about 20 kB) and the field (about 67 kB), not the whole kit: `fieldBackground` alone costs a code-split host about 90 kB minified (33 kB gzipped), against 285 kB (100 kB) when the kit was one module.
|
|
9
|
+
|
|
10
|
+
## Main thread
|
|
11
|
+
|
|
12
|
+
- **Mounting is spread out.** Kit fields mount when they come within half a viewport of the screen, at most one per frame however many a host starts in one task (a route change, a long list). Shader programs link with `KHR_parallel_shader_compile` where the browser has it.
|
|
13
|
+
- **Nothing runs when nothing changes.** A still field stops its frame loop. Fields off screen, in a hidden tab, in a `display: none` host or with zero size do not draw. Reduced motion settles every component on a still.
|
|
14
|
+
- **Ambient motion is capped.** Drift, scenes and self-animating components draw at most 60 frames a second on any screen (30 with two cores or less, 2 GB of memory or less, or Save-Data). The pointer's wake, lantern, trail, pulses and anything under the pointer keep the screen's full rate.
|
|
15
|
+
- **Studio hovers stay responsive.** A live `mountStudio` hover renders at most 60 times a second and never more often than leaves half the main thread free, then ends on its settled frame.
|
|
16
|
+
- **Listeners are passive** where the event allows, and every listener, observer, frame, timer, object URL and context is released by `destroy()`, including after a hundred quick mount and destroy cycles.
|
|
17
|
+
- **No global CSS but scoped fallbacks.** The few components that inject styles use one `<style id="ascii-kit-…">` each, with every rule inside `:where()` (zero specificity). No console output in normal use.
|
|
18
|
+
|
|
19
|
+
## GPU and memory
|
|
20
|
+
|
|
21
|
+
- **Context budget: 12.** At most 12 kit fields hold a WebGL context at once (`setFieldBudget(n)` changes it); past it the field farthest off screen is released to its `poster`. A context the browser takes back is remounted on a fresh canvas. 150 components on one page keep 12 contexts and lose none.
|
|
22
|
+
- **Backing store capped.** Pixel ratio is at most 2 by default (`look.maxPixelRatio`), and one field's backing store at most about one 4K screen (8.3 million pixels): a full-bleed field on a 5K or 6K display keeps its cells and draws them at a lower ratio.
|
|
23
|
+
- **Slow frames degrade, not stall.** About a second of frames slower than 24 fps drops the field to 1× pixels, then to no ambient motion; the pointer response keeps working.
|
|
24
|
+
- **Software WebGL counts as unsupported.** SwiftShader and llvmpipe report `isGlyphFieldSupported() === false` (pass `allowSoftware` to override), so components keep their HTML and poster instead of drawing every pixel on the CPU. Without WebGL2 the same fallback applies.
|
|
25
|
+
|
|
26
|
+
## What a host should still do
|
|
27
|
+
|
|
28
|
+
- Give heavy components a `poster`, so a released or unsupported field still shows its still.
|
|
29
|
+
- Call `destroy()` on unmount. In React, mount in an effect and destroy in its cleanup; StrictMode's double mount is safe.
|
|
30
|
+
- Keep `lazy` on (the default) for anything below the fold. `lazy: false` mounts at once wherever the element is.
|