@idle-screens/schema 3.7.0 → 3.9.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/FORMAT.md +162 -8
- package/dist/index.d.ts +553 -14
- package/dist/index.js +1423 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/saver-spec.schema.json +121 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idle-screens/schema",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "Declarative, agent-authorable saver format for idle-screens: validate a data spec, then compile it into a runnable, seeded, flash-safe SaverPlugin.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Shawn Partridge",
|
package/saver-spec.schema.json
CHANGED
|
@@ -100,6 +100,26 @@
|
|
|
100
100
|
},
|
|
101
101
|
"description": "Animated reveal controls for a text block."
|
|
102
102
|
},
|
|
103
|
+
"finish": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"description": "Print finish over the finished frame, applied last. grain (0..1): a seeded zero-mean noise tile screened at up to 35% alpha; dither (0..1): an 8x8 ordered Bayer tile at up to 25% - a stylistic screen, not per-pixel dithering. Both composite with a symmetric blend (overlay), so mean luminance is unchanged: flash-safe, and ignored by luminanceGrid. The grain tile is generated once per mount from the spec seed; animate: true steps its offset from the frame's time bucket (12 Hz, seeded), ignored on the basic/minimal tiers. Never fed back into ghosting. grain/dither are steerable paint paths (finish.grain). Native clients ignore finish.",
|
|
107
|
+
"properties": {
|
|
108
|
+
"grain": {
|
|
109
|
+
"type": "number",
|
|
110
|
+
"minimum": 0,
|
|
111
|
+
"maximum": 1
|
|
112
|
+
},
|
|
113
|
+
"dither": {
|
|
114
|
+
"type": "number",
|
|
115
|
+
"minimum": 0,
|
|
116
|
+
"maximum": 1
|
|
117
|
+
},
|
|
118
|
+
"animate": {
|
|
119
|
+
"type": "boolean"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
103
123
|
"background": {
|
|
104
124
|
"oneOf": [
|
|
105
125
|
{
|
|
@@ -193,6 +213,80 @@
|
|
|
193
213
|
"description": "Slow oscillation of gradient stop positions \u2014 makes the background feel alive."
|
|
194
214
|
}
|
|
195
215
|
}
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"type": "object",
|
|
219
|
+
"required": [
|
|
220
|
+
"type",
|
|
221
|
+
"scale",
|
|
222
|
+
"bands"
|
|
223
|
+
],
|
|
224
|
+
"additionalProperties": false,
|
|
225
|
+
"description": "A scalar-field background: seeded, warped value noise quantised into bands (thermal maps, contour terrain, riso washes). Pure in (x, y, t, seed): rendered as a low-res raster (short side 96 px, 48 on basic/minimal tiers) scaled to the canvas, recomputed once per 100 ms while drifting; the perception grid samples the same function. Never touches the entity RNG. Native clients that ignore the field paint a vertical gradient through bands in order.",
|
|
226
|
+
"properties": {
|
|
227
|
+
"type": {
|
|
228
|
+
"const": "field"
|
|
229
|
+
},
|
|
230
|
+
"scale": {
|
|
231
|
+
"type": "number",
|
|
232
|
+
"minimum": 0.5,
|
|
233
|
+
"maximum": 8,
|
|
234
|
+
"description": "Noise features across the short side of the viewport."
|
|
235
|
+
},
|
|
236
|
+
"octaves": {
|
|
237
|
+
"type": "integer",
|
|
238
|
+
"minimum": 1,
|
|
239
|
+
"maximum": 4,
|
|
240
|
+
"description": "Octaves of detail. Default 2."
|
|
241
|
+
},
|
|
242
|
+
"warp": {
|
|
243
|
+
"type": "number",
|
|
244
|
+
"minimum": 0,
|
|
245
|
+
"maximum": 1,
|
|
246
|
+
"description": "Domain-warp amount: 0 (default) round blobs, 1 smeared, folded contours."
|
|
247
|
+
},
|
|
248
|
+
"quantize": {
|
|
249
|
+
"type": "integer",
|
|
250
|
+
"minimum": 0,
|
|
251
|
+
"maximum": 8,
|
|
252
|
+
"not": { "const": 1 },
|
|
253
|
+
"description": "Levels to posterise into (2..8; hard bands), or 0 for smooth interpolation between bands. Default bands.length."
|
|
254
|
+
},
|
|
255
|
+
"bands": {
|
|
256
|
+
"type": "array",
|
|
257
|
+
"minItems": 2,
|
|
258
|
+
"maxItems": 8,
|
|
259
|
+
"items": {
|
|
260
|
+
"$ref": "#/definitions/hexColor"
|
|
261
|
+
},
|
|
262
|
+
"description": "2..8 colours, read as a ramp from the field's low end to its high end."
|
|
263
|
+
},
|
|
264
|
+
"drift": {
|
|
265
|
+
"type": "object",
|
|
266
|
+
"required": [
|
|
267
|
+
"period"
|
|
268
|
+
],
|
|
269
|
+
"additionalProperties": false,
|
|
270
|
+
"properties": {
|
|
271
|
+
"period": {
|
|
272
|
+
"type": "number",
|
|
273
|
+
"minimum": 10000,
|
|
274
|
+
"description": "Full loop period in ms. Floor of 10 s (flash guard: drift is the only way a field changes over time)."
|
|
275
|
+
},
|
|
276
|
+
"amount": {
|
|
277
|
+
"type": "number",
|
|
278
|
+
"minimum": 0,
|
|
279
|
+
"maximum": 1,
|
|
280
|
+
"description": "Radius of the sample domain's slow circle, in feature units. Default 0.3."
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"description": "Slow travel of the sample domain \u2014 the field's animate. The field loops exactly every period."
|
|
284
|
+
},
|
|
285
|
+
"seed": {
|
|
286
|
+
"type": "number",
|
|
287
|
+
"description": "Field seed. Defaults to the spec seed; independent of the entity stream either way."
|
|
288
|
+
}
|
|
289
|
+
}
|
|
196
290
|
}
|
|
197
291
|
]
|
|
198
292
|
},
|
|
@@ -547,6 +641,26 @@
|
|
|
547
641
|
},
|
|
548
642
|
"description": "Sparse events: each entity appears, expands and fades in place for `life` ms every `every` ms, dark in between. The one-ping primitive; a pure function of t."
|
|
549
643
|
},
|
|
644
|
+
"rotate": {
|
|
645
|
+
"description": "Static per-entity rotation in degrees (positive = clockwise). A scalar turns every entity the same way; a [min,max] range gives each entity a seeded angle. Composes with spin (added to its seeded start angle). spin: [0, 0] does NOT hold a seeded angle — a zero spin speed renders at 0. Native clients that read spin only render it as 0.",
|
|
646
|
+
"oneOf": [
|
|
647
|
+
{
|
|
648
|
+
"type": "number",
|
|
649
|
+
"minimum": -360,
|
|
650
|
+
"maximum": 360
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"type": "array",
|
|
654
|
+
"items": {
|
|
655
|
+
"type": "number",
|
|
656
|
+
"minimum": -360,
|
|
657
|
+
"maximum": 360
|
|
658
|
+
},
|
|
659
|
+
"minItems": 2,
|
|
660
|
+
"maxItems": 2
|
|
661
|
+
}
|
|
662
|
+
]
|
|
663
|
+
},
|
|
550
664
|
"clock": {
|
|
551
665
|
"type": "object",
|
|
552
666
|
"additionalProperties": false,
|
|
@@ -1409,6 +1523,9 @@
|
|
|
1409
1523
|
"background": {
|
|
1410
1524
|
"$ref": "#/definitions/background"
|
|
1411
1525
|
},
|
|
1526
|
+
"finish": {
|
|
1527
|
+
"$ref": "#/definitions/finish"
|
|
1528
|
+
},
|
|
1412
1529
|
"layers": {
|
|
1413
1530
|
"type": "array",
|
|
1414
1531
|
"minItems": 1,
|
|
@@ -1473,6 +1590,10 @@
|
|
|
1473
1590
|
"$ref": "#/definitions/saverSpec",
|
|
1474
1591
|
"description": "A scene drawn under every segment on the sequence's global clock — the ground that does not reset at a boundary or under a sequence.segment steer. Segments render over it transparently (their background and ghosting are ignored; validateSequence warns bed-hides-segment-background). Its entities plus the largest segment's must stay within the 800 cap (enforced by validateSequence). Steer it with bed.<path>. Native clients that ignore it render segments with their own backgrounds."
|
|
1475
1592
|
},
|
|
1593
|
+
"finish": {
|
|
1594
|
+
"$ref": "#/definitions/finish",
|
|
1595
|
+
"description": "A print finish applied once per composed frame (bed + segment + fade) on the sequence's presentation canvas. Overrides every segment's own finish while set; absent, the active segment's finish applies. A bed's finish is ignored. Native clients ignore it."
|
|
1596
|
+
},
|
|
1476
1597
|
"segments": {
|
|
1477
1598
|
"type": "array",
|
|
1478
1599
|
"minItems": 1,
|