@almadar/std 16.187.0 → 16.189.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.
Files changed (102) hide show
  1. package/behaviors/lolo/ui/core/.hand-authored.json +4 -4
  2. package/behaviors/lolo/ui/core/atoms/std-board.lolo +138 -4
  3. package/behaviors/lolo/ui/core/atoms/std-browse.lolo +148 -8
  4. package/behaviors/lolo/ui/core/atoms/std-calendar.lolo +161 -11
  5. package/behaviors/lolo/ui/core/atoms/std-event-log.lolo +255 -2
  6. package/behaviors/lolo/ui/core/atoms/std-gallery.lolo +148 -1
  7. package/behaviors/lolo/ui/core/atoms/std-list.lolo +193 -1
  8. package/behaviors/lolo/ui/core/atoms/std-record-detail.lolo +731 -0
  9. package/behaviors/lolo/ui/core/atoms/std-related.lolo +5 -1
  10. package/behaviors/lolo/ui/core/atoms/std-selection.lolo +182 -1
  11. package/behaviors/lolo/ui/core/atoms/std-tree.lolo +113 -3
  12. package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +1 -1
  13. package/behaviors/lolo/ui/core/molecules/ui-document-details.lolo +80 -0
  14. package/behaviors/lolo/ui/core/molecules/ui-document-panel.lolo +213 -0
  15. package/behaviors/lolo/ui/core/molecules/{ui-rich-block-editor.lolo → ui-rich-text-editor.lolo} +25 -25
  16. package/behaviors/lolo/ui/game/atoms/std-area-fill.lolo +93 -0
  17. package/behaviors/lolo/ui/game/atoms/std-choice-gate.lolo +100 -0
  18. package/behaviors/lolo/ui/game/atoms/std-coef-pad.lolo +114 -0
  19. package/behaviors/lolo/ui/game/atoms/std-curve-fog.lolo +50 -0
  20. package/behaviors/lolo/ui/game/atoms/std-loop-lock.lolo +79 -0
  21. package/behaviors/lolo/ui/game/atoms/std-pad-lock.lolo +97 -0
  22. package/behaviors/lolo/ui/game/atoms/std-patrol-hazard.lolo +14 -7
  23. package/behaviors/lolo/ui/game/atoms/std-platformer-body.lolo +48 -5
  24. package/behaviors/lolo/ui/game/atoms/std-velocity-gate.lolo +101 -0
  25. package/behaviors/lolo/ui/game/atoms/std-zone-card.lolo +95 -0
  26. package/behaviors/lolo/ui/game/organisms/std-platformer-board-2d.lolo +9 -0
  27. package/behaviors/registry/infra/atoms/std-approval-gate.orb +16 -8
  28. package/behaviors/registry/infra/atoms/std-cache-aside.orb +62 -31
  29. package/behaviors/registry/infra/atoms/std-circuit-breaker.orb +32 -16
  30. package/behaviors/registry/infra/atoms/std-data-erasure.orb +16 -8
  31. package/behaviors/registry/infra/atoms/std-mod-queue.orb +16 -8
  32. package/behaviors/registry/infra/atoms/std-rate-limiter.orb +28 -14
  33. package/behaviors/registry/infra/organisms/std-status-lifecycle-control.orb +2 -1
  34. package/behaviors/registry/ml/organisms/std-escalating-decision.orb +10 -5
  35. package/behaviors/registry/ml/organisms/std-knowledge-tracing.orb +4 -2
  36. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +2 -1
  37. package/behaviors/registry/ui/core/atoms/std-board.orb +355 -2
  38. package/behaviors/registry/ui/core/atoms/std-browse.orb +304 -31
  39. package/behaviors/registry/ui/core/atoms/std-calendar.orb +393 -25
  40. package/behaviors/registry/ui/core/atoms/std-dashboard-grid-embedded.orb +2 -1
  41. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +4 -2
  42. package/behaviors/registry/ui/core/atoms/std-esign-request.orb +6 -3
  43. package/behaviors/registry/ui/core/atoms/std-event-log.orb +773 -0
  44. package/behaviors/registry/ui/core/atoms/std-export.orb +4 -2
  45. package/behaviors/registry/ui/core/atoms/std-gallery.orb +390 -0
  46. package/behaviors/registry/ui/core/atoms/std-import.orb +4 -2
  47. package/behaviors/registry/ui/core/atoms/std-list.orb +451 -0
  48. package/behaviors/registry/ui/core/atoms/std-record-detail.orb +3360 -0
  49. package/behaviors/registry/ui/core/atoms/std-related.orb +23 -1
  50. package/behaviors/registry/ui/core/atoms/std-selection.orb +436 -0
  51. package/behaviors/registry/ui/core/atoms/std-tree.orb +292 -1
  52. package/behaviors/registry/ui/core/atoms/std-version-history.orb +1 -1
  53. package/behaviors/registry/ui/core/molecules/ui-document-details.orb +342 -0
  54. package/behaviors/registry/ui/core/molecules/ui-document-panel.orb +655 -0
  55. package/behaviors/registry/ui/core/molecules/{ui-rich-block-editor.orb → ui-rich-text-editor.orb} +84 -97
  56. package/behaviors/registry/ui/game/atoms/std-area-fill.orb +955 -0
  57. package/behaviors/registry/ui/game/atoms/std-choice-gate.orb +855 -0
  58. package/behaviors/registry/ui/game/atoms/std-coef-pad.orb +928 -0
  59. package/behaviors/registry/ui/game/atoms/std-curve-fog.orb +337 -0
  60. package/behaviors/registry/ui/game/atoms/std-fx-trail.orb +1 -1
  61. package/behaviors/registry/ui/game/atoms/std-gate-lock.orb +1 -1
  62. package/behaviors/registry/ui/game/atoms/std-lives.orb +1 -1
  63. package/behaviors/registry/ui/game/atoms/std-loop-lock.orb +785 -0
  64. package/behaviors/registry/ui/game/atoms/std-pad-lock.orb +933 -0
  65. package/behaviors/registry/ui/game/atoms/std-patrol-hazard.orb +190 -44
  66. package/behaviors/registry/ui/game/atoms/std-platformer-body.orb +1330 -653
  67. package/behaviors/registry/ui/game/atoms/std-velocity-gate.orb +1040 -0
  68. package/behaviors/registry/ui/game/atoms/std-zone-card.orb +642 -0
  69. package/behaviors/registry/ui/game/organisms/std-arcade-board-3d.orb +8 -4
  70. package/behaviors/registry/ui/game/organisms/std-crew-board-2d.orb +6 -3
  71. package/behaviors/registry/ui/game/organisms/std-dungeon-board-2d.orb +10 -5
  72. package/behaviors/registry/ui/game/organisms/std-market-board-3d.orb +8 -4
  73. package/behaviors/registry/ui/game/organisms/std-objective-board-3d.orb +8 -4
  74. package/behaviors/registry/ui/game/organisms/std-platformer-board-2d.orb +36 -1
  75. package/behaviors/registry/ui/game/organisms/std-survival-board-3d.orb +8 -4
  76. package/behaviors/registry/ui/game/organisms/std-tactics-board-2d.orb +12 -6
  77. package/behaviors/registry/ui/game/organisms/std-tactics-board-3d.orb +8 -4
  78. package/behaviors/registry/ui/game/organisms/std-worldmap-board-2d.orb +6 -3
  79. package/behaviors/registry/ui/learning/atoms/std-learn-slope-probe.orb +1 -1
  80. package/behaviors/registry/ui/marketing/atoms/std-marketing-article.orb +2 -1
  81. package/behaviors/registry/ui/marketing/atoms/std-marketing-footer.orb +2 -1
  82. package/behaviors/registry/ui/marketing/atoms/std-marketing-split.orb +2 -1
  83. package/behaviors/registry/ui/marketing/atoms/std-marketing-stats.orb +2 -1
  84. package/behaviors/registry/ui/marketing/atoms/std-marketing-steps.orb +2 -1
  85. package/behaviors/registry/ui/marketing/atoms/std-marketing-team.orb +2 -1
  86. package/dist/behaviors/exports-reader.js +10971 -6255
  87. package/dist/behaviors/functions/index.d.ts +1205 -256
  88. package/dist/behaviors/functions/index.js +10932 -6245
  89. package/dist/behaviors/index.d.ts +1 -1
  90. package/dist/behaviors/index.js +10972 -6256
  91. package/dist/behaviors/query.js +10971 -6255
  92. package/dist/behaviors-embeddings.hash.json +3 -3
  93. package/dist/behaviors-embeddings.json +485 -469
  94. package/dist/behaviors-registry.json +6125 -2940
  95. package/dist/index.d.ts +1 -1
  96. package/dist/index.js +10972 -6256
  97. package/dist/knob-embeddings.hash.json +3 -3
  98. package/dist/knob-embeddings.json +1 -1
  99. package/dist/registry/factory-signatures.json +1 -1
  100. package/package.json +4 -4
  101. package/behaviors/lolo/ui/core/atoms/std-rich-editor.lolo +0 -790
  102. package/behaviors/registry/ui/core/atoms/std-rich-editor.orb +0 -2225
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "Headless run/jump platformer-physics authority: the SOLE writer of body + fell + hazardId + goalId on side-view boards. Where std-motion-body owns free 2D drift (no collision), this atom owns the platformer contract: every 33ms physics tick it integrates gravity into the body's vertical velocity, steps position in per-second units, and collides the body rect against the config platforms with one-way semantics — a body moving in the gravity direction that overlaps a ground/platform tile lands on its anti-gravity face (vy zeroed, grounded set), while a body moving against gravity passes through, so jumping up through a platform and walking up a staircase both just work. The sign of gravity IS the vertical convention: positive pulls toward +y (screen boards, y down — sprite canvases), negative toward −y (math canvases, y up); jumps always fire against it. Intents: STEER sets horizontal velocity (dir −1/0/1 × moveSpeed, hold-to-run: keydown steers, keyup steers 0), JUMP kicks vertical velocity when grounded, PLACE teleports (spawns, hazard respawns), RESTART reseeds. Emits BODY_MOVED every tick for the render layer (boards that don't subscribe pay nothing), plus the sparse rule signals a board needs to score: BODY_JUMPED, BODY_LANDED (with impact speed), BODY_HAZARD (once per hazard entry, re-arms on exit), BODY_GOAL (same arming), BODY_FELL (once per fall past killY, re-armed by PLACE/RESTART). Curve skating: when config.skate is on and the grounded body comes within skateSnap of the config.skateCurve surface, the body rides the curve — y snaps to the interpolated surface and tangential gravity (g·slope/(1+slope²)) accelerates vx, so the body slides downhill along the graph itself and launches ballistically off its ends; jumping kicks free. Sparse BODY_SKATE_START/BODY_SKATE_END signals fire on engage/disengage so boards can layer fx. Lives, score, and win/lose stay downstream — this atom simulates, it never judges. Renders nothing.",
2
+ "description": "Headless run/jump platformer-physics authority: the SOLE writer of body + fell + hazardId + goalId on side-view boards. Where std-motion-body owns free 2D drift (no collision), this atom owns the platformer contract: every 33ms physics tick it integrates gravity into the body's vertical velocity, steps position in per-second units, and collides the body rect against the config platforms with one-way semantics — a body moving in the gravity direction that overlaps a ground/platform tile lands on its anti-gravity face (vy zeroed, grounded set), while a body moving against gravity passes through, so jumping up through a platform and walking up a staircase both just work. The sign of gravity IS the vertical convention: positive pulls toward +y (screen boards, y down — sprite canvases), negative toward −y (math canvases, y up); jumps always fire against it. Intents: STEER sets horizontal velocity (dir −1/0/1 × moveSpeed, hold-to-run: keydown steers, keyup steers 0), JUMP kicks vertical velocity when grounded, PLACE teleports (spawns, hazard respawns), RESTART reseeds. Emits BODY_MOVED every tick for the render layer (boards that don't subscribe pay nothing), plus the sparse rule signals a board needs to score: BODY_JUMPED, BODY_LANDED (with impact speed), BODY_HAZARD (once per hazard entry, re-arms on exit), BODY_GOAL (same arming), BODY_FELL (once per fall past killY, re-armed by PLACE/RESTART). Drift regions: config.driftRegions lists axis-aligned rects each carrying a constant acceleration (ax, ay) applied with the same 0.033s dt whenever the body's center is inside (empty list = zero behavior change). Curve skating: when config.skate is on and the grounded body comes within skateSnap of the config.skateCurve surface, the body rides the curve — y snaps to the interpolated surface and tangential gravity (g·slope/(1+slope²)) accelerates vx, and the vertical velocity is the tangential projection (s = vx·cos θ, vy = s·sin θ — no discontinuous jumps at sample boundaries), so the body slides downhill along the graph itself and launches ballistically off its ends; jumping kicks free. Sparse BODY_SKATE_START/BODY_SKATE_END signals fire on engage/disengage so boards can layer fx. Lives, score, and win/lose stay downstream — this atom simulates, it never judges. Renders nothing.",
3
3
  "ledger": {
4
4
  "entries": {
5
5
  "ent_01M0H2SJBB5TG61D238AWJW3KC": {
@@ -127,6 +127,15 @@
127
127
  "parent": "trt_01M0H2SJBBCZW9WSQ3YBCVRKM2",
128
128
  "renames": []
129
129
  },
130
+ "evt_01M14AHPKY631TP2R26RP8T02W": {
131
+ "bakedName": "CURVE_MOD_ADD",
132
+ "curName": "CURVE_MOD_ADD",
133
+ "id": "evt_01M14AHPKY631TP2R26RP8T02W",
134
+ "kind": "event",
135
+ "owner": "workspace",
136
+ "parent": "trt_01M0H2SJBBCZW9WSQ3YBCVRKM2",
137
+ "renames": []
138
+ },
130
139
  "orb_01M0H2SJBB6B28C7NXBC5BWW23": {
131
140
  "bakedName": "PlatformerBodyOrbital",
132
141
  "curName": "PlatformerBodyOrbital",
@@ -230,6 +239,41 @@
230
239
  "name": "hazardId",
231
240
  "type": "string"
232
241
  },
242
+ {
243
+ "default": [],
244
+ "items": {
245
+ "properties": {
246
+ "a": {
247
+ "name": "a",
248
+ "required": true,
249
+ "type": "number"
250
+ },
251
+ "h": {
252
+ "name": "h",
253
+ "required": true,
254
+ "type": "number"
255
+ },
256
+ "k": {
257
+ "name": "k",
258
+ "required": true,
259
+ "type": "number"
260
+ },
261
+ "x0": {
262
+ "name": "x0",
263
+ "required": true,
264
+ "type": "number"
265
+ },
266
+ "x1": {
267
+ "name": "x1",
268
+ "required": true,
269
+ "type": "number"
270
+ }
271
+ },
272
+ "type": "object"
273
+ },
274
+ "name": "curveMods",
275
+ "type": "array"
276
+ },
233
277
  {
234
278
  "default": "",
235
279
  "name": "goalId",
@@ -265,6 +309,60 @@
265
309
  {
266
310
  "category": "lifecycle",
267
311
  "config": {
312
+ "curveModsEnabled": {
313
+ "default": false,
314
+ "description": "When true, entity.curveMods reshape the skate surface inside each mod's x-range: the road samples the base curve at (x − h) and applies a·y + k (slope scales by a) — coefficient pads lift/tilt the segment the player is riding. Default off: boards without coef pads pay nothing.",
315
+ "label": "Curve Mods Enabled",
316
+ "tier": "domain",
317
+ "type": "boolean"
318
+ },
319
+ "driftRegions": {
320
+ "default": [],
321
+ "description": "Axis-aligned rects (x0..x1, y0..y1 in world units) each carrying a constant acceleration (ax, ay in units/s²) applied with the physics dt whenever the body's center is inside — winds, currents, gradient pushes. Empty list = zero behavior change.",
322
+ "items": {
323
+ "properties": {
324
+ "ax": {
325
+ "name": "ax",
326
+ "required": true,
327
+ "type": "number"
328
+ },
329
+ "ay": {
330
+ "name": "ay",
331
+ "required": true,
332
+ "type": "number"
333
+ },
334
+ "id": {
335
+ "name": "id",
336
+ "required": true,
337
+ "type": "string"
338
+ },
339
+ "x0": {
340
+ "name": "x0",
341
+ "required": true,
342
+ "type": "number"
343
+ },
344
+ "x1": {
345
+ "name": "x1",
346
+ "required": true,
347
+ "type": "number"
348
+ },
349
+ "y0": {
350
+ "name": "y0",
351
+ "required": true,
352
+ "type": "number"
353
+ },
354
+ "y1": {
355
+ "name": "y1",
356
+ "required": true,
357
+ "type": "number"
358
+ }
359
+ },
360
+ "type": "object"
361
+ },
362
+ "label": "Drift Regions",
363
+ "tier": "domain",
364
+ "type": "[BodyDriftRegion]"
365
+ },
268
366
  "gravity": {
269
367
  "default": 24.0,
270
368
  "description": "Units/s² added to vertical velocity; the SIGN is the vertical convention — positive pulls toward +y (screen boards, y down), negative toward −y (math canvases, y up) — and jumps always fire against it",
@@ -666,6 +764,7 @@
666
764
  "entityContract": {
667
765
  "provides": [
668
766
  "body",
767
+ "curveMods",
669
768
  "fell",
670
769
  "goalId",
671
770
  "hazardId",
@@ -729,6 +828,38 @@
729
828
  }
730
829
  ]
731
830
  },
831
+ {
832
+ "id": "evt_01M14AHPKY631TP2R26RP8T02W",
833
+ "key": "CURVE_MOD_ADD",
834
+ "name": "Curve Mod Add",
835
+ "payloadSchema": [
836
+ {
837
+ "name": "x0",
838
+ "required": true,
839
+ "type": "number"
840
+ },
841
+ {
842
+ "name": "x1",
843
+ "required": true,
844
+ "type": "number"
845
+ },
846
+ {
847
+ "name": "a",
848
+ "required": true,
849
+ "type": "number"
850
+ },
851
+ {
852
+ "name": "h",
853
+ "required": true,
854
+ "type": "number"
855
+ },
856
+ {
857
+ "name": "k",
858
+ "required": true,
859
+ "type": "number"
860
+ }
861
+ ]
862
+ },
732
863
  {
733
864
  "id": "evt_01M0H2SJBBSCEAJH5FZN8AAX45",
734
865
  "key": "RESTART",
@@ -1104,6 +1235,30 @@
1104
1235
  "from": "active",
1105
1236
  "to": "active"
1106
1237
  },
1238
+ {
1239
+ "effects": [
1240
+ [
1241
+ "set",
1242
+ "@entity.curveMods",
1243
+ [
1244
+ "array/append",
1245
+ "@entity.curveMods",
1246
+ {
1247
+ "a": "@payload.a",
1248
+ "h": "@payload.h",
1249
+ "k": "@payload.k",
1250
+ "x0": "@payload.x0",
1251
+ "x1": "@payload.x1"
1252
+ }
1253
+ ]
1254
+ ]
1255
+ ],
1256
+ "event": "CURVE_MOD_ADD",
1257
+ "eventId": "evt_01M14AHPKY631TP2R26RP8T02W",
1258
+ "from": "active",
1259
+ "guard": "@config.curveModsEnabled",
1260
+ "to": "active"
1261
+ },
1107
1262
  {
1108
1263
  "effects": [
1109
1264
  [
@@ -1111,6 +1266,11 @@
1111
1266
  "@entity.body",
1112
1267
  "@config.spawn"
1113
1268
  ],
1269
+ [
1270
+ "set",
1271
+ "@entity.curveMods",
1272
+ []
1273
+ ],
1114
1274
  [
1115
1275
  "set",
1116
1276
  "@entity.fell",
@@ -1163,44 +1323,103 @@
1163
1323
  "let",
1164
1324
  [
1165
1325
  [
1166
- "vy1",
1326
+ "bcx",
1167
1327
  [
1168
- "math/clamp",
1328
+ "+",
1169
1329
  [
1170
- "+",
1171
- "@entity.body.vy",
1172
- [
1173
- "*",
1174
- "@config.gravity",
1175
- 0.033
1176
- ]
1330
+ "object/get",
1331
+ "@entity.body",
1332
+ "x"
1177
1333
  ],
1178
1334
  [
1179
- "-",
1180
- 0.0,
1181
- "@config.maxFallSpeed"
1182
- ],
1183
- "@config.maxFallSpeed"
1335
+ "/",
1336
+ [
1337
+ "object/get",
1338
+ "@entity.body",
1339
+ "width"
1340
+ ],
1341
+ 2.0
1342
+ ]
1184
1343
  ]
1185
- ]
1186
- ],
1187
- [
1188
- "let",
1344
+ ],
1189
1345
  [
1346
+ "bcy",
1190
1347
  [
1191
- "bw",
1348
+ "+",
1192
1349
  [
1193
1350
  "object/get",
1194
1351
  "@entity.body",
1195
- "width"
1352
+ "y"
1353
+ ],
1354
+ [
1355
+ "/",
1356
+ [
1357
+ "object/get",
1358
+ "@entity.body",
1359
+ "height"
1360
+ ],
1361
+ 2.0
1196
1362
  ]
1197
- ],
1363
+ ]
1364
+ ]
1365
+ ],
1366
+ [
1367
+ "let",
1368
+ [
1198
1369
  [
1199
- "bh",
1370
+ "drift",
1200
1371
  [
1201
- "object/get",
1202
- "@entity.body",
1203
- "height"
1372
+ "array/find",
1373
+ "@config.driftRegions",
1374
+ [
1375
+ "fn",
1376
+ "r",
1377
+ [
1378
+ "and",
1379
+ [
1380
+ ">=",
1381
+ "@bcx",
1382
+ [
1383
+ "object/get",
1384
+ "@r",
1385
+ "x0"
1386
+ ]
1387
+ ],
1388
+ [
1389
+ "and",
1390
+ [
1391
+ "<=",
1392
+ "@bcx",
1393
+ [
1394
+ "object/get",
1395
+ "@r",
1396
+ "x1"
1397
+ ]
1398
+ ],
1399
+ [
1400
+ "and",
1401
+ [
1402
+ ">=",
1403
+ "@bcy",
1404
+ [
1405
+ "object/get",
1406
+ "@r",
1407
+ "y0"
1408
+ ]
1409
+ ],
1410
+ [
1411
+ "<=",
1412
+ "@bcy",
1413
+ [
1414
+ "object/get",
1415
+ "@r",
1416
+ "y1"
1417
+ ]
1418
+ ]
1419
+ ]
1420
+ ]
1421
+ ]
1422
+ ]
1204
1423
  ]
1205
1424
  ]
1206
1425
  ],
@@ -1208,20 +1427,37 @@
1208
1427
  "let",
1209
1428
  [
1210
1429
  [
1211
- "nx",
1430
+ "dax",
1212
1431
  [
1213
- "math/clamp",
1432
+ "if",
1214
1433
  [
1215
- "+",
1216
- "@entity.body.x",
1217
- [
1218
- "*",
1219
- "@entity.body.vx",
1220
- 0.033
1221
- ]
1434
+ "==",
1435
+ "@drift",
1436
+ null
1437
+ ],
1438
+ 0.0,
1439
+ [
1440
+ "object/get",
1441
+ "@drift",
1442
+ "ax"
1443
+ ]
1444
+ ]
1445
+ ],
1446
+ [
1447
+ "day",
1448
+ [
1449
+ "if",
1450
+ [
1451
+ "==",
1452
+ "@drift",
1453
+ null
1222
1454
  ],
1223
- "@config.xMin",
1224
- "@config.xMax"
1455
+ 0.0,
1456
+ [
1457
+ "object/get",
1458
+ "@drift",
1459
+ "ay"
1460
+ ]
1225
1461
  ]
1226
1462
  ]
1227
1463
  ],
@@ -1229,15 +1465,28 @@
1229
1465
  "let",
1230
1466
  [
1231
1467
  [
1232
- "ny",
1468
+ "vy1",
1233
1469
  [
1234
- "+",
1235
- "@entity.body.y",
1470
+ "math/clamp",
1236
1471
  [
1237
- "*",
1238
- "@vy1",
1239
- 0.033
1240
- ]
1472
+ "+",
1473
+ "@entity.body.vy",
1474
+ [
1475
+ "*",
1476
+ [
1477
+ "+",
1478
+ "@config.gravity",
1479
+ "@day"
1480
+ ],
1481
+ 0.033
1482
+ ]
1483
+ ],
1484
+ [
1485
+ "-",
1486
+ 0.0,
1487
+ "@config.maxFallSpeed"
1488
+ ],
1489
+ "@config.maxFallSpeed"
1241
1490
  ]
1242
1491
  ]
1243
1492
  ],
@@ -1245,61 +1494,40 @@
1245
1494
  "let",
1246
1495
  [
1247
1496
  [
1248
- "rect",
1249
- {
1250
- "h": "@bh",
1251
- "w": "@bw",
1252
- "x": "@nx",
1253
- "y": "@ny"
1254
- }
1497
+ "bw",
1498
+ [
1499
+ "object/get",
1500
+ "@entity.body",
1501
+ "width"
1502
+ ]
1503
+ ],
1504
+ [
1505
+ "bh",
1506
+ [
1507
+ "object/get",
1508
+ "@entity.body",
1509
+ "height"
1510
+ ]
1255
1511
  ]
1256
1512
  ],
1257
1513
  [
1258
1514
  "let",
1259
1515
  [
1260
1516
  [
1261
- "hit",
1517
+ "nx",
1262
1518
  [
1263
- "array/find",
1264
- "@config.platforms",
1519
+ "math/clamp",
1265
1520
  [
1266
- "fn",
1267
- "p",
1521
+ "+",
1522
+ "@entity.body.x",
1268
1523
  [
1269
- "and",
1270
- [
1271
- "or",
1272
- [
1273
- "==",
1274
- [
1275
- "object/get",
1276
- "@p",
1277
- "type"
1278
- ],
1279
- "ground"
1280
- ],
1281
- [
1282
- "==",
1283
- [
1284
- "object/get",
1285
- "@p",
1286
- "type"
1287
- ],
1288
- "platform"
1289
- ]
1290
- ],
1291
- [
1292
- "geo/aabb-overlap",
1293
- "@rect",
1294
- {
1295
- "h": "@p.height",
1296
- "w": "@p.width",
1297
- "x": "@p.x",
1298
- "y": "@p.y"
1299
- }
1300
- ]
1524
+ "*",
1525
+ "@entity.body.vx",
1526
+ 0.033
1301
1527
  ]
1302
- ]
1528
+ ],
1529
+ "@config.xMin",
1530
+ "@config.xMax"
1303
1531
  ]
1304
1532
  ]
1305
1533
  ],
@@ -1307,22 +1535,14 @@
1307
1535
  "let",
1308
1536
  [
1309
1537
  [
1310
- "landed",
1538
+ "ny",
1311
1539
  [
1312
- "and",
1540
+ "+",
1541
+ "@entity.body.y",
1313
1542
  [
1314
- "!=",
1315
- "@hit",
1316
- null
1317
- ],
1318
- [
1319
- ">",
1320
- [
1321
- "*",
1322
- "@vy1",
1323
- "@gdir"
1324
- ],
1325
- 0.0
1543
+ "*",
1544
+ "@vy1",
1545
+ 0.033
1326
1546
  ]
1327
1547
  ]
1328
1548
  ]
@@ -1331,150 +1551,136 @@
1331
1551
  "let",
1332
1552
  [
1333
1553
  [
1334
- "ny2",
1335
- [
1336
- "if",
1337
- "@landed",
1338
- [
1339
- "if",
1340
- [
1341
- ">",
1342
- "@gdir",
1343
- 0.0
1344
- ],
1345
- [
1346
- "-",
1347
- [
1348
- "object/get",
1349
- "@hit",
1350
- "y"
1351
- ],
1352
- "@bh"
1353
- ],
1354
- [
1355
- "+",
1356
- [
1357
- "object/get",
1358
- "@hit",
1359
- "y"
1360
- ],
1361
- [
1362
- "object/get",
1363
- "@hit",
1364
- "height"
1365
- ]
1366
- ]
1367
- ],
1368
- "@ny"
1369
- ]
1370
- ],
1371
- [
1372
- "vy2",
1373
- [
1374
- "if",
1375
- "@landed",
1376
- 0.0,
1377
- "@vy1"
1378
- ]
1554
+ "rect",
1555
+ {
1556
+ "h": "@bh",
1557
+ "w": "@bw",
1558
+ "x": "@nx",
1559
+ "y": "@ny"
1560
+ }
1379
1561
  ]
1380
1562
  ],
1381
1563
  [
1382
1564
  "let",
1383
1565
  [
1384
1566
  [
1385
- "cx",
1386
- [
1387
- "+",
1388
- "@nx",
1389
- [
1390
- "/",
1391
- "@bw",
1392
- 2.0
1393
- ]
1394
- ]
1395
- ]
1396
- ],
1397
- [
1398
- "let",
1399
- [
1567
+ "hit",
1400
1568
  [
1401
- "inRange",
1569
+ "array/find",
1570
+ "@config.platforms",
1402
1571
  [
1403
- "and",
1404
- "@config.skate",
1572
+ "fn",
1573
+ "p",
1405
1574
  [
1406
1575
  "and",
1407
1576
  [
1408
- ">",
1409
- [
1410
- "array/len",
1411
- "@config.skateCurve"
1412
- ],
1413
- 1.0
1414
- ],
1415
- [
1416
- "and",
1577
+ "or",
1417
1578
  [
1418
- ">=",
1419
- "@cx",
1579
+ "==",
1420
1580
  [
1421
1581
  "object/get",
1422
- [
1423
- "array/first",
1424
- "@config.skateCurve"
1425
- ],
1426
- "x"
1427
- ]
1582
+ "@p",
1583
+ "type"
1584
+ ],
1585
+ "ground"
1428
1586
  ],
1429
1587
  [
1430
- "<",
1431
- "@cx",
1588
+ "==",
1432
1589
  [
1433
1590
  "object/get",
1434
- [
1435
- "array/last",
1436
- "@config.skateCurve"
1437
- ],
1438
- "x"
1439
- ]
1591
+ "@p",
1592
+ "type"
1593
+ ],
1594
+ "platform"
1440
1595
  ]
1596
+ ],
1597
+ [
1598
+ "geo/aabb-overlap",
1599
+ "@rect",
1600
+ {
1601
+ "h": "@p.height",
1602
+ "w": "@p.width",
1603
+ "x": "@p.x",
1604
+ "y": "@p.y"
1605
+ }
1441
1606
  ]
1442
1607
  ]
1443
1608
  ]
1444
1609
  ]
1445
- ],
1610
+ ]
1611
+ ],
1612
+ [
1613
+ "let",
1446
1614
  [
1447
- "let",
1448
1615
  [
1616
+ "landed",
1449
1617
  [
1450
- "leftSamp",
1618
+ "and",
1451
1619
  [
1452
- "if",
1453
- "@inRange",
1454
- [
1455
- "array/last",
1456
- [
1457
- "array/filter",
1458
- "@config.skateCurve",
1620
+ "!=",
1621
+ "@hit",
1622
+ null
1623
+ ],
1624
+ [
1625
+ ">",
1626
+ [
1627
+ "*",
1628
+ "@vy1",
1629
+ "@gdir"
1630
+ ],
1631
+ 0.0
1632
+ ]
1633
+ ]
1634
+ ]
1635
+ ],
1636
+ [
1637
+ "let",
1638
+ [
1639
+ [
1640
+ "ny2",
1641
+ [
1642
+ "if",
1643
+ "@landed",
1644
+ [
1645
+ "if",
1646
+ [
1647
+ ">",
1648
+ "@gdir",
1649
+ 0.0
1650
+ ],
1651
+ [
1652
+ "-",
1459
1653
  [
1460
- "fn",
1461
- "s",
1462
- [
1463
- "<=",
1464
- [
1465
- "object/get",
1466
- "@s",
1467
- "x"
1468
- ],
1469
- "@cx"
1470
- ]
1654
+ "object/get",
1655
+ "@hit",
1656
+ "y"
1657
+ ],
1658
+ "@bh"
1659
+ ],
1660
+ [
1661
+ "+",
1662
+ [
1663
+ "object/get",
1664
+ "@hit",
1665
+ "y"
1666
+ ],
1667
+ [
1668
+ "object/get",
1669
+ "@hit",
1670
+ "height"
1471
1671
  ]
1472
1672
  ]
1473
1673
  ],
1474
- {
1475
- "x": 0.0,
1476
- "y": 0.0
1477
- }
1674
+ "@ny"
1675
+ ]
1676
+ ],
1677
+ [
1678
+ "vy2",
1679
+ [
1680
+ "if",
1681
+ "@landed",
1682
+ 0.0,
1683
+ "@vy1"
1478
1684
  ]
1479
1685
  ]
1480
1686
  ],
@@ -1482,34 +1688,15 @@
1482
1688
  "let",
1483
1689
  [
1484
1690
  [
1485
- "rightSamp",
1691
+ "cx",
1486
1692
  [
1487
- "if",
1488
- "@inRange",
1693
+ "+",
1694
+ "@nx",
1489
1695
  [
1490
- "array/first",
1491
- [
1492
- "array/filter",
1493
- "@config.skateCurve",
1494
- [
1495
- "fn",
1496
- "s",
1497
- [
1498
- ">",
1499
- [
1500
- "object/get",
1501
- "@s",
1502
- "x"
1503
- ],
1504
- "@cx"
1505
- ]
1506
- ]
1507
- ]
1508
- ],
1509
- {
1510
- "x": 1.0,
1511
- "y": 0.0
1512
- }
1696
+ "/",
1697
+ "@bw",
1698
+ 2.0
1699
+ ]
1513
1700
  ]
1514
1701
  ]
1515
1702
  ],
@@ -1517,40 +1704,48 @@
1517
1704
  "let",
1518
1705
  [
1519
1706
  [
1520
- "slope",
1707
+ "inRange",
1521
1708
  [
1522
- "if",
1523
- "@inRange",
1709
+ "and",
1710
+ "@config.skate",
1524
1711
  [
1525
- "/",
1712
+ "and",
1526
1713
  [
1527
- "-",
1714
+ ">",
1528
1715
  [
1529
- "object/get",
1530
- "@rightSamp",
1531
- "y"
1716
+ "array/len",
1717
+ "@config.skateCurve"
1532
1718
  ],
1533
- [
1534
- "object/get",
1535
- "@leftSamp",
1536
- "y"
1537
- ]
1719
+ 1.0
1538
1720
  ],
1539
1721
  [
1540
- "-",
1722
+ "and",
1541
1723
  [
1542
- "object/get",
1543
- "@rightSamp",
1544
- "x"
1724
+ ">=",
1725
+ "@cx",
1726
+ [
1727
+ "object/get",
1728
+ [
1729
+ "array/first",
1730
+ "@config.skateCurve"
1731
+ ],
1732
+ "x"
1733
+ ]
1545
1734
  ],
1546
1735
  [
1547
- "object/get",
1548
- "@leftSamp",
1549
- "x"
1736
+ "<",
1737
+ "@cx",
1738
+ [
1739
+ "object/get",
1740
+ [
1741
+ "array/last",
1742
+ "@config.skateCurve"
1743
+ ],
1744
+ "x"
1745
+ ]
1550
1746
  ]
1551
1747
  ]
1552
- ],
1553
- 0.0
1748
+ ]
1554
1749
  ]
1555
1750
  ]
1556
1751
  ],
@@ -1558,32 +1753,34 @@
1558
1753
  "let",
1559
1754
  [
1560
1755
  [
1561
- "curveY",
1756
+ "leftSamp",
1562
1757
  [
1563
1758
  "if",
1564
1759
  "@inRange",
1565
1760
  [
1566
- "+",
1567
- [
1568
- "object/get",
1569
- "@leftSamp",
1570
- "y"
1571
- ],
1761
+ "array/last",
1572
1762
  [
1573
- "*",
1574
- "@slope",
1763
+ "array/filter",
1764
+ "@config.skateCurve",
1575
1765
  [
1576
- "-",
1577
- "@cx",
1766
+ "fn",
1767
+ "s",
1578
1768
  [
1579
- "object/get",
1580
- "@leftSamp",
1581
- "x"
1769
+ "<=",
1770
+ [
1771
+ "object/get",
1772
+ "@s",
1773
+ "x"
1774
+ ],
1775
+ "@cx"
1582
1776
  ]
1583
1777
  ]
1584
1778
  ]
1585
1779
  ],
1586
- 0.0
1780
+ {
1781
+ "x": 0.0,
1782
+ "y": 0.0
1783
+ }
1587
1784
  ]
1588
1785
  ]
1589
1786
  ],
@@ -1591,15 +1788,34 @@
1591
1788
  "let",
1592
1789
  [
1593
1790
  [
1594
- "movingUp",
1791
+ "rightSamp",
1595
1792
  [
1596
- "<",
1793
+ "if",
1794
+ "@inRange",
1597
1795
  [
1598
- "*",
1599
- "@vy1",
1600
- "@gdir"
1796
+ "array/first",
1797
+ [
1798
+ "array/filter",
1799
+ "@config.skateCurve",
1800
+ [
1801
+ "fn",
1802
+ "s",
1803
+ [
1804
+ ">",
1805
+ [
1806
+ "object/get",
1807
+ "@s",
1808
+ "x"
1809
+ ],
1810
+ "@cx"
1811
+ ]
1812
+ ]
1813
+ ]
1601
1814
  ],
1602
- -0.01
1815
+ {
1816
+ "x": 1.0,
1817
+ "y": 0.0
1818
+ }
1603
1819
  ]
1604
1820
  ]
1605
1821
  ],
@@ -1607,41 +1823,40 @@
1607
1823
  "let",
1608
1824
  [
1609
1825
  [
1610
- "skateNow",
1826
+ "slope",
1611
1827
  [
1612
- "and",
1828
+ "if",
1613
1829
  "@inRange",
1614
1830
  [
1615
- "and",
1831
+ "/",
1616
1832
  [
1617
- "<=",
1833
+ "-",
1618
1834
  [
1619
- "math/abs",
1620
- [
1621
- "-",
1622
- "@ny2",
1623
- "@curveY"
1624
- ]
1835
+ "object/get",
1836
+ "@rightSamp",
1837
+ "y"
1625
1838
  ],
1626
- "@config.skateSnap"
1839
+ [
1840
+ "object/get",
1841
+ "@leftSamp",
1842
+ "y"
1843
+ ]
1627
1844
  ],
1628
1845
  [
1629
- "and",
1846
+ "-",
1630
1847
  [
1631
- "or",
1632
- "@landed",
1633
- "@entity.skating"
1848
+ "object/get",
1849
+ "@rightSamp",
1850
+ "x"
1634
1851
  ],
1635
1852
  [
1636
- "or",
1637
- "@entity.body.grounded",
1638
- [
1639
- "not",
1640
- "@movingUp"
1641
- ]
1853
+ "object/get",
1854
+ "@leftSamp",
1855
+ "x"
1642
1856
  ]
1643
1857
  ]
1644
- ]
1858
+ ],
1859
+ 0.0
1645
1860
  ]
1646
1861
  ]
1647
1862
  ],
@@ -1649,45 +1864,32 @@
1649
1864
  "let",
1650
1865
  [
1651
1866
  [
1652
- "vx2",
1867
+ "curveY",
1653
1868
  [
1654
1869
  "if",
1655
- "@skateNow",
1870
+ "@inRange",
1656
1871
  [
1657
- "math/clamp",
1872
+ "+",
1658
1873
  [
1659
- "+",
1660
- "@entity.body.vx",
1874
+ "object/get",
1875
+ "@leftSamp",
1876
+ "y"
1877
+ ],
1878
+ [
1879
+ "*",
1880
+ "@slope",
1661
1881
  [
1662
- "*",
1882
+ "-",
1883
+ "@cx",
1663
1884
  [
1664
- "/",
1665
- [
1666
- "*",
1667
- "@config.gravity",
1668
- "@slope"
1669
- ],
1670
- [
1671
- "+",
1672
- 1.0,
1673
- [
1674
- "*",
1675
- "@slope",
1676
- "@slope"
1677
- ]
1678
- ]
1679
- ],
1680
- 0.033
1885
+ "object/get",
1886
+ "@leftSamp",
1887
+ "x"
1888
+ ]
1681
1889
  ]
1682
- ],
1683
- [
1684
- "-",
1685
- 0.0,
1686
- "@config.maxFallSpeed"
1687
- ],
1688
- "@config.maxFallSpeed"
1890
+ ]
1689
1891
  ],
1690
- "@entity.body.vx"
1892
+ 0.0
1691
1893
  ]
1692
1894
  ]
1693
1895
  ],
@@ -1695,70 +1897,69 @@
1695
1897
  "let",
1696
1898
  [
1697
1899
  [
1698
- "fy",
1699
- [
1700
- "if",
1701
- "@skateNow",
1702
- "@curveY",
1703
- "@ny2"
1704
- ]
1705
- ],
1706
- [
1707
- "fvy",
1900
+ "curveMod",
1708
1901
  [
1709
1902
  "if",
1710
- "@skateNow",
1711
1903
  [
1712
- "*",
1713
- "@slope",
1714
- "@vx2"
1904
+ "and",
1905
+ "@config.curveModsEnabled",
1906
+ "@inRange"
1715
1907
  ],
1716
- "@vy2"
1717
- ]
1718
- ],
1719
- [
1720
- "fgrounded",
1721
- [
1722
- "or",
1723
- "@landed",
1724
- "@skateNow"
1725
- ]
1726
- ]
1727
- ],
1728
- [
1729
- "let",
1730
- [
1731
- [
1732
- "hazardHit",
1733
1908
  [
1734
1909
  "array/find",
1735
- "@config.platforms",
1910
+ "@entity.curveMods",
1736
1911
  [
1737
1912
  "fn",
1738
- "p",
1913
+ "m",
1739
1914
  [
1740
1915
  "and",
1741
1916
  [
1742
- "==",
1917
+ ">=",
1918
+ "@cx",
1743
1919
  [
1744
1920
  "object/get",
1745
- "@p",
1746
- "type"
1747
- ],
1748
- "hazard"
1921
+ "@m",
1922
+ "x0"
1923
+ ]
1749
1924
  ],
1750
1925
  [
1751
- "geo/aabb-overlap",
1752
- "@rect",
1753
- {
1754
- "h": "@p.height",
1755
- "w": "@p.width",
1756
- "x": "@p.x",
1757
- "y": "@p.y"
1758
- }
1926
+ "<=",
1927
+ "@cx",
1928
+ [
1929
+ "object/get",
1930
+ "@m",
1931
+ "x1"
1932
+ ]
1759
1933
  ]
1760
1934
  ]
1761
1935
  ]
1936
+ ],
1937
+ null
1938
+ ]
1939
+ ]
1940
+ ],
1941
+ [
1942
+ "let",
1943
+ [
1944
+ [
1945
+ "modX",
1946
+ [
1947
+ "if",
1948
+ [
1949
+ "==",
1950
+ "@curveMod",
1951
+ null
1952
+ ],
1953
+ "@cx",
1954
+ [
1955
+ "-",
1956
+ "@cx",
1957
+ [
1958
+ "object/get",
1959
+ "@curveMod",
1960
+ "h"
1961
+ ]
1962
+ ]
1762
1963
  ]
1763
1964
  ]
1764
1965
  ],
@@ -1766,33 +1967,38 @@
1766
1967
  "let",
1767
1968
  [
1768
1969
  [
1769
- "goalHit",
1970
+ "modInRange",
1770
1971
  [
1771
- "array/find",
1772
- "@config.platforms",
1972
+ "and",
1773
1973
  [
1774
- "fn",
1775
- "p",
1974
+ "!=",
1975
+ "@curveMod",
1976
+ null
1977
+ ],
1978
+ [
1979
+ "and",
1776
1980
  [
1777
- "and",
1981
+ ">=",
1982
+ "@modX",
1778
1983
  [
1779
- "==",
1984
+ "object/get",
1780
1985
  [
1781
- "object/get",
1782
- "@p",
1783
- "type"
1986
+ "array/first",
1987
+ "@config.skateCurve"
1784
1988
  ],
1785
- "goal"
1786
- ],
1989
+ "x"
1990
+ ]
1991
+ ],
1992
+ [
1993
+ "<",
1994
+ "@modX",
1787
1995
  [
1788
- "geo/aabb-overlap",
1789
- "@rect",
1790
- {
1791
- "h": "@p.height",
1792
- "w": "@p.width",
1793
- "x": "@p.x",
1794
- "y": "@p.y"
1795
- }
1996
+ "object/get",
1997
+ [
1998
+ "array/last",
1999
+ "@config.skateCurve"
2000
+ ],
2001
+ "x"
1796
2002
  ]
1797
2003
  ]
1798
2004
  ]
@@ -1803,292 +2009,763 @@
1803
2009
  "let",
1804
2010
  [
1805
2011
  [
1806
- "fellNow",
2012
+ "modLeft",
1807
2013
  [
1808
2014
  "if",
2015
+ "@modInRange",
1809
2016
  [
1810
- ">",
1811
- "@gdir",
1812
- 0.0
1813
- ],
1814
- [
1815
- ">",
1816
- "@fy",
1817
- "@config.killY"
2017
+ "array/last",
2018
+ [
2019
+ "array/filter",
2020
+ "@config.skateCurve",
2021
+ [
2022
+ "fn",
2023
+ "s",
2024
+ [
2025
+ "<=",
2026
+ [
2027
+ "object/get",
2028
+ "@s",
2029
+ "x"
2030
+ ],
2031
+ "@modX"
2032
+ ]
2033
+ ]
2034
+ ]
1818
2035
  ],
1819
- [
1820
- "<",
1821
- "@fy",
1822
- "@config.killY"
1823
- ]
2036
+ "@leftSamp"
1824
2037
  ]
1825
2038
  ]
1826
2039
  ],
1827
2040
  [
1828
- "do",
2041
+ "let",
1829
2042
  [
1830
- "set",
1831
- "@entity.body",
1832
2043
  [
1833
- "object/merge",
1834
- "@entity.body",
1835
- {
1836
- "grounded": "@fgrounded",
1837
- "vx": [
1838
- "if",
2044
+ "modRight",
2045
+ [
2046
+ "if",
2047
+ "@modInRange",
2048
+ [
2049
+ "array/first",
1839
2050
  [
1840
- "or",
2051
+ "array/filter",
2052
+ "@config.skateCurve",
1841
2053
  [
1842
- "==",
1843
- "@nx",
1844
- "@config.xMin"
1845
- ],
1846
- [
1847
- "==",
1848
- "@nx",
1849
- "@config.xMax"
2054
+ "fn",
2055
+ "s",
2056
+ [
2057
+ ">",
2058
+ [
2059
+ "object/get",
2060
+ "@s",
2061
+ "x"
2062
+ ],
2063
+ "@modX"
2064
+ ]
1850
2065
  ]
1851
- ],
1852
- 0.0,
1853
- "@vx2"
2066
+ ]
1854
2067
  ],
1855
- "vy": "@fvy",
1856
- "x": "@nx",
1857
- "y": "@fy"
1858
- }
1859
- ]
1860
- ],
1861
- [
1862
- "set",
1863
- "@entity.skating",
1864
- "@skateNow"
1865
- ],
1866
- [
1867
- "if",
1868
- [
1869
- "and",
1870
- "@skateNow",
1871
- [
1872
- "==",
1873
- "@entity.skating",
1874
- false
1875
- ]
1876
- ],
1877
- [
1878
- "emit",
1879
- "BODY_SKATE_START",
1880
- {
1881
- "slope": "@slope",
1882
- "x": "@nx",
1883
- "y": "@fy"
1884
- }
1885
- ],
1886
- null
1887
- ],
1888
- [
1889
- "if",
1890
- [
1891
- "and",
1892
- [
1893
- "==",
1894
- "@skateNow",
1895
- false
1896
- ],
1897
- [
1898
- "==",
1899
- "@entity.skating",
1900
- true
1901
- ]
1902
- ],
1903
- [
1904
- "emit",
1905
- "BODY_SKATE_END",
1906
- {
1907
- "x": "@nx",
1908
- "y": "@fy"
1909
- }
1910
- ],
1911
- null
1912
- ],
1913
- [
1914
- "if",
1915
- [
1916
- "and",
1917
- "@landed",
1918
- [
1919
- "==",
1920
- "@entity.body.grounded",
1921
- false
2068
+ "@rightSamp"
1922
2069
  ]
1923
- ],
1924
- [
1925
- "emit",
1926
- "BODY_LANDED",
1927
- {
1928
- "impact": [
1929
- "*",
1930
- "@vy1",
1931
- "@gdir"
1932
- ],
1933
- "x": "@nx",
1934
- "y": "@fy"
1935
- }
1936
- ],
1937
- null
2070
+ ]
1938
2071
  ],
1939
2072
  [
1940
- "if",
2073
+ "let",
1941
2074
  [
1942
- "!=",
1943
- "@hazardHit",
1944
- null
1945
- ],
1946
- [
1947
- "if",
1948
- [
1949
- "!=",
1950
- "@entity.hazardId",
1951
- [
1952
- "object/get",
1953
- "@hazardHit",
1954
- "id",
1955
- ""
1956
- ]
1957
- ],
1958
2075
  [
1959
- "do",
2076
+ "modSlope",
1960
2077
  [
1961
- "set",
1962
- "@entity.hazardId",
2078
+ "if",
2079
+ "@modInRange",
1963
2080
  [
1964
- "object/get",
1965
- "@hazardHit",
1966
- "id",
1967
- ""
1968
- ]
1969
- ],
1970
- [
1971
- "emit",
1972
- "BODY_HAZARD",
1973
- {
1974
- "id": [
1975
- "object/get",
1976
- "@hazardHit",
1977
- "id",
1978
- ""
2081
+ "/",
2082
+ [
2083
+ "-",
2084
+ [
2085
+ "object/get",
2086
+ "@modRight",
2087
+ "y"
2088
+ ],
2089
+ [
2090
+ "object/get",
2091
+ "@modLeft",
2092
+ "y"
2093
+ ]
1979
2094
  ],
1980
- "x": "@nx",
1981
- "y": "@fy"
1982
- }
2095
+ [
2096
+ "-",
2097
+ [
2098
+ "object/get",
2099
+ "@modRight",
2100
+ "x"
2101
+ ],
2102
+ [
2103
+ "object/get",
2104
+ "@modLeft",
2105
+ "x"
2106
+ ]
2107
+ ]
2108
+ ],
2109
+ "@slope"
1983
2110
  ]
1984
- ],
1985
- null
1986
- ],
1987
- [
1988
- "set",
1989
- "@entity.hazardId",
1990
- ""
1991
- ]
1992
- ],
1993
- [
1994
- "if",
1995
- [
1996
- "!=",
1997
- "@goalHit",
1998
- null
2111
+ ]
1999
2112
  ],
2000
2113
  [
2001
- "if",
2114
+ "let",
2002
2115
  [
2003
- "!=",
2004
- "@entity.goalId",
2005
2116
  [
2006
- "object/get",
2007
- "@goalHit",
2008
- "id",
2009
- ""
2117
+ "modCurveY",
2118
+ [
2119
+ "if",
2120
+ "@modInRange",
2121
+ [
2122
+ "+",
2123
+ [
2124
+ "object/get",
2125
+ "@modLeft",
2126
+ "y"
2127
+ ],
2128
+ [
2129
+ "*",
2130
+ "@modSlope",
2131
+ [
2132
+ "-",
2133
+ "@modX",
2134
+ [
2135
+ "object/get",
2136
+ "@modLeft",
2137
+ "x"
2138
+ ]
2139
+ ]
2140
+ ]
2141
+ ],
2142
+ "@curveY"
2143
+ ]
2010
2144
  ]
2011
2145
  ],
2012
2146
  [
2013
- "do",
2147
+ "let",
2014
2148
  [
2015
- "set",
2016
- "@entity.goalId",
2017
2149
  [
2018
- "object/get",
2019
- "@goalHit",
2020
- "id",
2021
- ""
2150
+ "slope",
2151
+ [
2152
+ "if",
2153
+ [
2154
+ "==",
2155
+ "@curveMod",
2156
+ null
2157
+ ],
2158
+ "@slope",
2159
+ [
2160
+ "*",
2161
+ [
2162
+ "object/get",
2163
+ "@curveMod",
2164
+ "a"
2165
+ ],
2166
+ "@modSlope"
2167
+ ]
2168
+ ]
2022
2169
  ]
2023
2170
  ],
2024
2171
  [
2025
- "emit",
2026
- "BODY_GOAL",
2027
- {
2028
- "id": [
2029
- "object/get",
2030
- "@goalHit",
2031
- "id",
2032
- ""
2172
+ "let",
2173
+ [
2174
+ [
2175
+ "curveY",
2176
+ [
2177
+ "if",
2178
+ [
2179
+ "==",
2180
+ "@curveMod",
2181
+ null
2182
+ ],
2183
+ "@curveY",
2184
+ [
2185
+ "+",
2186
+ [
2187
+ "*",
2188
+ [
2189
+ "object/get",
2190
+ "@curveMod",
2191
+ "a"
2192
+ ],
2193
+ "@modCurveY"
2194
+ ],
2195
+ [
2196
+ "object/get",
2197
+ "@curveMod",
2198
+ "k"
2199
+ ]
2200
+ ]
2201
+ ]
2202
+ ]
2203
+ ],
2204
+ [
2205
+ "let",
2206
+ [
2207
+ [
2208
+ "movingUp",
2209
+ [
2210
+ "<",
2211
+ [
2212
+ "*",
2213
+ "@vy1",
2214
+ "@gdir"
2215
+ ],
2216
+ -0.01
2217
+ ]
2218
+ ]
2033
2219
  ],
2034
- "x": "@nx",
2035
- "y": "@fy"
2036
- }
2220
+ [
2221
+ "let",
2222
+ [
2223
+ [
2224
+ "skateNow",
2225
+ [
2226
+ "and",
2227
+ "@inRange",
2228
+ [
2229
+ "and",
2230
+ [
2231
+ "<=",
2232
+ [
2233
+ "math/abs",
2234
+ [
2235
+ "-",
2236
+ "@ny2",
2237
+ "@curveY"
2238
+ ]
2239
+ ],
2240
+ "@config.skateSnap"
2241
+ ],
2242
+ [
2243
+ "and",
2244
+ [
2245
+ "or",
2246
+ "@landed",
2247
+ "@entity.skating"
2248
+ ],
2249
+ [
2250
+ "or",
2251
+ "@entity.body.grounded",
2252
+ [
2253
+ "not",
2254
+ "@movingUp"
2255
+ ]
2256
+ ]
2257
+ ]
2258
+ ]
2259
+ ]
2260
+ ]
2261
+ ],
2262
+ [
2263
+ "let",
2264
+ [
2265
+ [
2266
+ "vx2",
2267
+ [
2268
+ "if",
2269
+ "@skateNow",
2270
+ [
2271
+ "math/clamp",
2272
+ [
2273
+ "+",
2274
+ "@entity.body.vx",
2275
+ [
2276
+ "*",
2277
+ [
2278
+ "/",
2279
+ [
2280
+ "*",
2281
+ "@config.gravity",
2282
+ "@slope"
2283
+ ],
2284
+ [
2285
+ "+",
2286
+ 1.0,
2287
+ [
2288
+ "*",
2289
+ "@slope",
2290
+ "@slope"
2291
+ ]
2292
+ ]
2293
+ ],
2294
+ 0.033
2295
+ ]
2296
+ ],
2297
+ [
2298
+ "-",
2299
+ 0.0,
2300
+ "@config.maxFallSpeed"
2301
+ ],
2302
+ "@config.maxFallSpeed"
2303
+ ],
2304
+ "@entity.body.vx"
2305
+ ]
2306
+ ]
2307
+ ],
2308
+ [
2309
+ "let",
2310
+ [
2311
+ [
2312
+ "vx3",
2313
+ [
2314
+ "if",
2315
+ [
2316
+ "==",
2317
+ "@drift",
2318
+ null
2319
+ ],
2320
+ "@vx2",
2321
+ [
2322
+ "math/clamp",
2323
+ [
2324
+ "+",
2325
+ "@vx2",
2326
+ [
2327
+ "*",
2328
+ "@dax",
2329
+ 0.033
2330
+ ]
2331
+ ],
2332
+ [
2333
+ "-",
2334
+ 0.0,
2335
+ "@config.maxFallSpeed"
2336
+ ],
2337
+ "@config.maxFallSpeed"
2338
+ ]
2339
+ ]
2340
+ ]
2341
+ ],
2342
+ [
2343
+ "let",
2344
+ [
2345
+ [
2346
+ "fy",
2347
+ [
2348
+ "if",
2349
+ "@skateNow",
2350
+ "@curveY",
2351
+ "@ny2"
2352
+ ]
2353
+ ],
2354
+ [
2355
+ "fvy",
2356
+ [
2357
+ "if",
2358
+ "@skateNow",
2359
+ [
2360
+ "*",
2361
+ [
2362
+ "*",
2363
+ "@vx2",
2364
+ [
2365
+ "math/cos",
2366
+ [
2367
+ "math/atan",
2368
+ "@slope"
2369
+ ]
2370
+ ]
2371
+ ],
2372
+ [
2373
+ "math/sin",
2374
+ [
2375
+ "math/atan",
2376
+ "@slope"
2377
+ ]
2378
+ ]
2379
+ ],
2380
+ "@vy2"
2381
+ ]
2382
+ ],
2383
+ [
2384
+ "fgrounded",
2385
+ [
2386
+ "or",
2387
+ "@landed",
2388
+ "@skateNow"
2389
+ ]
2390
+ ]
2391
+ ],
2392
+ [
2393
+ "let",
2394
+ [
2395
+ [
2396
+ "hazardHit",
2397
+ [
2398
+ "array/find",
2399
+ "@config.platforms",
2400
+ [
2401
+ "fn",
2402
+ "p",
2403
+ [
2404
+ "and",
2405
+ [
2406
+ "==",
2407
+ [
2408
+ "object/get",
2409
+ "@p",
2410
+ "type"
2411
+ ],
2412
+ "hazard"
2413
+ ],
2414
+ [
2415
+ "geo/aabb-overlap",
2416
+ "@rect",
2417
+ {
2418
+ "h": "@p.height",
2419
+ "w": "@p.width",
2420
+ "x": "@p.x",
2421
+ "y": "@p.y"
2422
+ }
2423
+ ]
2424
+ ]
2425
+ ]
2426
+ ]
2427
+ ]
2428
+ ],
2429
+ [
2430
+ "let",
2431
+ [
2432
+ [
2433
+ "goalHit",
2434
+ [
2435
+ "array/find",
2436
+ "@config.platforms",
2437
+ [
2438
+ "fn",
2439
+ "p",
2440
+ [
2441
+ "and",
2442
+ [
2443
+ "==",
2444
+ [
2445
+ "object/get",
2446
+ "@p",
2447
+ "type"
2448
+ ],
2449
+ "goal"
2450
+ ],
2451
+ [
2452
+ "geo/aabb-overlap",
2453
+ "@rect",
2454
+ {
2455
+ "h": "@p.height",
2456
+ "w": "@p.width",
2457
+ "x": "@p.x",
2458
+ "y": "@p.y"
2459
+ }
2460
+ ]
2461
+ ]
2462
+ ]
2463
+ ]
2464
+ ]
2465
+ ],
2466
+ [
2467
+ "let",
2468
+ [
2469
+ [
2470
+ "fellNow",
2471
+ [
2472
+ "if",
2473
+ [
2474
+ ">",
2475
+ "@gdir",
2476
+ 0.0
2477
+ ],
2478
+ [
2479
+ ">",
2480
+ "@fy",
2481
+ "@config.killY"
2482
+ ],
2483
+ [
2484
+ "<",
2485
+ "@fy",
2486
+ "@config.killY"
2487
+ ]
2488
+ ]
2489
+ ]
2490
+ ],
2491
+ [
2492
+ "do",
2493
+ [
2494
+ "set",
2495
+ "@entity.body",
2496
+ [
2497
+ "object/merge",
2498
+ "@entity.body",
2499
+ {
2500
+ "grounded": "@fgrounded",
2501
+ "vx": [
2502
+ "if",
2503
+ [
2504
+ "or",
2505
+ [
2506
+ "==",
2507
+ "@nx",
2508
+ "@config.xMin"
2509
+ ],
2510
+ [
2511
+ "==",
2512
+ "@nx",
2513
+ "@config.xMax"
2514
+ ]
2515
+ ],
2516
+ 0.0,
2517
+ "@vx3"
2518
+ ],
2519
+ "vy": "@fvy",
2520
+ "x": "@nx",
2521
+ "y": "@fy"
2522
+ }
2523
+ ]
2524
+ ],
2525
+ [
2526
+ "set",
2527
+ "@entity.skating",
2528
+ "@skateNow"
2529
+ ],
2530
+ [
2531
+ "if",
2532
+ [
2533
+ "and",
2534
+ "@skateNow",
2535
+ [
2536
+ "==",
2537
+ "@entity.skating",
2538
+ false
2539
+ ]
2540
+ ],
2541
+ [
2542
+ "emit",
2543
+ "BODY_SKATE_START",
2544
+ {
2545
+ "slope": "@slope",
2546
+ "x": "@nx",
2547
+ "y": "@fy"
2548
+ }
2549
+ ],
2550
+ null
2551
+ ],
2552
+ [
2553
+ "if",
2554
+ [
2555
+ "and",
2556
+ [
2557
+ "==",
2558
+ "@skateNow",
2559
+ false
2560
+ ],
2561
+ [
2562
+ "==",
2563
+ "@entity.skating",
2564
+ true
2565
+ ]
2566
+ ],
2567
+ [
2568
+ "emit",
2569
+ "BODY_SKATE_END",
2570
+ {
2571
+ "x": "@nx",
2572
+ "y": "@fy"
2573
+ }
2574
+ ],
2575
+ null
2576
+ ],
2577
+ [
2578
+ "if",
2579
+ [
2580
+ "and",
2581
+ "@landed",
2582
+ [
2583
+ "==",
2584
+ "@entity.body.grounded",
2585
+ false
2586
+ ]
2587
+ ],
2588
+ [
2589
+ "emit",
2590
+ "BODY_LANDED",
2591
+ {
2592
+ "impact": [
2593
+ "*",
2594
+ "@vy1",
2595
+ "@gdir"
2596
+ ],
2597
+ "x": "@nx",
2598
+ "y": "@fy"
2599
+ }
2600
+ ],
2601
+ null
2602
+ ],
2603
+ [
2604
+ "if",
2605
+ [
2606
+ "!=",
2607
+ "@hazardHit",
2608
+ null
2609
+ ],
2610
+ [
2611
+ "if",
2612
+ [
2613
+ "!=",
2614
+ "@entity.hazardId",
2615
+ [
2616
+ "object/get",
2617
+ "@hazardHit",
2618
+ "id",
2619
+ ""
2620
+ ]
2621
+ ],
2622
+ [
2623
+ "do",
2624
+ [
2625
+ "set",
2626
+ "@entity.hazardId",
2627
+ [
2628
+ "object/get",
2629
+ "@hazardHit",
2630
+ "id",
2631
+ ""
2632
+ ]
2633
+ ],
2634
+ [
2635
+ "emit",
2636
+ "BODY_HAZARD",
2637
+ {
2638
+ "id": [
2639
+ "object/get",
2640
+ "@hazardHit",
2641
+ "id",
2642
+ ""
2643
+ ],
2644
+ "x": "@nx",
2645
+ "y": "@fy"
2646
+ }
2647
+ ]
2648
+ ],
2649
+ null
2650
+ ],
2651
+ [
2652
+ "set",
2653
+ "@entity.hazardId",
2654
+ ""
2655
+ ]
2656
+ ],
2657
+ [
2658
+ "if",
2659
+ [
2660
+ "!=",
2661
+ "@goalHit",
2662
+ null
2663
+ ],
2664
+ [
2665
+ "if",
2666
+ [
2667
+ "!=",
2668
+ "@entity.goalId",
2669
+ [
2670
+ "object/get",
2671
+ "@goalHit",
2672
+ "id",
2673
+ ""
2674
+ ]
2675
+ ],
2676
+ [
2677
+ "do",
2678
+ [
2679
+ "set",
2680
+ "@entity.goalId",
2681
+ [
2682
+ "object/get",
2683
+ "@goalHit",
2684
+ "id",
2685
+ ""
2686
+ ]
2687
+ ],
2688
+ [
2689
+ "emit",
2690
+ "BODY_GOAL",
2691
+ {
2692
+ "id": [
2693
+ "object/get",
2694
+ "@goalHit",
2695
+ "id",
2696
+ ""
2697
+ ],
2698
+ "x": "@nx",
2699
+ "y": "@fy"
2700
+ }
2701
+ ]
2702
+ ],
2703
+ null
2704
+ ],
2705
+ [
2706
+ "set",
2707
+ "@entity.goalId",
2708
+ ""
2709
+ ]
2710
+ ],
2711
+ [
2712
+ "if",
2713
+ [
2714
+ "and",
2715
+ "@fellNow",
2716
+ [
2717
+ "==",
2718
+ "@entity.fell",
2719
+ false
2720
+ ]
2721
+ ],
2722
+ [
2723
+ "do",
2724
+ [
2725
+ "set",
2726
+ "@entity.fell",
2727
+ true
2728
+ ],
2729
+ [
2730
+ "emit",
2731
+ "BODY_FELL",
2732
+ {
2733
+ "x": "@nx",
2734
+ "y": "@fy"
2735
+ }
2736
+ ]
2737
+ ],
2738
+ null
2739
+ ],
2740
+ [
2741
+ "emit",
2742
+ "BODY_MOVED",
2743
+ {
2744
+ "grounded": "@fgrounded",
2745
+ "skating": "@skateNow",
2746
+ "speed": [
2747
+ "math/hypot",
2748
+ "@entity.body.vx",
2749
+ "@fvy"
2750
+ ],
2751
+ "vx": "@entity.body.vx",
2752
+ "vy": "@fvy",
2753
+ "x": "@nx",
2754
+ "y": "@fy"
2755
+ }
2756
+ ]
2757
+ ]
2758
+ ]
2759
+ ]
2760
+ ]
2761
+ ]
2762
+ ]
2763
+ ]
2764
+ ]
2765
+ ]
2037
2766
  ]
2038
- ],
2039
- null
2040
- ],
2041
- [
2042
- "set",
2043
- "@entity.goalId",
2044
- ""
2045
- ]
2046
- ],
2047
- [
2048
- "if",
2049
- [
2050
- "and",
2051
- "@fellNow",
2052
- [
2053
- "==",
2054
- "@entity.fell",
2055
- false
2056
- ]
2057
- ],
2058
- [
2059
- "do",
2060
- [
2061
- "set",
2062
- "@entity.fell",
2063
- true
2064
- ],
2065
- [
2066
- "emit",
2067
- "BODY_FELL",
2068
- {
2069
- "x": "@nx",
2070
- "y": "@fy"
2071
- }
2072
2767
  ]
2073
- ],
2074
- null
2075
- ],
2076
- [
2077
- "emit",
2078
- "BODY_MOVED",
2079
- {
2080
- "grounded": "@fgrounded",
2081
- "skating": "@skateNow",
2082
- "speed": [
2083
- "math/hypot",
2084
- "@entity.body.vx",
2085
- "@fvy"
2086
- ],
2087
- "vx": "@entity.body.vx",
2088
- "vy": "@fvy",
2089
- "x": "@nx",
2090
- "y": "@fy"
2091
- }
2768
+ ]
2092
2769
  ]
2093
2770
  ]
2094
2771
  ]
@@ -2133,4 +2810,4 @@
2133
2810
  ],
2134
2811
  "schemaVersion": 1,
2135
2812
  "version": "1.0.0"
2136
- }
2813
+ }