@almadar/std 16.176.0 → 16.178.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/behaviors/lolo/ui/avl/atoms/ui-behavior-view.lolo +1 -1
- package/behaviors/lolo/ui/avl/atoms/ui-module-card.lolo +1 -1
- package/behaviors/lolo/ui/core/atoms/std-modal.lolo +13 -0
- package/behaviors/lolo/ui/core/organisms/ui-detail-panel.lolo +29 -1
- package/behaviors/lolo/ui/core/organisms/ui-form-section.lolo +19 -5
- package/behaviors/lolo/ui/core/organisms/ui-form.lolo +19 -5
- package/behaviors/lolo/ui/core/organisms/ui-segment-renderer.lolo +1 -1
- package/behaviors/lolo/ui/game/atoms/std-motion-body.lolo +139 -0
- package/behaviors/lolo/ui/game/atoms/ui-action-palette.lolo +1 -1
- package/behaviors/lolo/ui/game/atoms/ui-action-tile.lolo +1 -1
- package/behaviors/lolo/ui/game/atoms/ui-canvas-2d.lolo +1 -1
- package/behaviors/lolo/ui/game/atoms/ui-canvas.lolo +3 -3
- package/behaviors/lolo/ui/game/atoms/ui-draw-group.lolo +1 -1
- package/behaviors/lolo/ui/game/atoms/ui-draw-shape-layer.lolo +3 -3
- package/behaviors/lolo/ui/game/atoms/ui-draw-shape.lolo +3 -3
- package/behaviors/lolo/ui/game/atoms/ui-draw-sprite-layer.lolo +1 -1
- package/behaviors/lolo/ui/game/atoms/ui-draw-sprite.lolo +1 -1
- package/behaviors/lolo/ui/game/atoms/ui-draw-text-layer.lolo +1 -1
- package/behaviors/lolo/ui/game/atoms/ui-draw-text.lolo +1 -1
- package/behaviors/lolo/ui/game/atoms/ui-sequence-bar.lolo +2 -2
- package/behaviors/lolo/ui/game/atoms/ui-trait-slot.lolo +3 -3
- package/behaviors/lolo/ui/learning/atoms/ui-biology-canvas.lolo +2 -2
- package/behaviors/lolo/ui/learning/atoms/ui-chemistry-canvas.lolo +2 -2
- package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +12 -0
- package/behaviors/lolo/ui/learning/atoms/ui-physics-canvas.lolo +2 -2
- package/behaviors/registry/ui/avl/atoms/ui-behavior-view.orb +1 -1
- package/behaviors/registry/ui/avl/atoms/ui-module-card.orb +1 -1
- package/behaviors/registry/ui/core/atoms/std-modal.orb +34 -0
- package/behaviors/registry/ui/core/organisms/ui-detail-panel.orb +110 -2
- package/behaviors/registry/ui/core/organisms/ui-form-section.orb +52 -6
- package/behaviors/registry/ui/core/organisms/ui-form.orb +52 -6
- package/behaviors/registry/ui/core/organisms/ui-segment-renderer.orb +1 -1
- package/behaviors/registry/ui/game/atoms/std-motion-body.orb +1015 -0
- package/behaviors/registry/ui/game/atoms/ui-action-palette.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-action-tile.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-canvas-2d.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-canvas.orb +3 -3
- package/behaviors/registry/ui/game/atoms/ui-draw-group.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-shape-layer.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-shape.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-sprite-layer.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-sprite.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-text-layer.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-draw-text.orb +1 -1
- package/behaviors/registry/ui/game/atoms/ui-sequence-bar.orb +3 -3
- package/behaviors/registry/ui/game/atoms/ui-trait-slot.orb +5 -5
- package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +18 -1
- package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +26 -1
- package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +28 -3
- package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +28 -3
- package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +26 -1
- package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +84 -31
- package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +28 -3
- package/dist/behaviors/exports-reader.js +2152 -1874
- package/dist/behaviors/functions/index.d.ts +129 -21
- package/dist/behaviors/functions/index.js +2150 -1875
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +2153 -1875
- package/dist/behaviors/query.js +2152 -1874
- package/dist/behaviors-embeddings.hash.json +3 -3
- package/dist/behaviors-embeddings.json +410 -406
- package/dist/behaviors-registry.json +251 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2153 -1875
- package/dist/knob-embeddings.hash.json +3 -3
- package/dist/knob-embeddings.json +1 -1
- package/dist/registry/factory-signatures.json +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,1015 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Headless continuous-motion authority: the SOLE writer of bodies + gravity + bias on physics boards. Every 50ms motion tick it integrates each body — thrust acceleration plus the board-wide bias field (biasAx/biasAy — the hill-force / wind / conveyor-belt channel, written only through the SET_BIAS intent) plus gravity feed velocity, damping bleeds it, maxSpeed caps it, velocity steps position, and the world walls clamp it (a clamped axis kills that axis's velocity). Intents: THRUST sets a body's acceleration (hold-to-push input: keydown pushes, keyup zeroes), IMPULSE kicks velocity instantly (jumps, d-pad nudges), PLACE teleports (spawns, curve-riding pins), SET_GRAVITY retunes the pull live, SET_BIAS steers the bias field, RESTART reseeds. Emits BODY_MOVED for the lead body (bodies[0]) every tick so boards that subscribe can react — boards that don't subscribe pay nothing. Renders nothing.",
|
|
3
|
+
"ledger": {
|
|
4
|
+
"entries": {
|
|
5
|
+
"ent_01M0F15750RMAD8B3BNR5GE99X": {
|
|
6
|
+
"bakedName": "MotionBodyData",
|
|
7
|
+
"curName": "MotionBodyData",
|
|
8
|
+
"id": "ent_01M0F15750RMAD8B3BNR5GE99X",
|
|
9
|
+
"kind": "entity",
|
|
10
|
+
"owner": "workspace",
|
|
11
|
+
"renames": []
|
|
12
|
+
},
|
|
13
|
+
"evt_01M0F157501DXC9CR3QRNT8SXB": {
|
|
14
|
+
"bakedName": "SET_GRAVITY",
|
|
15
|
+
"curName": "SET_GRAVITY",
|
|
16
|
+
"id": "evt_01M0F157501DXC9CR3QRNT8SXB",
|
|
17
|
+
"kind": "event",
|
|
18
|
+
"owner": "workspace",
|
|
19
|
+
"parent": "trt_01M0F15750C0XA5RAB80SZVBFD",
|
|
20
|
+
"renames": []
|
|
21
|
+
},
|
|
22
|
+
"evt_01M0F1575079YFH1R7XXJ6NS4H": {
|
|
23
|
+
"bakedName": "THRUST",
|
|
24
|
+
"curName": "THRUST",
|
|
25
|
+
"id": "evt_01M0F1575079YFH1R7XXJ6NS4H",
|
|
26
|
+
"kind": "event",
|
|
27
|
+
"owner": "workspace",
|
|
28
|
+
"parent": "trt_01M0F15750C0XA5RAB80SZVBFD",
|
|
29
|
+
"renames": []
|
|
30
|
+
},
|
|
31
|
+
"evt_01M0F15750D79SW7SYK0MEJ1C8": {
|
|
32
|
+
"bakedName": "INIT",
|
|
33
|
+
"curName": "INIT",
|
|
34
|
+
"id": "evt_01M0F15750D79SW7SYK0MEJ1C8",
|
|
35
|
+
"kind": "event",
|
|
36
|
+
"owner": "workspace",
|
|
37
|
+
"parent": "trt_01M0F15750C0XA5RAB80SZVBFD",
|
|
38
|
+
"renames": []
|
|
39
|
+
},
|
|
40
|
+
"evt_01M0F15750F9TZKR47X63EBW01": {
|
|
41
|
+
"bakedName": "IMPULSE",
|
|
42
|
+
"curName": "IMPULSE",
|
|
43
|
+
"id": "evt_01M0F15750F9TZKR47X63EBW01",
|
|
44
|
+
"kind": "event",
|
|
45
|
+
"owner": "workspace",
|
|
46
|
+
"parent": "trt_01M0F15750C0XA5RAB80SZVBFD",
|
|
47
|
+
"renames": []
|
|
48
|
+
},
|
|
49
|
+
"evt_01M0F15750J898T28N2T7C5DW6": {
|
|
50
|
+
"bakedName": "BODY_MOVED",
|
|
51
|
+
"curName": "BODY_MOVED",
|
|
52
|
+
"id": "evt_01M0F15750J898T28N2T7C5DW6",
|
|
53
|
+
"kind": "event",
|
|
54
|
+
"owner": "workspace",
|
|
55
|
+
"parent": "trt_01M0F15750C0XA5RAB80SZVBFD",
|
|
56
|
+
"renames": []
|
|
57
|
+
},
|
|
58
|
+
"evt_01M0F15750PGMWJG31ZQB877NC": {
|
|
59
|
+
"bakedName": "PLACE",
|
|
60
|
+
"curName": "PLACE",
|
|
61
|
+
"id": "evt_01M0F15750PGMWJG31ZQB877NC",
|
|
62
|
+
"kind": "event",
|
|
63
|
+
"owner": "workspace",
|
|
64
|
+
"parent": "trt_01M0F15750C0XA5RAB80SZVBFD",
|
|
65
|
+
"renames": []
|
|
66
|
+
},
|
|
67
|
+
"evt_01M0F15750TJ4X6Y99S6H34892": {
|
|
68
|
+
"bakedName": "RESTART",
|
|
69
|
+
"curName": "RESTART",
|
|
70
|
+
"id": "evt_01M0F15750TJ4X6Y99S6H34892",
|
|
71
|
+
"kind": "event",
|
|
72
|
+
"owner": "workspace",
|
|
73
|
+
"parent": "trt_01M0F15750C0XA5RAB80SZVBFD",
|
|
74
|
+
"renames": []
|
|
75
|
+
},
|
|
76
|
+
"evt_01M0F15750TYJ70MCGET9ERBWE": {
|
|
77
|
+
"bakedName": "SET_BIAS",
|
|
78
|
+
"curName": "SET_BIAS",
|
|
79
|
+
"id": "evt_01M0F15750TYJ70MCGET9ERBWE",
|
|
80
|
+
"kind": "event",
|
|
81
|
+
"owner": "workspace",
|
|
82
|
+
"parent": "trt_01M0F15750C0XA5RAB80SZVBFD",
|
|
83
|
+
"renames": []
|
|
84
|
+
},
|
|
85
|
+
"orb_01M0F15750P5ST6DKE8H23JASA": {
|
|
86
|
+
"bakedName": "MotionBodyOrbital",
|
|
87
|
+
"curName": "MotionBodyOrbital",
|
|
88
|
+
"id": "orb_01M0F15750P5ST6DKE8H23JASA",
|
|
89
|
+
"kind": "orbital",
|
|
90
|
+
"owner": "workspace",
|
|
91
|
+
"renames": []
|
|
92
|
+
},
|
|
93
|
+
"pag_01M0F157501TQFSRR5CVBKJTT3": {
|
|
94
|
+
"bakedName": "MotionBodyPage",
|
|
95
|
+
"curName": "MotionBodyPage",
|
|
96
|
+
"id": "pag_01M0F157501TQFSRR5CVBKJTT3",
|
|
97
|
+
"kind": "page",
|
|
98
|
+
"owner": "workspace",
|
|
99
|
+
"renames": []
|
|
100
|
+
},
|
|
101
|
+
"trt_01M0F15750C0XA5RAB80SZVBFD": {
|
|
102
|
+
"bakedName": "MotionBody",
|
|
103
|
+
"curName": "MotionBody",
|
|
104
|
+
"id": "trt_01M0F15750C0XA5RAB80SZVBFD",
|
|
105
|
+
"kind": "trait",
|
|
106
|
+
"owner": "workspace",
|
|
107
|
+
"renames": []
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"schemaVersion": 1
|
|
111
|
+
},
|
|
112
|
+
"name": "std-motion-body",
|
|
113
|
+
"orbitals": [
|
|
114
|
+
{
|
|
115
|
+
"entity": {
|
|
116
|
+
"fields": [
|
|
117
|
+
{
|
|
118
|
+
"name": "id",
|
|
119
|
+
"required": true,
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"items": {
|
|
124
|
+
"properties": {
|
|
125
|
+
"ax": {
|
|
126
|
+
"name": "ax",
|
|
127
|
+
"required": false,
|
|
128
|
+
"type": "number"
|
|
129
|
+
},
|
|
130
|
+
"ay": {
|
|
131
|
+
"name": "ay",
|
|
132
|
+
"required": false,
|
|
133
|
+
"type": "number"
|
|
134
|
+
},
|
|
135
|
+
"id": {
|
|
136
|
+
"name": "id",
|
|
137
|
+
"required": true,
|
|
138
|
+
"type": "string"
|
|
139
|
+
},
|
|
140
|
+
"vx": {
|
|
141
|
+
"name": "vx",
|
|
142
|
+
"required": false,
|
|
143
|
+
"type": "number"
|
|
144
|
+
},
|
|
145
|
+
"vy": {
|
|
146
|
+
"name": "vy",
|
|
147
|
+
"required": false,
|
|
148
|
+
"type": "number"
|
|
149
|
+
},
|
|
150
|
+
"x": {
|
|
151
|
+
"name": "x",
|
|
152
|
+
"required": true,
|
|
153
|
+
"type": "number"
|
|
154
|
+
},
|
|
155
|
+
"y": {
|
|
156
|
+
"name": "y",
|
|
157
|
+
"required": true,
|
|
158
|
+
"type": "number"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"type": "object"
|
|
162
|
+
},
|
|
163
|
+
"name": "bodies",
|
|
164
|
+
"type": "array"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"default": 0.0,
|
|
168
|
+
"name": "gravity",
|
|
169
|
+
"type": "number"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"default": 0.0,
|
|
173
|
+
"name": "biasAx",
|
|
174
|
+
"type": "number"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"default": 0.0,
|
|
178
|
+
"name": "biasAy",
|
|
179
|
+
"type": "number"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"id": "ent_01M0F15750RMAD8B3BNR5GE99X",
|
|
183
|
+
"name": "MotionBodyData",
|
|
184
|
+
"persistence": "runtime",
|
|
185
|
+
"shared": true
|
|
186
|
+
},
|
|
187
|
+
"id": "orb_01M0F15750P5ST6DKE8H23JASA",
|
|
188
|
+
"name": "MotionBodyOrbital",
|
|
189
|
+
"pages": [
|
|
190
|
+
{
|
|
191
|
+
"id": "pag_01M0F157501TQFSRR5CVBKJTT3",
|
|
192
|
+
"name": "MotionBodyPage",
|
|
193
|
+
"path": "/motion-body",
|
|
194
|
+
"traits": [
|
|
195
|
+
{
|
|
196
|
+
"ref": "MotionBody",
|
|
197
|
+
"refId": "trt_01M0F15750C0XA5RAB80SZVBFD"
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"traits": [
|
|
203
|
+
{
|
|
204
|
+
"category": "lifecycle",
|
|
205
|
+
"config": {
|
|
206
|
+
"bodies": {
|
|
207
|
+
"default": [],
|
|
208
|
+
"description": "Seed roster — bodies[0] is the lead body reported by BODY_MOVED",
|
|
209
|
+
"items": {
|
|
210
|
+
"properties": {
|
|
211
|
+
"ax": {
|
|
212
|
+
"name": "ax",
|
|
213
|
+
"required": false,
|
|
214
|
+
"type": "number"
|
|
215
|
+
},
|
|
216
|
+
"ay": {
|
|
217
|
+
"name": "ay",
|
|
218
|
+
"required": false,
|
|
219
|
+
"type": "number"
|
|
220
|
+
},
|
|
221
|
+
"id": {
|
|
222
|
+
"name": "id",
|
|
223
|
+
"required": true,
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
"vx": {
|
|
227
|
+
"name": "vx",
|
|
228
|
+
"required": false,
|
|
229
|
+
"type": "number"
|
|
230
|
+
},
|
|
231
|
+
"vy": {
|
|
232
|
+
"name": "vy",
|
|
233
|
+
"required": false,
|
|
234
|
+
"type": "number"
|
|
235
|
+
},
|
|
236
|
+
"x": {
|
|
237
|
+
"name": "x",
|
|
238
|
+
"required": true,
|
|
239
|
+
"type": "number"
|
|
240
|
+
},
|
|
241
|
+
"y": {
|
|
242
|
+
"name": "y",
|
|
243
|
+
"required": true,
|
|
244
|
+
"type": "number"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"type": "object"
|
|
248
|
+
},
|
|
249
|
+
"label": "Initial Bodies",
|
|
250
|
+
"tier": "domain",
|
|
251
|
+
"type": "[Body]"
|
|
252
|
+
},
|
|
253
|
+
"damping": {
|
|
254
|
+
"default": 0.98,
|
|
255
|
+
"description": "Velocity retained each 50ms tick (1 = frictionless coast, 0.9 = quick stop); the ice-to-mud feel knob",
|
|
256
|
+
"label": "Damping",
|
|
257
|
+
"tier": "presentation",
|
|
258
|
+
"type": "number"
|
|
259
|
+
},
|
|
260
|
+
"gravity": {
|
|
261
|
+
"default": 0.0,
|
|
262
|
+
"description": "Constant acceleration added to every body's vertical velocity each tick (positive pulls toward +y); seeded onto the entity so SET_GRAVITY can retune it live",
|
|
263
|
+
"label": "Gravity",
|
|
264
|
+
"tier": "domain",
|
|
265
|
+
"type": "number"
|
|
266
|
+
},
|
|
267
|
+
"maxSpeed": {
|
|
268
|
+
"default": 8.0,
|
|
269
|
+
"description": "Per-axis speed cap in world units per second",
|
|
270
|
+
"label": "Max Speed",
|
|
271
|
+
"tier": "presentation",
|
|
272
|
+
"type": "number"
|
|
273
|
+
},
|
|
274
|
+
"running": {
|
|
275
|
+
"default": true,
|
|
276
|
+
"description": "When true the 50ms motion tick integrates; toggle to freeze all bodies",
|
|
277
|
+
"label": "Running",
|
|
278
|
+
"tier": "domain",
|
|
279
|
+
"type": "boolean"
|
|
280
|
+
},
|
|
281
|
+
"xMax": {
|
|
282
|
+
"default": 1000000.0,
|
|
283
|
+
"description": "Largest x a body may hold; hitting it zeroes vx",
|
|
284
|
+
"label": "Right Wall",
|
|
285
|
+
"tier": "presentation",
|
|
286
|
+
"type": "number"
|
|
287
|
+
},
|
|
288
|
+
"xMin": {
|
|
289
|
+
"default": -1000000.0,
|
|
290
|
+
"description": "Smallest x a body may hold; hitting it zeroes vx",
|
|
291
|
+
"label": "Left Wall",
|
|
292
|
+
"tier": "presentation",
|
|
293
|
+
"type": "number"
|
|
294
|
+
},
|
|
295
|
+
"yMax": {
|
|
296
|
+
"default": 1000000.0,
|
|
297
|
+
"description": "Largest y a body may hold; hitting it zeroes vy",
|
|
298
|
+
"label": "Ceiling",
|
|
299
|
+
"tier": "presentation",
|
|
300
|
+
"type": "number"
|
|
301
|
+
},
|
|
302
|
+
"yMin": {
|
|
303
|
+
"default": -1000000.0,
|
|
304
|
+
"description": "Smallest y a body may hold; hitting it zeroes vy",
|
|
305
|
+
"label": "Floor",
|
|
306
|
+
"tier": "presentation",
|
|
307
|
+
"type": "number"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"emits": [
|
|
311
|
+
{
|
|
312
|
+
"description": "Lead body (bodies[0]) after this motion tick: position, velocity, and scalar speed; boards render it, objective mechanics score it, game rules adapt from it",
|
|
313
|
+
"event": "BODY_MOVED",
|
|
314
|
+
"eventId": "evt_01M0F15750J898T28N2T7C5DW6",
|
|
315
|
+
"payloadSchema": [
|
|
316
|
+
{
|
|
317
|
+
"name": "id",
|
|
318
|
+
"required": true,
|
|
319
|
+
"type": "string"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"name": "x",
|
|
323
|
+
"required": true,
|
|
324
|
+
"type": "number"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "y",
|
|
328
|
+
"required": true,
|
|
329
|
+
"type": "number"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "vx",
|
|
333
|
+
"required": true,
|
|
334
|
+
"type": "number"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "vy",
|
|
338
|
+
"required": true,
|
|
339
|
+
"type": "number"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"name": "speed",
|
|
343
|
+
"required": true,
|
|
344
|
+
"type": "number"
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"scope": "external",
|
|
348
|
+
"tier": "domain"
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
"entityContract": {
|
|
352
|
+
"provides": [
|
|
353
|
+
"biasAx",
|
|
354
|
+
"biasAy",
|
|
355
|
+
"bodies",
|
|
356
|
+
"gravity"
|
|
357
|
+
],
|
|
358
|
+
"requires": []
|
|
359
|
+
},
|
|
360
|
+
"entityRebindable": true,
|
|
361
|
+
"entityRefIds": {
|
|
362
|
+
"MotionBodyData": "ent_01M0F15750RMAD8B3BNR5GE99X"
|
|
363
|
+
},
|
|
364
|
+
"id": "trt_01M0F15750C0XA5RAB80SZVBFD",
|
|
365
|
+
"linkedEntity": "MotionBodyData",
|
|
366
|
+
"linkedEntityId": "ent_01M0F15750RMAD8B3BNR5GE99X",
|
|
367
|
+
"name": "MotionBody",
|
|
368
|
+
"scope": "instance",
|
|
369
|
+
"stateMachine": {
|
|
370
|
+
"events": [
|
|
371
|
+
{
|
|
372
|
+
"id": "evt_01M0F15750D79SW7SYK0MEJ1C8",
|
|
373
|
+
"key": "INIT",
|
|
374
|
+
"name": "Initialize"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"id": "evt_01M0F1575079YFH1R7XXJ6NS4H",
|
|
378
|
+
"key": "THRUST",
|
|
379
|
+
"name": "Thrust",
|
|
380
|
+
"payloadSchema": [
|
|
381
|
+
{
|
|
382
|
+
"name": "id",
|
|
383
|
+
"required": true,
|
|
384
|
+
"type": "string"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"name": "ax",
|
|
388
|
+
"required": true,
|
|
389
|
+
"type": "number"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"name": "ay",
|
|
393
|
+
"required": true,
|
|
394
|
+
"type": "number"
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"id": "evt_01M0F15750F9TZKR47X63EBW01",
|
|
400
|
+
"key": "IMPULSE",
|
|
401
|
+
"name": "Impulse",
|
|
402
|
+
"payloadSchema": [
|
|
403
|
+
{
|
|
404
|
+
"name": "id",
|
|
405
|
+
"required": true,
|
|
406
|
+
"type": "string"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"name": "dvx",
|
|
410
|
+
"required": true,
|
|
411
|
+
"type": "number"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "dvy",
|
|
415
|
+
"required": true,
|
|
416
|
+
"type": "number"
|
|
417
|
+
}
|
|
418
|
+
]
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"id": "evt_01M0F15750PGMWJG31ZQB877NC",
|
|
422
|
+
"key": "PLACE",
|
|
423
|
+
"name": "Place",
|
|
424
|
+
"payloadSchema": [
|
|
425
|
+
{
|
|
426
|
+
"name": "id",
|
|
427
|
+
"required": true,
|
|
428
|
+
"type": "string"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"name": "x",
|
|
432
|
+
"required": true,
|
|
433
|
+
"type": "number"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"name": "y",
|
|
437
|
+
"required": true,
|
|
438
|
+
"type": "number"
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"id": "evt_01M0F157501DXC9CR3QRNT8SXB",
|
|
444
|
+
"key": "SET_GRAVITY",
|
|
445
|
+
"name": "Set Gravity",
|
|
446
|
+
"payloadSchema": [
|
|
447
|
+
{
|
|
448
|
+
"name": "gravity",
|
|
449
|
+
"required": true,
|
|
450
|
+
"type": "number"
|
|
451
|
+
}
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"id": "evt_01M0F15750TYJ70MCGET9ERBWE",
|
|
456
|
+
"key": "SET_BIAS",
|
|
457
|
+
"name": "Set Bias",
|
|
458
|
+
"payloadSchema": [
|
|
459
|
+
{
|
|
460
|
+
"name": "biasAx",
|
|
461
|
+
"required": true,
|
|
462
|
+
"type": "number"
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"name": "biasAy",
|
|
466
|
+
"required": true,
|
|
467
|
+
"type": "number"
|
|
468
|
+
}
|
|
469
|
+
]
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"id": "evt_01M0F15750TJ4X6Y99S6H34892",
|
|
473
|
+
"key": "RESTART",
|
|
474
|
+
"name": "Restart",
|
|
475
|
+
"payloadSchema": [
|
|
476
|
+
{
|
|
477
|
+
"name": "id",
|
|
478
|
+
"type": "string"
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"description": "Lead body (bodies[0]) after this motion tick: position, velocity, and scalar speed; boards render it, objective mechanics score it, game rules adapt from it",
|
|
484
|
+
"id": "evt_01M0F15750J898T28N2T7C5DW6",
|
|
485
|
+
"key": "BODY_MOVED",
|
|
486
|
+
"name": "Body Moved",
|
|
487
|
+
"payloadSchema": [
|
|
488
|
+
{
|
|
489
|
+
"name": "id",
|
|
490
|
+
"required": true,
|
|
491
|
+
"type": "string"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"name": "x",
|
|
495
|
+
"required": true,
|
|
496
|
+
"type": "number"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"name": "y",
|
|
500
|
+
"required": true,
|
|
501
|
+
"type": "number"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "vx",
|
|
505
|
+
"required": true,
|
|
506
|
+
"type": "number"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"name": "vy",
|
|
510
|
+
"required": true,
|
|
511
|
+
"type": "number"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"name": "speed",
|
|
515
|
+
"required": true,
|
|
516
|
+
"type": "number"
|
|
517
|
+
}
|
|
518
|
+
],
|
|
519
|
+
"tier": "domain"
|
|
520
|
+
}
|
|
521
|
+
],
|
|
522
|
+
"states": [
|
|
523
|
+
{
|
|
524
|
+
"isInitial": true,
|
|
525
|
+
"name": "active"
|
|
526
|
+
}
|
|
527
|
+
],
|
|
528
|
+
"transitions": [
|
|
529
|
+
{
|
|
530
|
+
"effects": [
|
|
531
|
+
[
|
|
532
|
+
"set",
|
|
533
|
+
"@entity.bodies",
|
|
534
|
+
"@config.bodies"
|
|
535
|
+
],
|
|
536
|
+
[
|
|
537
|
+
"set",
|
|
538
|
+
"@entity.gravity",
|
|
539
|
+
"@config.gravity"
|
|
540
|
+
]
|
|
541
|
+
],
|
|
542
|
+
"event": "INIT",
|
|
543
|
+
"eventId": "evt_01M0F15750D79SW7SYK0MEJ1C8",
|
|
544
|
+
"from": "active",
|
|
545
|
+
"to": "active"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"effects": [
|
|
549
|
+
[
|
|
550
|
+
"set",
|
|
551
|
+
"@entity.bodies",
|
|
552
|
+
[
|
|
553
|
+
"array/map",
|
|
554
|
+
"@entity.bodies",
|
|
555
|
+
[
|
|
556
|
+
"fn",
|
|
557
|
+
"b",
|
|
558
|
+
[
|
|
559
|
+
"if",
|
|
560
|
+
[
|
|
561
|
+
"==",
|
|
562
|
+
"@b.id",
|
|
563
|
+
"@payload.id"
|
|
564
|
+
],
|
|
565
|
+
[
|
|
566
|
+
"object/merge",
|
|
567
|
+
"@b",
|
|
568
|
+
{
|
|
569
|
+
"ax": "@payload.ax",
|
|
570
|
+
"ay": "@payload.ay"
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
"@b"
|
|
574
|
+
]
|
|
575
|
+
]
|
|
576
|
+
]
|
|
577
|
+
]
|
|
578
|
+
],
|
|
579
|
+
"event": "THRUST",
|
|
580
|
+
"eventId": "evt_01M0F1575079YFH1R7XXJ6NS4H",
|
|
581
|
+
"from": "active",
|
|
582
|
+
"to": "active"
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"effects": [
|
|
586
|
+
[
|
|
587
|
+
"set",
|
|
588
|
+
"@entity.bodies",
|
|
589
|
+
[
|
|
590
|
+
"array/map",
|
|
591
|
+
"@entity.bodies",
|
|
592
|
+
[
|
|
593
|
+
"fn",
|
|
594
|
+
"b",
|
|
595
|
+
[
|
|
596
|
+
"if",
|
|
597
|
+
[
|
|
598
|
+
"==",
|
|
599
|
+
"@b.id",
|
|
600
|
+
"@payload.id"
|
|
601
|
+
],
|
|
602
|
+
[
|
|
603
|
+
"object/merge",
|
|
604
|
+
"@b",
|
|
605
|
+
{
|
|
606
|
+
"vx": [
|
|
607
|
+
"+",
|
|
608
|
+
[
|
|
609
|
+
"object/get",
|
|
610
|
+
"@b",
|
|
611
|
+
"vx"
|
|
612
|
+
],
|
|
613
|
+
"@payload.dvx"
|
|
614
|
+
],
|
|
615
|
+
"vy": [
|
|
616
|
+
"+",
|
|
617
|
+
[
|
|
618
|
+
"object/get",
|
|
619
|
+
"@b",
|
|
620
|
+
"vy"
|
|
621
|
+
],
|
|
622
|
+
"@payload.dvy"
|
|
623
|
+
]
|
|
624
|
+
}
|
|
625
|
+
],
|
|
626
|
+
"@b"
|
|
627
|
+
]
|
|
628
|
+
]
|
|
629
|
+
]
|
|
630
|
+
]
|
|
631
|
+
],
|
|
632
|
+
"event": "IMPULSE",
|
|
633
|
+
"eventId": "evt_01M0F15750F9TZKR47X63EBW01",
|
|
634
|
+
"from": "active",
|
|
635
|
+
"to": "active"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"effects": [
|
|
639
|
+
[
|
|
640
|
+
"set",
|
|
641
|
+
"@entity.bodies",
|
|
642
|
+
[
|
|
643
|
+
"array/map",
|
|
644
|
+
"@entity.bodies",
|
|
645
|
+
[
|
|
646
|
+
"fn",
|
|
647
|
+
"b",
|
|
648
|
+
[
|
|
649
|
+
"if",
|
|
650
|
+
[
|
|
651
|
+
"==",
|
|
652
|
+
"@b.id",
|
|
653
|
+
"@payload.id"
|
|
654
|
+
],
|
|
655
|
+
[
|
|
656
|
+
"object/merge",
|
|
657
|
+
"@b",
|
|
658
|
+
{
|
|
659
|
+
"x": "@payload.x",
|
|
660
|
+
"y": "@payload.y"
|
|
661
|
+
}
|
|
662
|
+
],
|
|
663
|
+
"@b"
|
|
664
|
+
]
|
|
665
|
+
]
|
|
666
|
+
]
|
|
667
|
+
]
|
|
668
|
+
],
|
|
669
|
+
"event": "PLACE",
|
|
670
|
+
"eventId": "evt_01M0F15750PGMWJG31ZQB877NC",
|
|
671
|
+
"from": "active",
|
|
672
|
+
"to": "active"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"effects": [
|
|
676
|
+
[
|
|
677
|
+
"set",
|
|
678
|
+
"@entity.gravity",
|
|
679
|
+
"@payload.gravity"
|
|
680
|
+
]
|
|
681
|
+
],
|
|
682
|
+
"event": "SET_GRAVITY",
|
|
683
|
+
"eventId": "evt_01M0F157501DXC9CR3QRNT8SXB",
|
|
684
|
+
"from": "active",
|
|
685
|
+
"to": "active"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"effects": [
|
|
689
|
+
[
|
|
690
|
+
"set",
|
|
691
|
+
"@entity.biasAx",
|
|
692
|
+
"@payload.biasAx"
|
|
693
|
+
],
|
|
694
|
+
[
|
|
695
|
+
"set",
|
|
696
|
+
"@entity.biasAy",
|
|
697
|
+
"@payload.biasAy"
|
|
698
|
+
]
|
|
699
|
+
],
|
|
700
|
+
"event": "SET_BIAS",
|
|
701
|
+
"eventId": "evt_01M0F15750TYJ70MCGET9ERBWE",
|
|
702
|
+
"from": "active",
|
|
703
|
+
"to": "active"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"effects": [
|
|
707
|
+
[
|
|
708
|
+
"set",
|
|
709
|
+
"@entity.bodies",
|
|
710
|
+
"@config.bodies"
|
|
711
|
+
],
|
|
712
|
+
[
|
|
713
|
+
"set",
|
|
714
|
+
"@entity.gravity",
|
|
715
|
+
"@config.gravity"
|
|
716
|
+
]
|
|
717
|
+
],
|
|
718
|
+
"event": "RESTART",
|
|
719
|
+
"eventId": "evt_01M0F15750TJ4X6Y99S6H34892",
|
|
720
|
+
"from": "active",
|
|
721
|
+
"to": "active"
|
|
722
|
+
}
|
|
723
|
+
]
|
|
724
|
+
},
|
|
725
|
+
"ticks": [
|
|
726
|
+
{
|
|
727
|
+
"effects": [
|
|
728
|
+
[
|
|
729
|
+
"do",
|
|
730
|
+
[
|
|
731
|
+
"set",
|
|
732
|
+
"@entity.bodies",
|
|
733
|
+
[
|
|
734
|
+
"array/map",
|
|
735
|
+
"@entity.bodies",
|
|
736
|
+
[
|
|
737
|
+
"fn",
|
|
738
|
+
"b",
|
|
739
|
+
[
|
|
740
|
+
"let",
|
|
741
|
+
[
|
|
742
|
+
[
|
|
743
|
+
"nvx",
|
|
744
|
+
[
|
|
745
|
+
"math/clamp",
|
|
746
|
+
[
|
|
747
|
+
"*",
|
|
748
|
+
[
|
|
749
|
+
"+",
|
|
750
|
+
[
|
|
751
|
+
"object/get",
|
|
752
|
+
"@b",
|
|
753
|
+
"vx"
|
|
754
|
+
],
|
|
755
|
+
[
|
|
756
|
+
"*",
|
|
757
|
+
[
|
|
758
|
+
"+",
|
|
759
|
+
[
|
|
760
|
+
"object/get",
|
|
761
|
+
"@b",
|
|
762
|
+
"ax"
|
|
763
|
+
],
|
|
764
|
+
"@entity.biasAx"
|
|
765
|
+
],
|
|
766
|
+
0.05
|
|
767
|
+
]
|
|
768
|
+
],
|
|
769
|
+
"@config.damping"
|
|
770
|
+
],
|
|
771
|
+
[
|
|
772
|
+
"-",
|
|
773
|
+
0.0,
|
|
774
|
+
"@config.maxSpeed"
|
|
775
|
+
],
|
|
776
|
+
"@config.maxSpeed"
|
|
777
|
+
]
|
|
778
|
+
]
|
|
779
|
+
],
|
|
780
|
+
[
|
|
781
|
+
"let",
|
|
782
|
+
[
|
|
783
|
+
[
|
|
784
|
+
"nvy",
|
|
785
|
+
[
|
|
786
|
+
"math/clamp",
|
|
787
|
+
[
|
|
788
|
+
"*",
|
|
789
|
+
[
|
|
790
|
+
"+",
|
|
791
|
+
[
|
|
792
|
+
"object/get",
|
|
793
|
+
"@b",
|
|
794
|
+
"vy"
|
|
795
|
+
],
|
|
796
|
+
[
|
|
797
|
+
"*",
|
|
798
|
+
[
|
|
799
|
+
"+",
|
|
800
|
+
[
|
|
801
|
+
"+",
|
|
802
|
+
[
|
|
803
|
+
"object/get",
|
|
804
|
+
"@b",
|
|
805
|
+
"ay"
|
|
806
|
+
],
|
|
807
|
+
"@entity.biasAy"
|
|
808
|
+
],
|
|
809
|
+
"@entity.gravity"
|
|
810
|
+
],
|
|
811
|
+
0.05
|
|
812
|
+
]
|
|
813
|
+
],
|
|
814
|
+
"@config.damping"
|
|
815
|
+
],
|
|
816
|
+
[
|
|
817
|
+
"-",
|
|
818
|
+
0.0,
|
|
819
|
+
"@config.maxSpeed"
|
|
820
|
+
],
|
|
821
|
+
"@config.maxSpeed"
|
|
822
|
+
]
|
|
823
|
+
]
|
|
824
|
+
],
|
|
825
|
+
[
|
|
826
|
+
"let",
|
|
827
|
+
[
|
|
828
|
+
[
|
|
829
|
+
"nx",
|
|
830
|
+
[
|
|
831
|
+
"math/clamp",
|
|
832
|
+
[
|
|
833
|
+
"+",
|
|
834
|
+
[
|
|
835
|
+
"object/get",
|
|
836
|
+
"@b",
|
|
837
|
+
"x"
|
|
838
|
+
],
|
|
839
|
+
[
|
|
840
|
+
"*",
|
|
841
|
+
"@nvx",
|
|
842
|
+
0.05
|
|
843
|
+
]
|
|
844
|
+
],
|
|
845
|
+
"@config.xMin",
|
|
846
|
+
"@config.xMax"
|
|
847
|
+
]
|
|
848
|
+
]
|
|
849
|
+
],
|
|
850
|
+
[
|
|
851
|
+
"let",
|
|
852
|
+
[
|
|
853
|
+
[
|
|
854
|
+
"ny",
|
|
855
|
+
[
|
|
856
|
+
"math/clamp",
|
|
857
|
+
[
|
|
858
|
+
"+",
|
|
859
|
+
[
|
|
860
|
+
"object/get",
|
|
861
|
+
"@b",
|
|
862
|
+
"y"
|
|
863
|
+
],
|
|
864
|
+
[
|
|
865
|
+
"*",
|
|
866
|
+
"@nvy",
|
|
867
|
+
0.05
|
|
868
|
+
]
|
|
869
|
+
],
|
|
870
|
+
"@config.yMin",
|
|
871
|
+
"@config.yMax"
|
|
872
|
+
]
|
|
873
|
+
]
|
|
874
|
+
],
|
|
875
|
+
[
|
|
876
|
+
"object/merge",
|
|
877
|
+
"@b",
|
|
878
|
+
{
|
|
879
|
+
"vx": [
|
|
880
|
+
"if",
|
|
881
|
+
[
|
|
882
|
+
"or",
|
|
883
|
+
[
|
|
884
|
+
"==",
|
|
885
|
+
"@nx",
|
|
886
|
+
"@config.xMin"
|
|
887
|
+
],
|
|
888
|
+
[
|
|
889
|
+
"==",
|
|
890
|
+
"@nx",
|
|
891
|
+
"@config.xMax"
|
|
892
|
+
]
|
|
893
|
+
],
|
|
894
|
+
0.0,
|
|
895
|
+
"@nvx"
|
|
896
|
+
],
|
|
897
|
+
"vy": [
|
|
898
|
+
"if",
|
|
899
|
+
[
|
|
900
|
+
"or",
|
|
901
|
+
[
|
|
902
|
+
"==",
|
|
903
|
+
"@ny",
|
|
904
|
+
"@config.yMin"
|
|
905
|
+
],
|
|
906
|
+
[
|
|
907
|
+
"==",
|
|
908
|
+
"@ny",
|
|
909
|
+
"@config.yMax"
|
|
910
|
+
]
|
|
911
|
+
],
|
|
912
|
+
0.0,
|
|
913
|
+
"@nvy"
|
|
914
|
+
],
|
|
915
|
+
"x": "@nx",
|
|
916
|
+
"y": "@ny"
|
|
917
|
+
}
|
|
918
|
+
]
|
|
919
|
+
]
|
|
920
|
+
]
|
|
921
|
+
]
|
|
922
|
+
]
|
|
923
|
+
]
|
|
924
|
+
]
|
|
925
|
+
],
|
|
926
|
+
[
|
|
927
|
+
"emit",
|
|
928
|
+
"BODY_MOVED",
|
|
929
|
+
{
|
|
930
|
+
"id": [
|
|
931
|
+
"object/get",
|
|
932
|
+
[
|
|
933
|
+
"array/first",
|
|
934
|
+
"@entity.bodies"
|
|
935
|
+
],
|
|
936
|
+
"id"
|
|
937
|
+
],
|
|
938
|
+
"speed": [
|
|
939
|
+
"math/hypot",
|
|
940
|
+
[
|
|
941
|
+
"object/get",
|
|
942
|
+
[
|
|
943
|
+
"array/first",
|
|
944
|
+
"@entity.bodies"
|
|
945
|
+
],
|
|
946
|
+
"vx"
|
|
947
|
+
],
|
|
948
|
+
[
|
|
949
|
+
"object/get",
|
|
950
|
+
[
|
|
951
|
+
"array/first",
|
|
952
|
+
"@entity.bodies"
|
|
953
|
+
],
|
|
954
|
+
"vy"
|
|
955
|
+
]
|
|
956
|
+
],
|
|
957
|
+
"vx": [
|
|
958
|
+
"object/get",
|
|
959
|
+
[
|
|
960
|
+
"array/first",
|
|
961
|
+
"@entity.bodies"
|
|
962
|
+
],
|
|
963
|
+
"vx"
|
|
964
|
+
],
|
|
965
|
+
"vy": [
|
|
966
|
+
"object/get",
|
|
967
|
+
[
|
|
968
|
+
"array/first",
|
|
969
|
+
"@entity.bodies"
|
|
970
|
+
],
|
|
971
|
+
"vy"
|
|
972
|
+
],
|
|
973
|
+
"x": [
|
|
974
|
+
"object/get",
|
|
975
|
+
[
|
|
976
|
+
"array/first",
|
|
977
|
+
"@entity.bodies"
|
|
978
|
+
],
|
|
979
|
+
"x"
|
|
980
|
+
],
|
|
981
|
+
"y": [
|
|
982
|
+
"object/get",
|
|
983
|
+
[
|
|
984
|
+
"array/first",
|
|
985
|
+
"@entity.bodies"
|
|
986
|
+
],
|
|
987
|
+
"y"
|
|
988
|
+
]
|
|
989
|
+
}
|
|
990
|
+
]
|
|
991
|
+
]
|
|
992
|
+
],
|
|
993
|
+
"guard": [
|
|
994
|
+
"and",
|
|
995
|
+
"@config.running",
|
|
996
|
+
[
|
|
997
|
+
">",
|
|
998
|
+
[
|
|
999
|
+
"array/len",
|
|
1000
|
+
"@entity.bodies"
|
|
1001
|
+
],
|
|
1002
|
+
0.0
|
|
1003
|
+
]
|
|
1004
|
+
],
|
|
1005
|
+
"interval": 50.0,
|
|
1006
|
+
"name": "motionTick"
|
|
1007
|
+
}
|
|
1008
|
+
]
|
|
1009
|
+
}
|
|
1010
|
+
]
|
|
1011
|
+
}
|
|
1012
|
+
],
|
|
1013
|
+
"schemaVersion": 1,
|
|
1014
|
+
"version": "1.1.0"
|
|
1015
|
+
}
|