@origingame/engine 0.3.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 (84) hide show
  1. package/dist/web/origin-engine.d.ts +38 -2
  2. package/dist/web/origin-engine.js +250 -10
  3. package/dist/web/origin-engine_bg.wasm +0 -0
  4. package/dist/web/origin-engine_bg.wasm.d.ts +14 -2
  5. package/dist/web-publish/origin-engine-lanes.js +255 -34
  6. package/dist/web-publish/origin-engine-lanes_bg.wasm +0 -0
  7. package/dist/web-publish/origin-engine.d.ts +39 -3
  8. package/dist/web-publish/origin-engine.js +253 -32
  9. package/dist/web-publish/origin-engine_bg.wasm +0 -0
  10. package/dist/web-publish/origin-engine_bg.wasm.d.ts +15 -3
  11. package/dist/web-publish-2d/origin-engine-lanes.js +253 -32
  12. package/dist/web-publish-2d/origin-engine-lanes_bg.wasm +0 -0
  13. package/dist/web-publish-2d/origin-engine.d.ts +38 -2
  14. package/dist/web-publish-2d/origin-engine.js +250 -29
  15. package/dist/web-publish-2d/origin-engine_bg.wasm +0 -0
  16. package/dist/web-publish-2d/origin-engine_bg.wasm.d.ts +14 -2
  17. package/knowledge/README.md +2 -1
  18. package/knowledge/guides/three-to-og.md +393 -0
  19. package/knowledge/knowledge.json +2 -1
  20. package/knowledge/package.json +3 -2
  21. package/knowledge/scaffold/origin-engine.json +2 -2
  22. package/knowledge/scaffold/template/package.json +1 -1
  23. package/knowledge/scaffold/template/project.ogt +1 -1
  24. package/knowledge/scripts/validate.ts +140 -21
  25. package/knowledge/skills/og-audio/SKILL.md +2 -2
  26. package/knowledge/skills/og-build/SKILL.md +22 -3
  27. package/knowledge/skills/og-core/SKILL.md +20 -5
  28. package/knowledge/skills/og-feel/SKILL.md +2 -2
  29. package/knowledge/skills/og-game/SKILL.md +481 -35
  30. package/knowledge/skills/og-i18n/SKILL.md +7 -7
  31. package/knowledge/skills/og-model/SKILL.md +374 -0
  32. package/knowledge/skills/og-platform-sdk/SKILL.md +1 -1
  33. package/knowledge/skills/og-ui/SKILL.md +15 -8
  34. package/knowledge/wiki/ai.md +20 -20
  35. package/knowledge/wiki/anim.md +63 -55
  36. package/knowledge/wiki/atmosphere.md +13 -13
  37. package/knowledge/wiki/audio.md +18 -18
  38. package/knowledge/wiki/camera.md +13 -13
  39. package/knowledge/wiki/commands.md +11 -11
  40. package/knowledge/wiki/debug.md +13 -13
  41. package/knowledge/wiki/game.md +8 -8
  42. package/knowledge/wiki/i18n.md +7 -7
  43. package/knowledge/wiki/index.md +57 -3
  44. package/knowledge/wiki/input.md +47 -47
  45. package/knowledge/wiki/load.md +57 -57
  46. package/knowledge/wiki/nav.md +34 -34
  47. package/knowledge/wiki/net.md +10 -10
  48. package/knowledge/wiki/path.md +14 -14
  49. package/knowledge/wiki/physics.md +95 -95
  50. package/knowledge/wiki/platform.md +44 -44
  51. package/knowledge/wiki/probe.md +86 -86
  52. package/knowledge/wiki/reflect.md +16 -4
  53. package/knowledge/wiki/render.md +1168 -170
  54. package/knowledge/wiki/rng.md +14 -14
  55. package/knowledge/wiki/shapes.md +727 -0
  56. package/knowledge/wiki/stream.md +15 -15
  57. package/knowledge/wiki/system.md +8 -8
  58. package/knowledge/wiki/systems.md +2 -2
  59. package/knowledge/wiki/terrain.md +24 -20
  60. package/knowledge/wiki/tilemap.md +13 -13
  61. package/knowledge/wiki/time.md +4 -4
  62. package/knowledge/wiki/timeline.md +14 -14
  63. package/knowledge/wiki/transform.md +8 -8
  64. package/knowledge/wiki/tween.md +17 -17
  65. package/knowledge/wiki/ui.md +245 -269
  66. package/knowledge/wiki/video.md +5 -5
  67. package/knowledge/wiki/world.md +36 -36
  68. package/package.json +4 -4
  69. package/schema/api.schema.json +1834 -305
  70. package/shell/platform.ts +5 -0
  71. package/shell/player.ts +8 -2
  72. package/shell/transport.ts +6 -0
  73. package/src/generated/abi.ts +37 -1
  74. package/src/geom.ts +260 -0
  75. package/src/index.ts +8 -1
  76. package/src/node/playtest-run.ts +1 -0
  77. package/src/platform-local.ts +2 -0
  78. package/src/playtest.ts +8 -0
  79. package/src/runtime.ts +87 -6
  80. package/src/ui-kit/settings.ts +9 -0
  81. package/src/web/shell.ts +1 -1
  82. package/src/web/worker.ts +2 -2
  83. package/types/bindings.json +697 -402
  84. package/types/index.d.ts +1045 -127
