@origingame/engine 0.1.1 → 0.3.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/bin/og.mjs +1 -1
- package/dist/web/origin-engine.d.ts +219 -5
- package/dist/web/origin-engine.js +1344 -125
- package/dist/web/origin-engine_bg.wasm +0 -0
- package/dist/web/origin-engine_bg.wasm.d.ts +68 -3
- package/dist/web-publish/origin-engine-lanes.js +1007 -22
- package/dist/web-publish/origin-engine-lanes_bg.wasm +0 -0
- package/dist/web-publish/origin-engine.d.ts +162 -5
- package/dist/web-publish/origin-engine.js +1004 -19
- package/dist/web-publish/origin-engine_bg.wasm +0 -0
- package/dist/web-publish/origin-engine_bg.wasm.d.ts +52 -3
- package/dist/web-publish-2d/origin-engine-lanes.js +1007 -22
- package/dist/web-publish-2d/origin-engine-lanes_bg.wasm +0 -0
- package/dist/web-publish-2d/origin-engine.d.ts +162 -5
- package/dist/web-publish-2d/origin-engine.js +1004 -19
- package/dist/web-publish-2d/origin-engine_bg.wasm +0 -0
- package/dist/web-publish-2d/origin-engine_bg.wasm.d.ts +52 -3
- package/knowledge/looks/catalogue.json +40 -40
- package/knowledge/package.json +4 -4
- package/knowledge/scaffold/distribution.json +14 -0
- package/knowledge/scaffold/origin-engine.json +2 -2
- package/knowledge/scaffold/template/README.md +2 -1
- package/knowledge/scaffold/template/assets/audio/sting.ogt +10 -0
- package/knowledge/scaffold/template/assets/timelines/intro.ogt +101 -0
- package/knowledge/scaffold/template/assets/timelines/narration.srt +11 -0
- package/knowledge/scaffold/template/host.d.ts +46 -0
- package/knowledge/scaffold/template/package.json +1 -1
- package/knowledge/scaffold/template/project.ogt +1 -1
- package/knowledge/scaffold/template/src/main.ts +1 -1
- package/knowledge/scaffold/template/tests/frames.ts +134 -0
- package/knowledge/scaffold/template/tests/intro.og.ts +65 -0
- package/knowledge/scaffold/template/tests/smoke.og.ts +30 -36
- package/knowledge/scaffold/template/tsconfig.json +1 -1
- package/knowledge/scripts/mount.ts +2 -1
- package/knowledge/scripts/validate.ts +21 -11
- package/knowledge/skills/og-build/SKILL.md +25 -6
- package/knowledge/skills/og-core/SKILL.md +11 -0
- package/knowledge/skills/og-feel/SKILL.md +8 -1
- package/knowledge/skills/og-game/SKILL.md +994 -21
- package/knowledge/skills/og-i18n/SKILL.md +12 -3
- package/knowledge/skills/og-platform-sdk/SKILL.md +4 -1
- package/knowledge/skills/og-taste/SKILL.md +82 -73
- package/knowledge/skills/og-ui/SKILL.md +82 -54
- package/knowledge/wiki/ai.md +20 -20
- package/knowledge/wiki/anim.md +384 -41
- package/knowledge/wiki/atmosphere.md +36 -13
- package/knowledge/wiki/audio.md +18 -18
- package/knowledge/wiki/camera.md +19 -13
- package/knowledge/wiki/commands.md +19 -13
- package/knowledge/wiki/debug.md +414 -0
- package/knowledge/wiki/game.md +8 -8
- package/knowledge/wiki/i18n.md +7 -7
- package/knowledge/wiki/index.md +265 -7
- package/knowledge/wiki/input.md +47 -47
- package/knowledge/wiki/load.md +236 -68
- package/knowledge/wiki/math.md +2614 -7
- package/knowledge/wiki/nav.md +34 -34
- package/knowledge/wiki/net.md +340 -0
- package/knowledge/wiki/path.md +402 -0
- package/knowledge/wiki/physics.md +124 -106
- package/knowledge/wiki/platform.md +465 -31
- package/knowledge/wiki/probe.md +681 -67
- package/knowledge/wiki/reflect.md +15 -15
- package/knowledge/wiki/render.md +3904 -1897
- package/knowledge/wiki/rng.md +14 -14
- 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 +19 -15
- package/knowledge/wiki/time.md +4 -4
- package/knowledge/wiki/timeline.md +396 -0
- package/knowledge/wiki/transform.md +8 -8
- package/knowledge/wiki/tween.md +17 -17
- package/knowledge/wiki/ui.md +603 -629
- package/knowledge/wiki/video.md +157 -0
- package/knowledge/wiki/world.md +67 -37
- package/package.json +7 -6
- package/schema/api.schema.json +21071 -13964
- package/shell/page.ts +26 -2
- package/shell/platform.ts +46 -0
- package/shell/player.ts +7 -0
- package/src/depth.ts +71 -0
- package/src/e6.ts +32 -1
- package/src/env.d.ts +5 -1
- package/src/generated/abi.ts +189 -3
- package/src/index.ts +26 -4
- package/src/light.ts +18 -0
- package/src/math.ts +622 -0
- package/src/node/index.ts +17 -0
- package/src/node/playtest-run.ts +114 -18
- package/src/node/polish.ts +15 -4
- package/src/node/render.ts +291 -0
- package/src/node/run.ts +91 -6
- package/src/p2.ts +19 -1
- package/src/playtest.ts +57 -4
- package/src/runtime.ts +15 -3
- package/src/targets.ts +28 -0
- package/src/trace.ts +169 -0
- package/src/ui-kit/huds.ts +49 -45
- package/src/ui-kit/menus.ts +12 -12
- package/src/ui-kit/settings.ts +2 -2
- package/src/ui-kit/store.ts +18 -18
- package/src/ui-kit/story.ts +6 -4
- package/src/ui-kit/util.ts +8 -8
- package/src/web/shell.ts +58 -0
- package/src/web/worker.ts +103 -2
- package/types/bindings.json +8945 -6456
- package/types/index.d.ts +15507 -11437
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
<!-- Generated from crates/og-api/api.ogt by `og api gen`. Do not edit: `og api check` fails on any difference; change api.ogt and regenerate. -->
|
|
2
|
+
|
|
3
|
+
# The `timeline` module
|
|
4
|
+
|
|
5
|
+
Timelines: cutscenes and sequences as data, Unity's Timeline and Godot's AnimationPlayer as an `.ogt` the agent reads and diffs. A `type timeline` file has a `duration` in seconds, `path "<name>" { ... }` blocks (as og.path's) and `track <kind> ["<entity>"] { key <seconds> { ... } }` blocks; `og cook` cooks it (importing caption files) and og.load.timeline loads it. Tracks: `camera` (position and target keys, or `rail "<path>"` with `at` 0..1 along it, or `follow "<entity>"` with offsets; fov; eased), `transform "<entity>"` (position, rotation in degrees or quaternion, scale; eased), `animation "<entity>"` (clip, speed, blendIn, loop; `model` names the glTF whose clips they are, else the entity's og.Model), `audio` (sound, volume, pitch, bus), `music` (sound, volume, fadeIn, fadeOut, end, loop, bus), `caption` (text from `key` to `end` with a UI type step `style` and an `anchor`; `captions "narration.srt" [offset]` imports a SubRip file or word timestamps `.json`), `event` (`do "<command-channel action>"`: teleport, set, a game's registered command; `retroactive true` runs it when a seek passes it), `transition` (kind cut, fade, wipe, dissolve, iris or slide; mode through, in or out; duration, color, from, over og.ui's screen cover) and `marker` (`name`, sending og.TimelineMarker when played past).
|
|
6
|
+
|
|
7
|
+
Between two keys that set a value the later key's `ease` (og.tween's Ease names, linear when it gives none) mixes them; before the first and after the last the value is held. Every value is evaluated at the timeline's time, never accumulated over ticks, and that time is kept exactly (in steps of a thousandth of a tick), so seeking to a time and playing to it give the same world: a seek is how a video render starts at any frame.
|
|
8
|
+
|
|
9
|
+
An og.Timeline component plays one on its entity, run by the engine's og.timeline system after the game's systems (and tweens) and before og.anim and physics, so what it sets is what animation, physics and the frame see that tick. While one with a camera track plays (or is paused) it owns og.Camera, and hands back the camera it found when it stops or ends. Its event keys' actions run at the start of the next tick, as og.ai's commands do. The command channel plays them too: `timeline:play:<name>` (`timelines/<name>.ogt`, or an asset id), `timeline:seek:<seconds>[:<name>]`, `timeline:pause[:<name>]`, `timeline:resume[:<name>]`, `timeline:stop[:<name>]`.
|
|
10
|
+
|
|
11
|
+
- **TypeScript**: functions are the namespace `og.timeline`; components, resources and events are tokens on `og`.
|
|
12
|
+
- **Publish builds**: kept (members may override).
|
|
13
|
+
- **Skill**: `og-game`, which teaches the module (how much of it to use, and how to prove it).
|
|
14
|
+
- **Index**: [every module and name](index.md).
|
|
15
|
+
|
|
16
|
+
```ogt
|
|
17
|
+
module timeline {
|
|
18
|
+
# declarations follow, each quoted below
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
<sub>`api.ogt` line 13655</sub>
|
|
22
|
+
|
|
23
|
+
## Contents
|
|
24
|
+
|
|
25
|
+
| Name | Kind | Summary |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| [`TimelineAsset`](#type-TimelineAsset) | handle | A loaded timeline: its tracks, paths, sounds and clips. |
|
|
28
|
+
| [`TimelineAsset()`](#column-TimelineAsset) | column kind | A TimelineAsset handle field (0 is none). |
|
|
29
|
+
| [`og.Timeline`](#record-Timeline) | component | Plays a loaded timeline. Set `playing` (or call og.timeline.play) to run it from `time`; write `time` (or call og.timeline.seek) to jump; og.timeline.stop goes back to 0 and lets go of what it owns. |
|
|
30
|
+
| [`og.TimelineStarted`](#record-TimelineStarted) | event | A timeline started playing from stopped or ended (not on a resume from pause, nor on a loop). |
|
|
31
|
+
| [`og.TimelineMarker`](#record-TimelineMarker) | event | Playback passed a marker key (a seek over one does not send it). |
|
|
32
|
+
| [`og.TimelineEnded`](#record-TimelineEnded) | event | A timeline without loop reached its duration and stopped playing. |
|
|
33
|
+
| [`TimelineTrackInfo`](#type-TimelineTrackInfo) | struct | One track of a loaded timeline. |
|
|
34
|
+
| [`TimelineInfo`](#type-TimelineInfo) | struct | A loaded timeline. |
|
|
35
|
+
| [`og.timeline.info`](#fn-info) | function | What a loaded timeline holds. |
|
|
36
|
+
| [`og.timeline.play`](#fn-play) | function | Play the entity's og.Timeline from its time (0 after a stop or an end); systems may call it, it takes effect at this tick's og.timeline. |
|
|
37
|
+
| [`og.timeline.pause`](#fn-pause) | function | Hold the entity's og.Timeline where it is (it keeps the camera). |
|
|
38
|
+
| [`og.timeline.seek`](#fn-seek) | function | Jump to a time: this tick evaluates every track there exactly as playing to it would, without sending the markers or running the events passed (except `retroactive` ones). |
|
|
39
|
+
| [`og.timeline.stop`](#fn-stop) | function | Stop at 0: the camera is handed back, its sounds and music stop, its caption and cover go. |
|
|
40
|
+
|
|
41
|
+
## Functions
|
|
42
|
+
|
|
43
|
+
<a id="fn-info"></a>
|
|
44
|
+
|
|
45
|
+
### `og.timeline.info`
|
|
46
|
+
|
|
47
|
+
What a loaded timeline holds.
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
og.timeline.info(world: World, asset: TimelineAsset): Result<TimelineInfo>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
| Parameter | Type | Optional | Doc |
|
|
54
|
+
|---|---|---|---|
|
|
55
|
+
| `world` | `World` | no | The world. |
|
|
56
|
+
| `asset` | `TimelineAsset` | no | The timeline. |
|
|
57
|
+
|
|
58
|
+
**Returns** `Result<TimelineInfo>`: Refused for a timeline not loaded in this world.
|
|
59
|
+
|
|
60
|
+
Binding symbol `og_timeline_info` · publish builds: kept
|
|
61
|
+
|
|
62
|
+
```ogt
|
|
63
|
+
fn info {
|
|
64
|
+
doc "What a loaded timeline holds."
|
|
65
|
+
param world World "The world."
|
|
66
|
+
param asset TimelineAsset "The timeline."
|
|
67
|
+
returns Result.TimelineInfo "Refused for a timeline not loaded in this world."
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
<sub>`api.ogt` line 13728</sub>
|
|
72
|
+
|
|
73
|
+
<a id="fn-play"></a>
|
|
74
|
+
|
|
75
|
+
### `og.timeline.play`
|
|
76
|
+
|
|
77
|
+
Play the entity's og.Timeline from its time (0 after a stop or an end); systems may call it, it takes effect at this tick's og.timeline.
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
og.timeline.play(world: World, entity: Entity): Result<void>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
| Parameter | Type | Optional | Doc |
|
|
84
|
+
|---|---|---|---|
|
|
85
|
+
| `world` | `World` | no | The world. |
|
|
86
|
+
| `entity` | `Entity` | no | The entity with the og.Timeline. |
|
|
87
|
+
|
|
88
|
+
**Returns** `Result<void>`: Refused for an entity without og.Timeline, or one whose asset is not loaded.
|
|
89
|
+
|
|
90
|
+
Binding symbol `og_timeline_play` · publish builds: kept
|
|
91
|
+
|
|
92
|
+
```ogt
|
|
93
|
+
fn play {
|
|
94
|
+
doc "Play the entity's og.Timeline from its time (0 after a stop or an end); systems may call it, it takes effect at this tick's og.timeline."
|
|
95
|
+
param world World "The world."
|
|
96
|
+
param entity Entity "The entity with the og.Timeline."
|
|
97
|
+
returns Result.Void "Refused for an entity without og.Timeline, or one whose asset is not loaded."
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
<sub>`api.ogt` line 13735</sub>
|
|
102
|
+
|
|
103
|
+
<a id="fn-pause"></a>
|
|
104
|
+
|
|
105
|
+
### `og.timeline.pause`
|
|
106
|
+
|
|
107
|
+
Hold the entity's og.Timeline where it is (it keeps the camera).
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
og.timeline.pause(world: World, entity: Entity): Result<void>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
| Parameter | Type | Optional | Doc |
|
|
114
|
+
|---|---|---|---|
|
|
115
|
+
| `world` | `World` | no | The world. |
|
|
116
|
+
| `entity` | `Entity` | no | The entity with the og.Timeline. |
|
|
117
|
+
|
|
118
|
+
**Returns** `Result<void>`: Refused for an entity without og.Timeline.
|
|
119
|
+
|
|
120
|
+
Binding symbol `og_timeline_pause` · publish builds: kept
|
|
121
|
+
|
|
122
|
+
```ogt
|
|
123
|
+
fn pause {
|
|
124
|
+
doc "Hold the entity's og.Timeline where it is (it keeps the camera)."
|
|
125
|
+
param world World "The world."
|
|
126
|
+
param entity Entity "The entity with the og.Timeline."
|
|
127
|
+
returns Result.Void "Refused for an entity without og.Timeline."
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
<sub>`api.ogt` line 13742</sub>
|
|
132
|
+
|
|
133
|
+
<a id="fn-seek"></a>
|
|
134
|
+
|
|
135
|
+
### `og.timeline.seek`
|
|
136
|
+
|
|
137
|
+
Jump to a time: this tick evaluates every track there exactly as playing to it would, without sending the markers or running the events passed (except `retroactive` ones).
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
og.timeline.seek(world: World, entity: Entity, time: number): Result<void>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
| Parameter | Type | Optional | Doc |
|
|
144
|
+
|---|---|---|---|
|
|
145
|
+
| `world` | `World` | no | The world. |
|
|
146
|
+
| `entity` | `Entity` | no | The entity with the og.Timeline. |
|
|
147
|
+
| `time` | `number` | no | Seconds, 0 to the duration. |
|
|
148
|
+
|
|
149
|
+
**Returns** `Result<void>`: Refused for an entity without og.Timeline or a time outside 0 to its duration.
|
|
150
|
+
|
|
151
|
+
Binding symbol `og_timeline_seek` · publish builds: kept
|
|
152
|
+
|
|
153
|
+
```ogt
|
|
154
|
+
fn seek {
|
|
155
|
+
doc "Jump to a time: this tick evaluates every track there exactly as playing to it would, without sending the markers or running the events passed (except `retroactive` ones)."
|
|
156
|
+
param world World "The world."
|
|
157
|
+
param entity Entity "The entity with the og.Timeline."
|
|
158
|
+
param time f32 "Seconds, 0 to the duration."
|
|
159
|
+
returns Result.Void "Refused for an entity without og.Timeline or a time outside 0 to its duration."
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
<sub>`api.ogt` line 13749</sub>
|
|
164
|
+
|
|
165
|
+
<a id="fn-stop"></a>
|
|
166
|
+
|
|
167
|
+
### `og.timeline.stop`
|
|
168
|
+
|
|
169
|
+
Stop at 0: the camera is handed back, its sounds and music stop, its caption and cover go.
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
og.timeline.stop(world: World, entity: Entity): Result<void>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
| Parameter | Type | Optional | Doc |
|
|
176
|
+
|---|---|---|---|
|
|
177
|
+
| `world` | `World` | no | The world. |
|
|
178
|
+
| `entity` | `Entity` | no | The entity with the og.Timeline. |
|
|
179
|
+
|
|
180
|
+
**Returns** `Result<void>`: Refused for an entity without og.Timeline.
|
|
181
|
+
|
|
182
|
+
Binding symbol `og_timeline_stop` · publish builds: kept
|
|
183
|
+
|
|
184
|
+
```ogt
|
|
185
|
+
fn stop {
|
|
186
|
+
doc "Stop at 0: the camera is handed back, its sounds and music stop, its caption and cover go."
|
|
187
|
+
param world World "The world."
|
|
188
|
+
param entity Entity "The entity with the og.Timeline."
|
|
189
|
+
returns Result.Void "Refused for an entity without og.Timeline."
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
<sub>`api.ogt` line 13757</sub>
|
|
194
|
+
|
|
195
|
+
## Components, resources and events
|
|
196
|
+
|
|
197
|
+
<a id="record-Timeline"></a>
|
|
198
|
+
|
|
199
|
+
### `og.Timeline` (component)
|
|
200
|
+
|
|
201
|
+
Plays a loaded timeline. Set `playing` (or call og.timeline.play) to run it from `time`; write `time` (or call og.timeline.seek) to jump; og.timeline.stop goes back to 0 and lets go of what it owns.
|
|
202
|
+
|
|
203
|
+
Token `og.Timeline`, registered under the schema name `og.Timeline`; its value type is `Timeline`.
|
|
204
|
+
|
|
205
|
+
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
206
|
+
|---|---|---|---|---|---|---|
|
|
207
|
+
| `asset` | `TimelineAsset` | `0` | — | — | — | The timeline (og.load.timeline); 0 plays nothing. |
|
|
208
|
+
| `playing` | `boolean` | `false` | — | — | — | Advances while true. |
|
|
209
|
+
| `time` | `number` | `0` | ≥ 0 | `s` | — | Where it is, in seconds; written every tick it plays, set it to seek. |
|
|
210
|
+
| `speed` | `number` | `1` | 0 … 16 | — | tunable | Playback rate: 1 as authored, 0.5 half speed (0 holds the time while playing). |
|
|
211
|
+
| `loop` | `boolean` | `false` | — | — | — | Start over at the end; otherwise stop playing there, hand the camera back and send og.TimelineEnded. |
|
|
212
|
+
|
|
213
|
+
```ogt
|
|
214
|
+
component Timeline {
|
|
215
|
+
doc "Plays a loaded timeline. Set `playing` (or call og.timeline.play) to run it from `time`; write `time` (or call og.timeline.seek) to jump; og.timeline.stop goes back to 0 and lets go of what it owns."
|
|
216
|
+
field asset TimelineAsset "The timeline (og.load.timeline); 0 plays nothing."
|
|
217
|
+
field playing bool "Advances while true."
|
|
218
|
+
field time f32 "Where it is, in seconds; written every tick it plays, set it to seek." {
|
|
219
|
+
min 0
|
|
220
|
+
unit s
|
|
221
|
+
}
|
|
222
|
+
field speed f32 "Playback rate: 1 as authored, 0.5 half speed (0 holds the time while playing)." {
|
|
223
|
+
default 1
|
|
224
|
+
min 0
|
|
225
|
+
max 16
|
|
226
|
+
tunable true
|
|
227
|
+
}
|
|
228
|
+
field loop bool "Start over at the end; otherwise stop playing there, hand the camera back and send og.TimelineEnded."
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
<sub>`api.ogt` line 13670</sub>
|
|
233
|
+
|
|
234
|
+
<a id="record-TimelineStarted"></a>
|
|
235
|
+
|
|
236
|
+
### `og.TimelineStarted` (event)
|
|
237
|
+
|
|
238
|
+
A timeline started playing from stopped or ended (not on a resume from pause, nor on a loop).
|
|
239
|
+
|
|
240
|
+
Token `og.TimelineStarted`, registered under the schema name `og.TimelineStarted`; its value type is `TimelineStarted`.
|
|
241
|
+
|
|
242
|
+
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
243
|
+
|---|---|---|---|---|---|---|
|
|
244
|
+
| `entity` | `Entity` | `0` | — | — | — | The og.Timeline's entity. |
|
|
245
|
+
| `asset` | `TimelineAsset` | `0` | — | — | — | The timeline. |
|
|
246
|
+
|
|
247
|
+
```ogt
|
|
248
|
+
event TimelineStarted {
|
|
249
|
+
doc "A timeline started playing from stopped or ended (not on a resume from pause, nor on a loop)."
|
|
250
|
+
field entity Entity "The og.Timeline's entity."
|
|
251
|
+
field asset TimelineAsset "The timeline."
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
<sub>`api.ogt` line 13687</sub>
|
|
256
|
+
|
|
257
|
+
<a id="record-TimelineMarker"></a>
|
|
258
|
+
|
|
259
|
+
### `og.TimelineMarker` (event)
|
|
260
|
+
|
|
261
|
+
Playback passed a marker key (a seek over one does not send it).
|
|
262
|
+
|
|
263
|
+
Token `og.TimelineMarker`, registered under the schema name `og.TimelineMarker`; its value type is `TimelineMarker`.
|
|
264
|
+
|
|
265
|
+
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
266
|
+
|---|---|---|---|---|---|---|
|
|
267
|
+
| `entity` | `Entity` | `0` | — | — | — | The og.Timeline's entity. |
|
|
268
|
+
| `asset` | `TimelineAsset` | `0` | — | — | — | The timeline. |
|
|
269
|
+
| `name` | `string` | `""` | — | — | — | The marker's name (at most 63 bytes). |
|
|
270
|
+
| `time` | `number` | `0` | — | `s` | — | The marker's time. |
|
|
271
|
+
|
|
272
|
+
```ogt
|
|
273
|
+
event TimelineMarker {
|
|
274
|
+
doc "Playback passed a marker key (a seek over one does not send it)."
|
|
275
|
+
field entity Entity "The og.Timeline's entity."
|
|
276
|
+
field asset TimelineAsset "The timeline."
|
|
277
|
+
field name String "The marker's name (at most 63 bytes)."
|
|
278
|
+
field time f32 "The marker's time." {
|
|
279
|
+
unit s
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
<sub>`api.ogt` line 13693</sub>
|
|
285
|
+
|
|
286
|
+
<a id="record-TimelineEnded"></a>
|
|
287
|
+
|
|
288
|
+
### `og.TimelineEnded` (event)
|
|
289
|
+
|
|
290
|
+
A timeline without loop reached its duration and stopped playing.
|
|
291
|
+
|
|
292
|
+
Token `og.TimelineEnded`, registered under the schema name `og.TimelineEnded`; its value type is `TimelineEnded`.
|
|
293
|
+
|
|
294
|
+
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
295
|
+
|---|---|---|---|---|---|---|
|
|
296
|
+
| `entity` | `Entity` | `0` | — | — | — | The og.Timeline's entity. |
|
|
297
|
+
| `asset` | `TimelineAsset` | `0` | — | — | — | The timeline. |
|
|
298
|
+
|
|
299
|
+
```ogt
|
|
300
|
+
event TimelineEnded {
|
|
301
|
+
doc "A timeline without loop reached its duration and stopped playing."
|
|
302
|
+
field entity Entity "The og.Timeline's entity."
|
|
303
|
+
field asset TimelineAsset "The timeline."
|
|
304
|
+
}
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
<sub>`api.ogt` line 13703</sub>
|
|
308
|
+
|
|
309
|
+
## Types
|
|
310
|
+
|
|
311
|
+
<a id="type-TimelineAsset"></a>
|
|
312
|
+
|
|
313
|
+
### `TimelineAsset` (handle)
|
|
314
|
+
|
|
315
|
+
A loaded timeline: its tracks, paths, sounds and clips.
|
|
316
|
+
|
|
317
|
+
A generational handle: a number the engine hands out. A dead handle is an error value, never a crash.
|
|
318
|
+
|
|
319
|
+
```ogt
|
|
320
|
+
handle TimelineAsset "A loaded timeline: its tracks, paths, sounds and clips."
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
<sub>`api.ogt` line 13661</sub>
|
|
324
|
+
|
|
325
|
+
<a id="type-TimelineTrackInfo"></a>
|
|
326
|
+
|
|
327
|
+
### `TimelineTrackInfo` (struct)
|
|
328
|
+
|
|
329
|
+
One track of a loaded timeline.
|
|
330
|
+
|
|
331
|
+
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
332
|
+
|---|---|---|---|---|---|---|
|
|
333
|
+
| `kind` | `string` | `""` | — | — | — | camera, transform, animation, audio, music, caption, event, transition or marker. |
|
|
334
|
+
| `target` | `string` | `""` | — | — | — | The entity a transform or animation track drives, the path a rail rides, the entity a camera follows; empty otherwise. |
|
|
335
|
+
| `keys` | `number` | `0` | — | — | — | Its keys. |
|
|
336
|
+
|
|
337
|
+
```ogt
|
|
338
|
+
struct TimelineTrackInfo {
|
|
339
|
+
doc "One track of a loaded timeline."
|
|
340
|
+
field kind String "camera, transform, animation, audio, music, caption, event, transition or marker."
|
|
341
|
+
field target String "The entity a transform or animation track drives, the path a rail rides, the entity a camera follows; empty otherwise."
|
|
342
|
+
field keys u32 "Its keys."
|
|
343
|
+
}
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
<sub>`api.ogt` line 13709</sub>
|
|
347
|
+
|
|
348
|
+
<a id="type-TimelineInfo"></a>
|
|
349
|
+
|
|
350
|
+
### `TimelineInfo` (struct)
|
|
351
|
+
|
|
352
|
+
A loaded timeline.
|
|
353
|
+
|
|
354
|
+
| Field | Type | Default | Range | Unit | Notes | Doc |
|
|
355
|
+
|---|---|---|---|---|---|---|
|
|
356
|
+
| `asset` | `TimelineAsset` | `0` | — | — | — | Its handle. |
|
|
357
|
+
| `name` | `string` | `""` | — | — | — | Its `name`. |
|
|
358
|
+
| `duration` | `number` | `0` | — | `s` | — | Its length. |
|
|
359
|
+
| `tracks` | `readonly TimelineTrackInfo[]` | `[]` | — | — | — | Its tracks, in file order. |
|
|
360
|
+
| `paths` | `readonly string[]` | `[]` | — | — | — | The paths it declares. |
|
|
361
|
+
| `markers` | `readonly string[]` | `[]` | — | — | — | Its markers' names, in time order. |
|
|
362
|
+
|
|
363
|
+
```ogt
|
|
364
|
+
struct TimelineInfo {
|
|
365
|
+
doc "A loaded timeline."
|
|
366
|
+
field asset TimelineAsset "Its handle."
|
|
367
|
+
field name String "Its `name`."
|
|
368
|
+
field duration f32 "Its length." {
|
|
369
|
+
unit s
|
|
370
|
+
}
|
|
371
|
+
field tracks List.TimelineTrackInfo "Its tracks, in file order."
|
|
372
|
+
field paths List.String "The paths it declares."
|
|
373
|
+
field markers List.String "Its markers' names, in time order."
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
<sub>`api.ogt` line 13716</sub>
|
|
378
|
+
|
|
379
|
+
## Column kinds
|
|
380
|
+
|
|
381
|
+
Each is a factory, `TimelineAsset(value?, options?)`, that makes one field of a component or resource layout.
|
|
382
|
+
|
|
383
|
+
| Column | Value | Typed array | Stride | Doc |
|
|
384
|
+
|---|---|---|---|---|
|
|
385
|
+
| <a id="column-TimelineAsset"></a>`TimelineAsset` | `TimelineAsset` | `Uint32Array` | 2 | A TimelineAsset handle field (0 is none). |
|
|
386
|
+
|
|
387
|
+
```ogt
|
|
388
|
+
column TimelineAsset {
|
|
389
|
+
doc "A TimelineAsset handle field (0 is none)."
|
|
390
|
+
array Uint32Array
|
|
391
|
+
stride 2
|
|
392
|
+
value TimelineAsset
|
|
393
|
+
}
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
<sub>`api.ogt` line 13663</sub>
|
|
@@ -14,7 +14,7 @@ module transform {
|
|
|
14
14
|
# declarations follow, each quoted below
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
<sub>`api.ogt` line
|
|
17
|
+
<sub>`api.ogt` line 1105</sub>
|
|
18
18
|
|
|
19
19
|
## Contents
|
|
20
20
|
|
|
@@ -60,7 +60,7 @@ fn compose {
|
|
|
60
60
|
}
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
<sub>`api.ogt` line
|
|
63
|
+
<sub>`api.ogt` line 1132</sub>
|
|
64
64
|
|
|
65
65
|
<a id="fn-decompose"></a>
|
|
66
66
|
|
|
@@ -88,7 +88,7 @@ fn decompose {
|
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
<sub>`api.ogt` line
|
|
91
|
+
<sub>`api.ogt` line 1140</sub>
|
|
92
92
|
|
|
93
93
|
<a id="fn-lookAt"></a>
|
|
94
94
|
|
|
@@ -122,7 +122,7 @@ fn lookAt {
|
|
|
122
122
|
}
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
<sub>`api.ogt` line
|
|
125
|
+
<sub>`api.ogt` line 1146</sub>
|
|
126
126
|
|
|
127
127
|
<a id="fn-fromAxisAngle"></a>
|
|
128
128
|
|
|
@@ -152,7 +152,7 @@ fn fromAxisAngle {
|
|
|
152
152
|
}
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
-
<sub>`api.ogt` line
|
|
155
|
+
<sub>`api.ogt` line 1156</sub>
|
|
156
156
|
|
|
157
157
|
## Components, resources and events
|
|
158
158
|
|
|
@@ -183,7 +183,7 @@ component Transform {
|
|
|
183
183
|
}
|
|
184
184
|
```
|
|
185
185
|
|
|
186
|
-
<sub>`api.ogt` line
|
|
186
|
+
<sub>`api.ogt` line 1109</sub>
|
|
187
187
|
|
|
188
188
|
<a id="record-Parent"></a>
|
|
189
189
|
|
|
@@ -204,7 +204,7 @@ component Parent {
|
|
|
204
204
|
}
|
|
205
205
|
```
|
|
206
206
|
|
|
207
|
-
<sub>`api.ogt` line
|
|
207
|
+
<sub>`api.ogt` line 1120</sub>
|
|
208
208
|
|
|
209
209
|
<a id="record-MatrixWorld"></a>
|
|
210
210
|
|
|
@@ -227,4 +227,4 @@ component MatrixWorld {
|
|
|
227
227
|
}
|
|
228
228
|
```
|
|
229
229
|
|
|
230
|
-
<sub>`api.ogt` line
|
|
230
|
+
<sub>`api.ogt` line 1125</sub>
|
package/knowledge/wiki/tween.md
CHANGED
|
@@ -18,7 +18,7 @@ module tween {
|
|
|
18
18
|
# declarations follow, each quoted below
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
<sub>`api.ogt` line
|
|
21
|
+
<sub>`api.ogt` line 7732</sub>
|
|
22
22
|
|
|
23
23
|
## Contents
|
|
24
24
|
|
|
@@ -71,7 +71,7 @@ fn to {
|
|
|
71
71
|
}
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
<sub>`api.ogt` line
|
|
74
|
+
<sub>`api.ogt` line 7857</sub>
|
|
75
75
|
|
|
76
76
|
<a id="fn-sequence"></a>
|
|
77
77
|
|
|
@@ -105,7 +105,7 @@ fn sequence {
|
|
|
105
105
|
}
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
-
<sub>`api.ogt` line
|
|
108
|
+
<sub>`api.ogt` line 7864</sub>
|
|
109
109
|
|
|
110
110
|
<a id="fn-parallel"></a>
|
|
111
111
|
|
|
@@ -139,7 +139,7 @@ fn parallel {
|
|
|
139
139
|
}
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
<sub>`api.ogt` line
|
|
142
|
+
<sub>`api.ogt` line 7874</sub>
|
|
143
143
|
|
|
144
144
|
<a id="fn-cancel"></a>
|
|
145
145
|
|
|
@@ -169,7 +169,7 @@ fn cancel {
|
|
|
169
169
|
}
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
<sub>`api.ogt` line
|
|
172
|
+
<sub>`api.ogt` line 7884</sub>
|
|
173
173
|
|
|
174
174
|
<a id="fn-cancelEntity"></a>
|
|
175
175
|
|
|
@@ -199,7 +199,7 @@ fn cancelEntity {
|
|
|
199
199
|
}
|
|
200
200
|
```
|
|
201
201
|
|
|
202
|
-
<sub>`api.ogt` line
|
|
202
|
+
<sub>`api.ogt` line 7891</sub>
|
|
203
203
|
|
|
204
204
|
<a id="fn-active"></a>
|
|
205
205
|
|
|
@@ -229,7 +229,7 @@ fn active {
|
|
|
229
229
|
}
|
|
230
230
|
```
|
|
231
231
|
|
|
232
|
-
<sub>`api.ogt` line
|
|
232
|
+
<sub>`api.ogt` line 7898</sub>
|
|
233
233
|
|
|
234
234
|
<a id="fn-squash"></a>
|
|
235
235
|
|
|
@@ -259,7 +259,7 @@ fn squash {
|
|
|
259
259
|
}
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
-
<sub>`api.ogt` line
|
|
262
|
+
<sub>`api.ogt` line 7905</sub>
|
|
263
263
|
|
|
264
264
|
<a id="fn-flash"></a>
|
|
265
265
|
|
|
@@ -289,7 +289,7 @@ fn flash {
|
|
|
289
289
|
}
|
|
290
290
|
```
|
|
291
291
|
|
|
292
|
-
<sub>`api.ogt` line
|
|
292
|
+
<sub>`api.ogt` line 7912</sub>
|
|
293
293
|
|
|
294
294
|
## Components, resources and events
|
|
295
295
|
|
|
@@ -316,7 +316,7 @@ event TweenCompleted {
|
|
|
316
316
|
}
|
|
317
317
|
```
|
|
318
318
|
|
|
319
|
-
<sub>`api.ogt` line
|
|
319
|
+
<sub>`api.ogt` line 7810</sub>
|
|
320
320
|
|
|
321
321
|
## Types
|
|
322
322
|
|
|
@@ -332,7 +332,7 @@ A generational handle: a number the engine hands out. A dead handle is an error
|
|
|
332
332
|
handle Tween "A running tween or group."
|
|
333
333
|
```
|
|
334
334
|
|
|
335
|
-
<sub>`api.ogt` line
|
|
335
|
+
<sub>`api.ogt` line 7738</sub>
|
|
336
336
|
|
|
337
337
|
<a id="type-Ease"></a>
|
|
338
338
|
|
|
@@ -395,7 +395,7 @@ enum Ease {
|
|
|
395
395
|
}
|
|
396
396
|
```
|
|
397
397
|
|
|
398
|
-
<sub>`api.ogt` line
|
|
398
|
+
<sub>`api.ogt` line 7747</sub>
|
|
399
399
|
|
|
400
400
|
<a id="type-TweenDesc"></a>
|
|
401
401
|
|
|
@@ -450,7 +450,7 @@ struct TweenDesc {
|
|
|
450
450
|
}
|
|
451
451
|
```
|
|
452
452
|
|
|
453
|
-
<sub>`api.ogt` line
|
|
453
|
+
<sub>`api.ogt` line 7773</sub>
|
|
454
454
|
|
|
455
455
|
<a id="type-TweenGroupDesc"></a>
|
|
456
456
|
|
|
@@ -478,7 +478,7 @@ struct TweenGroupDesc {
|
|
|
478
478
|
}
|
|
479
479
|
```
|
|
480
480
|
|
|
481
|
-
<sub>`api.ogt` line
|
|
481
|
+
<sub>`api.ogt` line 7800</sub>
|
|
482
482
|
|
|
483
483
|
<a id="type-SquashDesc"></a>
|
|
484
484
|
|
|
@@ -516,7 +516,7 @@ struct SquashDesc {
|
|
|
516
516
|
}
|
|
517
517
|
```
|
|
518
518
|
|
|
519
|
-
<sub>`api.ogt` line
|
|
519
|
+
<sub>`api.ogt` line 7817</sub>
|
|
520
520
|
|
|
521
521
|
<a id="type-FlashDesc"></a>
|
|
522
522
|
|
|
@@ -558,7 +558,7 @@ struct FlashDesc {
|
|
|
558
558
|
}
|
|
559
559
|
```
|
|
560
560
|
|
|
561
|
-
<sub>`api.ogt` line
|
|
561
|
+
<sub>`api.ogt` line 7835</sub>
|
|
562
562
|
|
|
563
563
|
## Column kinds
|
|
564
564
|
|
|
@@ -577,4 +577,4 @@ column Tween {
|
|
|
577
577
|
}
|
|
578
578
|
```
|
|
579
579
|
|
|
580
|
-
<sub>`api.ogt` line
|
|
580
|
+
<sub>`api.ogt` line 7740</sub>
|