@origingame/engine 0.4.0 → 0.5.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 (78) hide show
  1. package/dist/web/origin-engine.d.ts +8 -5
  2. package/dist/web/origin-engine.js +39 -19
  3. package/dist/web/origin-engine_bg.wasm +0 -0
  4. package/dist/web/origin-engine_bg.wasm.d.ts +6 -5
  5. package/dist/web-publish/origin-engine-lanes.js +49 -29
  6. package/dist/web-publish/origin-engine-lanes_bg.wasm +0 -0
  7. package/dist/web-publish/origin-engine.d.ts +8 -5
  8. package/dist/web-publish/origin-engine.js +39 -19
  9. package/dist/web-publish/origin-engine_bg.wasm +0 -0
  10. package/dist/web-publish/origin-engine_bg.wasm.d.ts +6 -5
  11. package/dist/web-publish-2d/origin-engine-lanes.js +49 -29
  12. package/dist/web-publish-2d/origin-engine-lanes_bg.wasm +0 -0
  13. package/dist/web-publish-2d/origin-engine.d.ts +8 -5
  14. package/dist/web-publish-2d/origin-engine.js +39 -19
  15. package/dist/web-publish-2d/origin-engine_bg.wasm +0 -0
  16. package/dist/web-publish-2d/origin-engine_bg.wasm.d.ts +6 -5
  17. package/knowledge/looks/catalogue.json +123 -2
  18. package/knowledge/package.json +1 -1
  19. package/knowledge/scaffold/origin-engine.json +2 -2
  20. package/knowledge/scaffold/template/package.json +1 -1
  21. package/knowledge/scaffold/template/project.ogt +1 -1
  22. package/knowledge/scripts/validate.ts +69 -6
  23. package/knowledge/skills/og-audio/SKILL.md +31 -5
  24. package/knowledge/skills/og-build/SKILL.md +44 -4
  25. package/knowledge/skills/og-core/SKILL.md +4 -3
  26. package/knowledge/skills/og-feel/SKILL.md +9 -1
  27. package/knowledge/skills/og-game/SKILL.md +199 -16
  28. package/knowledge/skills/og-platform-sdk/SKILL.md +6 -0
  29. package/knowledge/skills/og-taste/SKILL.md +7 -0
  30. package/knowledge/skills/og-ui/SKILL.md +24 -0
  31. package/knowledge/wiki/ai.md +20 -20
  32. package/knowledge/wiki/anim.md +526 -60
  33. package/knowledge/wiki/atmosphere.md +13 -13
  34. package/knowledge/wiki/audio.md +160 -20
  35. package/knowledge/wiki/camera.md +13 -13
  36. package/knowledge/wiki/commands.md +11 -11
  37. package/knowledge/wiki/debug.md +13 -13
  38. package/knowledge/wiki/game.md +8 -8
  39. package/knowledge/wiki/i18n.md +7 -7
  40. package/knowledge/wiki/index.md +25 -1
  41. package/knowledge/wiki/input.md +47 -47
  42. package/knowledge/wiki/load.md +76 -50
  43. package/knowledge/wiki/math.md +102 -102
  44. package/knowledge/wiki/nav.md +34 -34
  45. package/knowledge/wiki/net.md +10 -10
  46. package/knowledge/wiki/path.md +14 -14
  47. package/knowledge/wiki/physics.md +111 -100
  48. package/knowledge/wiki/platform.md +44 -44
  49. package/knowledge/wiki/probe.md +86 -86
  50. package/knowledge/wiki/reflect.md +17 -17
  51. package/knowledge/wiki/render.md +245 -176
  52. package/knowledge/wiki/rng.md +14 -14
  53. package/knowledge/wiki/shapes.md +26 -26
  54. package/knowledge/wiki/stream.md +15 -15
  55. package/knowledge/wiki/system.md +8 -8
  56. package/knowledge/wiki/systems.md +2 -2
  57. package/knowledge/wiki/terrain.md +19 -19
  58. package/knowledge/wiki/tilemap.md +13 -13
  59. package/knowledge/wiki/time.md +4 -4
  60. package/knowledge/wiki/timeline.md +14 -14
  61. package/knowledge/wiki/transform.md +8 -8
  62. package/knowledge/wiki/tween.md +17 -17
  63. package/knowledge/wiki/ui.md +243 -243
  64. package/knowledge/wiki/video.md +5 -5
  65. package/knowledge/wiki/world.md +36 -36
  66. package/package.json +4 -4
  67. package/schema/api.schema.json +639 -11
  68. package/shell/page.ts +4 -0
  69. package/src/generated/abi.ts +3 -0
  70. package/src/index.ts +11 -0
  71. package/src/node/device.ts +5 -2
  72. package/src/node/polish.ts +34 -15
  73. package/src/node/run.ts +23 -6
  74. package/src/runtime.ts +1 -0
  75. package/src/web/gl-state.ts +907 -0
  76. package/src/web/worker.ts +6 -0
  77. package/types/bindings.json +823 -349
  78. package/types/index.d.ts +650 -15
