@idle-screens/schema 3.15.0 → 3.16.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 +111 -59
- package/dist/index.d.ts +152 -19
- package/dist/index.js +513 -134
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/saver-spec.schema.json +11 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idle-screens/schema",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.1",
|
|
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
|
@@ -57,7 +57,8 @@
|
|
|
57
57
|
"additionalProperties": false,
|
|
58
58
|
"properties": {
|
|
59
59
|
"start": { "type": "number", "minimum": 0, "maximum": 1, "description": "Where the painted stretch begins, as a fraction of the line's length (default 0)." },
|
|
60
|
-
"end": { "type": "number", "minimum": 0, "maximum": 1, "description": "Where it ends (default 1). Glide end 0 \u2192 1 to draw the line on; glide start after it to erase from the tail." }
|
|
60
|
+
"end": { "type": "number", "minimum": 0, "maximum": 1, "description": "Where it ends (default 1). Glide end 0 \u2192 1 to draw the line on; glide start after it to erase from the tail." },
|
|
61
|
+
"mode": { "enum": ["run", "each"], "description": "Path strokes: 'run' (default) draws every subpath as one pen run in draw order; 'each' cuts every subpath to the same start..end of its own length, so they all draw at once (a burst, a tick dial, hatching). An enum: it steps. No effect on a stroke sprite." }
|
|
61
62
|
},
|
|
62
63
|
"description": "Draw-on: paint only the stretch of the line from start to end (paint; glides). start >= end paints nothing. Native: ignored (whole line)."
|
|
63
64
|
},
|
|
@@ -428,9 +429,9 @@
|
|
|
428
429
|
"properties": {
|
|
429
430
|
"amp": {
|
|
430
431
|
"type": "number",
|
|
431
|
-
"
|
|
432
|
+
"minimum": 0,
|
|
432
433
|
"maximum": 0.5,
|
|
433
|
-
"description": "Opacity breathing amplitude,
|
|
434
|
+
"description": "Opacity breathing amplitude, 0 (no pulse) to 0.5."
|
|
434
435
|
},
|
|
435
436
|
"period": {
|
|
436
437
|
"type": "number",
|
|
@@ -559,8 +560,9 @@
|
|
|
559
560
|
"y": { "type": "number", "minimum": -17280, "maximum": 17280, "description": "Translate in min(w,h) units, within ±2 (px under units: 'px')." },
|
|
560
561
|
"scale": { "type": "number", "minimum": 0, "maximum": 8, "description": "Uniform scale about the viewport centre (default 1)." },
|
|
561
562
|
"scaleX": { "type": "number", "minimum": -8, "maximum": 8, "description": "Extra horizontal scale; toward 0 reads as a turn about the vertical axis, negative mirrors (default 1)." },
|
|
563
|
+
"scaleY": { "type": "number", "minimum": -8, "maximum": 8, "description": "Extra vertical scale (× scale); with scaleX it squashes and stretches, negative flips upside down (default 1)." },
|
|
562
564
|
"rotate": { "type": "number", "minimum": -3600, "maximum": 3600, "description": "Degrees, clockwise, about the transform's origin." },
|
|
563
|
-
"origin": { "enum": ["viewport", "anchor"], "description": "What scale/scaleX/rotate turn about: 'viewport' (default) the viewport centre — a camera; 'anchor' the layer's own position point (with dx/dy; a list/table block's anchor; else the centre of its region) — a word punches in place on every aspect." }
|
|
565
|
+
"origin": { "enum": ["viewport", "anchor"], "description": "What scale/scaleX/scaleY/rotate turn about: 'viewport' (default) the viewport centre — a camera; 'anchor' the layer's own position point (with dx/dy; a list/table block's anchor; else the centre of its region) — a word punches in place on every aspect." }
|
|
564
566
|
},
|
|
565
567
|
"description": "Paint-level transform of the whole layer at draw time, about the viewport centre. Outside the structural signature, so it glides under setParam, a timeline key or a morph — a camera for timed pieces, a slow drift for ambient ones. Native clients ignore it (identity)."
|
|
566
568
|
},
|
|
@@ -1143,14 +1145,14 @@
|
|
|
1143
1145
|
"minItems": 3,
|
|
1144
1146
|
"maxItems": 24,
|
|
1145
1147
|
"items": { "type": "array", "minItems": 2, "maxItems": 2, "items": { "type": "number", "minimum": -1, "maximum": 1 } },
|
|
1146
|
-
"description": "Custom vertices in unit coordinates (-1..1), scaled by the radius. Not with sides."
|
|
1148
|
+
"description": "Custom vertices in unit coordinates (-1..1), scaled by the radius. Not with sides. With stroke, fill: false or gradient they draw as the closed path through them (keyed points = line art)."
|
|
1147
1149
|
},
|
|
1148
1150
|
"soft": { "type": "boolean", "description": "Feather the fill from the centre, like a soft circle." },
|
|
1149
1151
|
"colors": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/hexColor" }, "description": "Per-entity color palette (seeded pick)." },
|
|
1150
1152
|
"colorWeights": { "$ref": "#/definitions/colorWeights" },
|
|
1151
1153
|
"path": { "$ref": "#/definitions/pathD" },
|
|
1152
1154
|
"fillRule": { "$ref": "#/definitions/pathFillRule" },
|
|
1153
|
-
"fill": { "type": "boolean", "description": "false draws the stroke only (line art; open paths allowed). Path drawings
|
|
1155
|
+
"fill": { "type": "boolean", "description": "false draws the stroke only (line art; open paths allowed). Path drawings, or points (drawn as the closed path through them)." },
|
|
1154
1156
|
"gradient": { "$ref": "#/definitions/pathGradient" },
|
|
1155
1157
|
"stroke": { "$ref": "#/definitions/pathStroke" },
|
|
1156
1158
|
"parts": { "type": "array", "minItems": 1, "maxItems": 256, "items": { "$ref": "#/definitions/pathPart" }, "description": "A multi-colour drawing: parts drawn back to front, each with its own path and paint. Not with path/points/sides/gradient/stroke/fill/fillRule on the sprite." },
|
|
@@ -1279,7 +1281,8 @@
|
|
|
1279
1281
|
"decimals": { "type": "integer", "minimum": 0, "maximum": 6, "description": "Places after the point (default 0)." },
|
|
1280
1282
|
"prefix": { "type": "string", "maxLength": 64 },
|
|
1281
1283
|
"suffix": { "type": "string", "maxLength": 64 },
|
|
1282
|
-
"grouping": { "type": "boolean", "description": "Thousands separated by commas (default true). Locale-free." }
|
|
1284
|
+
"grouping": { "type": "boolean", "description": "Thousands separated by commas (default true). Locale-free." },
|
|
1285
|
+
"minDigits": { "type": "integer", "minimum": 1, "maximum": 12, "description": "Zero-pad the integer part to at least this many digits (default 1): 4 paints 42 as 0042. Padded before grouping (0,042), so pair with grouping: false for a fixed-width counter. The sign stays outside." }
|
|
1283
1286
|
},
|
|
1284
1287
|
"description": "A counter: the block paints prefix + value + suffix instead of text. text is what clients that do not read number show - author it as the rest value. Native: ignored (text)."
|
|
1285
1288
|
}
|
|
@@ -1727,6 +1730,7 @@
|
|
|
1727
1730
|
"y": { "type": "number", "minimum": -17280, "maximum": 17280 },
|
|
1728
1731
|
"scale": { "type": "number", "minimum": 0, "maximum": 8 },
|
|
1729
1732
|
"scaleX": { "type": "number", "minimum": -8, "maximum": 8 },
|
|
1733
|
+
"scaleY": { "type": "number", "minimum": -8, "maximum": 8 },
|
|
1730
1734
|
"rotate": { "type": "number", "minimum": -3600, "maximum": 3600 },
|
|
1731
1735
|
"origin": { "const": "viewport" }
|
|
1732
1736
|
},
|