@zylem/game-lib 0.8.9 → 0.9.1
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/README.md +7 -1
- package/dist/api/game-lib.api.json +37952 -19547
- package/dist/api/game-lib.api.md +1302 -7
- package/dist/api/game-lib.d.ts +1696 -3
- package/dist/api/game-lib.typedoc.json +174596 -76562
- package/dist/audio.d.ts +193 -1
- package/dist/audio.js +1 -1
- package/dist/bridge.d.ts +17 -2
- package/dist/bridge.js +1 -1
- package/dist/catalog.js +1 -1
- package/dist/chunk-2PFNNGTV.js +1 -0
- package/dist/chunk-2XMG3NJS.js +1 -0
- package/dist/chunk-4CZZZCFB.js +9 -0
- package/dist/chunk-7CBJKE42.js +1 -0
- package/dist/{chunk-CBUQBP2U.js → chunk-BQRMYLYD.js} +1 -1
- package/dist/chunk-FZNEWOC5.js +1 -0
- package/dist/chunk-GPCSX3M6.js +1 -0
- package/dist/chunk-K3NNXZIJ.js +1 -0
- package/dist/{chunk-JNFFTNMH.js → chunk-KSEP7AUF.js} +1 -1
- package/dist/{chunk-7JSZEEAE.js → chunk-LI43BZQN.js} +1 -1
- package/dist/chunk-NVVLLWIM.js +1 -0
- package/dist/chunk-QGIYILYI.js +1 -0
- package/dist/chunk-SHDHPDOV.js +24 -0
- package/dist/chunk-STVEILJJ.js +1 -0
- package/dist/chunk-SWDNK4GG.js +1 -0
- package/dist/chunk-UUOPT2N4.js +1 -0
- package/dist/chunk-VMXSE3EC.js +0 -0
- package/dist/{chunk-EYDC2PMO.js → chunk-VSFULLND.js} +1 -1
- package/dist/chunk-YNX3Q3CL.js +1 -0
- package/dist/chunk-ZZO4CKRU.js +1 -0
- package/dist/cinematics.d.ts +279 -0
- package/dist/cinematics.js +1 -0
- package/dist/core.d.ts +124 -10
- package/dist/core.js +1 -1
- package/dist/cutscene-definition-C479fkei.d.ts +509 -0
- package/dist/debug.d.ts +1 -0
- package/dist/debug.js +1 -1
- package/dist/{entity-type-map-D6BeAdvg.d.ts → entity-type-map-CrsrKT8c.d.ts} +12 -3
- package/dist/entity.d.ts +2 -1
- package/dist/entity.js +1 -1
- package/dist/game-D8KTP3fD.d.ts +652 -0
- package/dist/game-default-JV3Q6JAL.js +1 -0
- package/dist/graphics.d.ts +1 -1
- package/dist/graphics.js +1 -1
- package/dist/public.d.ts +12 -6
- package/dist/public.js +1 -1
- package/dist/schema/cutscene.schema.json +782 -0
- package/dist/schema/song.schema.json +430 -0
- package/dist/schema.d.ts +2 -0
- package/dist/schema.js +1 -1
- package/dist/selection-bounds-BKmSo9aG.d.ts +50 -0
- package/dist/song-definition-rEKksP0B.d.ts +263 -0
- package/dist/song-player-7QPLFLAS.js +1 -0
- package/dist/{game-DyKbOeck.d.ts → stage-CAPlk_cN.d.ts} +146 -647
- package/dist/web-components.d.ts +5 -3
- package/dist/web-components.js +1 -1
- package/dist/{zylem-camera-DZTpPOiD.d.ts → zylem-camera-CYDtrVgi.d.ts} +134 -102
- package/package.json +11 -4
- package/dist/chunk-34MYRTRP.js +0 -9
- package/dist/chunk-AXJTUVGC.js +0 -24
- package/dist/chunk-BWOZF5YK.js +0 -1
- package/dist/chunk-EVMLNMGU.js +0 -1
- package/dist/chunk-G3TBBZUI.js +0 -1
- package/dist/chunk-J6KD2G6F.js +0 -1
- package/dist/chunk-X7T7QRYP.js +0 -1
- package/dist/chunk-YVWDCZNT.js +0 -1
- package/dist/chunk-ZRT3ZQVH.js +0 -1
- package/dist/game-default-6YXFFZ2Q.js +0 -1
- /package/dist/{chunk-MSCVL5OK.js → chunk-ELQN62PQ.js} +0 -0
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
2
|
+
import { Static } from '@sinclair/typebox';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* TypeBox schema for a cutscene the cinematics module can play: a timeline in
|
|
6
|
+
* seconds split into scenes, cameras (static, dolly along a spline, or
|
|
7
|
+
* following an entity) placed on camera tracks as shots, camera keyframes,
|
|
8
|
+
* and event/audio tracks that fire gameplay hooks at points in time.
|
|
9
|
+
*
|
|
10
|
+
* Creator's Director mode authors `.cutscene.json` documents that strip down
|
|
11
|
+
* to this shape (`toRuntimeCutscene` in `@zylem-creator/shared`).
|
|
12
|
+
*/
|
|
13
|
+
declare const Vec3Schema: _sinclair_typebox.TObject<{
|
|
14
|
+
x: _sinclair_typebox.TNumber;
|
|
15
|
+
y: _sinclair_typebox.TNumber;
|
|
16
|
+
z: _sinclair_typebox.TNumber;
|
|
17
|
+
}>;
|
|
18
|
+
type Vec3Def = Static<typeof Vec3Schema>;
|
|
19
|
+
declare const CutsceneEasingSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
20
|
+
type CutsceneEasing = Static<typeof CutsceneEasingSchema>;
|
|
21
|
+
declare const SceneTransitionTypeSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"cut">, _sinclair_typebox.TLiteral<"fade">, _sinclair_typebox.TLiteral<"wipe">, _sinclair_typebox.TLiteral<"radial">, _sinclair_typebox.TLiteral<"noise">, _sinclair_typebox.TLiteral<"cells">]>;
|
|
22
|
+
type SceneTransitionType = Static<typeof SceneTransitionTypeSchema>;
|
|
23
|
+
declare const SceneTransitionSchema: _sinclair_typebox.TObject<{
|
|
24
|
+
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"cut">, _sinclair_typebox.TLiteral<"fade">, _sinclair_typebox.TLiteral<"wipe">, _sinclair_typebox.TLiteral<"radial">, _sinclair_typebox.TLiteral<"noise">, _sinclair_typebox.TLiteral<"cells">]>;
|
|
25
|
+
/** Seconds; ignored for `cut`. */
|
|
26
|
+
duration: _sinclair_typebox.TNumber;
|
|
27
|
+
easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
28
|
+
}>;
|
|
29
|
+
type SceneTransition = Static<typeof SceneTransitionSchema>;
|
|
30
|
+
declare const CutsceneSceneSchema: _sinclair_typebox.TObject<{
|
|
31
|
+
id: _sinclair_typebox.TString;
|
|
32
|
+
name: _sinclair_typebox.TString;
|
|
33
|
+
/** Seconds from the cutscene start. */
|
|
34
|
+
start: _sinclair_typebox.TNumber;
|
|
35
|
+
end: _sinclair_typebox.TNumber;
|
|
36
|
+
/** How the picture arrives at this scene's start. */
|
|
37
|
+
transitionIn: _sinclair_typebox.TObject<{
|
|
38
|
+
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"cut">, _sinclair_typebox.TLiteral<"fade">, _sinclair_typebox.TLiteral<"wipe">, _sinclair_typebox.TLiteral<"radial">, _sinclair_typebox.TLiteral<"noise">, _sinclair_typebox.TLiteral<"cells">]>;
|
|
39
|
+
/** Seconds; ignored for `cut`. */
|
|
40
|
+
duration: _sinclair_typebox.TNumber;
|
|
41
|
+
easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
42
|
+
}>;
|
|
43
|
+
}>;
|
|
44
|
+
type CutsceneScene = Static<typeof CutsceneSceneSchema>;
|
|
45
|
+
declare const CameraPoseDefSchema: _sinclair_typebox.TObject<{
|
|
46
|
+
position: _sinclair_typebox.TObject<{
|
|
47
|
+
x: _sinclair_typebox.TNumber;
|
|
48
|
+
y: _sinclair_typebox.TNumber;
|
|
49
|
+
z: _sinclair_typebox.TNumber;
|
|
50
|
+
}>;
|
|
51
|
+
lookAt: _sinclair_typebox.TObject<{
|
|
52
|
+
x: _sinclair_typebox.TNumber;
|
|
53
|
+
y: _sinclair_typebox.TNumber;
|
|
54
|
+
z: _sinclair_typebox.TNumber;
|
|
55
|
+
}>;
|
|
56
|
+
}>;
|
|
57
|
+
type CameraPoseDef = Static<typeof CameraPoseDefSchema>;
|
|
58
|
+
declare const CameraKeyframeSchema: _sinclair_typebox.TObject<{
|
|
59
|
+
id: _sinclair_typebox.TString;
|
|
60
|
+
/** Seconds from the cutscene start. */
|
|
61
|
+
time: _sinclair_typebox.TNumber;
|
|
62
|
+
position: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
63
|
+
x: _sinclair_typebox.TNumber;
|
|
64
|
+
y: _sinclair_typebox.TNumber;
|
|
65
|
+
z: _sinclair_typebox.TNumber;
|
|
66
|
+
}>>;
|
|
67
|
+
lookAt: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
68
|
+
x: _sinclair_typebox.TNumber;
|
|
69
|
+
y: _sinclair_typebox.TNumber;
|
|
70
|
+
z: _sinclair_typebox.TNumber;
|
|
71
|
+
}>>;
|
|
72
|
+
fov: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
73
|
+
/** Easing used to arrive at this keyframe from the previous one. */
|
|
74
|
+
easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
75
|
+
}>;
|
|
76
|
+
type CameraKeyframe = Static<typeof CameraKeyframeSchema>;
|
|
77
|
+
declare const CutsceneCameraKindSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"static">, _sinclair_typebox.TLiteral<"dolly">, _sinclair_typebox.TLiteral<"follow">]>;
|
|
78
|
+
type CutsceneCameraKind = Static<typeof CutsceneCameraKindSchema>;
|
|
79
|
+
declare const CutsceneCameraSchema: _sinclair_typebox.TObject<{
|
|
80
|
+
id: _sinclair_typebox.TString;
|
|
81
|
+
name: _sinclair_typebox.TString;
|
|
82
|
+
kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"static">, _sinclair_typebox.TLiteral<"dolly">, _sinclair_typebox.TLiteral<"follow">]>;
|
|
83
|
+
/** Vertical field of view in degrees. */
|
|
84
|
+
fov: _sinclair_typebox.TNumber;
|
|
85
|
+
/** Base pose; `static` cameras hold it, keyframes and dollies start from it. */
|
|
86
|
+
pose: _sinclair_typebox.TObject<{
|
|
87
|
+
position: _sinclair_typebox.TObject<{
|
|
88
|
+
x: _sinclair_typebox.TNumber;
|
|
89
|
+
y: _sinclair_typebox.TNumber;
|
|
90
|
+
z: _sinclair_typebox.TNumber;
|
|
91
|
+
}>;
|
|
92
|
+
lookAt: _sinclair_typebox.TObject<{
|
|
93
|
+
x: _sinclair_typebox.TNumber;
|
|
94
|
+
y: _sinclair_typebox.TNumber;
|
|
95
|
+
z: _sinclair_typebox.TNumber;
|
|
96
|
+
}>;
|
|
97
|
+
}>;
|
|
98
|
+
/** `dolly` cameras ride this path over each shot. */
|
|
99
|
+
dollyId: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
100
|
+
/** Progress curve along the dolly path (0 → 1 over the shot). */
|
|
101
|
+
dollyEasing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
102
|
+
/** Entity name a `follow` camera tracks, and what a dolly looks at when set. */
|
|
103
|
+
target: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
104
|
+
/** Offset from the target for `follow` cameras. */
|
|
105
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
106
|
+
x: _sinclair_typebox.TNumber;
|
|
107
|
+
y: _sinclair_typebox.TNumber;
|
|
108
|
+
z: _sinclair_typebox.TNumber;
|
|
109
|
+
}>>;
|
|
110
|
+
/** Smoothing for `follow` cameras, 0 (instant) … 1 (very slow). */
|
|
111
|
+
damping: _sinclair_typebox.TNumber;
|
|
112
|
+
keyframes: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
113
|
+
id: _sinclair_typebox.TString;
|
|
114
|
+
/** Seconds from the cutscene start. */
|
|
115
|
+
time: _sinclair_typebox.TNumber;
|
|
116
|
+
position: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
117
|
+
x: _sinclair_typebox.TNumber;
|
|
118
|
+
y: _sinclair_typebox.TNumber;
|
|
119
|
+
z: _sinclair_typebox.TNumber;
|
|
120
|
+
}>>;
|
|
121
|
+
lookAt: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
122
|
+
x: _sinclair_typebox.TNumber;
|
|
123
|
+
y: _sinclair_typebox.TNumber;
|
|
124
|
+
z: _sinclair_typebox.TNumber;
|
|
125
|
+
}>>;
|
|
126
|
+
fov: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
127
|
+
/** Easing used to arrive at this keyframe from the previous one. */
|
|
128
|
+
easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
129
|
+
}>>;
|
|
130
|
+
}>;
|
|
131
|
+
type CutsceneCamera = Static<typeof CutsceneCameraSchema>;
|
|
132
|
+
declare const DollyPathSchema: _sinclair_typebox.TObject<{
|
|
133
|
+
id: _sinclair_typebox.TString;
|
|
134
|
+
name: _sinclair_typebox.TString;
|
|
135
|
+
points: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
136
|
+
x: _sinclair_typebox.TNumber;
|
|
137
|
+
y: _sinclair_typebox.TNumber;
|
|
138
|
+
z: _sinclair_typebox.TNumber;
|
|
139
|
+
}>>;
|
|
140
|
+
closed: _sinclair_typebox.TBoolean;
|
|
141
|
+
/** Catmull-Rom tension; 0.5 is centripetal. */
|
|
142
|
+
tension: _sinclair_typebox.TNumber;
|
|
143
|
+
}>;
|
|
144
|
+
type DollyPath = Static<typeof DollyPathSchema>;
|
|
145
|
+
declare const ShotBlendSchema: _sinclair_typebox.TObject<{
|
|
146
|
+
/** Seconds spent blending from the previous shot's camera; 0 is a hard cut. */
|
|
147
|
+
duration: _sinclair_typebox.TNumber;
|
|
148
|
+
easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
149
|
+
}>;
|
|
150
|
+
type ShotBlend = Static<typeof ShotBlendSchema>;
|
|
151
|
+
declare const CameraShotSchema: _sinclair_typebox.TObject<{
|
|
152
|
+
id: _sinclair_typebox.TString;
|
|
153
|
+
cameraId: _sinclair_typebox.TString;
|
|
154
|
+
start: _sinclair_typebox.TNumber;
|
|
155
|
+
end: _sinclair_typebox.TNumber;
|
|
156
|
+
blend: _sinclair_typebox.TObject<{
|
|
157
|
+
/** Seconds spent blending from the previous shot's camera; 0 is a hard cut. */
|
|
158
|
+
duration: _sinclair_typebox.TNumber;
|
|
159
|
+
easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
160
|
+
}>;
|
|
161
|
+
}>;
|
|
162
|
+
type CameraShot = Static<typeof CameraShotSchema>;
|
|
163
|
+
declare const CutsceneEventSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
164
|
+
type: _sinclair_typebox.TLiteral<"emit">;
|
|
165
|
+
/** Stage event name. */
|
|
166
|
+
name: _sinclair_typebox.TString;
|
|
167
|
+
payload: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>>;
|
|
168
|
+
}>, _sinclair_typebox.TObject<{
|
|
169
|
+
type: _sinclair_typebox.TLiteral<"playAnimation">;
|
|
170
|
+
/** Entity name. */
|
|
171
|
+
entity: _sinclair_typebox.TString;
|
|
172
|
+
/** Animation key as passed to `playAnimation({ key })`. */
|
|
173
|
+
key: _sinclair_typebox.TString;
|
|
174
|
+
}>, _sinclair_typebox.TObject<{
|
|
175
|
+
type: _sinclair_typebox.TLiteral<"playSong">;
|
|
176
|
+
/** Song slug or URL; resolved by the host. */
|
|
177
|
+
song: _sinclair_typebox.TString;
|
|
178
|
+
loop: _sinclair_typebox.TBoolean;
|
|
179
|
+
}>, _sinclair_typebox.TObject<{
|
|
180
|
+
type: _sinclair_typebox.TLiteral<"stopSong">;
|
|
181
|
+
song: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
182
|
+
}>, _sinclair_typebox.TObject<{
|
|
183
|
+
type: _sinclair_typebox.TLiteral<"setVariable">;
|
|
184
|
+
name: _sinclair_typebox.TString;
|
|
185
|
+
value: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>;
|
|
186
|
+
}>]>;
|
|
187
|
+
type CutsceneEvent = Static<typeof CutsceneEventSchema>;
|
|
188
|
+
declare const EventItemSchema: _sinclair_typebox.TObject<{
|
|
189
|
+
id: _sinclair_typebox.TString;
|
|
190
|
+
time: _sinclair_typebox.TNumber;
|
|
191
|
+
event: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
192
|
+
type: _sinclair_typebox.TLiteral<"emit">;
|
|
193
|
+
/** Stage event name. */
|
|
194
|
+
name: _sinclair_typebox.TString;
|
|
195
|
+
payload: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>>;
|
|
196
|
+
}>, _sinclair_typebox.TObject<{
|
|
197
|
+
type: _sinclair_typebox.TLiteral<"playAnimation">;
|
|
198
|
+
/** Entity name. */
|
|
199
|
+
entity: _sinclair_typebox.TString;
|
|
200
|
+
/** Animation key as passed to `playAnimation({ key })`. */
|
|
201
|
+
key: _sinclair_typebox.TString;
|
|
202
|
+
}>, _sinclair_typebox.TObject<{
|
|
203
|
+
type: _sinclair_typebox.TLiteral<"playSong">;
|
|
204
|
+
/** Song slug or URL; resolved by the host. */
|
|
205
|
+
song: _sinclair_typebox.TString;
|
|
206
|
+
loop: _sinclair_typebox.TBoolean;
|
|
207
|
+
}>, _sinclair_typebox.TObject<{
|
|
208
|
+
type: _sinclair_typebox.TLiteral<"stopSong">;
|
|
209
|
+
song: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
210
|
+
}>, _sinclair_typebox.TObject<{
|
|
211
|
+
type: _sinclair_typebox.TLiteral<"setVariable">;
|
|
212
|
+
name: _sinclair_typebox.TString;
|
|
213
|
+
value: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>;
|
|
214
|
+
}>]>;
|
|
215
|
+
}>;
|
|
216
|
+
type EventItem = Static<typeof EventItemSchema>;
|
|
217
|
+
declare const AudioItemSchema: _sinclair_typebox.TObject<{
|
|
218
|
+
id: _sinclair_typebox.TString;
|
|
219
|
+
time: _sinclair_typebox.TNumber;
|
|
220
|
+
kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"song">, _sinclair_typebox.TLiteral<"sfx">]>;
|
|
221
|
+
/** Song slug for `song`, asset URL for `sfx`. */
|
|
222
|
+
ref: _sinclair_typebox.TString;
|
|
223
|
+
loop: _sinclair_typebox.TBoolean;
|
|
224
|
+
/** Gain in dB. */
|
|
225
|
+
volume: _sinclair_typebox.TNumber;
|
|
226
|
+
}>;
|
|
227
|
+
type AudioItem = Static<typeof AudioItemSchema>;
|
|
228
|
+
declare const CameraTrackSchema: _sinclair_typebox.TObject<{
|
|
229
|
+
kind: _sinclair_typebox.TLiteral<"camera">;
|
|
230
|
+
id: _sinclair_typebox.TString;
|
|
231
|
+
name: _sinclair_typebox.TString;
|
|
232
|
+
items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
233
|
+
id: _sinclair_typebox.TString;
|
|
234
|
+
cameraId: _sinclair_typebox.TString;
|
|
235
|
+
start: _sinclair_typebox.TNumber;
|
|
236
|
+
end: _sinclair_typebox.TNumber;
|
|
237
|
+
blend: _sinclair_typebox.TObject<{
|
|
238
|
+
/** Seconds spent blending from the previous shot's camera; 0 is a hard cut. */
|
|
239
|
+
duration: _sinclair_typebox.TNumber;
|
|
240
|
+
easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
241
|
+
}>;
|
|
242
|
+
}>>;
|
|
243
|
+
}>;
|
|
244
|
+
declare const EventTrackSchema: _sinclair_typebox.TObject<{
|
|
245
|
+
kind: _sinclair_typebox.TLiteral<"event">;
|
|
246
|
+
id: _sinclair_typebox.TString;
|
|
247
|
+
name: _sinclair_typebox.TString;
|
|
248
|
+
items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
249
|
+
id: _sinclair_typebox.TString;
|
|
250
|
+
time: _sinclair_typebox.TNumber;
|
|
251
|
+
event: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
252
|
+
type: _sinclair_typebox.TLiteral<"emit">;
|
|
253
|
+
/** Stage event name. */
|
|
254
|
+
name: _sinclair_typebox.TString;
|
|
255
|
+
payload: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>>;
|
|
256
|
+
}>, _sinclair_typebox.TObject<{
|
|
257
|
+
type: _sinclair_typebox.TLiteral<"playAnimation">;
|
|
258
|
+
/** Entity name. */
|
|
259
|
+
entity: _sinclair_typebox.TString;
|
|
260
|
+
/** Animation key as passed to `playAnimation({ key })`. */
|
|
261
|
+
key: _sinclair_typebox.TString;
|
|
262
|
+
}>, _sinclair_typebox.TObject<{
|
|
263
|
+
type: _sinclair_typebox.TLiteral<"playSong">;
|
|
264
|
+
/** Song slug or URL; resolved by the host. */
|
|
265
|
+
song: _sinclair_typebox.TString;
|
|
266
|
+
loop: _sinclair_typebox.TBoolean;
|
|
267
|
+
}>, _sinclair_typebox.TObject<{
|
|
268
|
+
type: _sinclair_typebox.TLiteral<"stopSong">;
|
|
269
|
+
song: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
270
|
+
}>, _sinclair_typebox.TObject<{
|
|
271
|
+
type: _sinclair_typebox.TLiteral<"setVariable">;
|
|
272
|
+
name: _sinclair_typebox.TString;
|
|
273
|
+
value: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>;
|
|
274
|
+
}>]>;
|
|
275
|
+
}>>;
|
|
276
|
+
}>;
|
|
277
|
+
declare const AudioTrackSchema: _sinclair_typebox.TObject<{
|
|
278
|
+
kind: _sinclair_typebox.TLiteral<"audio">;
|
|
279
|
+
id: _sinclair_typebox.TString;
|
|
280
|
+
name: _sinclair_typebox.TString;
|
|
281
|
+
items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
282
|
+
id: _sinclair_typebox.TString;
|
|
283
|
+
time: _sinclair_typebox.TNumber;
|
|
284
|
+
kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"song">, _sinclair_typebox.TLiteral<"sfx">]>;
|
|
285
|
+
/** Song slug for `song`, asset URL for `sfx`. */
|
|
286
|
+
ref: _sinclair_typebox.TString;
|
|
287
|
+
loop: _sinclair_typebox.TBoolean;
|
|
288
|
+
/** Gain in dB. */
|
|
289
|
+
volume: _sinclair_typebox.TNumber;
|
|
290
|
+
}>>;
|
|
291
|
+
}>;
|
|
292
|
+
declare const CutsceneTrackSchema: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
293
|
+
kind: _sinclair_typebox.TLiteral<"camera">;
|
|
294
|
+
id: _sinclair_typebox.TString;
|
|
295
|
+
name: _sinclair_typebox.TString;
|
|
296
|
+
items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
297
|
+
id: _sinclair_typebox.TString;
|
|
298
|
+
cameraId: _sinclair_typebox.TString;
|
|
299
|
+
start: _sinclair_typebox.TNumber;
|
|
300
|
+
end: _sinclair_typebox.TNumber;
|
|
301
|
+
blend: _sinclair_typebox.TObject<{
|
|
302
|
+
/** Seconds spent blending from the previous shot's camera; 0 is a hard cut. */
|
|
303
|
+
duration: _sinclair_typebox.TNumber;
|
|
304
|
+
easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
305
|
+
}>;
|
|
306
|
+
}>>;
|
|
307
|
+
}>, _sinclair_typebox.TObject<{
|
|
308
|
+
kind: _sinclair_typebox.TLiteral<"event">;
|
|
309
|
+
id: _sinclair_typebox.TString;
|
|
310
|
+
name: _sinclair_typebox.TString;
|
|
311
|
+
items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
312
|
+
id: _sinclair_typebox.TString;
|
|
313
|
+
time: _sinclair_typebox.TNumber;
|
|
314
|
+
event: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
315
|
+
type: _sinclair_typebox.TLiteral<"emit">;
|
|
316
|
+
/** Stage event name. */
|
|
317
|
+
name: _sinclair_typebox.TString;
|
|
318
|
+
payload: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>>;
|
|
319
|
+
}>, _sinclair_typebox.TObject<{
|
|
320
|
+
type: _sinclair_typebox.TLiteral<"playAnimation">;
|
|
321
|
+
/** Entity name. */
|
|
322
|
+
entity: _sinclair_typebox.TString;
|
|
323
|
+
/** Animation key as passed to `playAnimation({ key })`. */
|
|
324
|
+
key: _sinclair_typebox.TString;
|
|
325
|
+
}>, _sinclair_typebox.TObject<{
|
|
326
|
+
type: _sinclair_typebox.TLiteral<"playSong">;
|
|
327
|
+
/** Song slug or URL; resolved by the host. */
|
|
328
|
+
song: _sinclair_typebox.TString;
|
|
329
|
+
loop: _sinclair_typebox.TBoolean;
|
|
330
|
+
}>, _sinclair_typebox.TObject<{
|
|
331
|
+
type: _sinclair_typebox.TLiteral<"stopSong">;
|
|
332
|
+
song: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
333
|
+
}>, _sinclair_typebox.TObject<{
|
|
334
|
+
type: _sinclair_typebox.TLiteral<"setVariable">;
|
|
335
|
+
name: _sinclair_typebox.TString;
|
|
336
|
+
value: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>;
|
|
337
|
+
}>]>;
|
|
338
|
+
}>>;
|
|
339
|
+
}>, _sinclair_typebox.TObject<{
|
|
340
|
+
kind: _sinclair_typebox.TLiteral<"audio">;
|
|
341
|
+
id: _sinclair_typebox.TString;
|
|
342
|
+
name: _sinclair_typebox.TString;
|
|
343
|
+
items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
344
|
+
id: _sinclair_typebox.TString;
|
|
345
|
+
time: _sinclair_typebox.TNumber;
|
|
346
|
+
kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"song">, _sinclair_typebox.TLiteral<"sfx">]>;
|
|
347
|
+
/** Song slug for `song`, asset URL for `sfx`. */
|
|
348
|
+
ref: _sinclair_typebox.TString;
|
|
349
|
+
loop: _sinclair_typebox.TBoolean;
|
|
350
|
+
/** Gain in dB. */
|
|
351
|
+
volume: _sinclair_typebox.TNumber;
|
|
352
|
+
}>>;
|
|
353
|
+
}>]>;
|
|
354
|
+
type CameraTrack = Static<typeof CameraTrackSchema>;
|
|
355
|
+
type EventTrack = Static<typeof EventTrackSchema>;
|
|
356
|
+
type AudioTrack = Static<typeof AudioTrackSchema>;
|
|
357
|
+
type CutsceneTrack = Static<typeof CutsceneTrackSchema>;
|
|
358
|
+
declare const CutsceneDefinitionSchema: _sinclair_typebox.TObject<{
|
|
359
|
+
id: _sinclair_typebox.TString;
|
|
360
|
+
name: _sinclair_typebox.TString;
|
|
361
|
+
/** Seconds. */
|
|
362
|
+
duration: _sinclair_typebox.TNumber;
|
|
363
|
+
/** Stage the cutscene was authored against; informational. */
|
|
364
|
+
stage: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNull]>;
|
|
365
|
+
skippable: _sinclair_typebox.TBoolean;
|
|
366
|
+
scenes: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
367
|
+
id: _sinclair_typebox.TString;
|
|
368
|
+
name: _sinclair_typebox.TString;
|
|
369
|
+
/** Seconds from the cutscene start. */
|
|
370
|
+
start: _sinclair_typebox.TNumber;
|
|
371
|
+
end: _sinclair_typebox.TNumber;
|
|
372
|
+
/** How the picture arrives at this scene's start. */
|
|
373
|
+
transitionIn: _sinclair_typebox.TObject<{
|
|
374
|
+
type: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"cut">, _sinclair_typebox.TLiteral<"fade">, _sinclair_typebox.TLiteral<"wipe">, _sinclair_typebox.TLiteral<"radial">, _sinclair_typebox.TLiteral<"noise">, _sinclair_typebox.TLiteral<"cells">]>;
|
|
375
|
+
/** Seconds; ignored for `cut`. */
|
|
376
|
+
duration: _sinclair_typebox.TNumber;
|
|
377
|
+
easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
378
|
+
}>;
|
|
379
|
+
}>>;
|
|
380
|
+
cameras: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
381
|
+
id: _sinclair_typebox.TString;
|
|
382
|
+
name: _sinclair_typebox.TString;
|
|
383
|
+
kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"static">, _sinclair_typebox.TLiteral<"dolly">, _sinclair_typebox.TLiteral<"follow">]>;
|
|
384
|
+
/** Vertical field of view in degrees. */
|
|
385
|
+
fov: _sinclair_typebox.TNumber;
|
|
386
|
+
/** Base pose; `static` cameras hold it, keyframes and dollies start from it. */
|
|
387
|
+
pose: _sinclair_typebox.TObject<{
|
|
388
|
+
position: _sinclair_typebox.TObject<{
|
|
389
|
+
x: _sinclair_typebox.TNumber;
|
|
390
|
+
y: _sinclair_typebox.TNumber;
|
|
391
|
+
z: _sinclair_typebox.TNumber;
|
|
392
|
+
}>;
|
|
393
|
+
lookAt: _sinclair_typebox.TObject<{
|
|
394
|
+
x: _sinclair_typebox.TNumber;
|
|
395
|
+
y: _sinclair_typebox.TNumber;
|
|
396
|
+
z: _sinclair_typebox.TNumber;
|
|
397
|
+
}>;
|
|
398
|
+
}>;
|
|
399
|
+
/** `dolly` cameras ride this path over each shot. */
|
|
400
|
+
dollyId: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
401
|
+
/** Progress curve along the dolly path (0 → 1 over the shot). */
|
|
402
|
+
dollyEasing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
403
|
+
/** Entity name a `follow` camera tracks, and what a dolly looks at when set. */
|
|
404
|
+
target: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
405
|
+
/** Offset from the target for `follow` cameras. */
|
|
406
|
+
offset: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
407
|
+
x: _sinclair_typebox.TNumber;
|
|
408
|
+
y: _sinclair_typebox.TNumber;
|
|
409
|
+
z: _sinclair_typebox.TNumber;
|
|
410
|
+
}>>;
|
|
411
|
+
/** Smoothing for `follow` cameras, 0 (instant) … 1 (very slow). */
|
|
412
|
+
damping: _sinclair_typebox.TNumber;
|
|
413
|
+
keyframes: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
414
|
+
id: _sinclair_typebox.TString;
|
|
415
|
+
/** Seconds from the cutscene start. */
|
|
416
|
+
time: _sinclair_typebox.TNumber;
|
|
417
|
+
position: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
418
|
+
x: _sinclair_typebox.TNumber;
|
|
419
|
+
y: _sinclair_typebox.TNumber;
|
|
420
|
+
z: _sinclair_typebox.TNumber;
|
|
421
|
+
}>>;
|
|
422
|
+
lookAt: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
423
|
+
x: _sinclair_typebox.TNumber;
|
|
424
|
+
y: _sinclair_typebox.TNumber;
|
|
425
|
+
z: _sinclair_typebox.TNumber;
|
|
426
|
+
}>>;
|
|
427
|
+
fov: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
428
|
+
/** Easing used to arrive at this keyframe from the previous one. */
|
|
429
|
+
easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
430
|
+
}>>;
|
|
431
|
+
}>>;
|
|
432
|
+
dollies: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
433
|
+
id: _sinclair_typebox.TString;
|
|
434
|
+
name: _sinclair_typebox.TString;
|
|
435
|
+
points: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
436
|
+
x: _sinclair_typebox.TNumber;
|
|
437
|
+
y: _sinclair_typebox.TNumber;
|
|
438
|
+
z: _sinclair_typebox.TNumber;
|
|
439
|
+
}>>;
|
|
440
|
+
closed: _sinclair_typebox.TBoolean;
|
|
441
|
+
/** Catmull-Rom tension; 0.5 is centripetal. */
|
|
442
|
+
tension: _sinclair_typebox.TNumber;
|
|
443
|
+
}>>;
|
|
444
|
+
tracks: _sinclair_typebox.TArray<_sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
445
|
+
kind: _sinclair_typebox.TLiteral<"camera">;
|
|
446
|
+
id: _sinclair_typebox.TString;
|
|
447
|
+
name: _sinclair_typebox.TString;
|
|
448
|
+
items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
449
|
+
id: _sinclair_typebox.TString;
|
|
450
|
+
cameraId: _sinclair_typebox.TString;
|
|
451
|
+
start: _sinclair_typebox.TNumber;
|
|
452
|
+
end: _sinclair_typebox.TNumber;
|
|
453
|
+
blend: _sinclair_typebox.TObject<{
|
|
454
|
+
/** Seconds spent blending from the previous shot's camera; 0 is a hard cut. */
|
|
455
|
+
duration: _sinclair_typebox.TNumber;
|
|
456
|
+
easing: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"linear">, _sinclair_typebox.TLiteral<"easeIn">, _sinclair_typebox.TLiteral<"easeOut">, _sinclair_typebox.TLiteral<"easeInOut">]>;
|
|
457
|
+
}>;
|
|
458
|
+
}>>;
|
|
459
|
+
}>, _sinclair_typebox.TObject<{
|
|
460
|
+
kind: _sinclair_typebox.TLiteral<"event">;
|
|
461
|
+
id: _sinclair_typebox.TString;
|
|
462
|
+
name: _sinclair_typebox.TString;
|
|
463
|
+
items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
464
|
+
id: _sinclair_typebox.TString;
|
|
465
|
+
time: _sinclair_typebox.TNumber;
|
|
466
|
+
event: _sinclair_typebox.TUnion<[_sinclair_typebox.TObject<{
|
|
467
|
+
type: _sinclair_typebox.TLiteral<"emit">;
|
|
468
|
+
/** Stage event name. */
|
|
469
|
+
name: _sinclair_typebox.TString;
|
|
470
|
+
payload: _sinclair_typebox.TRecord<_sinclair_typebox.TString, _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>>;
|
|
471
|
+
}>, _sinclair_typebox.TObject<{
|
|
472
|
+
type: _sinclair_typebox.TLiteral<"playAnimation">;
|
|
473
|
+
/** Entity name. */
|
|
474
|
+
entity: _sinclair_typebox.TString;
|
|
475
|
+
/** Animation key as passed to `playAnimation({ key })`. */
|
|
476
|
+
key: _sinclair_typebox.TString;
|
|
477
|
+
}>, _sinclair_typebox.TObject<{
|
|
478
|
+
type: _sinclair_typebox.TLiteral<"playSong">;
|
|
479
|
+
/** Song slug or URL; resolved by the host. */
|
|
480
|
+
song: _sinclair_typebox.TString;
|
|
481
|
+
loop: _sinclair_typebox.TBoolean;
|
|
482
|
+
}>, _sinclair_typebox.TObject<{
|
|
483
|
+
type: _sinclair_typebox.TLiteral<"stopSong">;
|
|
484
|
+
song: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
485
|
+
}>, _sinclair_typebox.TObject<{
|
|
486
|
+
type: _sinclair_typebox.TLiteral<"setVariable">;
|
|
487
|
+
name: _sinclair_typebox.TString;
|
|
488
|
+
value: _sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TBoolean]>;
|
|
489
|
+
}>]>;
|
|
490
|
+
}>>;
|
|
491
|
+
}>, _sinclair_typebox.TObject<{
|
|
492
|
+
kind: _sinclair_typebox.TLiteral<"audio">;
|
|
493
|
+
id: _sinclair_typebox.TString;
|
|
494
|
+
name: _sinclair_typebox.TString;
|
|
495
|
+
items: _sinclair_typebox.TArray<_sinclair_typebox.TObject<{
|
|
496
|
+
id: _sinclair_typebox.TString;
|
|
497
|
+
time: _sinclair_typebox.TNumber;
|
|
498
|
+
kind: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"song">, _sinclair_typebox.TLiteral<"sfx">]>;
|
|
499
|
+
/** Song slug for `song`, asset URL for `sfx`. */
|
|
500
|
+
ref: _sinclair_typebox.TString;
|
|
501
|
+
loop: _sinclair_typebox.TBoolean;
|
|
502
|
+
/** Gain in dB. */
|
|
503
|
+
volume: _sinclair_typebox.TNumber;
|
|
504
|
+
}>>;
|
|
505
|
+
}>]>>;
|
|
506
|
+
}>;
|
|
507
|
+
type CutsceneDefinition = Static<typeof CutsceneDefinitionSchema>;
|
|
508
|
+
|
|
509
|
+
export { AudioItemSchema as A, CutsceneDefinitionSchema as C, DollyPathSchema as D, EventItemSchema as E, SceneTransitionSchema as S, type Vec3Def as V, CutsceneSceneSchema as a, CutsceneCameraSchema as b, CameraKeyframeSchema as c, CameraShotSchema as d, CutsceneEventSchema as e, CutsceneTrackSchema as f, type CutsceneDefinition as g, type CutsceneScene as h, type CutsceneCamera as i, type CutsceneCameraKind as j, type CutsceneEasing as k, type CameraKeyframe as l, type CameraPoseDef as m, type CameraShot as n, type CameraTrack as o, type EventTrack as p, type AudioTrack as q, type CutsceneTrack as r, type DollyPath as s, type ShotBlend as t, type CutsceneEvent as u, type EventItem as v, type AudioItem as w, type SceneTransition as x, type SceneTransitionType as y };
|
package/dist/debug.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as three from 'three';
|
|
|
3
3
|
import { Group, Scene, Vector3, Camera, Object3D } from 'three';
|
|
4
4
|
import { c as Vec3 } from './vector-D3eDzvcA.js';
|
|
5
5
|
import { G as GameEntity } from './entity-XqvuWgPm.js';
|
|
6
|
+
export { S as SELECTION_BOUNDS_MARGIN, a as SELECTION_THIN_AXIS_FRACTION, c as SELECTION_THIN_AXIS_MAX, b as SELECTION_THIN_AXIS_MIN, d as SelectionBoundsProvider, m as measureObjectSelectionBounds, p as padSelectionBounds, r as resolveSelectionBounds } from './selection-bounds-BKmSo9aG.js';
|
|
6
7
|
import { WebGPURenderer } from 'three/webgpu';
|
|
7
8
|
import '@zylem/behaviors/core';
|
|
8
9
|
import './simulation-body-zQw-emOr.js';
|
package/dist/debug.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-ELQN62PQ.js";import{a as x,b as y}from"./chunk-Q2YDBMVY.js";import{c as P,d as Q,e as R,f as S}from"./chunk-BCFFS3FP.js";import{a as z,b as A,c as B,d as C,e as D,f as E,g as F,h as G,i as H}from"./chunk-BQRMYLYD.js";import{B as u,C as v,D as w,a,b,c,d,e,f,h as g,j as h,l as i,m as j,n as k,o as l,p as m,q as n,u as o,v as p,w as q,x as r,y as s,z as t}from"./chunk-GPCSX3M6.js";import{a as I,b as J,c as K,d as L,e as M,f as N,g as O}from"./chunk-UUOPT2N4.js";import"./chunk-WOT6VMZA.js";export{P as ConstructionGrid,c as DEFAULT_SNAP_SETTINGS,x as EntityThumbnailCache,I as SELECTION_BOUNDS_MARGIN,J as SELECTION_THIN_AXIS_FRACTION,L as SELECTION_THIN_AXIS_MAX,K as SELECTION_THIN_AXIS_MIN,a as TRANSFORM_TOOLS,S as TransformGizmo,Q as closestAxisValue,d as debugState,G as degreesToRadians,y as entityThumbnailCache,B as eulerToQuaternion,A as focusEntity,v as getHoveredEntity,s as getHoveredEntityId,u as getSelectedEntity,k as getSelectedEntityId,m as getSelectedEntityIds,o as getSnapSettings,R as intersectPlane,j as isPickMode,b as isTransformTool,N as measureObjectSelectionBounds,M as padSelectionBounds,C as quaternionToEuler,H as radiansToDegrees,e as registerDebugEntityResolver,z as registerEntityFocusContext,f as resolveDebugEntity,O as resolveSelectionBounds,r as setAddType,h as setDebugTool,q as setGridVisible,t as setHoveredEntityId,g as setPaused,i as setPickMode,w as setSelectedEntity,l as setSelectedEntityId,n as setSelectedEntityIds,p as setSnapSettings,F as snapScale,D as snapToIncrement,E as snapVec3};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Vector3, Sprite, Texture, Color, Object3D, ColorRepresentation, Light, Fog, FogExp2, Scene, Raycaster } from 'three';
|
|
1
|
+
import { Vector3, Sprite, Texture, Color, Box3, Object3D, ColorRepresentation, Light, Fog, FogExp2, Scene, Raycaster } from 'three';
|
|
2
2
|
import { B as BaseNode } from './base-node-idopiSw5.js';
|
|
3
3
|
import { G as GameEntity, a as GameEntityOptions } from './entity-XqvuWgPm.js';
|
|
4
4
|
import { d as Vec3Components, e as Vec3Input, b as Vec2Input } from './vector-D3eDzvcA.js';
|
|
5
5
|
import { U as UpdateContext, a as SetupContext, D as DestroyContext, l as CleanupContext } from './base-node-life-cycle-BK9xebT9.js';
|
|
6
6
|
import { T as TexturePath, e as MaterialOptions } from './material-CxxAyJYp.js';
|
|
7
|
+
import { d as SelectionBoundsProvider } from './selection-bounds-BKmSo9aG.js';
|
|
7
8
|
import { Simulation } from '@zylem/behaviors/core';
|
|
8
9
|
import { E as Entity } from './entity-BIf_a4dl.js';
|
|
9
10
|
import { ParticleEmitterBehaviorOptions, ParticleEffectDefinition, ParticleEmitterHandle } from '@zylem/behaviors/particle-emitter';
|
|
@@ -373,12 +374,18 @@ type ZylemZoneOptions = GameEntityOptions & {
|
|
|
373
374
|
onExit?: (params: OnExitParams) => void;
|
|
374
375
|
};
|
|
375
376
|
declare const ZONE_TYPE: unique symbol;
|
|
376
|
-
declare class ZylemZone extends GameEntity<ZylemZoneOptions> implements CollisionHandlerDelegate {
|
|
377
|
+
declare class ZylemZone extends GameEntity<ZylemZoneOptions> implements CollisionHandlerDelegate, SelectionBoundsProvider {
|
|
377
378
|
static type: symbol;
|
|
378
379
|
private _enteredZone;
|
|
379
380
|
private _exitedZone;
|
|
380
381
|
private _zoneEntities;
|
|
381
382
|
constructor(options?: ZylemZoneOptions);
|
|
383
|
+
/**
|
|
384
|
+
* A zone has no render object, so the editor cannot measure it. Its
|
|
385
|
+
* selection view is the sensor volume itself: `options.size` centred on
|
|
386
|
+
* the live pose (or the configured position before spawn).
|
|
387
|
+
*/
|
|
388
|
+
getSelectionBounds(target: Box3): Box3 | null;
|
|
382
389
|
handlePostCollision({ delta }: {
|
|
383
390
|
delta: number;
|
|
384
391
|
}): boolean;
|
|
@@ -614,10 +621,12 @@ type ZylemParticleSystemOptions = GameEntityOptions & ParticleEmitterBehaviorOpt
|
|
|
614
621
|
preset?: ParticleEffectDefinition;
|
|
615
622
|
};
|
|
616
623
|
declare const PARTICLE_SYSTEM_TYPE: unique symbol;
|
|
617
|
-
declare class ZylemParticleSystem extends GameEntity<ZylemParticleSystemOptions> {
|
|
624
|
+
declare class ZylemParticleSystem extends GameEntity<ZylemParticleSystemOptions> implements SelectionBoundsProvider {
|
|
618
625
|
static type: symbol;
|
|
619
626
|
__zylemParticleSystemEntity: true;
|
|
620
627
|
private particleHandle;
|
|
628
|
+
/** The emitter's `group` is empty, so measuring it yields nothing; see {@link PARTICLE_SYSTEM_SELECTION_EXTENT}. */
|
|
629
|
+
getSelectionBounds(target: Box3): Box3 | null;
|
|
621
630
|
constructor(options?: Partial<ZylemParticleSystemOptions>, initializeBehavior?: boolean);
|
|
622
631
|
private bindStandaloneTransforms;
|
|
623
632
|
private resolveParticleHandle;
|
package/dist/entity.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ACTOR_TYPE, a0 as AmbientLightOptions, B as BOX_TYPE, E as CONE_TYPE, K as CYLINDER_TYPE, C as CollisionShapeType, D as DISK_TYPE, a2 as DirectionalLightOptions, ak as EntityForType, aj as EntityTypeMap, a8 as FOG_TYPE, a1 as HemisphereLightOptions, _ as LIGHT_TYPE, ab as LINE_TYPE, a5 as LightShadowOptions, ae as LinePickResult, o as OnEnterParams, p as OnExitParams, O as OnHeldParams, V as PARTICLE_SYSTEM_TYPE, N as PILL_TYPE, P as PLANE_TYPE, H as PYRAMID_TYPE, a3 as PointLightOptions, R as RECT_TYPE, S as SPHERE_TYPE, f as SPRITE_TYPE, a4 as SpotLightOptions, h as SpriteAnimation, g as SpriteImage, i as SpriteSheet, T as TEXT_TYPE, n as ZONE_TYPE, r as ZylemActor, Z as ZylemBox, z as ZylemCone, J as ZylemCylinder, x as ZylemDisk, a7 as ZylemFog, ah as ZylemFogHeightOptions, ai as ZylemFogNoiseOptions, af as ZylemFogOptions, ag as ZylemFogType, Y as ZylemLight, $ as ZylemLightOptions, aa as ZylemLine, ad as ZylemLineOptions, U as ZylemParticleSystem, W as ZylemParticleSystemOptions, M as ZylemPill, k as ZylemPlane, G as ZylemPyramid, v as ZylemRect, b as ZylemSphere, e as ZylemSprite, t as ZylemText, m as ZylemZone, q as createActor, c as createBox, y as createCone, I as createCylinder, w as createDisk, a6 as createFog, X as createLight, a9 as createLine, Q as createParticleSystem, L as createPill, j as createPlane, F as createPyramid, u as createRect, a as createSphere, d as createSprite, s as createText, l as createZone, ac as pickZylemLine } from './entity-type-map-
|
|
1
|
+
export { A as ACTOR_TYPE, a0 as AmbientLightOptions, B as BOX_TYPE, E as CONE_TYPE, K as CYLINDER_TYPE, C as CollisionShapeType, D as DISK_TYPE, a2 as DirectionalLightOptions, ak as EntityForType, aj as EntityTypeMap, a8 as FOG_TYPE, a1 as HemisphereLightOptions, _ as LIGHT_TYPE, ab as LINE_TYPE, a5 as LightShadowOptions, ae as LinePickResult, o as OnEnterParams, p as OnExitParams, O as OnHeldParams, V as PARTICLE_SYSTEM_TYPE, N as PILL_TYPE, P as PLANE_TYPE, H as PYRAMID_TYPE, a3 as PointLightOptions, R as RECT_TYPE, S as SPHERE_TYPE, f as SPRITE_TYPE, a4 as SpotLightOptions, h as SpriteAnimation, g as SpriteImage, i as SpriteSheet, T as TEXT_TYPE, n as ZONE_TYPE, r as ZylemActor, Z as ZylemBox, z as ZylemCone, J as ZylemCylinder, x as ZylemDisk, a7 as ZylemFog, ah as ZylemFogHeightOptions, ai as ZylemFogNoiseOptions, af as ZylemFogOptions, ag as ZylemFogType, Y as ZylemLight, $ as ZylemLightOptions, aa as ZylemLine, ad as ZylemLineOptions, U as ZylemParticleSystem, W as ZylemParticleSystemOptions, M as ZylemPill, k as ZylemPlane, G as ZylemPyramid, v as ZylemRect, b as ZylemSphere, e as ZylemSprite, t as ZylemText, m as ZylemZone, q as createActor, c as createBox, y as createCone, I as createCylinder, w as createDisk, a6 as createFog, X as createLight, a9 as createLine, Q as createParticleSystem, L as createPill, j as createPlane, F as createPyramid, u as createRect, a as createSphere, d as createSprite, s as createText, l as createZone, ac as pickZylemLine } from './entity-type-map-CrsrKT8c.js';
|
|
2
2
|
import { G as GameEntity, a as GameEntityOptions, E as EntityBuilder, B as EntityMeshBuilder, D as EntityCollisionBuilder } from './entity-XqvuWgPm.js';
|
|
3
3
|
export { C as CollisionComponent, b as boxCollision, d as coneCollision, c as create, e as cylinderCollision, f as pillCollision, g as planeCollision, p as pyramidCollision, s as sphereCollision, z as zoneCollision } from './entity-XqvuWgPm.js';
|
|
4
4
|
import { Color, Mesh } from 'three';
|
|
@@ -7,6 +7,7 @@ import { b as Vec2Input, e as Vec3Input } from './vector-D3eDzvcA.js';
|
|
|
7
7
|
import { e as MaterialOptions } from './material-CxxAyJYp.js';
|
|
8
8
|
import './base-node-life-cycle-BK9xebT9.js';
|
|
9
9
|
import './stage-transition-CmGpV4tc.js';
|
|
10
|
+
import './selection-bounds-BKmSo9aG.js';
|
|
10
11
|
import '@zylem/behaviors/core';
|
|
11
12
|
import './entity-BIf_a4dl.js';
|
|
12
13
|
import './simulation-body-zQw-emOr.js';
|
package/dist/entity.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ma,b as na,c as oa,d as pa,e as qa}from"./chunk-
|
|
1
|
+
import{a as ma,b as na,c as oa,d as pa,e as qa}from"./chunk-K3NNXZIJ.js";import{a as ba,b as ca,c as da,d as ea,e as fa,f as ga,g as ha,h as ia,i as ja,j as ka,l as la}from"./chunk-LI43BZQN.js";import{a as X,b as Y,c as Z,d as _,e as $,f as aa}from"./chunk-YQS7CGXE.js";import{A as J,B as K,C as L,D as M,E as N,F as O,G as P,H as Q,I as R,J as S,K as T,L as U,M as V,N as W,b as j,c as k,d as l,e as m,f as n,g as o,h as p,i as q,j as r,k as s,l as t,m as u,n as v,o as w,p as x,q as y,r as z,s as A,t as B,u as C,v as D,w as E,x as F,y as G,z as I}from"./chunk-STVEILJJ.js";import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,u as i,z as H}from"./chunk-KP6DLLJO.js";import"./chunk-6FGXC4T6.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-UUOPT2N4.js";import"./chunk-EVYHPR3J.js";import"./chunk-4QLJUQSJ.js";import"./chunk-7WRQ2UAN.js";import"./chunk-XRP4JJXL.js";import"./chunk-WOT6VMZA.js";export{X as ACTOR_TYPE,p as BOX_TYPE,v as CONE_TYPE,B as CYLINDER_TYPE,I as DISK_TYPE,_ as FOG_TYPE,U as LIGHT_TYPE,ha as LINE_TYPE,ma as PARTICLE_SYSTEM_TYPE,E as PILL_TYPE,L as PLANE_TYPE,y as PYRAMID_TYPE,R as RECT_TYPE,s as SPHERE_TYPE,ea as SPRITE_TYPE,ba as TEXT_TYPE,O as ZONE_TYPE,Y as ZylemActor,q as ZylemBox,w as ZylemCone,C as ZylemCylinder,J as ZylemDisk,$ as ZylemFog,V as ZylemLight,ja as ZylemLine,na as ZylemParticleSystem,F as ZylemPill,M as ZylemPlane,z as ZylemPyramid,S as ZylemRect,t as ZylemSphere,fa as ZylemSprite,ca as ZylemText,P as ZylemZone,a as boxCollision,j as boxMesh,c as coneCollision,l as coneMesh,i as create,Z as createActor,r as createBox,x as createCone,pa as createCooldownIcon,D as createCylinder,K as createDisk,H as createEntity,la as createEntityFactory,aa as createFog,W as createLight,ka as createLine,oa as createParticleSystem,G as createPill,N as createPlane,A as createPyramid,T as createRect,u as createSphere,ga as createSprite,da as createText,Q as createZone,e as cylinderCollision,n as cylinderMesh,qa as destroy,ia as pickZylemLine,f as pillCollision,o as pillMesh,g as planeCollision,d as pyramidCollision,m as pyramidMesh,b as sphereCollision,k as sphereMesh,h as zoneCollision};
|