@@ -18,7 +18,7 @@ module load {
18
18
  # declarations follow, each quoted below
19
19
  ```
20
20
 
21
- <sub>`api.ogt` line 5386</sub>
21
+ <sub>`api.ogt` line 5417</sub>
22
22
 
23
23
  ## Contents
24
24
 
@@ -32,6 +32,8 @@ module load {
32
32
  | [`TextureArray()`](#column-TextureArray) | column kind | A TextureArray handle field (0 is none). |
33
33
  | [`Asset()`](#column-Asset) | column kind | An Asset handle field. |
34
34
  | [`Sound()`](#column-Sound) | column kind | A Sound handle field. |
35
+ | [`Font()`](#column-Font) | column kind | A Font handle field (0 is none): a font og.load.font answered, kept for og.render.text or og.ui.configure. |
36
+ | [`Style()`](#column-Style) | column kind | A Style handle field (0 is none): a UI style og.load.style answered, kept for og.ui.configure. |
35
37
  | [`LoadStatus`](#type-LoadStatus) | enum | Where a load is. |
36
38
  | [`GltfDesc`](#type-GltfDesc) | desc struct | How to load a glTF, as three.js GLTFLoader options where they apply. |
37
39
  | [`GltfInfo`](#type-GltfInfo) | struct | What a loaded glTF holds. |
@@ -104,7 +106,7 @@ fn bundle {
104
106
  }
105
107
  ```
106
108
 
107
- <sub>`api.ogt` line 5525</sub>
109
+ <sub>`api.ogt` line 5570</sub>
108
110
 
109
111
  <a id="fn-bundleInfo"></a>
110
112
 
@@ -134,7 +136,7 @@ fn bundleInfo {
134
136
  }
135
137
  ```
136
138
 
137
- <sub>`api.ogt` line 5532</sub>
139
+ <sub>`api.ogt` line 5577</sub>
138
140
 
139
141
  <a id="fn-defaultBundle"></a>
140
142
 
@@ -162,7 +164,7 @@ fn defaultBundle {
162
164
  }
163
165
  ```
164
166
 
165
- <sub>`api.ogt` line 5539</sub>
167
+ <sub>`api.ogt` line 5584</sub>
166
168
 
167
169
  <a id="fn-gltf"></a>
168
170
 
@@ -197,7 +199,7 @@ fn gltf {
197
199
  }
198
200
  ```
199
201
 
200
- <sub>`api.ogt` line 5545</sub>
202
+ <sub>`api.ogt` line 5590</sub>
201
203
 
202
204
  <a id="fn-scene"></a>
203
205
 
@@ -227,7 +229,7 @@ fn scene {
227
229
  }
228
230
  ```
229
231
 
230
- <sub>`api.ogt` line 5554</sub>
232
+ <sub>`api.ogt` line 5599</sub>
231
233
 
232
234
  <a id="fn-font"></a>
233
235
 
@@ -257,7 +259,7 @@ fn font {
257
259
  }
258
260
  ```
259
261
 
260
- <sub>`api.ogt` line 5561</sub>
262
+ <sub>`api.ogt` line 5606</sub>
261
263
 
262
264
  <a id="fn-fontInfo"></a>
263
265
 
@@ -287,7 +289,7 @@ fn fontInfo {
287
289
  }
288
290
  ```
289
291
 
290
- <sub>`api.ogt` line 5568</sub>
292
+ <sub>`api.ogt` line 5613</sub>
291
293
 
292
294
  <a id="fn-sound"></a>
293
295
 
@@ -320,7 +322,7 @@ fn sound {
320
322
  }
321
323
  ```
322
324
 
323
- <sub>`api.ogt` line 5575</sub>
325
+ <sub>`api.ogt` line 5620</sub>
324
326
 
325
327
  <a id="fn-lut"></a>
326
328
 
@@ -350,7 +352,7 @@ fn lut {
350
352
  }
351
353
  ```
352
354
 
353
- <sub>`api.ogt` line 5583</sub>
355
+ <sub>`api.ogt` line 5628</sub>
354
356
 
355
357
  <a id="fn-environment"></a>
356
358
 
@@ -380,7 +382,7 @@ fn environment {
380
382
  }
381
383
  ```
382
384
 
383
- <sub>`api.ogt` line 5590</sub>
385
+ <sub>`api.ogt` line 5635</sub>
384
386
 
385
387
  <a id="fn-emitter"></a>
386
388
 
@@ -410,7 +412,7 @@ fn emitter {
410
412
  }
411
413
  ```
412
414
 
413
- <sub>`api.ogt` line 5597</sub>
415
+ <sub>`api.ogt` line 5642</sub>
414
416
 
415
417
  <a id="fn-shader"></a>
416
418
 
@@ -440,7 +442,7 @@ fn shader {
440
442
  }
441
443
  ```
442
444
 
443
- <sub>`api.ogt` line 5604</sub>
445
+ <sub>`api.ogt` line 5649</sub>
444
446
 
445
447
  <a id="fn-post"></a>
446
448
 
@@ -470,7 +472,7 @@ fn post {
470
472
  }
471
473
  ```
472
474
 
473
- <sub>`api.ogt` line 5611</sub>
475
+ <sub>`api.ogt` line 5656</sub>
474
476
 
475
477
  <a id="fn-texture"></a>
476
478
 
@@ -503,7 +505,7 @@ fn texture {
503
505
  }
504
506
  ```
505
507
 
506
- <sub>`api.ogt` line 5618</sub>
508
+ <sub>`api.ogt` line 5663</sub>
507
509
 
508
510
  <a id="fn-textureArray"></a>
509
511
 
@@ -536,7 +538,7 @@ fn textureArray {
536
538
  }
537
539
  ```
538
540
 
539
- <sub>`api.ogt` line 5626</sub>
541
+ <sub>`api.ogt` line 5671</sub>
540
542
 
541
543
  <a id="fn-style"></a>
542
544
 
@@ -566,7 +568,7 @@ fn style {
566
568
  }
567
569
  ```
568
570
 
569
- <sub>`api.ogt` line 5634</sub>
571
+ <sub>`api.ogt` line 5679</sub>
570
572
 
571
573
  <a id="fn-look"></a>
572
574
 
@@ -596,7 +598,7 @@ fn look {
596
598
  }
597
599
  ```
598
600
 
599
- <sub>`api.ogt` line 5641</sub>
601
+ <sub>`api.ogt` line 5686</sub>
600
602
 
601
603
  <a id="fn-lookInfo"></a>
602
604
 
@@ -626,7 +628,7 @@ fn lookInfo {
626
628
  }
627
629
  ```
628
630
 
629
- <sub>`api.ogt` line 5648</sub>
631
+ <sub>`api.ogt` line 5693</sub>
630
632
 
631
633
  <a id="fn-palette"></a>
632
634
 
@@ -656,7 +658,7 @@ fn palette {
656
658
  }
657
659
  ```
658
660
 
659
- <sub>`api.ogt` line 5655</sub>
661
+ <sub>`api.ogt` line 5700</sub>
660
662
 
661
663
  <a id="fn-soundInfo"></a>
662
664
 
@@ -686,7 +688,7 @@ fn soundInfo {
686
688
  }
687
689
  ```
688
690
 
689
- <sub>`api.ogt` line 5662</sub>
691
+ <sub>`api.ogt` line 5707</sub>
690
692
 
691
693
  <a id="fn-status"></a>
692
694
 
@@ -716,7 +718,7 @@ fn status {
716
718
  }
717
719
  ```
718
720
 
719
- <sub>`api.ogt` line 5669</sub>
721
+ <sub>`api.ogt` line 5714</sub>
720
722
 
721
723
  <a id="fn-error"></a>
722
724
 
@@ -746,7 +748,7 @@ fn error {
746
748
  }
747
749
  ```
748
750
 
749
- <sub>`api.ogt` line 5676</sub>
751
+ <sub>`api.ogt` line 5721</sub>
750
752
 
751
753
  <a id="fn-gltfInfo"></a>
752
754
 
@@ -776,7 +778,7 @@ fn gltfInfo {
776
778
  }
777
779
  ```
778
780
 
779
- <sub>`api.ogt` line 5683</sub>
781
+ <sub>`api.ogt` line 5728</sub>
780
782
 
781
783
  <a id="fn-animation"></a>
782
784
 
@@ -809,7 +811,7 @@ fn animation {
809
811
  }
810
812
  ```
811
813
 
812
- <sub>`api.ogt` line 5690</sub>
814
+ <sub>`api.ogt` line 5735</sub>
813
815
 
814
816
  <a id="fn-rig"></a>
815
817
 
@@ -839,7 +841,7 @@ fn rig {
839
841
  }
840
842
  ```
841
843
 
842
- <sub>`api.ogt` line 5698</sub>
844
+ <sub>`api.ogt` line 5743</sub>
843
845
 
844
846
  <a id="fn-flipbook"></a>
845
847
 
@@ -869,7 +871,7 @@ fn flipbook {
869
871
  }
870
872
  ```
871
873
 
872
- <sub>`api.ogt` line 5705</sub>
874
+ <sub>`api.ogt` line 5750</sub>
873
875
 
874
876
  <a id="fn-tilemap"></a>
875
877
 
@@ -899,7 +901,7 @@ fn tilemap {
899
901
  }
900
902
  ```
901
903
 
902
- <sub>`api.ogt` line 5712</sub>
904
+ <sub>`api.ogt` line 5757</sub>
903
905
 
904
906
  <a id="fn-video"></a>
905
907
 
@@ -929,7 +931,7 @@ fn video {
929
931
  }
930
932
  ```
931
933
 
932
- <sub>`api.ogt` line 5719</sub>
934
+ <sub>`api.ogt` line 5764</sub>
933
935
 
934
936
  <a id="fn-videoInfo"></a>
935
937
 
@@ -959,7 +961,7 @@ fn videoInfo {
959
961
  }
960
962
  ```
961
963
 
962
- <sub>`api.ogt` line 5726</sub>
964
+ <sub>`api.ogt` line 5771</sub>
963
965
 
964
966
  <a id="fn-timeline"></a>
965
967
 
@@ -989,7 +991,7 @@ fn timeline {
989
991
  }
990
992
  ```
991
993
 
992
- <sub>`api.ogt` line 5733</sub>
994
+ <sub>`api.ogt` line 5778</sub>
993
995
 
994
996
  <a id="fn-rig2d"></a>
995
997
 
@@ -1019,7 +1021,7 @@ fn rig2d {
1019
1021
  }
1020
1022
  ```
1021
1023
 
1022
- <sub>`api.ogt` line 5740</sub>
1024
+ <sub>`api.ogt` line 5785</sub>
1023
1025
 
1024
1026
  ## Components, resources and events
1025
1027
 
@@ -1084,7 +1086,7 @@ component Model {
1084
1086
  }
1085
1087
  ```
1086
1088
 
1087
- <sub>`api.ogt` line 5489</sub>
1089
+ <sub>`api.ogt` line 5534</sub>
1088
1090
 
1089
1091
  <a id="record-AssetReady"></a>
1090
1092
 
@@ -1107,7 +1109,7 @@ event AssetReady {
1107
1109
  }
1108
1110
  ```
1109
1111
 
1110
- <sub>`api.ogt` line 5747</sub>
1112
+ <sub>`api.ogt` line 5792</sub>
1111
1113
 
1112
1114
  <a id="record-AssetFailed"></a>
1113
1115
 
@@ -1132,7 +1134,7 @@ event AssetFailed {
1132
1134
  }
1133
1135
  ```
1134
1136
 
1135
- <sub>`api.ogt` line 5753</sub>
1137
+ <sub>`api.ogt` line 5798</sub>
1136
1138
 
1137
1139
  ## Types
1138
1140
 
@@ -1148,7 +1150,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
1148
1150
  handle Asset "A loaded bundle, scene or glTF asset."
1149
1151
  ```
1150
1152
 
1151
- <sub>`api.ogt` line 5392</sub>
1153
+ <sub>`api.ogt` line 5423</sub>
1152
1154
 
1153
1155
  <a id="type-Font"></a>
1154
1156
 
@@ -1162,7 +1164,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
1162
1164
  handle Font "A cooked MSDF font: its glyph table and one or more atlas pages."
1163
1165
  ```
1164
1166
 
1165
- <sub>`api.ogt` line 5393</sub>
1167
+ <sub>`api.ogt` line 5424</sub>
1166
1168
 
1167
1169
  <a id="type-Sound"></a>
1168
1170
 
@@ -1176,7 +1178,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
1176
1178
  handle Sound "A cooked sound: QOA-encoded PCM the audio module plays."
1177
1179
  ```
1178
1180
 
1179
- <sub>`api.ogt` line 5394</sub>
1181
+ <sub>`api.ogt` line 5425</sub>
1180
1182
 
1181
1183
  <a id="type-Style"></a>
1182
1184
 
@@ -1190,7 +1192,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
1190
1192
  handle Style "A cooked UI style: its values, atlas, fonts, icons and sounds loaded with it, for og.ui.configure."
1191
1193
  ```
1192
1194
 
1193
- <sub>`api.ogt` line 5395</sub>
1195
+ <sub>`api.ogt` line 5426</sub>
1194
1196
 
1195
1197
  <a id="type-TextureArray"></a>
1196
1198
 
@@ -1204,7 +1206,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
1204
1206
  handle TextureArray "A cooked texture array: same-sized layers uploaded as one 2D-array texture (og.load.textureArray)."
1205
1207
  ```
1206
1208
 
1207
- <sub>`api.ogt` line 5396</sub>
1209
+ <sub>`api.ogt` line 5427</sub>
1208
1210
 
1209
1211
  <a id="type-LoadStatus"></a>
1210
1212
 
@@ -1229,7 +1231,7 @@ enum LoadStatus {
1229
1231
  }
1230
1232
  ```
1231
1233
 
1232
- <sub>`api.ogt` line 5419</sub>
1234
+ <sub>`api.ogt` line 5464</sub>
1233
1235
 
1234
1236
  <a id="type-GltfDesc"></a>
1235
1237
 
@@ -1259,7 +1261,7 @@ struct GltfDesc {
1259
1261
  }
1260
1262
  ```
1261
1263
 
1262
- <sub>`api.ogt` line 5426</sub>
1264
+ <sub>`api.ogt` line 5471</sub>
1263
1265
 
1264
1266
  <a id="type-GltfInfo"></a>
1265
1267
 
@@ -1284,7 +1286,7 @@ struct GltfInfo {
1284
1286
  }
1285
1287
  ```
1286
1288
 
1287
- <sub>`api.ogt` line 5438</sub>
1289
+ <sub>`api.ogt` line 5483</sub>
1288
1290
 
1289
1291
  <a id="type-BundleInfo"></a>
1290
1292
 
@@ -1307,7 +1309,7 @@ struct BundleInfo {
1307
1309
  }
1308
1310
  ```
1309
1311
 
1310
- <sub>`api.ogt` line 5446</sub>
1312
+ <sub>`api.ogt` line 5491</sub>
1311
1313
 
1312
1314
  <a id="type-FontInfo"></a>
1313
1315
 
@@ -1340,7 +1342,7 @@ struct FontInfo {
1340
1342
  }
1341
1343
  ```
1342
1344
 
1343
- <sub>`api.ogt` line 5453</sub>
1345
+ <sub>`api.ogt` line 5498</sub>
1344
1346
 
1345
1347
  <a id="type-SoundInfo"></a>
1346
1348
 
@@ -1371,7 +1373,7 @@ struct SoundInfo {
1371
1373
  }
1372
1374
  ```
1373
1375
 
1374
- <sub>`api.ogt` line 5465</sub>
1376
+ <sub>`api.ogt` line 5510</sub>
1375
1377
 
1376
1378
  <a id="type-TextureArrayInfo"></a>
1377
1379
 
@@ -1402,7 +1404,7 @@ struct TextureArrayInfo {
1402
1404
  }
1403
1405
  ```
1404
1406
 
1405
- <sub>`api.ogt` line 5478</sub>
1407
+ <sub>`api.ogt` line 5523</sub>
1406
1408
 
1407
1409
  ## Column kinds
1408
1410
 
@@ -1413,6 +1415,8 @@ Each is a factory, `TextureArray(value?, options?)`, that makes one field of a c
1413
1415
  | <a id="column-TextureArray"></a>`TextureArray` | `TextureArray` | `Uint32Array` | 2 | A TextureArray handle field (0 is none). |
1414
1416
  | <a id="column-Asset"></a>`Asset` | `Asset` | `Uint32Array` | 2 | An Asset handle field. |
1415
1417
  | <a id="column-Sound"></a>`Sound` | `Sound` | `Uint32Array` | 2 | A Sound handle field. |
1418
+ | <a id="column-Font"></a>`Font` | `Font` | `Uint32Array` | 2 | A Font handle field (0 is none): a font og.load.font answered, kept for og.render.text or og.ui.configure. |
1419
+ | <a id="column-Style"></a>`Style` | `Style` | `Uint32Array` | 2 | A Style handle field (0 is none): a UI style og.load.style answered, kept for og.ui.configure. |
1416
1420
 
1417
1421
  ```ogt
1418
1422
  column TextureArray {
@@ -1423,7 +1427,7 @@ column TextureArray {
1423
1427
  }
1424
1428
  ```
1425
1429
 
1426
- <sub>`api.ogt` line 5398</sub>
1430
+ <sub>`api.ogt` line 5429</sub>
1427
1431
 
1428
1432
  ```ogt
1429
1433
  column Asset {
@@ -1434,7 +1438,7 @@ column Asset {
1434
1438
  }
1435
1439
  ```
1436
1440
 
1437
- <sub>`api.ogt` line 5405</sub>
1441
+ <sub>`api.ogt` line 5436</sub>
1438
1442
 
1439
1443
  ```ogt
1440
1444
  column Sound {
@@ -1445,4 +1449,26 @@ column Sound {
1445
1449
  }
1446
1450
  ```
1447
1451
 
1448
- <sub>`api.ogt` line 5412</sub>
1452
+ <sub>`api.ogt` line 5443</sub>
1453
+
1454
+ ```ogt
1455
+ column Font {
1456
+ doc "A Font handle field (0 is none): a font og.load.font answered, kept for og.render.text or og.ui.configure."
1457
+ array Uint32Array
1458
+ stride 2
1459
+ value Font
1460
+ }
1461
+ ```
1462
+
1463
+ <sub>`api.ogt` line 5450</sub>
1464
+
1465
+ ```ogt
1466
+ column Style {
1467
+ doc "A Style handle field (0 is none): a UI style og.load.style answered, kept for og.ui.configure."
1468
+ array Uint32Array
1469
+ stride 2
1470
+ value Style
1471
+ }
1472
+ ```
1473
+
1474
+ <sub>`api.ogt` line 5457</sub>