Sequence editor. Layout fixes
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
[
|
||||
{
|
||||
"id": "seq_alphabet_default",
|
||||
"name": "Spell Alphabet",
|
||||
"favorite": true,
|
||||
"steps": [
|
||||
{ "type": "spot", "id": "A" },
|
||||
{ "type": "spot", "id": "B" },
|
||||
{ "type": "spot", "id": "C" },
|
||||
{ "type": "spot", "id": "D" },
|
||||
{ "type": "spot", "id": "E" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "seq_yes_no",
|
||||
"name": "Yes then No",
|
||||
"favorite": true,
|
||||
"steps": [
|
||||
{ "type": "spot", "id": "YES" },
|
||||
{ "type": "spot", "id": "NO" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "seq_corners",
|
||||
"name": "Four Corners",
|
||||
"favorite": true,
|
||||
"steps": [
|
||||
{ "type": "xy", "x": 130, "y": 120, "delay": 1500 },
|
||||
{ "type": "xy", "x": -130, "y": 120, "delay": 1500 },
|
||||
{ "type": "xy", "x": -130, "y": -15, "delay": 1500 },
|
||||
{ "type": "xy", "x": 130, "y": -15, "delay": 1500 },
|
||||
{ "type": "xy", "x": 0, "y": 50, "delay": 1500 }
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"id": "seq_alphabet_portrait",
|
||||
"name": "Spell Alphabet (Portrait)",
|
||||
"favorite": true,
|
||||
"steps": [
|
||||
{ "type": "spot", "id": "A" },
|
||||
{ "type": "spot", "id": "B" },
|
||||
{ "type": "spot", "id": "C", "delay": 1000 },
|
||||
{ "type": "spot", "id": "D" },
|
||||
{ "type": "spot", "id": "E" }
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,54 @@
|
||||
# Sequence Configuration Specification (`sequences.json`)
|
||||
|
||||
Sequences allow predefined orchestration of movements. They are stored per-background in `web/assets/backgrounds/<bg_name>/sequences.json`.
|
||||
|
||||
## File Structure
|
||||
The file should contain a JSON array of sequence objects.
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "demo_sequence",
|
||||
"name": "Demo Mix",
|
||||
"favorite": true,
|
||||
"steps": [
|
||||
{
|
||||
"type": "spot",
|
||||
"id": "A"
|
||||
},
|
||||
{
|
||||
"type": "spot",
|
||||
"id": "B",
|
||||
"delay": 1500
|
||||
},
|
||||
{
|
||||
"type": "xy",
|
||||
"x": 50,
|
||||
"y": 120,
|
||||
"delay": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Sequence Object Properties
|
||||
- `id` (string): Unique identifier for the sequence.
|
||||
- `name` (string): Human-readable name displayed in the UI.
|
||||
- `favorite` (boolean): If `true`, this sequence will appear in the "Quick Sequences" box across relevant sections (`board-control`, `input-text`, `stepper-test`).
|
||||
- `steps` (array): A list of step objects executed in order.
|
||||
|
||||
## Step Object Properties
|
||||
All steps share an optional `delay` property. If omitted, the global delay setting is used.
|
||||
- `delay` (number, optional): Delay in milliseconds to wait *after* reaching the target before moving to the next step.
|
||||
|
||||
### Type: "spot"
|
||||
Moves to a predefined spot in the background's `spots.json`.
|
||||
- `type`: Must be `"spot"`.
|
||||
- `id`: The spot ID string (e.g., `"YES"`, `"A"`).
|
||||
|
||||
### Type: "xy"
|
||||
Moves to a raw X/Y coordinate in mm.
|
||||
- `type`: Must be `"xy"`.
|
||||
- `x`: X coordinate (number).
|
||||
- `y`: Y coordinate (number).
|
||||
Reference in New Issue
Block a user