@origingame/engine 0.2.0 → 0.4.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 (118) hide show
  1. package/bin/og.mjs +1 -1
  2. package/dist/web/origin-engine.d.ts +255 -5
  3. package/dist/web/origin-engine.js +1584 -125
  4. package/dist/web/origin-engine_bg.wasm +0 -0
  5. package/dist/web/origin-engine_bg.wasm.d.ts +80 -3
  6. package/dist/web-publish/origin-engine-lanes.js +1288 -82
  7. package/dist/web-publish/origin-engine-lanes_bg.wasm +0 -0
  8. package/dist/web-publish/origin-engine.d.ts +199 -6
  9. package/dist/web-publish/origin-engine.js +1285 -79
  10. package/dist/web-publish/origin-engine_bg.wasm +0 -0
  11. package/dist/web-publish/origin-engine_bg.wasm.d.ts +65 -4
  12. package/dist/web-publish-2d/origin-engine-lanes.js +1285 -79
  13. package/dist/web-publish-2d/origin-engine-lanes_bg.wasm +0 -0
  14. package/dist/web-publish-2d/origin-engine.d.ts +198 -5
  15. package/dist/web-publish-2d/origin-engine.js +1282 -76
  16. package/dist/web-publish-2d/origin-engine_bg.wasm +0 -0
  17. package/dist/web-publish-2d/origin-engine_bg.wasm.d.ts +64 -3
  18. package/knowledge/README.md +2 -1
  19. package/knowledge/guides/three-to-og.md +393 -0
  20. package/knowledge/knowledge.json +2 -1
  21. package/knowledge/looks/catalogue.json +40 -40
  22. package/knowledge/package.json +3 -2
  23. package/knowledge/scaffold/distribution.json +14 -0
  24. package/knowledge/scaffold/origin-engine.json +2 -2
  25. package/knowledge/scaffold/template/README.md +2 -1
  26. package/knowledge/scaffold/template/assets/audio/sting.ogt +10 -0
  27. package/knowledge/scaffold/template/assets/timelines/intro.ogt +101 -0
  28. package/knowledge/scaffold/template/assets/timelines/narration.srt +11 -0
  29. package/knowledge/scaffold/template/host.d.ts +46 -0
  30. package/knowledge/scaffold/template/package.json +1 -1
  31. package/knowledge/scaffold/template/project.ogt +1 -1
  32. package/knowledge/scaffold/template/src/main.ts +1 -1
  33. package/knowledge/scaffold/template/tests/frames.ts +134 -0
  34. package/knowledge/scaffold/template/tests/intro.og.ts +65 -0
  35. package/knowledge/scaffold/template/tests/smoke.og.ts +30 -36
  36. package/knowledge/scaffold/template/tsconfig.json +1 -1
  37. package/knowledge/scripts/mount.ts +2 -1
  38. package/knowledge/scripts/validate.ts +159 -31
  39. package/knowledge/skills/og-audio/SKILL.md +2 -2
  40. package/knowledge/skills/og-build/SKILL.md +29 -7
  41. package/knowledge/skills/og-core/SKILL.md +31 -5
  42. package/knowledge/skills/og-feel/SKILL.md +2 -2
  43. package/knowledge/skills/og-game/SKILL.md +1331 -16
  44. package/knowledge/skills/og-i18n/SKILL.md +7 -7
  45. package/knowledge/skills/og-model/SKILL.md +374 -0
  46. package/knowledge/skills/og-platform-sdk/SKILL.md +2 -1
  47. package/knowledge/skills/og-taste/SKILL.md +82 -73
  48. package/knowledge/skills/og-ui/SKILL.md +80 -58
  49. package/knowledge/wiki/ai.md +20 -20
  50. package/knowledge/wiki/anim.md +392 -41
  51. package/knowledge/wiki/atmosphere.md +36 -13
  52. package/knowledge/wiki/audio.md +18 -18
  53. package/knowledge/wiki/camera.md +19 -13
  54. package/knowledge/wiki/commands.md +19 -13
  55. package/knowledge/wiki/debug.md +414 -0
  56. package/knowledge/wiki/game.md +8 -8
  57. package/knowledge/wiki/i18n.md +7 -7
  58. package/knowledge/wiki/index.md +317 -8
  59. package/knowledge/wiki/input.md +47 -47
  60. package/knowledge/wiki/load.md +238 -70
  61. package/knowledge/wiki/math.md +2607 -0
  62. package/knowledge/wiki/nav.md +34 -34
  63. package/knowledge/wiki/net.md +340 -0
  64. package/knowledge/wiki/path.md +402 -0
  65. package/knowledge/wiki/physics.md +95 -95
  66. package/knowledge/wiki/platform.md +463 -29
  67. package/knowledge/wiki/probe.md +681 -67
  68. package/knowledge/wiki/reflect.md +29 -17
  69. package/knowledge/wiki/render.md +4993 -1998
  70. package/knowledge/wiki/rng.md +14 -14
  71. package/knowledge/wiki/shapes.md +727 -0
  72. package/knowledge/wiki/stream.md +15 -15
  73. package/knowledge/wiki/system.md +8 -8
  74. package/knowledge/wiki/systems.md +2 -2
  75. package/knowledge/wiki/terrain.md +24 -20
  76. package/knowledge/wiki/tilemap.md +13 -13
  77. package/knowledge/wiki/time.md +4 -4
  78. package/knowledge/wiki/timeline.md +396 -0
  79. package/knowledge/wiki/transform.md +8 -8
  80. package/knowledge/wiki/tween.md +17 -17
  81. package/knowledge/wiki/ui.md +560 -654
  82. package/knowledge/wiki/video.md +157 -0
  83. package/knowledge/wiki/world.md +36 -36
  84. package/package.json +4 -3
  85. package/schema/api.schema.json +28151 -19640
  86. package/shell/page.ts +26 -2
  87. package/shell/platform.ts +51 -0
  88. package/shell/player.ts +15 -2
  89. package/shell/transport.ts +6 -0
  90. package/src/depth.ts +71 -0
  91. package/src/e6.ts +32 -1
  92. package/src/env.d.ts +5 -1
  93. package/src/generated/abi.ts +226 -4
  94. package/src/geom.ts +260 -0
  95. package/src/index.ts +32 -4
  96. package/src/light.ts +18 -0
  97. package/src/math.ts +622 -0
  98. package/src/node/index.ts +17 -0
  99. package/src/node/playtest-run.ts +115 -18
  100. package/src/node/polish.ts +13 -3
  101. package/src/node/render.ts +291 -0
  102. package/src/node/run.ts +86 -5
  103. package/src/p2.ts +19 -1
  104. package/src/platform-local.ts +2 -0
  105. package/src/playtest.ts +65 -4
  106. package/src/runtime.ts +100 -9
  107. package/src/targets.ts +28 -0
  108. package/src/trace.ts +169 -0
  109. package/src/ui-kit/huds.ts +34 -34
  110. package/src/ui-kit/menus.ts +12 -12
  111. package/src/ui-kit/settings.ts +11 -2
  112. package/src/ui-kit/store.ts +18 -18
  113. package/src/ui-kit/story.ts +6 -4
  114. package/src/ui-kit/util.ts +8 -8
  115. package/src/web/shell.ts +59 -1
  116. package/src/web/worker.ts +105 -4
  117. package/types/bindings.json +9368 -6619
  118. package/types/index.d.ts +16377 -11520