@@ -18,7 +18,7 @@ module nav {
18
18
  # declarations follow, each quoted below
19
19
  ```
20
20
 
21
- <sub>`api.ogt` line 8459</sub>
21
+ <sub>`api.ogt` line 9032</sub>
22
22
 
23
23
  ## Contents
24
24
 
@@ -88,7 +88,7 @@ fn grid {
88
88
  }
89
89
  ```
90
90
 
91
- <sub>`api.ogt` line 8815</sub>
91
+ <sub>`api.ogt` line 9388</sub>
92
92
 
93
93
  <a id="fn-gridFromTilemap"></a>
94
94
 
@@ -118,7 +118,7 @@ fn gridFromTilemap {
118
118
  }
119
119
  ```
120
120
 
121
- <sub>`api.ogt` line 8822</sub>
121
+ <sub>`api.ogt` line 9395</sub>
122
122
 
123
123
  <a id="fn-setCost"></a>
124
124
 
@@ -154,7 +154,7 @@ fn setCost {
154
154
  }
155
155
  ```
156
156
 
157
- <sub>`api.ogt` line 8829</sub>
157
+ <sub>`api.ogt` line 9402</sub>
158
158
 
159
159
  <a id="fn-cellAt"></a>
160
160
 
@@ -186,7 +186,7 @@ fn cellAt {
186
186
  }
187
187
  ```
188
188
 
189
- <sub>`api.ogt` line 8839</sub>
189
+ <sub>`api.ogt` line 9412</sub>
190
190
 
191
191
  <a id="fn-findPath"></a>
192
192
 
@@ -216,7 +216,7 @@ fn findPath {
216
216
  }
217
217
  ```
218
218
 
219
- <sub>`api.ogt` line 8847</sub>
219
+ <sub>`api.ogt` line 9420</sub>
220
220
 
221
221
  <a id="fn-flowField"></a>
222
222
 
@@ -246,7 +246,7 @@ fn flowField {
246
246
  }
247
247
  ```
248
248
 
249
- <sub>`api.ogt` line 8854</sub>
249
+ <sub>`api.ogt` line 9427</sub>
250
250
 
251
251
  <a id="fn-setFlowTargets"></a>
252
252
 
@@ -278,7 +278,7 @@ fn setFlowTargets {
278
278
  }
279
279
  ```
280
280
 
281
- <sub>`api.ogt` line 8861</sub>
281
+ <sub>`api.ogt` line 9434</sub>
282
282
 
283
283
  <a id="fn-flowAt"></a>
284
284
 
@@ -310,7 +310,7 @@ fn flowAt {
310
310
  }
311
311
  ```
312
312
 
313
- <sub>`api.ogt` line 8869</sub>
313
+ <sub>`api.ogt` line 9442</sub>
314
314
 
315
315
  <a id="fn-load"></a>
316
316
 
@@ -340,7 +340,7 @@ fn load {
340
340
  }
341
341
  ```
342
342
 
343
- <sub>`api.ogt` line 8877</sub>
343
+ <sub>`api.ogt` line 9450</sub>
344
344
 
345
345
  <a id="fn-build"></a>
346
346
 
@@ -370,7 +370,7 @@ fn build {
370
370
  }
371
371
  ```
372
372
 
373
- <sub>`api.ogt` line 8884</sub>
373
+ <sub>`api.ogt` line 9457</sub>
374
374
 
375
375
  <a id="fn-setObstacle"></a>
376
376
 
@@ -406,7 +406,7 @@ fn setObstacle {
406
406
  }
407
407
  ```
408
408
 
409
- <sub>`api.ogt` line 8891</sub>
409
+ <sub>`api.ogt` line 9464</sub>
410
410
 
411
411
  <a id="fn-nearest"></a>
412
412
 
@@ -442,7 +442,7 @@ fn nearest {
442
442
  }
443
443
  ```
444
444
 
445
- <sub>`api.ogt` line 8902</sub>
445
+ <sub>`api.ogt` line 9475</sub>
446
446
 
447
447
  <a id="fn-pathOf"></a>
448
448
 
@@ -472,7 +472,7 @@ fn pathOf {
472
472
  }
473
473
  ```
474
474
 
475
- <sub>`api.ogt` line 8913</sub>
475
+ <sub>`api.ogt` line 9486</sub>
476
476
 
477
477
  ## Components, resources and events
478
478
 
@@ -593,7 +593,7 @@ component NavAgent {
593
593
  }
594
594
  ```
595
595
 
596
- <sub>`api.ogt` line 8486</sub>
596
+ <sub>`api.ogt` line 9059</sub>
597
597
 
598
598
  <a id="record-Steering"></a>
599
599
 
@@ -720,7 +720,7 @@ component Steering {
720
720
  }
721
721
  ```
722
722
 
723
- <sub>`api.ogt` line 8571</sub>
723
+ <sub>`api.ogt` line 9144</sub>
724
724
 
725
725
  ## Types
726
726
 
@@ -736,7 +736,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
736
736
  handle Navigation "A grid, a navmesh or a flow field agents plan on."
737
737
  ```
738
738
 
739
- <sub>`api.ogt` line 8465</sub>
739
+ <sub>`api.ogt` line 9038</sub>
740
740
 
741
741
  <a id="type-NavAlgorithm"></a>
742
742
 
@@ -759,7 +759,7 @@ enum NavAlgorithm {
759
759
  }
760
760
  ```
761
761
 
762
- <sub>`api.ogt` line 8480</sub>
762
+ <sub>`api.ogt` line 9053</sub>
763
763
 
764
764
  <a id="type-NavGridDesc"></a>
765
765
 
@@ -804,7 +804,7 @@ struct NavGridDesc {
804
804
  }
805
805
  ```
806
806
 
807
- <sub>`api.ogt` line 8665</sub>
807
+ <sub>`api.ogt` line 9238</sub>
808
808
 
809
809
  <a id="type-TilemapGridDesc"></a>
810
810
 
@@ -832,7 +832,7 @@ struct TilemapGridDesc {
832
832
  }
833
833
  ```
834
834
 
835
- <sub>`api.ogt` line 8690</sub>
835
+ <sub>`api.ogt` line 9263</sub>
836
836
 
837
837
  <a id="type-NavCell"></a>
838
838
 
@@ -855,7 +855,7 @@ struct NavCell {
855
855
  }
856
856
  ```
857
857
 
858
- <sub>`api.ogt` line 8700</sub>
858
+ <sub>`api.ogt` line 9273</sub>
859
859
 
860
860
  <a id="type-PathDesc"></a>
861
861
 
@@ -897,7 +897,7 @@ struct PathDesc {
897
897
  }
898
898
  ```
899
899
 
900
- <sub>`api.ogt` line 8707</sub>
900
+ <sub>`api.ogt` line 9280</sub>
901
901
 
902
902
  <a id="type-NavPath"></a>
903
903
 
@@ -926,7 +926,7 @@ struct NavPath {
926
926
  }
927
927
  ```
928
928
 
929
- <sub>`api.ogt` line 8728</sub>
929
+ <sub>`api.ogt` line 9301</sub>
930
930
 
931
931
  <a id="type-FlowDesc"></a>
932
932
 
@@ -950,7 +950,7 @@ struct FlowDesc {
950
950
  }
951
951
  ```
952
952
 
953
- <sub>`api.ogt` line 8739</sub>
953
+ <sub>`api.ogt` line 9312</sub>
954
954
 
955
955
  <a id="type-NavBox"></a>
956
956
 
@@ -978,7 +978,7 @@ struct NavBox {
978
978
  }
979
979
  ```
980
980
 
981
- <sub>`api.ogt` line 8746</sub>
981
+ <sub>`api.ogt` line 9319</sub>
982
982
 
983
983
  <a id="type-NavMeshDesc"></a>
984
984
 
@@ -1036,7 +1036,7 @@ struct NavMeshDesc {
1036
1036
  }
1037
1037
  ```
1038
1038
 
1039
- <sub>`api.ogt` line 8757</sub>
1039
+ <sub>`api.ogt` line 9330</sub>
1040
1040
 
1041
1041
  <a id="type-NavMeshInfo"></a>
1042
1042
 
@@ -1071,7 +1071,7 @@ struct NavMeshInfo {
1071
1071
  }
1072
1072
  ```
1073
1073
 
1074
- <sub>`api.ogt` line 8793</sub>
1074
+ <sub>`api.ogt` line 9366</sub>
1075
1075
 
1076
1076
  <a id="type-NavRebuild"></a>
1077
1077
 
@@ -1092,7 +1092,7 @@ struct NavRebuild {
1092
1092
  }
1093
1093
  ```
1094
1094
 
1095
- <sub>`api.ogt` line 8809</sub>
1095
+ <sub>`api.ogt` line 9382</sub>
1096
1096
 
1097
1097
  ## Column kinds
1098
1098
 
@@ -1111,7 +1111,7 @@ column Navigation {
1111
1111
  }
1112
1112
  ```
1113
1113
 
1114
- <sub>`api.ogt` line 8467</sub>
1114
+ <sub>`api.ogt` line 9040</sub>
1115
1115
 
1116
1116
  ## Constants
1117
1117
 
@@ -1127,28 +1127,28 @@ column Navigation {
1127
1127
  const NAV_IDLE u32 0 "NavAgent.status: not seeking."
1128
1128
  ```
1129
1129
 
1130
- <sub>`api.ogt` line 8474</sub>
1130
+ <sub>`api.ogt` line 9047</sub>
1131
1131
 
1132
1132
  ```ogt
1133
1133
  const NAV_MOVING u32 1 "NavAgent.status: following a path or a flow field."
1134
1134
  ```
1135
1135
 
1136
- <sub>`api.ogt` line 8475</sub>
1136
+ <sub>`api.ogt` line 9048</sub>
1137
1137
 
1138
1138
  ```ogt
1139
1139
  const NAV_ARRIVED u32 2 "NavAgent.status: within stopDistance of the target."
1140
1140
  ```
1141
1141
 
1142
- <sub>`api.ogt` line 8476</sub>
1142
+ <sub>`api.ogt` line 9049</sub>
1143
1143
 
1144
1144
  ```ogt
1145
1145
  const NAV_UNREACHABLE u32 3 "NavAgent.status: no path reaches the target, or the agent is off its grid or navmesh."
1146
1146
  ```
1147
1147
 
1148
- <sub>`api.ogt` line 8477</sub>
1148
+ <sub>`api.ogt` line 9050</sub>
1149
1149
 
1150
1150
  ```ogt
1151
1151
  const NAV_PARTIAL u32 4 "NavAgent.status: the target is cut off; moving to the reachable point nearest it."
1152
1152
  ```
1153
1153
 
1154
- <sub>`api.ogt` line 8478</sub>
1154
+ <sub>`api.ogt` line 9051</sub>
@@ -18,7 +18,7 @@ module net {
18
18
  # declarations follow, each quoted below
19
19
  ```
20
20
 
21
- <sub>`api.ogt` line 13767</sub>
21
+ <sub>`api.ogt` line 14337</sub>
22
22
 
23
23
  ## Contents
24
24
 
@@ -64,7 +64,7 @@ fn submit {
64
64
  }
65
65
  ```
66
66
 
67
- <sub>`api.ogt` line 13865</sub>
67
+ <sub>`api.ogt` line 14435</sub>
68
68
 
69
69
  <a id="fn-status"></a>
70
70
 
@@ -92,7 +92,7 @@ fn status {
92
92
  }
93
93
  ```
94
94
 
95
- <sub>`api.ogt` line 13872</sub>
95
+ <sub>`api.ogt` line 14442</sub>
96
96
 
97
97
  <a id="fn-hash"></a>
98
98
 
@@ -120,7 +120,7 @@ fn hash {
120
120
  }
121
121
  ```
122
122
 
123
- <sub>`api.ogt` line 13878</sub>
123
+ <sub>`api.ogt` line 14448</sub>
124
124
 
125
125
  ## Components, resources and events
126
126
 
@@ -171,7 +171,7 @@ resource Lockstep {
171
171
  }
172
172
  ```
173
173
 
174
- <sub>`api.ogt` line 13773</sub>
174
+ <sub>`api.ogt` line 14343</sub>
175
175
 
176
176
  <a id="record-PlayerInput"></a>
177
177
 
@@ -212,7 +212,7 @@ component PlayerInput {
212
212
  }
213
213
  ```
214
214
 
215
- <sub>`api.ogt` line 13801</sub>
215
+ <sub>`api.ogt` line 14371</sub>
216
216
 
217
217
  <a id="record-Desync"></a>
218
218
 
@@ -237,7 +237,7 @@ event Desync {
237
237
  }
238
238
  ```
239
239
 
240
- <sub>`api.ogt` line 13820</sub>
240
+ <sub>`api.ogt` line 14390</sub>
241
241
 
242
242
  ## Types
243
243
 
@@ -269,7 +269,7 @@ struct InputDesc {
269
269
  }
270
270
  ```
271
271
 
272
- <sub>`api.ogt` line 13827</sub>
272
+ <sub>`api.ogt` line 14397</sub>
273
273
 
274
274
  <a id="type-LockstepSeat"></a>
275
275
 
@@ -298,7 +298,7 @@ struct LockstepSeat {
298
298
  }
299
299
  ```
300
300
 
301
- <sub>`api.ogt` line 13837</sub>
301
+ <sub>`api.ogt` line 14407</sub>
302
302
 
303
303
  <a id="type-LockstepStatus"></a>
304
304
 
@@ -337,4 +337,4 @@ struct LockstepStatus {
337
337
  }
338
338
  ```
339
339
 
340
- <sub>`api.ogt` line 13849</sub>
340
+ <sub>`api.ogt` line 14419</sub>
@@ -16,7 +16,7 @@ module path {
16
16
  # declarations follow, each quoted below
17
17
  ```
18
18
 
19
- <sub>`api.ogt` line 13526</sub>
19
+ <sub>`api.ogt` line 14096</sub>
20
20
 
21
21
  ## Contents
22
22
 
@@ -66,7 +66,7 @@ fn create {
66
66
  }
67
67
  ```
68
68
 
69
- <sub>`api.ogt` line 13615</sub>
69
+ <sub>`api.ogt` line 14185</sub>
70
70
 
71
71
  <a id="fn-find"></a>
72
72
 
@@ -96,7 +96,7 @@ fn find {
96
96
  }
97
97
  ```
98
98
 
99
- <sub>`api.ogt` line 13622</sub>
99
+ <sub>`api.ogt` line 14192</sub>
100
100
 
101
101
  <a id="fn-sample"></a>
102
102
 
@@ -128,7 +128,7 @@ fn sample {
128
128
  }
129
129
  ```
130
130
 
131
- <sub>`api.ogt` line 13629</sub>
131
+ <sub>`api.ogt` line 14199</sub>
132
132
 
133
133
  <a id="fn-length"></a>
134
134
 
@@ -158,7 +158,7 @@ fn length {
158
158
  }
159
159
  ```
160
160
 
161
- <sub>`api.ogt` line 13637</sub>
161
+ <sub>`api.ogt` line 14207</sub>
162
162
 
163
163
  <a id="fn-nearest"></a>
164
164
 
@@ -190,7 +190,7 @@ fn nearest {
190
190
  }
191
191
  ```
192
192
 
193
- <sub>`api.ogt` line 13644</sub>
193
+ <sub>`api.ogt` line 14214</sub>
194
194
 
195
195
  ## Components, resources and events
196
196
 
@@ -241,7 +241,7 @@ component PathFollower {
241
241
  }
242
242
  ```
243
243
 
244
- <sub>`api.ogt` line 13589</sub>
244
+ <sub>`api.ogt` line 14159</sub>
245
245
 
246
246
  ## Types
247
247
 
@@ -257,7 +257,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
257
257
  handle Path "A path: its points, kind and arc-length table."
258
258
  ```
259
259
 
260
- <sub>`api.ogt` line 13531</sub>
260
+ <sub>`api.ogt` line 14101</sub>
261
261
 
262
262
  <a id="type-PathKind"></a>
263
263
 
@@ -282,7 +282,7 @@ enum PathKind {
282
282
  }
283
283
  ```
284
284
 
285
- <sub>`api.ogt` line 13540</sub>
285
+ <sub>`api.ogt` line 14110</sub>
286
286
 
287
287
  <a id="type-CurveDesc"></a>
288
288
 
@@ -314,7 +314,7 @@ struct CurveDesc {
314
314
  }
315
315
  ```
316
316
 
317
- <sub>`api.ogt` line 13554</sub>
317
+ <sub>`api.ogt` line 14124</sub>
318
318
 
319
319
  <a id="type-PathSample"></a>
320
320
 
@@ -339,7 +339,7 @@ struct PathSample {
339
339
  }
340
340
  ```
341
341
 
342
- <sub>`api.ogt` line 13567</sub>
342
+ <sub>`api.ogt` line 14137</sub>
343
343
 
344
344
  <a id="type-PathNearest"></a>
345
345
 
@@ -368,7 +368,7 @@ struct PathNearest {
368
368
  }
369
369
  ```
370
370
 
371
- <sub>`api.ogt` line 13576</sub>
371
+ <sub>`api.ogt` line 14146</sub>
372
372
 
373
373
  ## Column kinds
374
374
 
@@ -388,7 +388,7 @@ column Path {
388
388
  }
389
389
  ```
390
390
 
391
- <sub>`api.ogt` line 13533</sub>
391
+ <sub>`api.ogt` line 14103</sub>
392
392
 
393
393
  ```ogt
394
394
  column PathKind {
@@ -399,4 +399,4 @@ column PathKind {
399
399
  }
400
400
  ```
401
401
 
402
- <sub>`api.ogt` line 13547</sub>
402
+ <sub>`api.ogt` line 14117</sub>