@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.
- package/dist/web/origin-engine.d.ts +8 -5
- package/dist/web/origin-engine.js +39 -19
- package/dist/web/origin-engine_bg.wasm +0 -0
- package/dist/web/origin-engine_bg.wasm.d.ts +6 -5
- package/dist/web-publish/origin-engine-lanes.js +49 -29
- package/dist/web-publish/origin-engine-lanes_bg.wasm +0 -0
- package/dist/web-publish/origin-engine.d.ts +8 -5
- package/dist/web-publish/origin-engine.js +39 -19
- package/dist/web-publish/origin-engine_bg.wasm +0 -0
- package/dist/web-publish/origin-engine_bg.wasm.d.ts +6 -5
- package/dist/web-publish-2d/origin-engine-lanes.js +49 -29
- package/dist/web-publish-2d/origin-engine-lanes_bg.wasm +0 -0
- package/dist/web-publish-2d/origin-engine.d.ts +8 -5
- package/dist/web-publish-2d/origin-engine.js +39 -19
- package/dist/web-publish-2d/origin-engine_bg.wasm +0 -0
- package/dist/web-publish-2d/origin-engine_bg.wasm.d.ts +6 -5
- package/knowledge/looks/catalogue.json +123 -2
- package/knowledge/package.json +1 -1
- package/knowledge/scaffold/origin-engine.json +2 -2
- package/knowledge/scaffold/template/package.json +1 -1
- package/knowledge/scaffold/template/project.ogt +1 -1
- package/knowledge/scripts/validate.ts +69 -6
- package/knowledge/skills/og-audio/SKILL.md +31 -5
- package/knowledge/skills/og-build/SKILL.md +44 -4
- package/knowledge/skills/og-core/SKILL.md +4 -3
- package/knowledge/skills/og-feel/SKILL.md +9 -1
- package/knowledge/skills/og-game/SKILL.md +199 -16
- package/knowledge/skills/og-platform-sdk/SKILL.md +6 -0
- package/knowledge/skills/og-taste/SKILL.md +7 -0
- package/knowledge/skills/og-ui/SKILL.md +24 -0
- package/knowledge/wiki/ai.md +20 -20
- package/knowledge/wiki/anim.md +526 -60
- package/knowledge/wiki/atmosphere.md +13 -13
- package/knowledge/wiki/audio.md +160 -20
- package/knowledge/wiki/camera.md +13 -13
- package/knowledge/wiki/commands.md +11 -11
- package/knowledge/wiki/debug.md +13 -13
- package/knowledge/wiki/game.md +8 -8
- package/knowledge/wiki/i18n.md +7 -7
- package/knowledge/wiki/index.md +25 -1
- package/knowledge/wiki/input.md +47 -47
- package/knowledge/wiki/load.md +76 -50
- package/knowledge/wiki/math.md +102 -102
- package/knowledge/wiki/nav.md +34 -34
- package/knowledge/wiki/net.md +10 -10
- package/knowledge/wiki/path.md +14 -14
- package/knowledge/wiki/physics.md +111 -100
- package/knowledge/wiki/platform.md +44 -44
- package/knowledge/wiki/probe.md +86 -86
- package/knowledge/wiki/reflect.md +17 -17
- package/knowledge/wiki/render.md +245 -176
- package/knowledge/wiki/rng.md +14 -14
- package/knowledge/wiki/shapes.md +26 -26
- package/knowledge/wiki/stream.md +15 -15
- package/knowledge/wiki/system.md +8 -8
- package/knowledge/wiki/systems.md +2 -2
- package/knowledge/wiki/terrain.md +19 -19
- package/knowledge/wiki/tilemap.md +13 -13
- package/knowledge/wiki/time.md +4 -4
- package/knowledge/wiki/timeline.md +14 -14
- package/knowledge/wiki/transform.md +8 -8
- package/knowledge/wiki/tween.md +17 -17
- package/knowledge/wiki/ui.md +243 -243
- package/knowledge/wiki/video.md +5 -5
- package/knowledge/wiki/world.md +36 -36
- package/package.json +4 -4
- package/schema/api.schema.json +639 -11
- package/shell/page.ts +4 -0
- package/src/generated/abi.ts +3 -0
- package/src/index.ts +11 -0
- package/src/node/device.ts +5 -2
- package/src/node/polish.ts +34 -15
- package/src/node/run.ts +23 -6
- package/src/runtime.ts +1 -0
- package/src/web/gl-state.ts +907 -0
- package/src/web/worker.ts +6 -0
- package/types/bindings.json +823 -349
- package/types/index.d.ts +650 -15
|
@@ -8,7 +8,7 @@ The inspector, Tune, the probe, scene text and the wiki read this one schema. Ea
|
|
|
8
8
|
|
|
9
9
|
A field holds one value, or a list of at most a fixed number of one number type or handle: `list(u32(), 8)`, `list(Asset(), 4)` (the list factory below). A list is read as a frozen copy (`push` throws) and written whole (`chain.passes = [...chain.passes, h]`); one over its capacity is refused, never truncated. A few vectors are numbered fields (`p0` to `p7`, as og.CameraRail does); a list of things with fields of their own is an entity each, with its own component, looped over by a query (a ring of skid marks, the laps of a race); a long record (a lap's taped inputs) is text in `str` fields of at most 4,096 bytes each, chunked over entities. Keep none of it in module variables: they are not world state, so a snapshot, a replay and a hot reload lose them.
|
|
10
10
|
|
|
11
|
-
A handle (an og.load answer, a texture, a sound, a geometry, a material, an entity) is a 64-bit number: keep it in a field of its own kind (`Asset()`, `Texture()`, `Sound()`, `Geometry()`, `Material()`, `Entity()
|
|
11
|
+
A handle (an og.load answer, a texture, a sound, a geometry, a material, an entity) is a 64-bit number: keep it in a field of its own kind (`Asset()`, `Texture()`, `Sound()`, `Font()`, `Style()`, `Geometry()`, `Material()`, `Entity()`: every handle type of the API has its factory, named as the type), never cast to another kind, in a component or a resource. A `u32` field refuses one (handles pass 2^32: `4294967298 is not a u32`); an `f64` holds the number but loses its type.
|
|
12
12
|
|
|
13
13
|
- **TypeScript**: functions are named exports of the package: `import { … } from "@origingame/engine"`; components, resources and events are tokens on `og`.
|
|
14
14
|
- **Publish builds**: kept (members may override).
|
|
@@ -20,7 +20,7 @@ module reflect {
|
|
|
20
20
|
# declarations follow, each quoted below
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
<sub>`api.ogt` line
|
|
23
|
+
<sub>`api.ogt` line 661</sub>
|
|
24
24
|
|
|
25
25
|
## Contents
|
|
26
26
|
|
|
@@ -76,7 +76,7 @@ fn defineComponent {
|
|
|
76
76
|
}
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
<sub>`api.ogt` line
|
|
79
|
+
<sub>`api.ogt` line 765</sub>
|
|
80
80
|
|
|
81
81
|
<a id="fn-defineResource"></a>
|
|
82
82
|
|
|
@@ -107,7 +107,7 @@ fn defineResource {
|
|
|
107
107
|
}
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
<sub>`api.ogt` line
|
|
110
|
+
<sub>`api.ogt` line 774</sub>
|
|
111
111
|
|
|
112
112
|
## Types
|
|
113
113
|
|
|
@@ -143,7 +143,7 @@ struct FieldOptions {
|
|
|
143
143
|
}
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
-
<sub>`api.ogt` line
|
|
146
|
+
<sub>`api.ogt` line 669</sub>
|
|
147
147
|
|
|
148
148
|
## Column kinds
|
|
149
149
|
|
|
@@ -173,7 +173,7 @@ column f32 {
|
|
|
173
173
|
}
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
<sub>`api.ogt` line
|
|
176
|
+
<sub>`api.ogt` line 681</sub>
|
|
177
177
|
|
|
178
178
|
```ogt
|
|
179
179
|
column f64 {
|
|
@@ -184,7 +184,7 @@ column f64 {
|
|
|
184
184
|
}
|
|
185
185
|
```
|
|
186
186
|
|
|
187
|
-
<sub>`api.ogt` line
|
|
187
|
+
<sub>`api.ogt` line 688</sub>
|
|
188
188
|
|
|
189
189
|
```ogt
|
|
190
190
|
column u32 {
|
|
@@ -195,7 +195,7 @@ column u32 {
|
|
|
195
195
|
}
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
<sub>`api.ogt` line
|
|
198
|
+
<sub>`api.ogt` line 695</sub>
|
|
199
199
|
|
|
200
200
|
```ogt
|
|
201
201
|
column i32 {
|
|
@@ -206,7 +206,7 @@ column i32 {
|
|
|
206
206
|
}
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
-
<sub>`api.ogt` line
|
|
209
|
+
<sub>`api.ogt` line 702</sub>
|
|
210
210
|
|
|
211
211
|
```ogt
|
|
212
212
|
column bool {
|
|
@@ -217,7 +217,7 @@ column bool {
|
|
|
217
217
|
}
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
-
<sub>`api.ogt` line
|
|
220
|
+
<sub>`api.ogt` line 709</sub>
|
|
221
221
|
|
|
222
222
|
```ogt
|
|
223
223
|
column Vector2 {
|
|
@@ -228,7 +228,7 @@ column Vector2 {
|
|
|
228
228
|
}
|
|
229
229
|
```
|
|
230
230
|
|
|
231
|
-
<sub>`api.ogt` line
|
|
231
|
+
<sub>`api.ogt` line 716</sub>
|
|
232
232
|
|
|
233
233
|
```ogt
|
|
234
234
|
column Vector3 {
|
|
@@ -239,7 +239,7 @@ column Vector3 {
|
|
|
239
239
|
}
|
|
240
240
|
```
|
|
241
241
|
|
|
242
|
-
<sub>`api.ogt` line
|
|
242
|
+
<sub>`api.ogt` line 723</sub>
|
|
243
243
|
|
|
244
244
|
```ogt
|
|
245
245
|
column Quaternion {
|
|
@@ -250,7 +250,7 @@ column Quaternion {
|
|
|
250
250
|
}
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
-
<sub>`api.ogt` line
|
|
253
|
+
<sub>`api.ogt` line 730</sub>
|
|
254
254
|
|
|
255
255
|
```ogt
|
|
256
256
|
column Matrix4 {
|
|
@@ -261,7 +261,7 @@ column Matrix4 {
|
|
|
261
261
|
}
|
|
262
262
|
```
|
|
263
263
|
|
|
264
|
-
<sub>`api.ogt` line
|
|
264
|
+
<sub>`api.ogt` line 737</sub>
|
|
265
265
|
|
|
266
266
|
```ogt
|
|
267
267
|
column Color {
|
|
@@ -272,7 +272,7 @@ column Color {
|
|
|
272
272
|
}
|
|
273
273
|
```
|
|
274
274
|
|
|
275
|
-
<sub>`api.ogt` line
|
|
275
|
+
<sub>`api.ogt` line 744</sub>
|
|
276
276
|
|
|
277
277
|
```ogt
|
|
278
278
|
column str {
|
|
@@ -284,7 +284,7 @@ column str {
|
|
|
284
284
|
}
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
-
<sub>`api.ogt` line
|
|
287
|
+
<sub>`api.ogt` line 751</sub>
|
|
288
288
|
|
|
289
289
|
```ogt
|
|
290
290
|
column list {
|
|
@@ -294,4 +294,4 @@ column list {
|
|
|
294
294
|
}
|
|
295
295
|
```
|
|
296
296
|
|
|
297
|
-
<sub>`api.ogt` line
|
|
297
|
+
<sub>`api.ogt` line 759</sub>
|