@almadar/std 16.243.0 → 16.244.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/behaviors/behaviors-registry.json +72537 -31220
- package/behaviors/lolo/agent/atoms/std-agent-context.lolo +24 -4
- package/behaviors/lolo/agent/atoms/std-agent-memory.lolo +20 -5
- package/behaviors/lolo/agent/atoms/std-agent-proposal.lolo +550 -0
- package/behaviors/lolo/agent/atoms/std-agent-session.lolo +284 -25
- package/behaviors/lolo/agent/atoms/std-agent-suggestions.lolo +841 -0
- package/behaviors/lolo/agent/atoms/std-agent-tool-loop.lolo +58 -8
- package/behaviors/lolo/agent/organisms/std-agent-assistant.lolo +1 -0
- package/behaviors/lolo/infra/atoms/std-page-treat.lolo +28 -1
- package/behaviors/lolo/ui/avl/atoms/ui-avl-state-machine.lolo +22 -0
- package/behaviors/lolo/ui/avl/atoms/ui-avl-transition-explainer.lolo +175 -0
- package/behaviors/lolo/ui/avl/atoms/ui-module-card.lolo +22 -0
- package/behaviors/lolo/ui/core/atoms/std-app-layout.lolo +23 -4
- package/behaviors/lolo/ui/core/atoms/std-hero.lolo +72 -33
- package/behaviors/lolo/ui/core/molecules/ui-agent-chat-feed.lolo +1 -1
- package/behaviors/lolo/ui/core/molecules/ui-markdown-content.lolo +54 -0
- package/behaviors/lolo/ui/core/molecules/ui-upload-drop-zone.lolo +5 -0
- package/behaviors/lolo/ui/core/organisms/ui-segment-renderer.lolo +127 -3
- package/behaviors/lolo/ui/core/organisms/ui-state-machine-view.lolo +22 -0
- package/behaviors/lolo/ui/core/templates/ui-dashboard-layout.lolo +2 -2
- package/behaviors/lolo/ui/learning/atoms/std-learn-arrangement.lolo +87 -17
- package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +172 -37
- package/behaviors/lolo/ui/learning/atoms/std-learn-coupled-sim.lolo +183 -70
- package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +78 -13
- package/behaviors/lolo/ui/learning/atoms/std-learn-diagram.lolo +58 -2
- package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +107 -12
- package/behaviors/lolo/ui/learning/atoms/std-learn-estimate.lolo +83 -10
- package/behaviors/lolo/ui/learning/atoms/std-learn-goal-seek.lolo +130 -9
- package/behaviors/lolo/ui/learning/atoms/std-learn-grid-sim.lolo +143 -59
- package/behaviors/lolo/ui/learning/atoms/std-learn-hotspot.lolo +96 -22
- package/behaviors/lolo/ui/learning/atoms/std-learn-live-sim.lolo +66 -5
- package/behaviors/lolo/ui/learning/atoms/std-learn-predict.lolo +84 -6
- package/behaviors/lolo/ui/learning/atoms/std-learn-sandbox.lolo +80 -14
- package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +99 -5
- package/behaviors/lolo/ui/learning/atoms/std-learn-scenario.lolo +81 -7
- package/behaviors/lolo/ui/learning/atoms/std-learn-speed-drill.lolo +83 -7
- package/behaviors/lolo/ui/learning/atoms/std-learn-stepper.lolo +224 -99
- package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +63 -2
- package/behaviors/lolo/ui/learning/atoms/std-learn-trace-player.lolo +99 -38
- package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +7 -7
- package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +69 -4
- package/behaviors/lolo-behavior-contracts.json +1 -1
- package/behaviors/registry/agent/atoms/std-agent-context.orb +205 -6
- package/behaviors/registry/agent/atoms/std-agent-memory.orb +146 -4
- package/behaviors/registry/agent/atoms/std-agent-proposal.orb +1972 -0
- package/behaviors/registry/agent/atoms/std-agent-session.orb +2021 -597
- package/behaviors/registry/agent/atoms/std-agent-suggestions.orb +5079 -0
- package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +287 -5
- package/behaviors/registry/agent/organisms/std-agent-assistant.orb +7 -0
- package/behaviors/registry/factory-signatures.json +1 -1
- package/behaviors/registry/infra/atoms/std-page-treat.orb +327 -2
- package/behaviors/registry/ui/avl/atoms/ui-avl-state-machine.orb +134 -0
- package/behaviors/registry/ui/avl/atoms/ui-avl-transition-explainer.orb +678 -0
- package/behaviors/registry/ui/avl/atoms/ui-module-card.orb +122 -0
- package/behaviors/registry/ui/core/atoms/std-app-layout.orb +73 -4
- package/behaviors/registry/ui/core/atoms/std-hero.orb +174 -97
- package/behaviors/registry/ui/core/molecules/ui-markdown-content.orb +204 -1
- package/behaviors/registry/ui/core/molecules/ui-upload-drop-zone.orb +12 -0
- package/behaviors/registry/ui/core/organisms/ui-segment-renderer.orb +683 -30
- package/behaviors/registry/ui/learning/atoms/std-learn-arrangement.orb +748 -21
- package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1429 -41
- package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +1031 -185
- package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +807 -132
- package/behaviors/registry/ui/learning/atoms/std-learn-diagram.orb +553 -6
- package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +987 -21
- package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +582 -16
- package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +954 -13
- package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +828 -88
- package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +730 -28
- package/behaviors/registry/ui/learning/atoms/std-learn-live-sim.orb +479 -9
- package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +797 -46
- package/behaviors/registry/ui/learning/atoms/std-learn-sandbox.orb +757 -58
- package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +1176 -164
- package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +599 -12
- package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +832 -150
- package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +1561 -127
- package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +655 -6
- package/behaviors/registry/ui/learning/atoms/std-learn-trace-player.orb +634 -43
- package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +85 -31
- package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +425 -9
- package/canonical-operators.json +45 -2
- package/dist/behaviors/exports-reader.js +16667 -7868
- package/dist/behaviors/functions/index.d.ts +711 -32
- package/dist/behaviors/functions/index.js +16651 -7869
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +16668 -7869
- package/dist/behaviors/query.js +16667 -7868
- package/dist/behaviors-embeddings.hash.json +3 -3
- package/dist/behaviors-embeddings.json +77 -53
- package/dist/behaviors-registry.json +72537 -31220
- package/dist/index.d.ts +3 -3
- package/dist/index.js +16101 -7275
- package/dist/knob-embeddings.hash.json +3 -3
- package/dist/knob-embeddings.json +11617 -1225
- package/dist/modules/anim.d.ts +1 -1
- package/dist/modules/array.d.ts +1 -1
- package/dist/modules/async.d.ts +1 -1
- package/dist/modules/behavior.d.ts +1 -1
- package/dist/modules/browser.d.ts +1 -1
- package/dist/modules/composition.d.ts +1 -1
- package/dist/modules/contract.d.ts +1 -1
- package/dist/modules/core.d.ts +1 -1
- package/dist/modules/core.js +29 -2
- package/dist/modules/data.d.ts +1 -1
- package/dist/modules/ease.d.ts +1 -1
- package/dist/modules/format.d.ts +1 -1
- package/dist/modules/geo.d.ts +1 -1
- package/dist/modules/graph.d.ts +1 -1
- package/dist/modules/grid.d.ts +1 -1
- package/dist/modules/i18n.d.ts +1 -1
- package/dist/modules/index.d.ts +1 -1
- package/dist/modules/index.js +29 -2
- package/dist/modules/integration.d.ts +1 -1
- package/dist/modules/json.d.ts +1 -1
- package/dist/modules/llm.d.ts +1 -1
- package/dist/modules/math.d.ts +1 -1
- package/dist/modules/memory.d.ts +1 -1
- package/dist/modules/nn.d.ts +1 -1
- package/dist/modules/noise.d.ts +1 -1
- package/dist/modules/object.d.ts +1 -1
- package/dist/modules/os.d.ts +1 -1
- package/dist/modules/path.d.ts +1 -1
- package/dist/modules/prob.d.ts +1 -1
- package/dist/modules/session.d.ts +1 -1
- package/dist/modules/str.d.ts +1 -1
- package/dist/modules/tensor.d.ts +1 -1
- package/dist/modules/time.d.ts +1 -1
- package/dist/modules/trace.d.ts +1 -1
- package/dist/modules/train.d.ts +1 -1
- package/dist/modules/validate.d.ts +1 -1
- package/dist/modules/vector.d.ts +1 -1
- package/dist/modules/workspace.d.ts +1 -1
- package/dist/registry/factory-signatures.json +1 -1
- package/dist/registry.d.ts +2 -2
- package/dist/registry.js +29 -2
- package/dist/{types-Cdb321uM.d.ts → types-Y-yYWEOX.d.ts} +1 -1
- package/i18n/ar.json +3 -1
- package/i18n/en.json +2 -0
- package/i18n/sl.json +3 -1
- package/package.json +3 -3
|
@@ -15,6 +15,14 @@ orbital CoupledSimOrbital {
|
|
|
15
15
|
id : string!
|
|
16
16
|
active : boolean = false
|
|
17
17
|
title : string
|
|
18
|
+
taskText : string
|
|
19
|
+
kind : string
|
|
20
|
+
pLabel : string
|
|
21
|
+
qLabel : string
|
|
22
|
+
pStart : number
|
|
23
|
+
qStart : number
|
|
24
|
+
coefALabel : string
|
|
25
|
+
coefBLabel : string
|
|
18
26
|
t : number = 0
|
|
19
27
|
p : number = 0
|
|
20
28
|
q : number = 0
|
|
@@ -31,20 +39,28 @@ orbital CoupledSimOrbital {
|
|
|
31
39
|
initial: idle
|
|
32
40
|
|
|
33
41
|
state idle {
|
|
34
|
-
INIT -> idle when (== @config.matchMode "")
|
|
42
|
+
INIT -> idle when (and (== @config.matchMode "") (== @config.rosterSource "config"))
|
|
35
43
|
(set @entity.active true)
|
|
36
44
|
(set @entity.title @config.title)
|
|
45
|
+
(set @entity.taskText @config.taskText)
|
|
46
|
+
(set @entity.kind @config.kind)
|
|
47
|
+
(set @entity.pLabel @config.pLabel)
|
|
48
|
+
(set @entity.qLabel @config.qLabel)
|
|
49
|
+
(set @entity.pStart @config.pStart)
|
|
50
|
+
(set @entity.qStart @config.qStart)
|
|
51
|
+
(set @entity.coefALabel @config.coefALabel)
|
|
52
|
+
(set @entity.coefBLabel @config.coefBLabel)
|
|
37
53
|
(set @entity.t 0)
|
|
38
|
-
(set @entity.p @
|
|
39
|
-
(set @entity.q @
|
|
54
|
+
(set @entity.p @entity.pStart)
|
|
55
|
+
(set @entity.q @entity.qStart)
|
|
40
56
|
(set @entity.coefA @config.coefADefault)
|
|
41
57
|
(set @entity.coefB @config.coefBDefault)
|
|
42
58
|
(set @entity.running @config.autoRun)
|
|
43
|
-
(set @entity.pSamples [ { x: 0, y: @
|
|
44
|
-
(set @entity.qSamples [ { x: 0, y: @
|
|
59
|
+
(set @entity.pSamples [ { x: 0, y: @entity.pStart } ])
|
|
60
|
+
(set @entity.qSamples [ { x: 0, y: @entity.qStart } ])
|
|
45
61
|
(set @entity.curves [
|
|
46
|
-
{ label: @
|
|
47
|
-
{ label: @
|
|
62
|
+
{ label: @entity.pLabel, color: @config.pColor, samples: @entity.pSamples },
|
|
63
|
+
{ label: @entity.qLabel, color: @config.qColor, samples: @entity.qSamples }
|
|
48
64
|
])
|
|
49
65
|
(render-ui main {
|
|
50
66
|
type: box
|
|
@@ -74,17 +90,17 @@ orbital CoupledSimOrbital {
|
|
|
74
90
|
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: @config.duration, yMin: 0, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.curves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { Space: TOGGLE_RUN, KeyR: RESET } },
|
|
75
91
|
{ type: stack, direction: vertical, gap: sm, children: [
|
|
76
92
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
77
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
93
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefALabel ": " (math/round @entity.coefA 3)) },
|
|
78
94
|
{ type: range-slider, min: @config.coefAMin, max: @config.coefAMax, step: @config.coefAStep, value: @entity.coefA, showTooltip: true, action: "SET_A" }
|
|
79
95
|
] },
|
|
80
96
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
81
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
97
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefBLabel ": " (math/round @entity.coefB 3)) },
|
|
82
98
|
{ type: range-slider, min: @config.coefBMin, max: @config.coefBMax, step: @config.coefBStep, value: @entity.coefB, showTooltip: true, action: "SET_B" }
|
|
83
99
|
] }
|
|
84
100
|
] },
|
|
85
101
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
86
|
-
{ type: typography, variant: body, content: @
|
|
87
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
102
|
+
{ type: typography, variant: body, content: @entity.taskText },
|
|
103
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.pLabel " = " (math/round @entity.p 1) " · " @entity.qLabel " = " (math/round @entity.q 1)) }
|
|
88
104
|
] }
|
|
89
105
|
] }
|
|
90
106
|
]
|
|
@@ -95,20 +111,28 @@ orbital CoupledSimOrbital {
|
|
|
95
111
|
(set @entity.running false)
|
|
96
112
|
(render-ui main null)
|
|
97
113
|
|
|
98
|
-
MODE_SELECTED -> idle when (== ?mode @config.matchMode)
|
|
114
|
+
MODE_SELECTED -> idle when (and (== ?mode @config.matchMode) (== @config.rosterSource "config"))
|
|
99
115
|
(set @entity.active true)
|
|
100
116
|
(set @entity.title @config.title)
|
|
117
|
+
(set @entity.taskText @config.taskText)
|
|
118
|
+
(set @entity.kind @config.kind)
|
|
119
|
+
(set @entity.pLabel @config.pLabel)
|
|
120
|
+
(set @entity.qLabel @config.qLabel)
|
|
121
|
+
(set @entity.pStart @config.pStart)
|
|
122
|
+
(set @entity.qStart @config.qStart)
|
|
123
|
+
(set @entity.coefALabel @config.coefALabel)
|
|
124
|
+
(set @entity.coefBLabel @config.coefBLabel)
|
|
101
125
|
(set @entity.t 0)
|
|
102
|
-
(set @entity.p @
|
|
103
|
-
(set @entity.q @
|
|
126
|
+
(set @entity.p @entity.pStart)
|
|
127
|
+
(set @entity.q @entity.qStart)
|
|
104
128
|
(set @entity.coefA @config.coefADefault)
|
|
105
129
|
(set @entity.coefB @config.coefBDefault)
|
|
106
130
|
(set @entity.running @config.autoRun)
|
|
107
|
-
(set @entity.pSamples [ { x: 0, y: @
|
|
108
|
-
(set @entity.qSamples [ { x: 0, y: @
|
|
131
|
+
(set @entity.pSamples [ { x: 0, y: @entity.pStart } ])
|
|
132
|
+
(set @entity.qSamples [ { x: 0, y: @entity.qStart } ])
|
|
109
133
|
(set @entity.curves [
|
|
110
|
-
{ label: @
|
|
111
|
-
{ label: @
|
|
134
|
+
{ label: @entity.pLabel, color: @config.pColor, samples: @entity.pSamples },
|
|
135
|
+
{ label: @entity.qLabel, color: @config.qColor, samples: @entity.qSamples }
|
|
112
136
|
])
|
|
113
137
|
(render-ui main {
|
|
114
138
|
type: box
|
|
@@ -138,22 +162,94 @@ orbital CoupledSimOrbital {
|
|
|
138
162
|
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: @config.duration, yMin: 0, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.curves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { Space: TOGGLE_RUN, KeyR: RESET } },
|
|
139
163
|
{ type: stack, direction: vertical, gap: sm, children: [
|
|
140
164
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
141
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
165
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefALabel ": " (math/round @entity.coefA 3)) },
|
|
142
166
|
{ type: range-slider, min: @config.coefAMin, max: @config.coefAMax, step: @config.coefAStep, value: @entity.coefA, showTooltip: true, action: "SET_A" }
|
|
143
167
|
] },
|
|
144
168
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
145
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
169
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefBLabel ": " (math/round @entity.coefB 3)) },
|
|
146
170
|
{ type: range-slider, min: @config.coefBMin, max: @config.coefBMax, step: @config.coefBStep, value: @entity.coefB, showTooltip: true, action: "SET_B" }
|
|
147
171
|
] }
|
|
148
172
|
] },
|
|
149
173
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
150
|
-
{ type: typography, variant: body, content: @
|
|
151
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
174
|
+
{ type: typography, variant: body, content: @entity.taskText },
|
|
175
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.pLabel " = " (math/round @entity.p 1) " · " @entity.qLabel " = " (math/round @entity.q 1)) }
|
|
152
176
|
] }
|
|
153
177
|
] }
|
|
154
178
|
]
|
|
155
179
|
})
|
|
156
180
|
|
|
181
|
+
ROSTER_LOADED -> idle when (and (== @config.rosterSource "event") (and (== ?mode @config.matchMode) (!= ?kind "")))
|
|
182
|
+
(set @entity.active true)
|
|
183
|
+
(set @entity.title @config.title)
|
|
184
|
+
(set @entity.taskText ?taskText)
|
|
185
|
+
(set @entity.kind ?kind)
|
|
186
|
+
(set @entity.pLabel ?pLabel)
|
|
187
|
+
(set @entity.qLabel ?qLabel)
|
|
188
|
+
(set @entity.pStart ?pStart)
|
|
189
|
+
(set @entity.qStart ?qStart)
|
|
190
|
+
(set @entity.coefALabel ?coefALabel)
|
|
191
|
+
(set @entity.coefBLabel ?coefBLabel)
|
|
192
|
+
(set @entity.t 0)
|
|
193
|
+
(set @entity.p @entity.pStart)
|
|
194
|
+
(set @entity.q @entity.qStart)
|
|
195
|
+
(set @entity.coefA @config.coefADefault)
|
|
196
|
+
(set @entity.coefB @config.coefBDefault)
|
|
197
|
+
(set @entity.running @config.autoRun)
|
|
198
|
+
(set @entity.pSamples [ { x: 0, y: @entity.pStart } ])
|
|
199
|
+
(set @entity.qSamples [ { x: 0, y: @entity.qStart } ])
|
|
200
|
+
(set @entity.curves [
|
|
201
|
+
{ label: @entity.pLabel, color: @config.pColor, samples: @entity.pSamples },
|
|
202
|
+
{ label: @entity.qLabel, color: @config.qColor, samples: @entity.qSamples }
|
|
203
|
+
])
|
|
204
|
+
(render-ui main {
|
|
205
|
+
type: box
|
|
206
|
+
padding: md
|
|
207
|
+
children: [
|
|
208
|
+
{ type: stack, direction: vertical, gap: md, children: [
|
|
209
|
+
{ type: stack, direction: horizontal, justify: between, align: start, gap: md, children: [
|
|
210
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
211
|
+
{ type: typography, variant: h4, content: @entity.title },
|
|
212
|
+
(if (== @config.summary "") null { type: typography, variant: body2, color: muted, content: @config.summary })
|
|
213
|
+
] },
|
|
214
|
+
{ type: badge, label: (if (>= @entity.t @config.duration) "Done" (if @entity.running "Running" "Paused")), variant: (if (>= @entity.t @config.duration) "success" (if @entity.running "primary" "neutral")) }
|
|
215
|
+
] },
|
|
216
|
+
{ type: stack, direction: horizontal, align: center, gap: sm, wrap: true, children: [
|
|
217
|
+
(if @entity.running { type: button, action: TOGGLE_RUN, label: "Pause", icon: "pause", variant: primary, aria-pressed: "true" } { type: button, action: TOGGLE_RUN, label: "Play", icon: "play", variant: primary, aria-pressed: "false", disabled: (>= @entity.t @config.duration) }),
|
|
218
|
+
{ type: button, action: RESET, label: "Reset", icon: "rotate-ccw", variant: ghost },
|
|
219
|
+
{ type: button, action: SHOCK, actionPayload: { delta: @config.shockSize }, label: @config.shockUpLabel, variant: secondary, size: sm },
|
|
220
|
+
{ type: button, action: SHOCK, actionPayload: { delta: (- 0 @config.shockSize) }, label: @config.shockDownLabel, variant: secondary, size: sm },
|
|
221
|
+
{ type: stack, direction: horizontal, align: center, gap: xs, role: "group", aria-label: "Speed", children: [
|
|
222
|
+
{ type: button, action: SPEED_SET, actionPayload: { speed: 0.5 }, label: "0.5×", size: sm, variant: (if (== @entity.speed 0.5) "secondary" "ghost"), aria-pressed: (if (== @entity.speed 0.5) "true" "false") },
|
|
223
|
+
{ type: button, action: SPEED_SET, actionPayload: { speed: 1 }, label: "1×", size: sm, variant: (if (== @entity.speed 1) "secondary" "ghost"), aria-pressed: (if (== @entity.speed 1) "true" "false") },
|
|
224
|
+
{ type: button, action: SPEED_SET, actionPayload: { speed: 2 }, label: "2×", size: sm, variant: (if (== @entity.speed 2) "secondary" "ghost"), aria-pressed: (if (== @entity.speed 2) "true" "false") },
|
|
225
|
+
{ type: button, action: SPEED_SET, actionPayload: { speed: 4 }, label: "4×", size: sm, variant: (if (== @entity.speed 4) "secondary" "ghost"), aria-pressed: (if (== @entity.speed 4) "true" "false") }
|
|
226
|
+
] },
|
|
227
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat "t = " (math/round @entity.t 1) " of " @config.duration) }
|
|
228
|
+
] },
|
|
229
|
+
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: @config.duration, yMin: 0, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.curves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { Space: TOGGLE_RUN, KeyR: RESET } },
|
|
230
|
+
{ type: stack, direction: vertical, gap: sm, children: [
|
|
231
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
232
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefALabel ": " (math/round @entity.coefA 3)) },
|
|
233
|
+
{ type: range-slider, min: @config.coefAMin, max: @config.coefAMax, step: @config.coefAStep, value: @entity.coefA, showTooltip: true, action: "SET_A" }
|
|
234
|
+
] },
|
|
235
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
236
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefBLabel ": " (math/round @entity.coefB 3)) },
|
|
237
|
+
{ type: range-slider, min: @config.coefBMin, max: @config.coefBMax, step: @config.coefBStep, value: @entity.coefB, showTooltip: true, action: "SET_B" }
|
|
238
|
+
] }
|
|
239
|
+
] },
|
|
240
|
+
{ type: stack, direction: vertical, gap: xs, children: [
|
|
241
|
+
{ type: typography, variant: body, content: @entity.taskText },
|
|
242
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.pLabel " = " (math/round @entity.p 1) " · " @entity.qLabel " = " (math/round @entity.q 1)) }
|
|
243
|
+
] }
|
|
244
|
+
] }
|
|
245
|
+
]
|
|
246
|
+
})
|
|
247
|
+
|
|
248
|
+
ROSTER_LOADED -> idle when (and (== @config.rosterSource "event") (not (== ?mode @config.matchMode)))
|
|
249
|
+
(set @entity.active false)
|
|
250
|
+
(set @entity.running false)
|
|
251
|
+
(render-ui main null)
|
|
252
|
+
|
|
157
253
|
TOGGLE_RUN -> idle when (and (== @entity.active true) (or (== @entity.running true) (< @entity.t @config.duration)))
|
|
158
254
|
(set @entity.running (not @entity.running))
|
|
159
255
|
(render-ui main {
|
|
@@ -184,17 +280,17 @@ orbital CoupledSimOrbital {
|
|
|
184
280
|
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: @config.duration, yMin: 0, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.curves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { Space: TOGGLE_RUN, KeyR: RESET } },
|
|
185
281
|
{ type: stack, direction: vertical, gap: sm, children: [
|
|
186
282
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
187
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
283
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefALabel ": " (math/round @entity.coefA 3)) },
|
|
188
284
|
{ type: range-slider, min: @config.coefAMin, max: @config.coefAMax, step: @config.coefAStep, value: @entity.coefA, showTooltip: true, action: "SET_A" }
|
|
189
285
|
] },
|
|
190
286
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
191
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
287
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefBLabel ": " (math/round @entity.coefB 3)) },
|
|
192
288
|
{ type: range-slider, min: @config.coefBMin, max: @config.coefBMax, step: @config.coefBStep, value: @entity.coefB, showTooltip: true, action: "SET_B" }
|
|
193
289
|
] }
|
|
194
290
|
] },
|
|
195
291
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
196
|
-
{ type: typography, variant: body, content: @
|
|
197
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
292
|
+
{ type: typography, variant: body, content: @entity.taskText },
|
|
293
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.pLabel " = " (math/round @entity.p 1) " · " @entity.qLabel " = " (math/round @entity.q 1)) }
|
|
198
294
|
] }
|
|
199
295
|
] }
|
|
200
296
|
]
|
|
@@ -231,17 +327,17 @@ orbital CoupledSimOrbital {
|
|
|
231
327
|
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: @config.duration, yMin: 0, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.curves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { Space: TOGGLE_RUN, KeyR: RESET } },
|
|
232
328
|
{ type: stack, direction: vertical, gap: sm, children: [
|
|
233
329
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
234
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
330
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefALabel ": " (math/round @entity.coefA 3)) },
|
|
235
331
|
{ type: range-slider, min: @config.coefAMin, max: @config.coefAMax, step: @config.coefAStep, value: @entity.coefA, showTooltip: true, action: "SET_A" }
|
|
236
332
|
] },
|
|
237
333
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
238
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
334
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefBLabel ": " (math/round @entity.coefB 3)) },
|
|
239
335
|
{ type: range-slider, min: @config.coefBMin, max: @config.coefBMax, step: @config.coefBStep, value: @entity.coefB, showTooltip: true, action: "SET_B" }
|
|
240
336
|
] }
|
|
241
337
|
] },
|
|
242
338
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
243
|
-
{ type: typography, variant: body, content: @
|
|
244
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
339
|
+
{ type: typography, variant: body, content: @entity.taskText },
|
|
340
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.pLabel " = " (math/round @entity.p 1) " · " @entity.qLabel " = " (math/round @entity.q 1)) }
|
|
245
341
|
] }
|
|
246
342
|
] }
|
|
247
343
|
]
|
|
@@ -277,17 +373,17 @@ orbital CoupledSimOrbital {
|
|
|
277
373
|
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: @config.duration, yMin: 0, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.curves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { Space: TOGGLE_RUN, KeyR: RESET } },
|
|
278
374
|
{ type: stack, direction: vertical, gap: sm, children: [
|
|
279
375
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
280
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
376
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefALabel ": " (math/round @entity.coefA 3)) },
|
|
281
377
|
{ type: range-slider, min: @config.coefAMin, max: @config.coefAMax, step: @config.coefAStep, value: @entity.coefA, showTooltip: true, action: "SET_A" }
|
|
282
378
|
] },
|
|
283
379
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
284
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
380
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefBLabel ": " (math/round @entity.coefB 3)) },
|
|
285
381
|
{ type: range-slider, min: @config.coefBMin, max: @config.coefBMax, step: @config.coefBStep, value: @entity.coefB, showTooltip: true, action: "SET_B" }
|
|
286
382
|
] }
|
|
287
383
|
] },
|
|
288
384
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
289
|
-
{ type: typography, variant: body, content: @
|
|
290
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
385
|
+
{ type: typography, variant: body, content: @entity.taskText },
|
|
386
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.pLabel " = " (math/round @entity.p 1) " · " @entity.qLabel " = " (math/round @entity.q 1)) }
|
|
291
387
|
] }
|
|
292
388
|
] }
|
|
293
389
|
]
|
|
@@ -324,17 +420,17 @@ orbital CoupledSimOrbital {
|
|
|
324
420
|
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: @config.duration, yMin: 0, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.curves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { Space: TOGGLE_RUN, KeyR: RESET } },
|
|
325
421
|
{ type: stack, direction: vertical, gap: sm, children: [
|
|
326
422
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
327
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
423
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefALabel ": " (math/round @entity.coefA 3)) },
|
|
328
424
|
{ type: range-slider, min: @config.coefAMin, max: @config.coefAMax, step: @config.coefAStep, value: @entity.coefA, showTooltip: true, action: "SET_A" }
|
|
329
425
|
] },
|
|
330
426
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
331
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
427
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefBLabel ": " (math/round @entity.coefB 3)) },
|
|
332
428
|
{ type: range-slider, min: @config.coefBMin, max: @config.coefBMax, step: @config.coefBStep, value: @entity.coefB, showTooltip: true, action: "SET_B" }
|
|
333
429
|
] }
|
|
334
430
|
] },
|
|
335
431
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
336
|
-
{ type: typography, variant: body, content: @
|
|
337
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
432
|
+
{ type: typography, variant: body, content: @entity.taskText },
|
|
433
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.pLabel " = " (math/round @entity.p 1) " · " @entity.qLabel " = " (math/round @entity.q 1)) }
|
|
338
434
|
] }
|
|
339
435
|
] }
|
|
340
436
|
]
|
|
@@ -343,16 +439,16 @@ orbital CoupledSimOrbital {
|
|
|
343
439
|
|
|
344
440
|
RESET -> idle when (== @entity.active true)
|
|
345
441
|
(set @entity.t 0)
|
|
346
|
-
(set @entity.p @
|
|
347
|
-
(set @entity.q @
|
|
442
|
+
(set @entity.p @entity.pStart)
|
|
443
|
+
(set @entity.q @entity.qStart)
|
|
348
444
|
(set @entity.coefA @config.coefADefault)
|
|
349
445
|
(set @entity.coefB @config.coefBDefault)
|
|
350
446
|
(set @entity.running false)
|
|
351
|
-
(set @entity.pSamples [ { x: 0, y: @
|
|
352
|
-
(set @entity.qSamples [ { x: 0, y: @
|
|
447
|
+
(set @entity.pSamples [ { x: 0, y: @entity.pStart } ])
|
|
448
|
+
(set @entity.qSamples [ { x: 0, y: @entity.qStart } ])
|
|
353
449
|
(set @entity.curves [
|
|
354
|
-
{ label: @
|
|
355
|
-
{ label: @
|
|
450
|
+
{ label: @entity.pLabel, color: @config.pColor, samples: @entity.pSamples },
|
|
451
|
+
{ label: @entity.qLabel, color: @config.qColor, samples: @entity.qSamples }
|
|
356
452
|
])
|
|
357
453
|
(render-ui main {
|
|
358
454
|
type: box
|
|
@@ -382,22 +478,22 @@ orbital CoupledSimOrbital {
|
|
|
382
478
|
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: @config.duration, yMin: 0, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.curves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { Space: TOGGLE_RUN, KeyR: RESET } },
|
|
383
479
|
{ type: stack, direction: vertical, gap: sm, children: [
|
|
384
480
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
385
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
481
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefALabel ": " (math/round @entity.coefA 3)) },
|
|
386
482
|
{ type: range-slider, min: @config.coefAMin, max: @config.coefAMax, step: @config.coefAStep, value: @entity.coefA, showTooltip: true, action: "SET_A" }
|
|
387
483
|
] },
|
|
388
484
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
389
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
485
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefBLabel ": " (math/round @entity.coefB 3)) },
|
|
390
486
|
{ type: range-slider, min: @config.coefBMin, max: @config.coefBMax, step: @config.coefBStep, value: @entity.coefB, showTooltip: true, action: "SET_B" }
|
|
391
487
|
] }
|
|
392
488
|
] },
|
|
393
489
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
394
|
-
{ type: typography, variant: body, content: @
|
|
395
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
490
|
+
{ type: typography, variant: body, content: @entity.taskText },
|
|
491
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.pLabel " = " (math/round @entity.p 1) " · " @entity.qLabel " = " (math/round @entity.q 1)) }
|
|
396
492
|
] }
|
|
397
493
|
] }
|
|
398
494
|
]
|
|
399
495
|
})
|
|
400
|
-
(emit SIM_RESET { pStart: @
|
|
496
|
+
(emit SIM_RESET { pStart: @entity.pStart, qStart: @entity.qStart })
|
|
401
497
|
|
|
402
498
|
SET_A -> idle when (== @entity.active true)
|
|
403
499
|
(set @entity.coefA (math/clamp ?value @config.coefAMin @config.coefAMax))
|
|
@@ -429,17 +525,17 @@ orbital CoupledSimOrbital {
|
|
|
429
525
|
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: @config.duration, yMin: 0, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.curves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { Space: TOGGLE_RUN, KeyR: RESET } },
|
|
430
526
|
{ type: stack, direction: vertical, gap: sm, children: [
|
|
431
527
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
432
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
528
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefALabel ": " (math/round @entity.coefA 3)) },
|
|
433
529
|
{ type: range-slider, min: @config.coefAMin, max: @config.coefAMax, step: @config.coefAStep, value: @entity.coefA, showTooltip: true, action: "SET_A" }
|
|
434
530
|
] },
|
|
435
531
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
436
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
532
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefBLabel ": " (math/round @entity.coefB 3)) },
|
|
437
533
|
{ type: range-slider, min: @config.coefBMin, max: @config.coefBMax, step: @config.coefBStep, value: @entity.coefB, showTooltip: true, action: "SET_B" }
|
|
438
534
|
] }
|
|
439
535
|
] },
|
|
440
536
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
441
|
-
{ type: typography, variant: body, content: @
|
|
442
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
537
|
+
{ type: typography, variant: body, content: @entity.taskText },
|
|
538
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.pLabel " = " (math/round @entity.p 1) " · " @entity.qLabel " = " (math/round @entity.q 1)) }
|
|
443
539
|
] }
|
|
444
540
|
] }
|
|
445
541
|
]
|
|
@@ -476,17 +572,17 @@ orbital CoupledSimOrbital {
|
|
|
476
572
|
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: @config.duration, yMin: 0, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.curves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { Space: TOGGLE_RUN, KeyR: RESET } },
|
|
477
573
|
{ type: stack, direction: vertical, gap: sm, children: [
|
|
478
574
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
479
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
575
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefALabel ": " (math/round @entity.coefA 3)) },
|
|
480
576
|
{ type: range-slider, min: @config.coefAMin, max: @config.coefAMax, step: @config.coefAStep, value: @entity.coefA, showTooltip: true, action: "SET_A" }
|
|
481
577
|
] },
|
|
482
578
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
483
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
579
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefBLabel ": " (math/round @entity.coefB 3)) },
|
|
484
580
|
{ type: range-slider, min: @config.coefBMin, max: @config.coefBMax, step: @config.coefBStep, value: @entity.coefB, showTooltip: true, action: "SET_B" }
|
|
485
581
|
] }
|
|
486
582
|
] },
|
|
487
583
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
488
|
-
{ type: typography, variant: body, content: @
|
|
489
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
584
|
+
{ type: typography, variant: body, content: @entity.taskText },
|
|
585
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.pLabel " = " (math/round @entity.p 1) " · " @entity.qLabel " = " (math/round @entity.q 1)) }
|
|
490
586
|
] }
|
|
491
587
|
] }
|
|
492
588
|
]
|
|
@@ -497,8 +593,8 @@ orbital CoupledSimOrbital {
|
|
|
497
593
|
(set @entity.p (math/max 0 (+ @entity.p ?delta)))
|
|
498
594
|
(set @entity.pSamples (array/append @entity.pSamples { x: @entity.t, y: @entity.p }))
|
|
499
595
|
(set @entity.curves [
|
|
500
|
-
{ label: @
|
|
501
|
-
{ label: @
|
|
596
|
+
{ label: @entity.pLabel, color: @config.pColor, samples: @entity.pSamples },
|
|
597
|
+
{ label: @entity.qLabel, color: @config.qColor, samples: @entity.qSamples }
|
|
502
598
|
])
|
|
503
599
|
(render-ui main {
|
|
504
600
|
type: box
|
|
@@ -528,17 +624,17 @@ orbital CoupledSimOrbital {
|
|
|
528
624
|
{ type: math-canvas, width: @config.width, height: @config.height, title: "", xMin: 0, xMax: @config.duration, yMin: 0, yMax: @config.valueMax, showAxes: true, showGrid: true, gridStep: @config.gridStep, curves: @entity.curves, points: [], vectors: [], shapes: [], interactive: false, animate: false, keyMap: { Space: TOGGLE_RUN, KeyR: RESET } },
|
|
529
625
|
{ type: stack, direction: vertical, gap: sm, children: [
|
|
530
626
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
531
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
627
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefALabel ": " (math/round @entity.coefA 3)) },
|
|
532
628
|
{ type: range-slider, min: @config.coefAMin, max: @config.coefAMax, step: @config.coefAStep, value: @entity.coefA, showTooltip: true, action: "SET_A" }
|
|
533
629
|
] },
|
|
534
630
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
535
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
631
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.coefBLabel ": " (math/round @entity.coefB 3)) },
|
|
536
632
|
{ type: range-slider, min: @config.coefBMin, max: @config.coefBMax, step: @config.coefBStep, value: @entity.coefB, showTooltip: true, action: "SET_B" }
|
|
537
633
|
] }
|
|
538
634
|
] },
|
|
539
635
|
{ type: stack, direction: vertical, gap: xs, children: [
|
|
540
|
-
{ type: typography, variant: body, content: @
|
|
541
|
-
{ type: typography, variant: caption, color: muted, content: (str/concat @
|
|
636
|
+
{ type: typography, variant: body, content: @entity.taskText },
|
|
637
|
+
{ type: typography, variant: caption, color: muted, content: (str/concat @entity.pLabel " = " (math/round @entity.p 1) " · " @entity.qLabel " = " (math/round @entity.q 1)) }
|
|
542
638
|
] }
|
|
543
639
|
] }
|
|
544
640
|
]
|
|
@@ -555,14 +651,14 @@ orbital CoupledSimOrbital {
|
|
|
555
651
|
(b @entity.coefB)
|
|
556
652
|
(P @entity.p)
|
|
557
653
|
(Q @entity.q)
|
|
558
|
-
(dP (if (== @
|
|
654
|
+
(dP (if (== @entity.kind "predator-prey")
|
|
559
655
|
(- (* @a @P) (* @b @P @Q 0.01))
|
|
560
|
-
(if (== @
|
|
656
|
+
(if (== @entity.kind "epidemic")
|
|
561
657
|
(- 0 (* @a @P @Q 0.01))
|
|
562
658
|
(- 0 (* @a @P)))))
|
|
563
|
-
(dQ (if (== @
|
|
659
|
+
(dQ (if (== @entity.kind "predator-prey")
|
|
564
660
|
(- (* @config.coefC @b @P @Q 0.01) (* @config.coefD @Q))
|
|
565
|
-
(if (== @
|
|
661
|
+
(if (== @entity.kind "epidemic")
|
|
566
662
|
(- (* @a @P @Q 0.01) (* @b @Q))
|
|
567
663
|
(- (* @a @P) (* @b @Q)))))
|
|
568
664
|
(newP (math/max 0 (+ @P (* @dP @dt))))
|
|
@@ -575,8 +671,8 @@ orbital CoupledSimOrbital {
|
|
|
575
671
|
(set @entity.pSamples (array/append @entity.pSamples { x: @entity.t, y: @newP }))
|
|
576
672
|
(set @entity.qSamples (array/append @entity.qSamples { x: @entity.t, y: @newQ }))
|
|
577
673
|
(set @entity.curves [
|
|
578
|
-
{ label: @
|
|
579
|
-
{ label: @
|
|
674
|
+
{ label: @entity.pLabel, color: @config.pColor, samples: @entity.pSamples },
|
|
675
|
+
{ label: @entity.qLabel, color: @config.qColor, samples: @entity.qSamples }
|
|
580
676
|
])
|
|
581
677
|
(set @entity.running (if (>= @entity.t @config.duration) false true))))
|
|
582
678
|
}
|
|
@@ -587,6 +683,19 @@ orbital CoupledSimOrbital {
|
|
|
587
683
|
}
|
|
588
684
|
@description "Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, otherwise renders null."
|
|
589
685
|
@tier "domain"
|
|
686
|
+
ROSTER_LOADED {
|
|
687
|
+
mode : string!
|
|
688
|
+
taskText : string!
|
|
689
|
+
kind : string!
|
|
690
|
+
pLabel : string!
|
|
691
|
+
qLabel : string!
|
|
692
|
+
pStart : number!
|
|
693
|
+
qStart : number!
|
|
694
|
+
coefALabel : string!
|
|
695
|
+
coefBLabel : string!
|
|
696
|
+
}
|
|
697
|
+
@description "Runtime content feed, honoured only when rosterSource is event — mode names the instrument it is for (the matchMode it carries, blank when standalone) and taskText, kind, pLabel, qLabel, pStart, qStart, coefALabel and coefBLabel define the coupled system; a matching instrument re-initialises from it exactly as INIT does from config, any other instrument hides."
|
|
698
|
+
@tier "domain"
|
|
590
699
|
TOGGLE_RUN {
|
|
591
700
|
}
|
|
592
701
|
@description "Learner pressed the Play/Pause toggle — starts or freezes the coupled evolution."
|
|
@@ -656,8 +765,12 @@ orbital CoupledSimOrbital {
|
|
|
656
765
|
config {
|
|
657
766
|
matchMode : string = ""
|
|
658
767
|
@label "Match Mode"
|
|
659
|
-
@description "When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT."
|
|
768
|
+
@description "When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT (or on ROSTER_LOADED when rosterSource is event)."
|
|
660
769
|
@tier "presentation"
|
|
770
|
+
rosterSource : "config" | "event" = "config"
|
|
771
|
+
@label "Roster Source"
|
|
772
|
+
@description "Where the system definition (taskText, kind, pLabel, qLabel, pStart, qStart, coefALabel, coefBLabel) comes from: config reads those knobs at INIT; event waits for ROSTER_LOADED and takes them from its payload."
|
|
773
|
+
@tier "domain"
|
|
661
774
|
title : string = "Coupled System"
|
|
662
775
|
@label "Title"
|
|
663
776
|
@description "The instrument's name, the header's one hero."
|