@idle-screens/schema 3.5.0 → 3.6.1
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/FORMAT.md +249 -17
- package/dist/index.d.ts +318 -3
- package/dist/index.js +1041 -62
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/saver-spec.schema.json +285 -36
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,16 @@ interface SaverSpec {
|
|
|
22
22
|
background?: BackgroundSpec;
|
|
23
23
|
layers: LayerSpec[];
|
|
24
24
|
motionIntensity?: 'calm' | 'moderate' | 'energetic';
|
|
25
|
+
/**
|
|
26
|
+
* Declared density intent. `sparse` says the emptiness is the point (one
|
|
27
|
+
* mark on a dark ground, long silences): `adviseSpec` withholds
|
|
28
|
+
* `sparse-scene`, and scorers that gate on coverage should read this before
|
|
29
|
+
* calling a faithful scene broken. `dense` withholds `dense-scene` the same
|
|
30
|
+
* way. Either declaration is checked against the measured coverage and a
|
|
31
|
+
* `density-mismatch` advisory fires when the scene contradicts it. Omitted
|
|
32
|
+
* means `normal`. A hint only — it changes no pixel.
|
|
33
|
+
*/
|
|
34
|
+
density?: 'sparse' | 'normal' | 'dense';
|
|
25
35
|
/**
|
|
26
36
|
* Frame persistence (0..1, capped at LIMITS.maxGhosting). Instead of fully clearing,
|
|
27
37
|
* each frame the background is painted at reduced alpha so moving entities leave
|
|
@@ -137,7 +147,8 @@ interface LayerSpec {
|
|
|
137
147
|
key?: string;
|
|
138
148
|
/**
|
|
139
149
|
* Exact fractional position {x, y} for a single entity (0 = left/top, 1 = right/bottom).
|
|
140
|
-
* Only valid when `count` is 1
|
|
150
|
+
* Only valid when `count` is 1 — or, with a `list` / `table` layout, as the
|
|
151
|
+
* top-left anchor of the whole block. Overrides `region` scatter placement.
|
|
141
152
|
*/
|
|
142
153
|
position?: {
|
|
143
154
|
x: number;
|
|
@@ -185,6 +196,26 @@ interface LayerSpec {
|
|
|
185
196
|
x?: number;
|
|
186
197
|
y?: number;
|
|
187
198
|
};
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Data layouts — entities in READING ORDER, no scatter. `list` stacks them
|
|
202
|
+
* in one column `gap` apart (viewport units of min(w,h), default 0.06);
|
|
203
|
+
* `table` fills `columns` row-major with `gap` `{x, y}` (one number = both).
|
|
204
|
+
* Text and emoji sprites take `strings[i]` / `glyphs[i]` in order instead of
|
|
205
|
+
* a seeded pick, and palette `colors[i]` likewise, so N labels or N bars are
|
|
206
|
+
* ONE layer. `position` (with any count) is the block's top-left anchor;
|
|
207
|
+
* without it the block is centred in `region`.
|
|
208
|
+
*/
|
|
209
|
+
| {
|
|
210
|
+
type: 'list';
|
|
211
|
+
gap?: number;
|
|
212
|
+
} | {
|
|
213
|
+
type: 'table';
|
|
214
|
+
columns: number;
|
|
215
|
+
gap?: number | {
|
|
216
|
+
x?: number;
|
|
217
|
+
y?: number;
|
|
218
|
+
};
|
|
188
219
|
};
|
|
189
220
|
/**
|
|
190
221
|
* Layer lifecycle for act structure — a pure function of t, no state. Alpha is 0
|
|
@@ -196,6 +227,56 @@ interface LayerSpec {
|
|
|
196
227
|
exit?: number;
|
|
197
228
|
fade?: number;
|
|
198
229
|
};
|
|
230
|
+
/**
|
|
231
|
+
* Sparse events — marks that appear, expand and fade in place, one at a time,
|
|
232
|
+
* with long silences between (the "one ping" primitive). Each entity is dark
|
|
233
|
+
* except for a window of `life` ms that recurs every `every` ms at a
|
|
234
|
+
* per-entity offset: `jitter` 1 (default) scatters the offsets (a fixed
|
|
235
|
+
* low-discrepancy sequence — not seeded, so declaring `emit` disturbs no
|
|
236
|
+
* other draw and the same spec times its events identically under every
|
|
237
|
+
* seed), 0 spreads the entities evenly across the period — a metronome, one
|
|
238
|
+
* event at a time as long as `life ≤ every / count`.
|
|
239
|
+
* Inside a window the entity fades in over the first quarter and out over
|
|
240
|
+
* the rest; `grow` scales its size from `grow[0]` to `grow[1]` across the
|
|
241
|
+
* window — expansion rather than travel. A pure function of t. Flash safety:
|
|
242
|
+
* `every` ≥ 1000 ms and `life` ≥ 500 ms, so no entity fires more than once a
|
|
243
|
+
* second and never as a hard cut. Composes with `pulse`, `life`, `trail` and
|
|
244
|
+
* every motion; with `motion.ease` the eased travel restarts on every event.
|
|
245
|
+
*/
|
|
246
|
+
emit?: {
|
|
247
|
+
every: number;
|
|
248
|
+
life: number;
|
|
249
|
+
jitter?: number;
|
|
250
|
+
grow?: [number, number];
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Phase-lock. Replaces the seeded per-entity phases of `pulse`, `grow` and
|
|
254
|
+
* `cycle` with one shared phase (`phase` in turns, 0..1, default 0) and runs
|
|
255
|
+
* those three at `rate` × scene time (default 1). Two layers declaring the
|
|
256
|
+
* same clock breathe in step; different phases give a fixed offset (call and
|
|
257
|
+
* response). `pulse.wave` still adds its position-derived phase on top, so a
|
|
258
|
+
* clocked wave stays a wave. Because a clocked layer moves in unison, its
|
|
259
|
+
* `pulse`/`grow` periods must satisfy `period / rate ≥ 1000 ms` (1 Hz).
|
|
260
|
+
*/
|
|
261
|
+
clock?: {
|
|
262
|
+
phase?: number;
|
|
263
|
+
rate?: number;
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Closed-form velocity easing for `drift`, `rise` and `wander`. `settle`
|
|
268
|
+
* starts at the entity's speed and decelerates to rest with time constant
|
|
269
|
+
* `tau` ms — it travels `speed × tau` and stops, a mark flung and coming to
|
|
270
|
+
* rest. `buoyant` starts at rest and approaches the speed over `tau` — a
|
|
271
|
+
* bubble reaching terminal velocity. Position stays an analytic function of
|
|
272
|
+
* t (no integration state). With `emit`, the eased travel restarts from the
|
|
273
|
+
* spawn point on every event. For `wander` only the base velocity eases —
|
|
274
|
+
* the harmonic meander keeps breathing, so a settled wanderer hovers rather
|
|
275
|
+
* than freezes.
|
|
276
|
+
*/
|
|
277
|
+
interface MotionEase {
|
|
278
|
+
type: 'settle' | 'buoyant';
|
|
279
|
+
tau: number;
|
|
199
280
|
}
|
|
200
281
|
type SpriteSpec = {
|
|
201
282
|
kind: 'emoji';
|
|
@@ -248,6 +329,8 @@ type SpriteSpec = {
|
|
|
248
329
|
/**
|
|
249
330
|
* Axis-aligned rectangle (rotates with `spin`). `width` is the horizontal size
|
|
250
331
|
* range; `aspect` the height/width ratio range (default [1,1] = squares).
|
|
332
|
+
* `feather` (0..1) softens the edges: that fraction of the half-size fades
|
|
333
|
+
* out toward the border — Rothko's soft-edged block at 0.5–0.8.
|
|
251
334
|
* Mondrian blocks, confetti, city lights.
|
|
252
335
|
*/
|
|
253
336
|
| {
|
|
@@ -255,6 +338,63 @@ type SpriteSpec = {
|
|
|
255
338
|
width: [number, number];
|
|
256
339
|
aspect?: [number, number];
|
|
257
340
|
color: string;
|
|
341
|
+
feather?: number;
|
|
342
|
+
colors?: string[];
|
|
343
|
+
colorWeights?: number[];
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* A data bar. Entity i draws a bar `length × values[i] / max` long (viewport
|
|
347
|
+
* units of min(w,h)), `thickness` thick, growing from its position toward
|
|
348
|
+
* `direction` (default 'right'). `values` are PAINT — steer
|
|
349
|
+
* `layers.N.sprite.values` and the bars glide; `max` defaults to the largest
|
|
350
|
+
* value. Pair with a `list` layout: a chart is one layer, labels another.
|
|
351
|
+
*/
|
|
352
|
+
| {
|
|
353
|
+
kind: 'bar';
|
|
354
|
+
values: number[];
|
|
355
|
+
length: number;
|
|
356
|
+
thickness: number;
|
|
357
|
+
color: string;
|
|
358
|
+
max?: number;
|
|
359
|
+
direction?: 'right' | 'left' | 'up' | 'down';
|
|
360
|
+
colors?: string[];
|
|
361
|
+
colorWeights?: number[];
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Regular or custom polygon. `sides` (3..12, default 6) draws a regular
|
|
365
|
+
* n-gon of the seeded `radius` (circumradius), point up; `points` (3..24
|
|
366
|
+
* unit coordinates in −1..1, scaled by the radius) draws any facet — a
|
|
367
|
+
* Picasso shard, a Kandinsky triangle, a Mondrian plane. `soft` feathers
|
|
368
|
+
* the fill from the centre like a soft circle. Rotates with `spin`.
|
|
369
|
+
*/
|
|
370
|
+
| {
|
|
371
|
+
kind: 'polygon';
|
|
372
|
+
radius: [number, number];
|
|
373
|
+
color: string;
|
|
374
|
+
sides?: number;
|
|
375
|
+
points?: Array<[number, number]>;
|
|
376
|
+
soft?: boolean;
|
|
377
|
+
colors?: string[];
|
|
378
|
+
colorWeights?: number[];
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* A freehand mark: a path through `points` (2..24 unit coordinates in
|
|
382
|
+
* −1..1, scaled by the seeded `length`) stroked `width` wide with round
|
|
383
|
+
* joins. `curve: 'smooth'` (default) runs a Catmull-Rom spline through the
|
|
384
|
+
* points, `'linear'` a polyline. `taper` thins the mark to almost nothing at
|
|
385
|
+
* both ends — a brush stroke rather than a line. `orient` turns the path's
|
|
386
|
+
* +x along the entity's heading (like `streak`). Rotates with `spin`. Van
|
|
387
|
+
* Gogh's stroke, Hokusai's contour, O'Keeffe's petal, Basquiat's scrawl.
|
|
388
|
+
*/
|
|
389
|
+
| {
|
|
390
|
+
kind: 'stroke';
|
|
391
|
+
length: [number, number];
|
|
392
|
+
points: Array<[number, number]>;
|
|
393
|
+
color: string;
|
|
394
|
+
width?: number;
|
|
395
|
+
curve?: 'smooth' | 'linear';
|
|
396
|
+
taper?: boolean;
|
|
397
|
+
orient?: boolean;
|
|
258
398
|
colors?: string[];
|
|
259
399
|
colorWeights?: number[];
|
|
260
400
|
}
|
|
@@ -338,12 +478,14 @@ type MotionSpec =
|
|
|
338
478
|
angle?: number;
|
|
339
479
|
bidirectional?: boolean;
|
|
340
480
|
bob?: number;
|
|
481
|
+
ease?: MotionEase;
|
|
341
482
|
}
|
|
342
483
|
/** Rise upward (px/sec) with an optional horizontal sway amplitude (px) — bubbles. */
|
|
343
484
|
| {
|
|
344
485
|
type: 'rise';
|
|
345
486
|
speed: [number, number];
|
|
346
487
|
sway?: number;
|
|
488
|
+
ease?: MotionEase;
|
|
347
489
|
}
|
|
348
490
|
/** Bounce diagonally at a per-entity speed, reflecting off the edges (px/sec). */
|
|
349
491
|
| {
|
|
@@ -388,6 +530,7 @@ type MotionSpec =
|
|
|
388
530
|
angle?: number;
|
|
389
531
|
meander?: number;
|
|
390
532
|
coherence?: number;
|
|
533
|
+
ease?: MotionEase;
|
|
391
534
|
}
|
|
392
535
|
/**
|
|
393
536
|
* Perspective starfield: entities live on a depth axis and stream toward the
|
|
@@ -477,6 +620,20 @@ declare const LIMITS: {
|
|
|
477
620
|
readonly minSegmentDuration: 1000;
|
|
478
621
|
readonly maxTransitionDur: 5000;
|
|
479
622
|
readonly minTransitionDur: 200;
|
|
623
|
+
readonly minEmitEvery: 1000;
|
|
624
|
+
readonly maxEmitEvery: 600000;
|
|
625
|
+
readonly minEmitLife: 500;
|
|
626
|
+
readonly maxEmitGrow: 8;
|
|
627
|
+
readonly minClockedPeriod: 1000;
|
|
628
|
+
readonly minClockRate: 0.1;
|
|
629
|
+
readonly maxClockRate: 4;
|
|
630
|
+
readonly defaultListGap: 0.06;
|
|
631
|
+
readonly defaultListGapPx: 40;
|
|
632
|
+
readonly minPolygonSides: 3;
|
|
633
|
+
readonly maxPolygonSides: 12;
|
|
634
|
+
readonly maxShapePoints: 24;
|
|
635
|
+
readonly minEaseTau: 100;
|
|
636
|
+
readonly maxEaseTau: 120000;
|
|
480
637
|
};
|
|
481
638
|
type SequenceTransition = {
|
|
482
639
|
type: 'cut';
|
|
@@ -554,10 +711,16 @@ interface Entity {
|
|
|
554
711
|
orbitCy: number;
|
|
555
712
|
colorIndex: number;
|
|
556
713
|
cyclePeriod: number;
|
|
557
|
-
/** Rect sprite second dimension (height px). Only set for rect sprites. */
|
|
714
|
+
/** Rect sprite second dimension (height px), or bar thickness. Only set for rect / bar sprites. */
|
|
558
715
|
size2?: number;
|
|
716
|
+
/** Reading-order index into `bar.values`. Only set for bar sprites. */
|
|
717
|
+
barIndex?: number;
|
|
718
|
+
/** Placed by a list/table layout: variants cycle from the ordered base index, in step. Only set for data layouts. */
|
|
719
|
+
ordered?: true;
|
|
559
720
|
/** Orbit parent layer key (motion.center = { layer }). Center resolved at render time. */
|
|
560
721
|
orbitParent?: string;
|
|
722
|
+
/** Present only when the layer explicitly disables edge wrapping. */
|
|
723
|
+
wrapDisabled?: true;
|
|
561
724
|
/** Harmonic drift params. Only set for wander motion. */
|
|
562
725
|
wander?: {
|
|
563
726
|
own: WanderOsc;
|
|
@@ -574,6 +737,23 @@ interface Entity {
|
|
|
574
737
|
cx: number;
|
|
575
738
|
cy: number;
|
|
576
739
|
};
|
|
740
|
+
/** Sparse-event window. Only set when `layer.emit` is declared. `phase` ms offset. */
|
|
741
|
+
emit?: {
|
|
742
|
+
every: number;
|
|
743
|
+
life: number;
|
|
744
|
+
phase: number;
|
|
745
|
+
growFrom: number;
|
|
746
|
+
growTo: number;
|
|
747
|
+
};
|
|
748
|
+
/** Shared-clock time multiplier for pulse/grow/cycle. Only set when `layer.clock` is declared. */
|
|
749
|
+
clockRate?: number;
|
|
750
|
+
/** Shared cycle phase (radians). Only set when `layer.clock` is declared. */
|
|
751
|
+
cyclePhase?: number;
|
|
752
|
+
/** Velocity easing. Only set when the motion declares `ease`. */
|
|
753
|
+
ease?: {
|
|
754
|
+
type: 'settle' | 'buoyant';
|
|
755
|
+
tau: number;
|
|
756
|
+
};
|
|
577
757
|
/** Spline params (pts in px, shared per layer). Only set for path motion. */
|
|
578
758
|
path?: {
|
|
579
759
|
pts: Array<{
|
|
@@ -598,6 +778,14 @@ declare function spriteVariants(sprite: SpriteSpec): number;
|
|
|
598
778
|
* `scale` multiplies every dimensional draw (default 1). Used for viewport units.
|
|
599
779
|
* `countScale` multiplies entity count for density-aware scaling (default 1). */
|
|
600
780
|
declare function buildEntities(layer: LayerSpec, rng: Rng, w: number, h: number, scale?: number, countScale?: number): Entity[];
|
|
781
|
+
/**
|
|
782
|
+
* Where entity `e` sits in its current emit window at time `t`: 0..1 across
|
|
783
|
+
* the visible `life` ms, or null while dark (or when the layer has no `emit`).
|
|
784
|
+
* Pure — the window index is `floor((t - phase) / every)`, no state.
|
|
785
|
+
*/
|
|
786
|
+
declare function emitWindow(e: Entity, t: number): number | null;
|
|
787
|
+
/** Alpha envelope across an emit window: fast smooth attack, slow smooth decay. */
|
|
788
|
+
declare function emitEnvelope(u: number): number;
|
|
601
789
|
/** Analytic opacity of an entity at logical time `t` (ms). Pure, clamped to 0..1. */
|
|
602
790
|
declare function alphaAt(e: Entity, t: number): number;
|
|
603
791
|
/** Analytic size multiplier at time `t` (ms). Pure, clamped to > 0. */
|
|
@@ -762,6 +950,16 @@ declare function structuralSignature(spec: SaverSpec): string;
|
|
|
762
950
|
declare function adviseSpec(spec: SaverSpec, viewport?: {
|
|
763
951
|
width: number;
|
|
764
952
|
height: number;
|
|
953
|
+
},
|
|
954
|
+
/**
|
|
955
|
+
* Sample point. `perceiveScene` forwards its own `t`/`seed` so the advisories
|
|
956
|
+
* describe the same scene its other channels do — without them a caller
|
|
957
|
+
* perceiving at t = 30 s would get `form` for that instant beside an
|
|
958
|
+
* `overlap-seams` advisory computed for a different one.
|
|
959
|
+
*/
|
|
960
|
+
opts?: {
|
|
961
|
+
t?: number;
|
|
962
|
+
seed?: number;
|
|
765
963
|
}): SpecWarning[];
|
|
766
964
|
/**
|
|
767
965
|
* Non-blocking advisory warnings for a validated sequence envelope.
|
|
@@ -772,6 +970,82 @@ declare function adviseSequence(seq: IdleSequence, viewport?: {
|
|
|
772
970
|
height: number;
|
|
773
971
|
}): SpecWarning[];
|
|
774
972
|
|
|
973
|
+
/**
|
|
974
|
+
* Layer cohesion — does a layer read as ONE form, or as N separate marks?
|
|
975
|
+
*
|
|
976
|
+
* The gap this closes: every other perception channel reports a heavily
|
|
977
|
+
* overlapping layer identically whether its sprites merge into a silhouette or
|
|
978
|
+
* stay legible as individual discs. Luminance, coverage, dominance and the
|
|
979
|
+
* braille map are all blind to it, because they measure ink, not edges. An
|
|
980
|
+
* agent drawing a *shape* out of sprites therefore cannot tell success from
|
|
981
|
+
* failure without publishing and looking at real pixels.
|
|
982
|
+
*
|
|
983
|
+
* Two independent facts decide it, so both are reported:
|
|
984
|
+
*
|
|
985
|
+
* - `overlap` — geometry. What fraction of a typical entity's outline is buried
|
|
986
|
+
* inside a sibling. Scattered fields sit near 0; a deliberate mass sits high.
|
|
987
|
+
* - `seamless` — paint. Whether an overlap between two of this layer's entities
|
|
988
|
+
* paints as an invisible join. Only a hard-edged, fully opaque, single-colour,
|
|
989
|
+
* un-blended layer merges; anything else shows every internal edge.
|
|
990
|
+
*
|
|
991
|
+
* Both are analytic, deterministic and renderer-free, like the rest of
|
|
992
|
+
* `perceive.ts`.
|
|
993
|
+
*/
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* Sample time for a spec-level cohesion read, matching `perceiveScene`'s own
|
|
997
|
+
* default so the advisory and the reported numbers agree on the usual call.
|
|
998
|
+
* Past all typical `life.enter` staging; `grow` has had time to breathe.
|
|
999
|
+
*/
|
|
1000
|
+
declare const COHESION_T = 5000;
|
|
1001
|
+
/** What a layer will read as on the wall. */
|
|
1002
|
+
type CohesionRead =
|
|
1003
|
+
/** Entities merge into a single silhouette — the layer draws a shape. */
|
|
1004
|
+
'mass'
|
|
1005
|
+
/** Entities overlap heavily but every overlap paints a visible edge. */
|
|
1006
|
+
| 'seamed'
|
|
1007
|
+
/** Entities stand alone — a field of marks, which most layers are. */
|
|
1008
|
+
| 'marks';
|
|
1009
|
+
interface LayerCohesion {
|
|
1010
|
+
layerIndex: number;
|
|
1011
|
+
key: string | undefined;
|
|
1012
|
+
/**
|
|
1013
|
+
* Mean fraction of an entity's outline covered by a same-layer sibling, 0..1.
|
|
1014
|
+
* `null` for sprite kinds where a merged silhouette is not a meaningful idea
|
|
1015
|
+
* (lines, glyphs and text: ring, streak, stroke, bar, emoji, text, textBlock).
|
|
1016
|
+
*/
|
|
1017
|
+
overlap: number | null;
|
|
1018
|
+
/** Do this layer's overlaps paint as invisible joins? */
|
|
1019
|
+
seamless: boolean;
|
|
1020
|
+
/** Why not, when not — the field to act on. `null` when seamless. */
|
|
1021
|
+
seamCause: string | null;
|
|
1022
|
+
/** The verdict. `null` when `overlap` is null. */
|
|
1023
|
+
reads: CohesionRead | null;
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Why this layer's overlaps paint a visible edge, or null when they vanish.
|
|
1027
|
+
*
|
|
1028
|
+
* Opacity is judged over the whole timeline, not this instant: a layer that
|
|
1029
|
+
* breathes with `pulse` is translucent at some point in every cycle, so its
|
|
1030
|
+
* seams appear even if the sampled frame happens to catch it at full alpha.
|
|
1031
|
+
*/
|
|
1032
|
+
declare function seamCauseOf(layer: LayerSpec): string | null;
|
|
1033
|
+
/**
|
|
1034
|
+
* Per-layer cohesion for an already-built scene. Takes entities rather than a
|
|
1035
|
+
* spec so `perceiveScene` and `adviseSpec` can each pass the scene they already
|
|
1036
|
+
* built instead of building a third one.
|
|
1037
|
+
*/
|
|
1038
|
+
declare function cohesionOf(layers: Array<{
|
|
1039
|
+
layer: LayerSpec;
|
|
1040
|
+
entities: Entity[];
|
|
1041
|
+
}>, t: number, w: number, h: number): LayerCohesion[];
|
|
1042
|
+
/**
|
|
1043
|
+
* True when a `seamed` layer is worth warning about: dense enough to be
|
|
1044
|
+
* deliberate, and opaque enough that it cannot be an atmospheric wash. Keeps
|
|
1045
|
+
* the advisory off the soft low-alpha glow fields the playbook recommends.
|
|
1046
|
+
*/
|
|
1047
|
+
declare function seamsWorthWarning(layer: LayerSpec, c: LayerCohesion, entityCount: number): boolean;
|
|
1048
|
+
|
|
775
1049
|
interface LayerSnapshot {
|
|
776
1050
|
key: string | undefined;
|
|
777
1051
|
count: number;
|
|
@@ -918,6 +1192,13 @@ interface DominanceEntry {
|
|
|
918
1192
|
* ribbons, so a comet layer is ranked by its comet, not just its head.
|
|
919
1193
|
*/
|
|
920
1194
|
declare function dominanceRanking(spec: SaverSpec, opts?: PerceiveOptions): DominanceEntry[];
|
|
1195
|
+
/**
|
|
1196
|
+
* Does each layer read as one merged form or as separate marks? The one thing
|
|
1197
|
+
* the luminance maps cannot answer — they measure ink, not edges, so a layer
|
|
1198
|
+
* that merged into a silhouette and one that stayed a pile of discs look
|
|
1199
|
+
* identical in every other channel. See `cohesion.ts`.
|
|
1200
|
+
*/
|
|
1201
|
+
declare function layerCohesion(spec: SaverSpec, opts?: PerceiveOptions): LayerCohesion[];
|
|
921
1202
|
interface LayerMotionStats {
|
|
922
1203
|
layerIndex: number;
|
|
923
1204
|
key: string | undefined;
|
|
@@ -995,6 +1276,8 @@ interface ScenePerception {
|
|
|
995
1276
|
colProfile: number[];
|
|
996
1277
|
dominance: DominanceEntry[];
|
|
997
1278
|
motion: LayerMotionStats[];
|
|
1279
|
+
/** Per layer: merged silhouette, seamed overlap, or separate marks. */
|
|
1280
|
+
form: LayerCohesion[];
|
|
998
1281
|
/** Literal strings + sizes of any text layers (glyphs don't show in the maps). */
|
|
999
1282
|
text: TextSpriteInfo[];
|
|
1000
1283
|
advisories: ReturnType<typeof adviseSpec>;
|
|
@@ -1157,6 +1440,38 @@ declare const MATRIX_RAIN_SPEC: SaverSpec;
|
|
|
1157
1440
|
*/
|
|
1158
1441
|
declare const NOSTALGHIA_CANDLE_SPEC: SaverSpec;
|
|
1159
1442
|
|
|
1443
|
+
/**
|
|
1444
|
+
* Pings — almost nothing, almost never.
|
|
1445
|
+
* A near-black ground and one teal hue. Three rings take turns: each one
|
|
1446
|
+
* appears, grows sixteenfold (0.15× → 2.4× its radius) and fades over four
|
|
1447
|
+
* seconds, then the frame is empty until the next — `emit` with `jitter: 0`
|
|
1448
|
+
* spaces them evenly, one event every four seconds, and `life` is kept at
|
|
1449
|
+
* the stagger so no two rings are ever lit together. Underneath, a few motes rise,
|
|
1450
|
+
* `settle` to rest and fade on their own, longer, seeded schedule. Nothing
|
|
1451
|
+
* travels; everything grows and goes. The house style Fathom describes this
|
|
1452
|
+
* exactly and, before `emit`, could not be authored.
|
|
1453
|
+
*/
|
|
1454
|
+
declare const PINGS_SPEC: SaverSpec;
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* Facets — a composition in the manner of the early abstractionists: three
|
|
1458
|
+
* soft-edged colour planes (feathered `rect`) breathing slowly behind a field
|
|
1459
|
+
* of tumbling triangular facets (custom `polygon`), tapered brush arcs
|
|
1460
|
+
* (`stroke`) drifting across, and a few glowing hexagons (soft regular
|
|
1461
|
+
* `polygon`). Every glyph here is a path, not a disc — the shape family nine
|
|
1462
|
+
* of the fifteen style profiles asked for.
|
|
1463
|
+
*/
|
|
1464
|
+
declare const FACETS_SPEC: SaverSpec;
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* Relay Board — a six-row status chart in five layers instead of twenty-five.
|
|
1468
|
+
* One `list` of labels, one `list` of `bar`s whose lengths are the numbers,
|
|
1469
|
+
* one `list` of readouts, a title block, and a slow dust field behind so the
|
|
1470
|
+
* board reads as a live wall, not a document. Steer `bars.values` and the
|
|
1471
|
+
* bars glide to the new figures; the labels never move.
|
|
1472
|
+
*/
|
|
1473
|
+
declare const RELAY_BOARD_SPEC: SaverSpec;
|
|
1474
|
+
|
|
1160
1475
|
/**
|
|
1161
1476
|
* Polygons: the classic Mystify-style bouncing-polygon saver, expressed as chain links + heavy
|
|
1162
1477
|
* ghosting. Showcases `links.mode: 'chain'` with `closed` (vertices wired in order
|
|
@@ -1193,4 +1508,4 @@ declare const EXAMPLE_SPECS: SaverSpec[];
|
|
|
1193
1508
|
/** Lookup by saver id. */
|
|
1194
1509
|
declare const EXAMPLE_BY_ID: Readonly<Record<string, SaverSpec>>;
|
|
1195
1510
|
|
|
1196
|
-
export { AQUARIUM_SPEC, AURORA_SPEC, type BackgroundDrift, type BackgroundSpec, type BandSpec, COMETS_SPEC, CONSTELLATION_SPEC, type CycleSpec, DASHBOARD_SPEC, type DominanceEntry, EXAMPLE_BY_ID, EXAMPLE_SPECS, type Entity, type GradientStop, HAIKU_SPEC, type IdleSequence, LANTERNS_SPEC, LIMITS, type LayerMotionStats, type LayerSnapshot, type LayerSpec, type LinkEdge, type LuminanceGrid, type LuminanceGridOptions, MATRIX_RAIN_SPEC, type MotionSpec, NOSTALGHIA_CANDLE_SPEC, ORRERY_SPEC, POLYGONS_SPEC, PROCESSION_SPEC, type PerceiveOptions, type Placed, RAIN_SPEC, type ResolveOptions, type ResolvedSegment, type RevealState, SAKURA_SPEC, SCHEMA_EXAMPLES, SCHEMA_VERSION, SNOWFALL_SPEC, type SaverSpec, type SceneDescription, type SceneDiff, type ScenePerception, type SceneSnapshot, type SchemaExample, type SequenceSegment, type SequenceTransition, type SpecError, type SpecWarning, type SpriteSpec, type SteerDelta, type TextBlockLine, type TextRevealInput, type TextRevealSpec, type TextSpriteInfo, type ValidationResult, WARP_NEAR, WARP_TUNNEL_SPEC, type WanderOsc, adviseSequence, adviseSpec, alphaAt, applyDeltasToSpec, assertValidSequence, assertValidSpec, breakTextBlock, buildEntities, compileSaver, compileSequence, describeScene, diffScenes, dominanceRanking, easeSmooth, graphemeClusters, headingAt, lerpSpec, lifeAlphaAt, linkEdges, linkPairs, luminanceGrid, manifestFor, motionStats, perceiveScene, positionAt, renderBrailleMap, renderDensityMap, resolveSegment, resolveSpecPath, revealState, rotationAt, segmentStart, sizeAt, spriteIndexAt, spriteVariants, steerablePaths, structuralSignature, textSprites, textWidthEm, validateSequence, validateSpec };
|
|
1511
|
+
export { AQUARIUM_SPEC, AURORA_SPEC, type BackgroundDrift, type BackgroundSpec, type BandSpec, COHESION_T, COMETS_SPEC, CONSTELLATION_SPEC, type CohesionRead, type CycleSpec, DASHBOARD_SPEC, type DominanceEntry, EXAMPLE_BY_ID, EXAMPLE_SPECS, type Entity, FACETS_SPEC, type GradientStop, HAIKU_SPEC, type IdleSequence, LANTERNS_SPEC, LIMITS, type LayerCohesion, type LayerMotionStats, type LayerSnapshot, type LayerSpec, type LinkEdge, type LuminanceGrid, type LuminanceGridOptions, MATRIX_RAIN_SPEC, type MotionEase, type MotionSpec, NOSTALGHIA_CANDLE_SPEC, ORRERY_SPEC, PINGS_SPEC, POLYGONS_SPEC, PROCESSION_SPEC, type PerceiveOptions, type Placed, RAIN_SPEC, RELAY_BOARD_SPEC, type ResolveOptions, type ResolvedSegment, type RevealState, SAKURA_SPEC, SCHEMA_EXAMPLES, SCHEMA_VERSION, SNOWFALL_SPEC, type SaverSpec, type SceneDescription, type SceneDiff, type ScenePerception, type SceneSnapshot, type SchemaExample, type SequenceSegment, type SequenceTransition, type SpecError, type SpecWarning, type SpriteSpec, type SteerDelta, type TextBlockLine, type TextRevealInput, type TextRevealSpec, type TextSpriteInfo, type ValidationResult, WARP_NEAR, WARP_TUNNEL_SPEC, type WanderOsc, adviseSequence, adviseSpec, alphaAt, applyDeltasToSpec, assertValidSequence, assertValidSpec, breakTextBlock, buildEntities, cohesionOf, compileSaver, compileSequence, describeScene, diffScenes, dominanceRanking, easeSmooth, emitEnvelope, emitWindow, graphemeClusters, headingAt, layerCohesion, lerpSpec, lifeAlphaAt, linkEdges, linkPairs, luminanceGrid, manifestFor, motionStats, perceiveScene, positionAt, renderBrailleMap, renderDensityMap, resolveSegment, resolveSpecPath, revealState, rotationAt, seamCauseOf, seamsWorthWarning, segmentStart, sizeAt, spriteIndexAt, spriteVariants, steerablePaths, structuralSignature, textSprites, textWidthEm, validateSequence, validateSpec };
|