@@ -18,7 +18,7 @@ module input {
18
18
  # declarations follow, each quoted below
19
19
  ```
20
20
 
21
- <sub>`api.ogt` line 727</sub>
21
+ <sub>`api.ogt` line 1306</sub>
22
22
 
23
23
  ## Contents
24
24
 
@@ -212,7 +212,7 @@ resource Input {
212
212
  }
213
213
  ```
214
214
 
215
- <sub>`api.ogt` line 902</sub>
215
+ <sub>`api.ogt` line 1481</sub>
216
216
 
217
217
  <a id="member-Input-down"></a>
218
218
 
@@ -240,7 +240,7 @@ fn down {
240
240
  }
241
241
  ```
242
242
 
243
- <sub>`api.ogt` line 976</sub>
243
+ <sub>`api.ogt` line 1555</sub>
244
244
 
245
245
  <a id="member-Input-pressed"></a>
246
246
 
@@ -268,7 +268,7 @@ fn pressed {
268
268
  }
269
269
  ```
270
270
 
271
- <sub>`api.ogt` line 981</sub>
271
+ <sub>`api.ogt` line 1560</sub>
272
272
 
273
273
  <a id="member-Input-released"></a>
274
274
 
@@ -296,7 +296,7 @@ fn released {
296
296
  }
297
297
  ```
298
298
 
299
- <sub>`api.ogt` line 986</sub>
299
+ <sub>`api.ogt` line 1565</sub>
300
300
 
301
301
  <a id="member-Input-axis"></a>
302
302
 
@@ -326,7 +326,7 @@ fn axis {
326
326
  }
327
327
  ```
328
328
 
329
- <sub>`api.ogt` line 991</sub>
329
+ <sub>`api.ogt` line 1570</sub>
330
330
 
331
331
  <a id="member-Input-axis2"></a>
332
332
 
@@ -360,7 +360,7 @@ fn axis2 {
360
360
  }
361
361
  ```
362
362
 
363
- <sub>`api.ogt` line 997</sub>
363
+ <sub>`api.ogt` line 1576</sub>
364
364
 
365
365
  <a id="member-Input-buttonDown"></a>
366
366
 
@@ -388,7 +388,7 @@ fn buttonDown {
388
388
  }
389
389
  ```
390
390
 
391
- <sub>`api.ogt` line 1005</sub>
391
+ <sub>`api.ogt` line 1584</sub>
392
392
 
393
393
  <a id="member-Input-buttonPressed"></a>
394
394
 
@@ -416,7 +416,7 @@ fn buttonPressed {
416
416
  }
417
417
  ```
418
418
 
419
- <sub>`api.ogt` line 1010</sub>
419
+ <sub>`api.ogt` line 1589</sub>
420
420
 
421
421
  <a id="member-Input-buttonReleased"></a>
422
422
 
@@ -444,7 +444,7 @@ fn buttonReleased {
444
444
  }
445
445
  ```
446
446
 
447
- <sub>`api.ogt` line 1015</sub>
447
+ <sub>`api.ogt` line 1594</sub>
448
448
 
449
449
  <a id="record-Pointers"></a>
450
450
 
@@ -561,7 +561,7 @@ resource Pointers {
561
561
  }
562
562
  ```
563
563
 
564
- <sub>`api.ogt` line 1022</sub>
564
+ <sub>`api.ogt` line 1601</sub>
565
565
 
566
566
  <a id="member-Pointers-down"></a>
567
567
 
@@ -589,7 +589,7 @@ fn down {
589
589
  }
590
590
  ```
591
591
 
592
- <sub>`api.ogt` line 1077</sub>
592
+ <sub>`api.ogt` line 1656</sub>
593
593
 
594
594
  <a id="member-Pointers-pressed"></a>
595
595
 
@@ -617,7 +617,7 @@ fn pressed {
617
617
  }
618
618
  ```
619
619
 
620
- <sub>`api.ogt` line 1082</sub>
620
+ <sub>`api.ogt` line 1661</sub>
621
621
 
622
622
  <a id="member-Pointers-released"></a>
623
623
 
@@ -645,7 +645,7 @@ fn released {
645
645
  }
646
646
  ```
647
647
 
648
- <sub>`api.ogt` line 1087</sub>
648
+ <sub>`api.ogt` line 1666</sub>
649
649
 
650
650
  <a id="member-Pointers-position"></a>
651
651
 
@@ -673,7 +673,7 @@ fn position {
673
673
  }
674
674
  ```
675
675
 
676
- <sub>`api.ogt` line 1092</sub>
676
+ <sub>`api.ogt` line 1671</sub>
677
677
 
678
678
  <a id="member-Pointers-start"></a>
679
679
 
@@ -701,7 +701,7 @@ fn start {
701
701
  }
702
702
  ```
703
703
 
704
- <sub>`api.ogt` line 1097</sub>
704
+ <sub>`api.ogt` line 1676</sub>
705
705
 
706
706
  <a id="member-Pointers-count"></a>
707
707
 
@@ -724,7 +724,7 @@ fn count {
724
724
  }
725
725
  ```
726
726
 
727
- <sub>`api.ogt` line 1102</sub>
727
+ <sub>`api.ogt` line 1681</sub>
728
728
 
729
729
  <a id="record-Gamepad"></a>
730
730
 
@@ -885,7 +885,7 @@ resource Gamepad {
885
885
  }
886
886
  ```
887
887
 
888
- <sub>`api.ogt` line 1108</sub>
888
+ <sub>`api.ogt` line 1687</sub>
889
889
 
890
890
  <a id="member-Gamepad-connected"></a>
891
891
 
@@ -915,7 +915,7 @@ fn connected {
915
915
  }
916
916
  ```
917
917
 
918
- <sub>`api.ogt` line 1186</sub>
918
+ <sub>`api.ogt` line 1765</sub>
919
919
 
920
920
  <a id="member-Gamepad-down"></a>
921
921
 
@@ -947,7 +947,7 @@ fn down {
947
947
  }
948
948
  ```
949
949
 
950
- <sub>`api.ogt` line 1193</sub>
950
+ <sub>`api.ogt` line 1772</sub>
951
951
 
952
952
  <a id="member-Gamepad-pressed"></a>
953
953
 
@@ -979,7 +979,7 @@ fn pressed {
979
979
  }
980
980
  ```
981
981
 
982
- <sub>`api.ogt` line 1201</sub>
982
+ <sub>`api.ogt` line 1780</sub>
983
983
 
984
984
  <a id="member-Gamepad-released"></a>
985
985
 
@@ -1011,7 +1011,7 @@ fn released {
1011
1011
  }
1012
1012
  ```
1013
1013
 
1014
- <sub>`api.ogt` line 1209</sub>
1014
+ <sub>`api.ogt` line 1788</sub>
1015
1015
 
1016
1016
  <a id="member-Gamepad-axis"></a>
1017
1017
 
@@ -1043,7 +1043,7 @@ fn axis {
1043
1043
  }
1044
1044
  ```
1045
1045
 
1046
- <sub>`api.ogt` line 1217</sub>
1046
+ <sub>`api.ogt` line 1796</sub>
1047
1047
 
1048
1048
  <a id="record-KeyDown"></a>
1049
1049
 
@@ -1071,7 +1071,7 @@ event KeyDown {
1071
1071
  }
1072
1072
  ```
1073
1073
 
1074
- <sub>`api.ogt` line 1227</sub>
1074
+ <sub>`api.ogt` line 1806</sub>
1075
1075
 
1076
1076
  <a id="record-TextInput"></a>
1077
1077
 
@@ -1096,7 +1096,7 @@ event TextInput {
1096
1096
  }
1097
1097
  ```
1098
1098
 
1099
- <sub>`api.ogt` line 1237</sub>
1099
+ <sub>`api.ogt` line 1816</sub>
1100
1100
 
1101
1101
  <a id="record-KeyUp"></a>
1102
1102
 
@@ -1122,7 +1122,7 @@ event KeyUp {
1122
1122
  }
1123
1123
  ```
1124
1124
 
1125
- <sub>`api.ogt` line 1244</sub>
1125
+ <sub>`api.ogt` line 1823</sub>
1126
1126
 
1127
1127
  <a id="record-PointerDown"></a>
1128
1128
 
@@ -1154,7 +1154,7 @@ event PointerDown {
1154
1154
  }
1155
1155
  ```
1156
1156
 
1157
- <sub>`api.ogt` line 1253</sub>
1157
+ <sub>`api.ogt` line 1832</sub>
1158
1158
 
1159
1159
  <a id="record-PointerUp"></a>
1160
1160
 
@@ -1186,7 +1186,7 @@ event PointerUp {
1186
1186
  }
1187
1187
  ```
1188
1188
 
1189
- <sub>`api.ogt` line 1265</sub>
1189
+ <sub>`api.ogt` line 1844</sub>
1190
1190
 
1191
1191
  <a id="record-PointerMove"></a>
1192
1192
 
@@ -1211,7 +1211,7 @@ event PointerMove {
1211
1211
  }
1212
1212
  ```
1213
1213
 
1214
- <sub>`api.ogt` line 1277</sub>
1214
+ <sub>`api.ogt` line 1856</sub>
1215
1215
 
1216
1216
  <a id="record-Wheel"></a>
1217
1217
 
@@ -1234,7 +1234,7 @@ event Wheel {
1234
1234
  }
1235
1235
  ```
1236
1236
 
1237
- <sub>`api.ogt` line 1284</sub>
1237
+ <sub>`api.ogt` line 1863</sub>
1238
1238
 
1239
1239
  <a id="record-A11yAction"></a>
1240
1240
 
@@ -1257,7 +1257,7 @@ event A11yAction {
1257
1257
  }
1258
1258
  ```
1259
1259
 
1260
- <sub>`api.ogt` line 1290</sub>
1260
+ <sub>`api.ogt` line 1869</sub>
1261
1261
 
1262
1262
  ## Types
1263
1263
 
@@ -1312,7 +1312,7 @@ enum GamepadButton {
1312
1312
  }
1313
1313
  ```
1314
1314
 
1315
- <sub>`api.ogt` line 736</sub>
1315
+ <sub>`api.ogt` line 1315</sub>
1316
1316
 
1317
1317
  <a id="type-GamepadAxis"></a>
1318
1318
 
@@ -1343,7 +1343,7 @@ enum GamepadAxis {
1343
1343
  }
1344
1344
  ```
1345
1345
 
1346
- <sub>`api.ogt` line 757</sub>
1346
+ <sub>`api.ogt` line 1336</sub>
1347
1347
 
1348
1348
  <a id="type-KeyAction"></a>
1349
1349
 
@@ -1368,7 +1368,7 @@ enum KeyAction {
1368
1368
  }
1369
1369
  ```
1370
1370
 
1371
- <sub>`api.ogt` line 767</sub>
1371
+ <sub>`api.ogt` line 1346</sub>
1372
1372
 
1373
1373
  <a id="type-PointerAction"></a>
1374
1374
 
@@ -1395,7 +1395,7 @@ enum PointerAction {
1395
1395
  }
1396
1396
  ```
1397
1397
 
1398
- <sub>`api.ogt` line 774</sub>
1398
+ <sub>`api.ogt` line 1353</sub>
1399
1399
 
1400
1400
  <a id="type-PointerButton"></a>
1401
1401
 
@@ -1422,7 +1422,7 @@ enum PointerButton {
1422
1422
  }
1423
1423
  ```
1424
1424
 
1425
- <sub>`api.ogt` line 782</sub>
1425
+ <sub>`api.ogt` line 1361</sub>
1426
1426
 
1427
1427
  <a id="type-Modifiers"></a>
1428
1428
 
@@ -1447,7 +1447,7 @@ struct Modifiers {
1447
1447
  }
1448
1448
  ```
1449
1449
 
1450
- <sub>`api.ogt` line 790</sub>
1450
+ <sub>`api.ogt` line 1369</sub>
1451
1451
 
1452
1452
  <a id="type-KeyInput"></a>
1453
1453
 
@@ -1478,7 +1478,7 @@ struct KeyInput {
1478
1478
  }
1479
1479
  ```
1480
1480
 
1481
- <sub>`api.ogt` line 798</sub>
1481
+ <sub>`api.ogt` line 1377</sub>
1482
1482
 
1483
1483
  <a id="type-PointerInput"></a>
1484
1484
 
@@ -1518,7 +1518,7 @@ struct PointerInput {
1518
1518
  }
1519
1519
  ```
1520
1520
 
1521
- <sub>`api.ogt` line 812</sub>
1521
+ <sub>`api.ogt` line 1391</sub>
1522
1522
 
1523
1523
  <a id="type-GamepadInput"></a>
1524
1524
 
@@ -1556,7 +1556,7 @@ struct GamepadInput {
1556
1556
  }
1557
1557
  ```
1558
1558
 
1559
- <sub>`api.ogt` line 833</sub>
1559
+ <sub>`api.ogt` line 1412</sub>
1560
1560
 
1561
1561
  <a id="type-WheelInput"></a>
1562
1562
 
@@ -1589,7 +1589,7 @@ struct WheelInput {
1589
1589
  }
1590
1590
  ```
1591
1591
 
1592
- <sub>`api.ogt` line 853</sub>
1592
+ <sub>`api.ogt` line 1432</sub>
1593
1593
 
1594
1594
  <a id="type-TextEntry"></a>
1595
1595
 
@@ -1612,7 +1612,7 @@ struct TextEntry {
1612
1612
  }
1613
1613
  ```
1614
1614
 
1615
- <sub>`api.ogt` line 869</sub>
1615
+ <sub>`api.ogt` line 1448</sub>
1616
1616
 
1617
1617
  <a id="type-A11yActionKind"></a>
1618
1618
 
@@ -1639,7 +1639,7 @@ enum A11yActionKind {
1639
1639
  }
1640
1640
  ```
1641
1641
 
1642
- <sub>`api.ogt` line 877</sub>
1642
+ <sub>`api.ogt` line 1456</sub>
1643
1643
 
1644
1644
  <a id="type-A11yRequest"></a>
1645
1645
 
@@ -1660,7 +1660,7 @@ struct A11yRequest {
1660
1660
  }
1661
1661
  ```
1662
1662
 
1663
- <sub>`api.ogt` line 885</sub>
1663
+ <sub>`api.ogt` line 1464</sub>
1664
1664
 
1665
1665
  <a id="type-InjectedInput"></a>
1666
1666
 
@@ -1692,7 +1692,7 @@ union InjectedInput {
1692
1692
  }
1693
1693
  ```
1694
1694
 
1695
- <sub>`api.ogt` line 891</sub>
1695
+ <sub>`api.ogt` line 1470</sub>
1696
1696
 
1697
1697
  ## Constants
1698
1698
 
@@ -1705,10 +1705,10 @@ union InjectedInput {
1705
1705
  const MAX_POINTERS u32 5 "The most pointers og.Pointers tracks at once: ids 0 (the primary pointer) to 4."
1706
1706
  ```
1707
1707
 
1708
- <sub>`api.ogt` line 733</sub>
1708
+ <sub>`api.ogt` line 1312</sub>
1709
1709
 
1710
1710
  ```ogt
1711
1711
  const MAX_GAMEPADS u32 4 "The most gamepads og.Gamepad reads: pads 0 to 3."
1712
1712
  ```
1713
1713
 
1714
- <sub>`api.ogt` line 734</sub>
1714
+ <sub>`api.ogt` line 1313</sub>