@almadar/std 16.201.0 → 16.202.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/core/molecules/ui-command-palette.lolo +116 -0
- package/behaviors/lolo/ui/core/molecules/ui-floating-toolbar.lolo +2 -1
- package/behaviors/lolo/ui/game/atoms/std-audio-cue.lolo +138 -0
- package/behaviors/lolo/ui/game/atoms/std-camera-rig.lolo +158 -0
- package/behaviors/lolo/ui/game/atoms/ui-canvas-2d.lolo +42 -0
- package/behaviors/lolo/ui/game/atoms/ui-canvas.lolo +42 -0
- package/behaviors/lolo/ui/game/atoms/ui-game-audio-cue.lolo +68 -0
- package/behaviors/lolo/ui/game/atoms/ui-game-audio-toggle.lolo +13 -0
- package/behaviors/lolo/ui/learning/atoms/ui-algo-graph-canvas.lolo +1 -0
- package/behaviors/lolo/ui/learning/atoms/ui-algorithm-canvas.lolo +1 -0
- package/behaviors/lolo/ui/learning/atoms/ui-biology-canvas.lolo +1 -0
- package/behaviors/lolo/ui/learning/atoms/ui-chemistry-canvas.lolo +1 -0
- package/behaviors/lolo/ui/learning/atoms/ui-learning-canvas.lolo +7 -0
- package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +7 -0
- package/behaviors/lolo/ui/learning/atoms/ui-physics-canvas.lolo +1 -0
- package/behaviors/registry/ui/core/molecules/ui-command-palette.orb +589 -0
- package/behaviors/registry/ui/core/molecules/ui-floating-toolbar.orb +13 -2
- package/behaviors/registry/ui/game/atoms/std-audio-cue.orb +653 -0
- package/behaviors/registry/ui/game/atoms/std-camera-rig.orb +813 -0
- package/behaviors/registry/ui/game/atoms/ui-canvas-2d.orb +135 -0
- package/behaviors/registry/ui/game/atoms/ui-canvas.orb +134 -0
- package/behaviors/registry/ui/game/atoms/ui-game-audio-cue.orb +258 -0
- package/behaviors/registry/ui/game/atoms/ui-game-audio-toggle.orb +48 -0
- package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +9 -0
- package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +13 -0
- package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +13 -0
- package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +13 -0
- package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +21 -0
- package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +21 -0
- package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +13 -0
- package/dist/behaviors/exports-reader.js +3067 -2891
- package/dist/behaviors/functions/index.d.ts +407 -5
- package/dist/behaviors/functions/index.js +3048 -2884
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +3060 -2884
- package/dist/behaviors/query.js +3067 -2891
- package/dist/behaviors-embeddings.hash.json +3 -3
- package/dist/behaviors-embeddings.json +23 -7
- package/dist/behaviors-registry.json +2780 -391
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3060 -2884
- 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,813 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Headless camera authority: the SOLE writer of camX/camY/camZoom on side-view and top-down boards. Every 33ms camera tick it eases camX/camY toward (camTargetX + camLead, camTargetY) — a dead-zone camera: inside deadzoneX/deadzoneY the axis holds, outside it lerps by stiffness — clamps the result to bounds, eases camZoom toward camTargetZoom the same way, and decays camShake toward 0 by shakeDecay. Intents: FOLLOW retargets from a moving body's x/y/vx (vx feeds camLead, the horizontal look-ahead), CUT snaps position+target instantly (no ease, for teleports/cutscenes), SET_ZOOM retargets zoom (clamped to minZoom/maxZoom), SHAKE sets camShake for a consumer to jitter with at bind time — this atom never writes shake into camX/camY itself, RESTART reseeds from config. Emits CAMERA_MOVED every tick. Renders nothing — a board binds its own canvas camera prop straight to camX/camY/camZoom.",
|
|
3
|
+
"ledger": {
|
|
4
|
+
"entries": {
|
|
5
|
+
"ent_01M1KT7VDHARACH6QT9FHENHM8": {
|
|
6
|
+
"bakedName": "CameraState",
|
|
7
|
+
"curName": "CameraState",
|
|
8
|
+
"id": "ent_01M1KT7VDHARACH6QT9FHENHM8",
|
|
9
|
+
"kind": "entity",
|
|
10
|
+
"owner": "workspace",
|
|
11
|
+
"renames": []
|
|
12
|
+
},
|
|
13
|
+
"evt_01M1KT7VDH27J939V4G8J199KT": {
|
|
14
|
+
"bakedName": "FOLLOW",
|
|
15
|
+
"curName": "FOLLOW",
|
|
16
|
+
"id": "evt_01M1KT7VDH27J939V4G8J199KT",
|
|
17
|
+
"kind": "event",
|
|
18
|
+
"owner": "workspace",
|
|
19
|
+
"parent": "trt_01M1KT7VDH3WK1YCKY0NQHHDYP",
|
|
20
|
+
"renames": []
|
|
21
|
+
},
|
|
22
|
+
"evt_01M1KT7VDH7EM7H3VR4949R1EX": {
|
|
23
|
+
"bakedName": "SHAKE",
|
|
24
|
+
"curName": "SHAKE",
|
|
25
|
+
"id": "evt_01M1KT7VDH7EM7H3VR4949R1EX",
|
|
26
|
+
"kind": "event",
|
|
27
|
+
"owner": "workspace",
|
|
28
|
+
"parent": "trt_01M1KT7VDH3WK1YCKY0NQHHDYP",
|
|
29
|
+
"renames": []
|
|
30
|
+
},
|
|
31
|
+
"evt_01M1KT7VDH7GM6FBFHVF1VJRNH": {
|
|
32
|
+
"bakedName": "SET_ZOOM",
|
|
33
|
+
"curName": "SET_ZOOM",
|
|
34
|
+
"id": "evt_01M1KT7VDH7GM6FBFHVF1VJRNH",
|
|
35
|
+
"kind": "event",
|
|
36
|
+
"owner": "workspace",
|
|
37
|
+
"parent": "trt_01M1KT7VDH3WK1YCKY0NQHHDYP",
|
|
38
|
+
"renames": []
|
|
39
|
+
},
|
|
40
|
+
"evt_01M1KT7VDHACZBVYWSJ1XT0XT4": {
|
|
41
|
+
"bakedName": "CAMERA_MOVED",
|
|
42
|
+
"curName": "CAMERA_MOVED",
|
|
43
|
+
"id": "evt_01M1KT7VDHACZBVYWSJ1XT0XT4",
|
|
44
|
+
"kind": "event",
|
|
45
|
+
"owner": "workspace",
|
|
46
|
+
"parent": "trt_01M1KT7VDH3WK1YCKY0NQHHDYP",
|
|
47
|
+
"renames": []
|
|
48
|
+
},
|
|
49
|
+
"evt_01M1KT7VDHD96YA0S3RPC9MRCC": {
|
|
50
|
+
"bakedName": "RESTART",
|
|
51
|
+
"curName": "RESTART",
|
|
52
|
+
"id": "evt_01M1KT7VDHD96YA0S3RPC9MRCC",
|
|
53
|
+
"kind": "event",
|
|
54
|
+
"owner": "workspace",
|
|
55
|
+
"parent": "trt_01M1KT7VDH3WK1YCKY0NQHHDYP",
|
|
56
|
+
"renames": []
|
|
57
|
+
},
|
|
58
|
+
"evt_01M1KT7VDHP8EPRYARWY431Q8A": {
|
|
59
|
+
"bakedName": "CUT",
|
|
60
|
+
"curName": "CUT",
|
|
61
|
+
"id": "evt_01M1KT7VDHP8EPRYARWY431Q8A",
|
|
62
|
+
"kind": "event",
|
|
63
|
+
"owner": "workspace",
|
|
64
|
+
"parent": "trt_01M1KT7VDH3WK1YCKY0NQHHDYP",
|
|
65
|
+
"renames": []
|
|
66
|
+
},
|
|
67
|
+
"evt_01M1KT7VDHP97MNNBCK21F9XF0": {
|
|
68
|
+
"bakedName": "INIT",
|
|
69
|
+
"curName": "INIT",
|
|
70
|
+
"id": "evt_01M1KT7VDHP97MNNBCK21F9XF0",
|
|
71
|
+
"kind": "event",
|
|
72
|
+
"owner": "workspace",
|
|
73
|
+
"parent": "trt_01M1KT7VDH3WK1YCKY0NQHHDYP",
|
|
74
|
+
"renames": []
|
|
75
|
+
},
|
|
76
|
+
"orb_01M1KT7VDHWWAW8CY87TSH63JJ": {
|
|
77
|
+
"bakedName": "CameraRigOrbital",
|
|
78
|
+
"curName": "CameraRigOrbital",
|
|
79
|
+
"id": "orb_01M1KT7VDHWWAW8CY87TSH63JJ",
|
|
80
|
+
"kind": "orbital",
|
|
81
|
+
"owner": "workspace",
|
|
82
|
+
"renames": []
|
|
83
|
+
},
|
|
84
|
+
"pag_01M1KT7VDHJG8QACSY95BPKVJH": {
|
|
85
|
+
"bakedName": "CameraRigPage",
|
|
86
|
+
"curName": "CameraRigPage",
|
|
87
|
+
"id": "pag_01M1KT7VDHJG8QACSY95BPKVJH",
|
|
88
|
+
"kind": "page",
|
|
89
|
+
"owner": "workspace",
|
|
90
|
+
"renames": []
|
|
91
|
+
},
|
|
92
|
+
"trt_01M1KT7VDH3WK1YCKY0NQHHDYP": {
|
|
93
|
+
"bakedName": "CameraRig",
|
|
94
|
+
"curName": "CameraRig",
|
|
95
|
+
"id": "trt_01M1KT7VDH3WK1YCKY0NQHHDYP",
|
|
96
|
+
"kind": "trait",
|
|
97
|
+
"owner": "workspace",
|
|
98
|
+
"renames": []
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"schemaVersion": 1
|
|
102
|
+
},
|
|
103
|
+
"name": "std-camera-rig",
|
|
104
|
+
"orbitals": [
|
|
105
|
+
{
|
|
106
|
+
"entity": {
|
|
107
|
+
"fields": [
|
|
108
|
+
{
|
|
109
|
+
"name": "id",
|
|
110
|
+
"required": true,
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"default": 0.0,
|
|
115
|
+
"name": "camX",
|
|
116
|
+
"type": "number"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"default": 0.0,
|
|
120
|
+
"name": "camY",
|
|
121
|
+
"type": "number"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"default": 1.0,
|
|
125
|
+
"name": "camZoom",
|
|
126
|
+
"type": "number"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"default": 0.0,
|
|
130
|
+
"name": "camTargetX",
|
|
131
|
+
"type": "number"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"default": 0.0,
|
|
135
|
+
"name": "camTargetY",
|
|
136
|
+
"type": "number"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"default": 1.0,
|
|
140
|
+
"name": "camTargetZoom",
|
|
141
|
+
"type": "number"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"default": 0.0,
|
|
145
|
+
"name": "camLead",
|
|
146
|
+
"type": "number"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"default": 0.0,
|
|
150
|
+
"name": "camShake",
|
|
151
|
+
"type": "number"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"id": "ent_01M1KT7VDHARACH6QT9FHENHM8",
|
|
155
|
+
"name": "CameraState",
|
|
156
|
+
"persistence": "runtime",
|
|
157
|
+
"shared": true
|
|
158
|
+
},
|
|
159
|
+
"id": "orb_01M1KT7VDHWWAW8CY87TSH63JJ",
|
|
160
|
+
"name": "CameraRigOrbital",
|
|
161
|
+
"pages": [
|
|
162
|
+
{
|
|
163
|
+
"id": "pag_01M1KT7VDHJG8QACSY95BPKVJH",
|
|
164
|
+
"name": "CameraRigPage",
|
|
165
|
+
"path": "/camera-rig",
|
|
166
|
+
"traits": [
|
|
167
|
+
{
|
|
168
|
+
"ref": "CameraRig",
|
|
169
|
+
"refId": "trt_01M1KT7VDH3WK1YCKY0NQHHDYP"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"traits": [
|
|
175
|
+
{
|
|
176
|
+
"category": "lifecycle",
|
|
177
|
+
"config": {
|
|
178
|
+
"bounds": {
|
|
179
|
+
"default": {
|
|
180
|
+
"xMax": 1000000.0,
|
|
181
|
+
"xMin": -1000000.0,
|
|
182
|
+
"yMax": 1000000.0,
|
|
183
|
+
"yMin": -1000000.0
|
|
184
|
+
},
|
|
185
|
+
"description": "World-space clamp applied to the eased camera position every tick",
|
|
186
|
+
"label": "Bounds",
|
|
187
|
+
"properties": {
|
|
188
|
+
"xMax": {
|
|
189
|
+
"name": "xMax",
|
|
190
|
+
"required": true,
|
|
191
|
+
"type": "number"
|
|
192
|
+
},
|
|
193
|
+
"xMin": {
|
|
194
|
+
"name": "xMin",
|
|
195
|
+
"required": true,
|
|
196
|
+
"type": "number"
|
|
197
|
+
},
|
|
198
|
+
"yMax": {
|
|
199
|
+
"name": "yMax",
|
|
200
|
+
"required": true,
|
|
201
|
+
"type": "number"
|
|
202
|
+
},
|
|
203
|
+
"yMin": {
|
|
204
|
+
"name": "yMin",
|
|
205
|
+
"required": true,
|
|
206
|
+
"type": "number"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"tier": "presentation",
|
|
210
|
+
"type": "CameraBounds"
|
|
211
|
+
},
|
|
212
|
+
"deadzoneX": {
|
|
213
|
+
"default": 0.0,
|
|
214
|
+
"description": "Horizontal distance from target the camera tolerates without easing",
|
|
215
|
+
"label": "Dead Zone X",
|
|
216
|
+
"tier": "presentation",
|
|
217
|
+
"type": "number"
|
|
218
|
+
},
|
|
219
|
+
"deadzoneY": {
|
|
220
|
+
"default": 0.0,
|
|
221
|
+
"description": "Vertical distance from target the camera tolerates without easing",
|
|
222
|
+
"label": "Dead Zone Y",
|
|
223
|
+
"tier": "presentation",
|
|
224
|
+
"type": "number"
|
|
225
|
+
},
|
|
226
|
+
"lead": {
|
|
227
|
+
"default": 0.0,
|
|
228
|
+
"description": "Horizontal look-ahead multiplier applied to FOLLOW's vx",
|
|
229
|
+
"label": "Lead",
|
|
230
|
+
"tier": "presentation",
|
|
231
|
+
"type": "number"
|
|
232
|
+
},
|
|
233
|
+
"maxZoom": {
|
|
234
|
+
"default": 3.0,
|
|
235
|
+
"description": "Upper clamp for SET_ZOOM and the eased zoom",
|
|
236
|
+
"label": "Max Zoom",
|
|
237
|
+
"tier": "presentation",
|
|
238
|
+
"type": "number"
|
|
239
|
+
},
|
|
240
|
+
"minZoom": {
|
|
241
|
+
"default": 0.5,
|
|
242
|
+
"description": "Lower clamp for SET_ZOOM and the eased zoom",
|
|
243
|
+
"label": "Min Zoom",
|
|
244
|
+
"tier": "presentation",
|
|
245
|
+
"type": "number"
|
|
246
|
+
},
|
|
247
|
+
"running": {
|
|
248
|
+
"default": true,
|
|
249
|
+
"description": "When true the 33ms camera tick eases toward target; toggle to freeze the camera",
|
|
250
|
+
"label": "Running",
|
|
251
|
+
"tier": "domain",
|
|
252
|
+
"type": "boolean"
|
|
253
|
+
},
|
|
254
|
+
"shakeDecay": {
|
|
255
|
+
"default": 0.1,
|
|
256
|
+
"description": "Amount camShake reduces toward 0 every tick",
|
|
257
|
+
"label": "Shake Decay",
|
|
258
|
+
"tier": "presentation",
|
|
259
|
+
"type": "number"
|
|
260
|
+
},
|
|
261
|
+
"start": {
|
|
262
|
+
"default": {
|
|
263
|
+
"x": 0.0,
|
|
264
|
+
"y": 0.0
|
|
265
|
+
},
|
|
266
|
+
"description": "Initial and RESTART camera position/target",
|
|
267
|
+
"label": "Start Position",
|
|
268
|
+
"properties": {
|
|
269
|
+
"x": {
|
|
270
|
+
"name": "x",
|
|
271
|
+
"required": true,
|
|
272
|
+
"type": "number"
|
|
273
|
+
},
|
|
274
|
+
"y": {
|
|
275
|
+
"name": "y",
|
|
276
|
+
"required": true,
|
|
277
|
+
"type": "number"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"tier": "domain",
|
|
281
|
+
"type": "CameraPos"
|
|
282
|
+
},
|
|
283
|
+
"stiffness": {
|
|
284
|
+
"default": 0.1,
|
|
285
|
+
"description": "Per-tick lerp factor easing position/zoom toward target (0-1, higher = snappier)",
|
|
286
|
+
"label": "Stiffness",
|
|
287
|
+
"tier": "presentation",
|
|
288
|
+
"type": "number"
|
|
289
|
+
},
|
|
290
|
+
"zoom": {
|
|
291
|
+
"default": 1.0,
|
|
292
|
+
"description": "Initial and RESTART zoom level",
|
|
293
|
+
"label": "Zoom",
|
|
294
|
+
"tier": "domain",
|
|
295
|
+
"type": "number"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"emits": [
|
|
299
|
+
{
|
|
300
|
+
"description": "Eased camera position/zoom after this tick.",
|
|
301
|
+
"event": "CAMERA_MOVED",
|
|
302
|
+
"eventId": "evt_01M1KT7VDHACZBVYWSJ1XT0XT4",
|
|
303
|
+
"payloadSchema": [
|
|
304
|
+
{
|
|
305
|
+
"name": "x",
|
|
306
|
+
"required": true,
|
|
307
|
+
"type": "number"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "y",
|
|
311
|
+
"required": true,
|
|
312
|
+
"type": "number"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"name": "zoom",
|
|
316
|
+
"required": true,
|
|
317
|
+
"type": "number"
|
|
318
|
+
}
|
|
319
|
+
],
|
|
320
|
+
"scope": "external",
|
|
321
|
+
"tier": "domain"
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"entityContract": {
|
|
325
|
+
"provides": [
|
|
326
|
+
"camLead",
|
|
327
|
+
"camShake",
|
|
328
|
+
"camTargetX",
|
|
329
|
+
"camTargetY",
|
|
330
|
+
"camTargetZoom",
|
|
331
|
+
"camX",
|
|
332
|
+
"camY",
|
|
333
|
+
"camZoom"
|
|
334
|
+
],
|
|
335
|
+
"requires": []
|
|
336
|
+
},
|
|
337
|
+
"entityRebindable": true,
|
|
338
|
+
"entityRefIds": {
|
|
339
|
+
"CameraState": "ent_01M1KT7VDHARACH6QT9FHENHM8"
|
|
340
|
+
},
|
|
341
|
+
"id": "trt_01M1KT7VDH3WK1YCKY0NQHHDYP",
|
|
342
|
+
"linkedEntity": "CameraState",
|
|
343
|
+
"linkedEntityId": "ent_01M1KT7VDHARACH6QT9FHENHM8",
|
|
344
|
+
"name": "CameraRig",
|
|
345
|
+
"scope": "instance",
|
|
346
|
+
"stateMachine": {
|
|
347
|
+
"events": [
|
|
348
|
+
{
|
|
349
|
+
"id": "evt_01M1KT7VDHP97MNNBCK21F9XF0",
|
|
350
|
+
"key": "INIT",
|
|
351
|
+
"name": "Initialize"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"description": "Retarget from a moving body's position and horizontal velocity (vx drives camLead).",
|
|
355
|
+
"id": "evt_01M1KT7VDH27J939V4G8J199KT",
|
|
356
|
+
"key": "FOLLOW",
|
|
357
|
+
"name": "Follow",
|
|
358
|
+
"payloadSchema": [
|
|
359
|
+
{
|
|
360
|
+
"name": "x",
|
|
361
|
+
"required": true,
|
|
362
|
+
"type": "number"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"name": "y",
|
|
366
|
+
"required": true,
|
|
367
|
+
"type": "number"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"name": "vx",
|
|
371
|
+
"required": true,
|
|
372
|
+
"type": "number"
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
"tier": "domain"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"description": "Snap position and target instantly, no ease — teleports and cutscenes.",
|
|
379
|
+
"id": "evt_01M1KT7VDHP8EPRYARWY431Q8A",
|
|
380
|
+
"key": "CUT",
|
|
381
|
+
"name": "Cut",
|
|
382
|
+
"payloadSchema": [
|
|
383
|
+
{
|
|
384
|
+
"name": "x",
|
|
385
|
+
"required": true,
|
|
386
|
+
"type": "number"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "y",
|
|
390
|
+
"required": true,
|
|
391
|
+
"type": "number"
|
|
392
|
+
}
|
|
393
|
+
],
|
|
394
|
+
"tier": "domain"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"description": "Retarget zoom, clamped to minZoom/maxZoom.",
|
|
398
|
+
"id": "evt_01M1KT7VDH7GM6FBFHVF1VJRNH",
|
|
399
|
+
"key": "SET_ZOOM",
|
|
400
|
+
"name": "Set Zoom",
|
|
401
|
+
"payloadSchema": [
|
|
402
|
+
{
|
|
403
|
+
"name": "zoom",
|
|
404
|
+
"required": true,
|
|
405
|
+
"type": "number"
|
|
406
|
+
}
|
|
407
|
+
],
|
|
408
|
+
"tier": "domain"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"description": "Set camShake; a consumer jitters camX/camY with it at bind time — this atom never writes shake into position.",
|
|
412
|
+
"id": "evt_01M1KT7VDH7EM7H3VR4949R1EX",
|
|
413
|
+
"key": "SHAKE",
|
|
414
|
+
"name": "Shake",
|
|
415
|
+
"payloadSchema": [
|
|
416
|
+
{
|
|
417
|
+
"name": "magnitude",
|
|
418
|
+
"required": true,
|
|
419
|
+
"type": "number"
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
"tier": "domain"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"description": "Reseed position/zoom/lead/shake from config.",
|
|
426
|
+
"id": "evt_01M1KT7VDHD96YA0S3RPC9MRCC",
|
|
427
|
+
"key": "RESTART",
|
|
428
|
+
"name": "Restart",
|
|
429
|
+
"tier": "domain"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"description": "Eased camera position/zoom after this tick.",
|
|
433
|
+
"id": "evt_01M1KT7VDHACZBVYWSJ1XT0XT4",
|
|
434
|
+
"key": "CAMERA_MOVED",
|
|
435
|
+
"name": "Camera Moved",
|
|
436
|
+
"payloadSchema": [
|
|
437
|
+
{
|
|
438
|
+
"name": "x",
|
|
439
|
+
"required": true,
|
|
440
|
+
"type": "number"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"name": "y",
|
|
444
|
+
"required": true,
|
|
445
|
+
"type": "number"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"name": "zoom",
|
|
449
|
+
"required": true,
|
|
450
|
+
"type": "number"
|
|
451
|
+
}
|
|
452
|
+
],
|
|
453
|
+
"tier": "domain"
|
|
454
|
+
}
|
|
455
|
+
],
|
|
456
|
+
"states": [
|
|
457
|
+
{
|
|
458
|
+
"isInitial": true,
|
|
459
|
+
"name": "active"
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
"transitions": [
|
|
463
|
+
{
|
|
464
|
+
"effects": [
|
|
465
|
+
[
|
|
466
|
+
"set",
|
|
467
|
+
"@entity.camX",
|
|
468
|
+
"@config.start.x"
|
|
469
|
+
],
|
|
470
|
+
[
|
|
471
|
+
"set",
|
|
472
|
+
"@entity.camY",
|
|
473
|
+
"@config.start.y"
|
|
474
|
+
],
|
|
475
|
+
[
|
|
476
|
+
"set",
|
|
477
|
+
"@entity.camZoom",
|
|
478
|
+
"@config.zoom"
|
|
479
|
+
],
|
|
480
|
+
[
|
|
481
|
+
"set",
|
|
482
|
+
"@entity.camTargetX",
|
|
483
|
+
"@config.start.x"
|
|
484
|
+
],
|
|
485
|
+
[
|
|
486
|
+
"set",
|
|
487
|
+
"@entity.camTargetY",
|
|
488
|
+
"@config.start.y"
|
|
489
|
+
],
|
|
490
|
+
[
|
|
491
|
+
"set",
|
|
492
|
+
"@entity.camTargetZoom",
|
|
493
|
+
"@config.zoom"
|
|
494
|
+
],
|
|
495
|
+
[
|
|
496
|
+
"set",
|
|
497
|
+
"@entity.camLead",
|
|
498
|
+
0.0
|
|
499
|
+
],
|
|
500
|
+
[
|
|
501
|
+
"set",
|
|
502
|
+
"@entity.camShake",
|
|
503
|
+
0.0
|
|
504
|
+
]
|
|
505
|
+
],
|
|
506
|
+
"event": "INIT",
|
|
507
|
+
"eventId": "evt_01M1KT7VDHP97MNNBCK21F9XF0",
|
|
508
|
+
"from": "active",
|
|
509
|
+
"to": "active"
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"effects": [
|
|
513
|
+
[
|
|
514
|
+
"set",
|
|
515
|
+
"@entity.camTargetX",
|
|
516
|
+
"@payload.x"
|
|
517
|
+
],
|
|
518
|
+
[
|
|
519
|
+
"set",
|
|
520
|
+
"@entity.camTargetY",
|
|
521
|
+
"@payload.y"
|
|
522
|
+
],
|
|
523
|
+
[
|
|
524
|
+
"set",
|
|
525
|
+
"@entity.camLead",
|
|
526
|
+
[
|
|
527
|
+
"*",
|
|
528
|
+
"@payload.vx",
|
|
529
|
+
"@config.lead"
|
|
530
|
+
]
|
|
531
|
+
]
|
|
532
|
+
],
|
|
533
|
+
"event": "FOLLOW",
|
|
534
|
+
"eventId": "evt_01M1KT7VDH27J939V4G8J199KT",
|
|
535
|
+
"from": "active",
|
|
536
|
+
"to": "active"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"effects": [
|
|
540
|
+
[
|
|
541
|
+
"set",
|
|
542
|
+
"@entity.camX",
|
|
543
|
+
"@payload.x"
|
|
544
|
+
],
|
|
545
|
+
[
|
|
546
|
+
"set",
|
|
547
|
+
"@entity.camY",
|
|
548
|
+
"@payload.y"
|
|
549
|
+
],
|
|
550
|
+
[
|
|
551
|
+
"set",
|
|
552
|
+
"@entity.camTargetX",
|
|
553
|
+
"@payload.x"
|
|
554
|
+
],
|
|
555
|
+
[
|
|
556
|
+
"set",
|
|
557
|
+
"@entity.camTargetY",
|
|
558
|
+
"@payload.y"
|
|
559
|
+
],
|
|
560
|
+
[
|
|
561
|
+
"set",
|
|
562
|
+
"@entity.camLead",
|
|
563
|
+
0.0
|
|
564
|
+
]
|
|
565
|
+
],
|
|
566
|
+
"event": "CUT",
|
|
567
|
+
"eventId": "evt_01M1KT7VDHP8EPRYARWY431Q8A",
|
|
568
|
+
"from": "active",
|
|
569
|
+
"to": "active"
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"effects": [
|
|
573
|
+
[
|
|
574
|
+
"set",
|
|
575
|
+
"@entity.camTargetZoom",
|
|
576
|
+
[
|
|
577
|
+
"math/clamp",
|
|
578
|
+
"@payload.zoom",
|
|
579
|
+
"@config.minZoom",
|
|
580
|
+
"@config.maxZoom"
|
|
581
|
+
]
|
|
582
|
+
]
|
|
583
|
+
],
|
|
584
|
+
"event": "SET_ZOOM",
|
|
585
|
+
"eventId": "evt_01M1KT7VDH7GM6FBFHVF1VJRNH",
|
|
586
|
+
"from": "active",
|
|
587
|
+
"to": "active"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"effects": [
|
|
591
|
+
[
|
|
592
|
+
"set",
|
|
593
|
+
"@entity.camShake",
|
|
594
|
+
"@payload.magnitude"
|
|
595
|
+
]
|
|
596
|
+
],
|
|
597
|
+
"event": "SHAKE",
|
|
598
|
+
"eventId": "evt_01M1KT7VDH7EM7H3VR4949R1EX",
|
|
599
|
+
"from": "active",
|
|
600
|
+
"to": "active"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"effects": [
|
|
604
|
+
[
|
|
605
|
+
"set",
|
|
606
|
+
"@entity.camX",
|
|
607
|
+
"@config.start.x"
|
|
608
|
+
],
|
|
609
|
+
[
|
|
610
|
+
"set",
|
|
611
|
+
"@entity.camY",
|
|
612
|
+
"@config.start.y"
|
|
613
|
+
],
|
|
614
|
+
[
|
|
615
|
+
"set",
|
|
616
|
+
"@entity.camZoom",
|
|
617
|
+
"@config.zoom"
|
|
618
|
+
],
|
|
619
|
+
[
|
|
620
|
+
"set",
|
|
621
|
+
"@entity.camTargetX",
|
|
622
|
+
"@config.start.x"
|
|
623
|
+
],
|
|
624
|
+
[
|
|
625
|
+
"set",
|
|
626
|
+
"@entity.camTargetY",
|
|
627
|
+
"@config.start.y"
|
|
628
|
+
],
|
|
629
|
+
[
|
|
630
|
+
"set",
|
|
631
|
+
"@entity.camTargetZoom",
|
|
632
|
+
"@config.zoom"
|
|
633
|
+
],
|
|
634
|
+
[
|
|
635
|
+
"set",
|
|
636
|
+
"@entity.camLead",
|
|
637
|
+
0.0
|
|
638
|
+
],
|
|
639
|
+
[
|
|
640
|
+
"set",
|
|
641
|
+
"@entity.camShake",
|
|
642
|
+
0.0
|
|
643
|
+
]
|
|
644
|
+
],
|
|
645
|
+
"event": "RESTART",
|
|
646
|
+
"eventId": "evt_01M1KT7VDHD96YA0S3RPC9MRCC",
|
|
647
|
+
"from": "active",
|
|
648
|
+
"to": "active"
|
|
649
|
+
}
|
|
650
|
+
]
|
|
651
|
+
},
|
|
652
|
+
"ticks": [
|
|
653
|
+
{
|
|
654
|
+
"effects": [
|
|
655
|
+
[
|
|
656
|
+
"do",
|
|
657
|
+
[
|
|
658
|
+
"set",
|
|
659
|
+
"@entity.camX",
|
|
660
|
+
[
|
|
661
|
+
"math/clamp",
|
|
662
|
+
[
|
|
663
|
+
"if",
|
|
664
|
+
[
|
|
665
|
+
">",
|
|
666
|
+
[
|
|
667
|
+
"math/abs",
|
|
668
|
+
[
|
|
669
|
+
"-",
|
|
670
|
+
[
|
|
671
|
+
"+",
|
|
672
|
+
"@entity.camTargetX",
|
|
673
|
+
"@entity.camLead"
|
|
674
|
+
],
|
|
675
|
+
"@entity.camX"
|
|
676
|
+
]
|
|
677
|
+
],
|
|
678
|
+
"@config.deadzoneX"
|
|
679
|
+
],
|
|
680
|
+
[
|
|
681
|
+
"math/lerp",
|
|
682
|
+
"@entity.camX",
|
|
683
|
+
[
|
|
684
|
+
"+",
|
|
685
|
+
"@entity.camTargetX",
|
|
686
|
+
"@entity.camLead"
|
|
687
|
+
],
|
|
688
|
+
"@config.stiffness"
|
|
689
|
+
],
|
|
690
|
+
"@entity.camX"
|
|
691
|
+
],
|
|
692
|
+
"@config.bounds.xMin",
|
|
693
|
+
"@config.bounds.xMax"
|
|
694
|
+
]
|
|
695
|
+
],
|
|
696
|
+
[
|
|
697
|
+
"set",
|
|
698
|
+
"@entity.camY",
|
|
699
|
+
[
|
|
700
|
+
"math/clamp",
|
|
701
|
+
[
|
|
702
|
+
"if",
|
|
703
|
+
[
|
|
704
|
+
">",
|
|
705
|
+
[
|
|
706
|
+
"math/abs",
|
|
707
|
+
[
|
|
708
|
+
"-",
|
|
709
|
+
"@entity.camTargetY",
|
|
710
|
+
"@entity.camY"
|
|
711
|
+
]
|
|
712
|
+
],
|
|
713
|
+
"@config.deadzoneY"
|
|
714
|
+
],
|
|
715
|
+
[
|
|
716
|
+
"math/lerp",
|
|
717
|
+
"@entity.camY",
|
|
718
|
+
"@entity.camTargetY",
|
|
719
|
+
"@config.stiffness"
|
|
720
|
+
],
|
|
721
|
+
"@entity.camY"
|
|
722
|
+
],
|
|
723
|
+
"@config.bounds.yMin",
|
|
724
|
+
"@config.bounds.yMax"
|
|
725
|
+
]
|
|
726
|
+
],
|
|
727
|
+
[
|
|
728
|
+
"set",
|
|
729
|
+
"@entity.camZoom",
|
|
730
|
+
[
|
|
731
|
+
"math/clamp",
|
|
732
|
+
[
|
|
733
|
+
"math/lerp",
|
|
734
|
+
"@entity.camZoom",
|
|
735
|
+
"@entity.camTargetZoom",
|
|
736
|
+
"@config.stiffness"
|
|
737
|
+
],
|
|
738
|
+
"@config.minZoom",
|
|
739
|
+
"@config.maxZoom"
|
|
740
|
+
]
|
|
741
|
+
],
|
|
742
|
+
[
|
|
743
|
+
"set",
|
|
744
|
+
"@entity.camShake",
|
|
745
|
+
[
|
|
746
|
+
"math/max",
|
|
747
|
+
0.0,
|
|
748
|
+
[
|
|
749
|
+
"-",
|
|
750
|
+
"@entity.camShake",
|
|
751
|
+
"@config.shakeDecay"
|
|
752
|
+
]
|
|
753
|
+
]
|
|
754
|
+
]
|
|
755
|
+
],
|
|
756
|
+
[
|
|
757
|
+
"emit",
|
|
758
|
+
"CAMERA_MOVED",
|
|
759
|
+
{
|
|
760
|
+
"x": "@entity.camX",
|
|
761
|
+
"y": "@entity.camY",
|
|
762
|
+
"zoom": "@entity.camZoom"
|
|
763
|
+
}
|
|
764
|
+
]
|
|
765
|
+
],
|
|
766
|
+
"guard": "@config.running",
|
|
767
|
+
"interval": 33.0,
|
|
768
|
+
"name": "camTick"
|
|
769
|
+
}
|
|
770
|
+
]
|
|
771
|
+
}
|
|
772
|
+
],
|
|
773
|
+
"types": {
|
|
774
|
+
"CameraBounds": [
|
|
775
|
+
{
|
|
776
|
+
"name": "xMin",
|
|
777
|
+
"required": true,
|
|
778
|
+
"type": "number"
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"name": "xMax",
|
|
782
|
+
"required": true,
|
|
783
|
+
"type": "number"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"name": "yMin",
|
|
787
|
+
"required": true,
|
|
788
|
+
"type": "number"
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
"name": "yMax",
|
|
792
|
+
"required": true,
|
|
793
|
+
"type": "number"
|
|
794
|
+
}
|
|
795
|
+
],
|
|
796
|
+
"CameraPos": [
|
|
797
|
+
{
|
|
798
|
+
"name": "x",
|
|
799
|
+
"required": true,
|
|
800
|
+
"type": "number"
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"name": "y",
|
|
804
|
+
"required": true,
|
|
805
|
+
"type": "number"
|
|
806
|
+
}
|
|
807
|
+
]
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
],
|
|
811
|
+
"schemaVersion": 1,
|
|
812
|
+
"version": "1.0.0"
|
|
813
|
+
}
|