@zylem/game-lib 0.6.3 → 0.7.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/README.md +3 -1
- package/dist/actions.d.ts +255 -8
- package/dist/actions.js +1 -772
- package/dist/audio.d.ts +13 -0
- package/dist/audio.js +1 -0
- package/dist/base-node-life-cycle-CnJ-7zX-.d.ts +143 -0
- package/dist/behavior.d.ts +3 -0
- package/dist/behavior.js +1 -0
- package/dist/chunk-4QLJUQSJ.js +1 -0
- package/dist/chunk-73VZQZUL.js +1 -0
- package/dist/chunk-A34ZG3L4.js +1 -0
- package/dist/chunk-CDPY4VOQ.js +1 -0
- package/dist/chunk-DR6XXZE7.js +19 -0
- package/dist/chunk-FM5TBEPO.js +1 -0
- package/dist/chunk-G2IIMSUH.js +1 -0
- package/dist/chunk-MSC2BEO5.js +1 -0
- package/dist/chunk-NIH5CONO.js +1 -0
- package/dist/chunk-ONWXGBWB.js +1 -0
- package/dist/chunk-QEDQDR27.js +1 -0
- package/dist/chunk-QXVH6POE.js +1 -0
- package/dist/chunk-RXDTAWI2.js +29 -0
- package/dist/chunk-WKHW2QO2.js +1 -0
- package/dist/chunk-XRP4JJXL.js +1 -0
- package/dist/chunk-YHEWKN7N.js +1 -0
- package/dist/chunk-YHKXQ2ZN.js +1 -0
- package/dist/core.d.ts +206 -13
- package/dist/core.js +24 -9160
- package/dist/debug.d.ts +24 -0
- package/dist/debug.js +1 -0
- package/dist/default-controls-BGc61yYl.d.ts +111 -0
- package/dist/entity-DNkYKfdp.d.ts +1043 -0
- package/dist/entity-type-map-C94h2TDW.d.ts +781 -0
- package/dist/entity.d.ts +265 -0
- package/dist/entity.js +1 -0
- package/dist/events.d.ts +172 -0
- package/dist/events.js +1 -0
- package/dist/game-Cuj5gy7U.d.ts +1590 -0
- package/dist/game-default-PZLLHYL7.js +1 -0
- package/dist/game-interfaces-tfpM5NBk.d.ts +90 -0
- package/dist/globals.d.ts +104 -0
- package/dist/globals.js +1 -0
- package/dist/graphics.d.ts +83 -0
- package/dist/graphics.js +1 -0
- package/dist/input-ui.d.ts +34 -0
- package/dist/input-ui.js +1 -0
- package/dist/input.d.ts +72 -0
- package/dist/input.js +1 -0
- package/dist/material-Wz83vTTp.d.ts +151 -0
- package/dist/runtime.d.ts +433 -0
- package/dist/runtime.js +1 -0
- package/dist/web-components.d.ts +67 -0
- package/dist/web-components.js +9 -0
- package/dist/world-C9zdyl5d.d.ts +103 -0
- package/dist/zylem-stage-runtime-Cs-UDEVU.d.ts +777 -0
- package/package.json +54 -41
- package/dist/actions.js.map +0 -1
- package/dist/behavior/platformer-3d.d.ts +0 -296
- package/dist/behavior/platformer-3d.js +0 -518
- package/dist/behavior/platformer-3d.js.map +0 -1
- package/dist/behavior/ricochet-2d.d.ts +0 -274
- package/dist/behavior/ricochet-2d.js +0 -394
- package/dist/behavior/ricochet-2d.js.map +0 -1
- package/dist/behavior/screen-wrap.d.ts +0 -86
- package/dist/behavior/screen-wrap.js +0 -195
- package/dist/behavior/screen-wrap.js.map +0 -1
- package/dist/behavior/thruster.d.ts +0 -10
- package/dist/behavior/thruster.js +0 -234
- package/dist/behavior/thruster.js.map +0 -1
- package/dist/behavior/world-boundary-2d.d.ts +0 -141
- package/dist/behavior/world-boundary-2d.js +0 -181
- package/dist/behavior/world-boundary-2d.js.map +0 -1
- package/dist/behavior-descriptor-BWNWmIjv.d.ts +0 -142
- package/dist/blueprints-BWGz8fII.d.ts +0 -26
- package/dist/camera-B5e4c78l.d.ts +0 -468
- package/dist/camera.d.ts +0 -6
- package/dist/camera.js +0 -1406
- package/dist/camera.js.map +0 -1
- package/dist/composition-DrzFrbqI.d.ts +0 -218
- package/dist/core-DAkskq6Y.d.ts +0 -498
- package/dist/core.js.map +0 -1
- package/dist/entities-DC9ce_vx.d.ts +0 -416
- package/dist/entities.d.ts +0 -9
- package/dist/entities.js +0 -4069
- package/dist/entities.js.map +0 -1
- package/dist/entity-BpbZqg19.d.ts +0 -1100
- package/dist/entity-Bq_eNEDI.d.ts +0 -28
- package/dist/entity-types-DAu8sGJH.d.ts +0 -26
- package/dist/global-change-Dc8uCKi2.d.ts +0 -25
- package/dist/main.d.ts +0 -654
- package/dist/main.js +0 -13355
- package/dist/main.js.map +0 -1
- package/dist/stage-types-BFsm3qsZ.d.ts +0 -567
- package/dist/stage.d.ts +0 -51
- package/dist/stage.js +0 -5738
- package/dist/stage.js.map +0 -1
- package/dist/thruster-DhRaJnoL.d.ts +0 -172
- package/dist/world-Be5m1XC1.d.ts +0 -31
|
@@ -0,0 +1,777 @@
|
|
|
1
|
+
import { h as SetupFunction, a as Inputs } from './base-node-life-cycle-CnJ-7zX-.js';
|
|
2
|
+
import { G as GameEntity } from './entity-DNkYKfdp.js';
|
|
3
|
+
import { Object3D, Vector2, Scene, Camera, Vector3, Quaternion, RenderTarget, Texture, Color } from 'three';
|
|
4
|
+
import { S as StageEntity, E as Entity, L as LifecycleFunction, Z as ZylemWorld } from './world-C9zdyl5d.js';
|
|
5
|
+
import { WebGPURenderer, RenderPipeline } from 'three/webgpu';
|
|
6
|
+
import { o as ZylemShader } from './material-Wz83vTTp.js';
|
|
7
|
+
|
|
8
|
+
declare const Perspectives: {
|
|
9
|
+
readonly FirstPerson: "first-person";
|
|
10
|
+
readonly ThirdPerson: "third-person";
|
|
11
|
+
readonly Isometric: "isometric";
|
|
12
|
+
readonly Flat2D: "flat-2d";
|
|
13
|
+
readonly Fixed2D: "fixed-2d";
|
|
14
|
+
readonly TopDown: "top-down";
|
|
15
|
+
};
|
|
16
|
+
type PerspectiveType = (typeof Perspectives)[keyof typeof Perspectives];
|
|
17
|
+
|
|
18
|
+
interface CameraDebugState {
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
selected: string[];
|
|
21
|
+
}
|
|
22
|
+
interface CameraDebugDelegate {
|
|
23
|
+
subscribe(listener: (state: CameraDebugState) => void): () => void;
|
|
24
|
+
resolveTarget(uuid: string): Object3D | null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Renderer type option.
|
|
29
|
+
*
|
|
30
|
+
* @deprecated game-lib now always renders with WebGPU (Three.js
|
|
31
|
+
* {@link WebGPURenderer}, which keeps its own internal WebGL2 fallback for
|
|
32
|
+
* devices without WebGPU). This type is retained only so existing public
|
|
33
|
+
* APIs (e.g. `CameraOptions.rendererType`) keep type-checking; the value is
|
|
34
|
+
* ignored by the renderer.
|
|
35
|
+
*/
|
|
36
|
+
type RendererType = 'auto' | 'webgpu' | 'webgl';
|
|
37
|
+
/**
|
|
38
|
+
* The renderer instance type. game-lib standardizes on {@link WebGPURenderer}.
|
|
39
|
+
*/
|
|
40
|
+
type ZylemRenderer = WebGPURenderer;
|
|
41
|
+
/**
|
|
42
|
+
* Viewport definition in normalized coordinates (0-1).
|
|
43
|
+
* Represents a rectangular region of the canvas for camera rendering.
|
|
44
|
+
*/
|
|
45
|
+
interface Viewport {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Check if WebGPU is supported in the current browser.
|
|
53
|
+
*
|
|
54
|
+
* Informational only — game-lib always constructs a {@link WebGPURenderer},
|
|
55
|
+
* which transparently falls back to a WebGL2 backend when the WebGPU adapter
|
|
56
|
+
* is unavailable. Callers can use this to surface device capabilities.
|
|
57
|
+
*/
|
|
58
|
+
declare function isWebGPUSupported(): Promise<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* RendererManager owns the shared WebGPU renderer, canvas element, the
|
|
61
|
+
* optional post-processing pipeline, and the render loop. There is one
|
|
62
|
+
* RendererManager per game.
|
|
63
|
+
*
|
|
64
|
+
* It iterates active cameras and renders each with its configured viewport.
|
|
65
|
+
*/
|
|
66
|
+
declare class RendererManager {
|
|
67
|
+
renderer: ZylemRenderer;
|
|
68
|
+
/**
|
|
69
|
+
* Optional TSL post-processing pipeline. Bound to a single fullscreen
|
|
70
|
+
* scene+camera via {@link setupPostProcessing}. When present and the
|
|
71
|
+
* frame is a single fullscreen viewport, the pipeline drives the final
|
|
72
|
+
* draw instead of `renderer.render(...)`.
|
|
73
|
+
*/
|
|
74
|
+
postProcessing: RenderPipeline | null;
|
|
75
|
+
/**
|
|
76
|
+
* Supersampling (SSAA) multiplier for the scene pass. `1` renders at native
|
|
77
|
+
* resolution (default). Values > 1 render the scene pass larger and let the
|
|
78
|
+
* post pipeline downsample it, trading GPU cost for smoother shading/edges
|
|
79
|
+
* (this is what the legacy WebGL pipeline did implicitly). Applied on the
|
|
80
|
+
* next {@link setupPostProcessing}.
|
|
81
|
+
*/
|
|
82
|
+
renderScale: number;
|
|
83
|
+
screenResolution: Vector2;
|
|
84
|
+
/**
|
|
85
|
+
* @deprecated Always `'webgpu'`. Retained for backward compatibility.
|
|
86
|
+
*/
|
|
87
|
+
rendererType: RendererType;
|
|
88
|
+
private _initialized;
|
|
89
|
+
private _sceneRef;
|
|
90
|
+
private _lastAnimationTimestamp;
|
|
91
|
+
constructor(screenResolution?: Vector2, _rendererType?: RendererType);
|
|
92
|
+
/**
|
|
93
|
+
* Check if the renderer has been initialized
|
|
94
|
+
*/
|
|
95
|
+
get initialized(): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the active renderer is WebGPU. Always true; retained for
|
|
98
|
+
* backward compatibility with callers that branched on backend.
|
|
99
|
+
*
|
|
100
|
+
* @deprecated game-lib is WebGPU-only.
|
|
101
|
+
*/
|
|
102
|
+
get isWebGPU(): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Initialize the renderer (must be called before rendering).
|
|
105
|
+
* Async because WebGPU requires async initialization.
|
|
106
|
+
*
|
|
107
|
+
* The renderer keeps Three.js's built-in WebGL2 fallback backend, so it
|
|
108
|
+
* still initializes on devices without native WebGPU.
|
|
109
|
+
*/
|
|
110
|
+
initRenderer(): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Set the current scene reference for rendering.
|
|
113
|
+
*/
|
|
114
|
+
setScene(scene: Scene): void;
|
|
115
|
+
/**
|
|
116
|
+
* Set up the post-processing pipeline for a scene + camera.
|
|
117
|
+
*
|
|
118
|
+
* Builds a TSL `pass(scene, camera)` (HalfFloat + MSAA) and composes the
|
|
119
|
+
* final output ourselves so a display-space dither can be added: the dither
|
|
120
|
+
* breaks up 8-bit gradient banding (e.g. on terrain/sky) that the legacy
|
|
121
|
+
* WebGL pipeline hid via implicit supersampling. This is the WebGPU
|
|
122
|
+
* replacement for the old `EffectComposer` + `RenderPass`.
|
|
123
|
+
*/
|
|
124
|
+
setupPostProcessing(scene: Scene, camera: Camera): void;
|
|
125
|
+
/**
|
|
126
|
+
* Set the supersampling (SSAA) multiplier. Takes effect on the next
|
|
127
|
+
* {@link setupPostProcessing}. `1` = native resolution (default).
|
|
128
|
+
*/
|
|
129
|
+
setRenderScale(scale: number): void;
|
|
130
|
+
/**
|
|
131
|
+
* Dispose the current post-processing pipeline, if any.
|
|
132
|
+
*/
|
|
133
|
+
private disposePostProcessing;
|
|
134
|
+
/**
|
|
135
|
+
* Start the render loop. Calls the provided callback each frame.
|
|
136
|
+
*/
|
|
137
|
+
startRenderLoop(onFrame: (delta: number) => void): void;
|
|
138
|
+
/**
|
|
139
|
+
* Stop the render loop.
|
|
140
|
+
*/
|
|
141
|
+
stopRenderLoop(): void;
|
|
142
|
+
/**
|
|
143
|
+
* Render a scene from a single camera's perspective.
|
|
144
|
+
* Sets the viewport/scissor based on the camera's viewport config so
|
|
145
|
+
* split-screen / picture-in-picture layouts render to their region.
|
|
146
|
+
*
|
|
147
|
+
* @param usePostProcessing When true and a pipeline is configured, the
|
|
148
|
+
* post-processing pipeline drives the draw (fullscreen only).
|
|
149
|
+
*/
|
|
150
|
+
renderCamera(scene: Scene, camera: ZylemCamera, usePostProcessing?: boolean): void;
|
|
151
|
+
/**
|
|
152
|
+
* Render a camera to its offscreen render target.
|
|
153
|
+
* Bypasses post-processing since render-to-texture output is consumed by
|
|
154
|
+
* an in-scene material (jumbotron / security-camera / portal effects).
|
|
155
|
+
*
|
|
156
|
+
* The camera must have a non-null renderTarget.
|
|
157
|
+
*/
|
|
158
|
+
renderCameraToTarget(scene: Scene, camera: ZylemCamera): void;
|
|
159
|
+
/**
|
|
160
|
+
* Render a scene from multiple cameras, each with their own viewport.
|
|
161
|
+
* Cameras are rendered in order (first = bottom layer, last = top layer).
|
|
162
|
+
*
|
|
163
|
+
* Post-processing is applied only when there is a single fullscreen
|
|
164
|
+
* camera; split-screen layouts render directly per-viewport (a single
|
|
165
|
+
* fullscreen post pass cannot honor per-camera scissor regions).
|
|
166
|
+
*/
|
|
167
|
+
renderCameras(scene: Scene, cameras: ZylemCamera[]): void;
|
|
168
|
+
/**
|
|
169
|
+
* Simple single-camera render (backwards compatible).
|
|
170
|
+
* Uses post-processing when configured.
|
|
171
|
+
*/
|
|
172
|
+
render(scene: Scene, camera: Camera): void;
|
|
173
|
+
/**
|
|
174
|
+
* Resize the renderer and update resolution.
|
|
175
|
+
*/
|
|
176
|
+
resize(width: number, height: number): void;
|
|
177
|
+
/**
|
|
178
|
+
* Update renderer pixel ratio (DPR).
|
|
179
|
+
*/
|
|
180
|
+
setPixelRatio(dpr: number): void;
|
|
181
|
+
/**
|
|
182
|
+
* Get the DOM element for the renderer.
|
|
183
|
+
*/
|
|
184
|
+
getDomElement(): HTMLCanvasElement;
|
|
185
|
+
/**
|
|
186
|
+
* Dispose renderer, post-processing, and related resources.
|
|
187
|
+
*/
|
|
188
|
+
dispose(): void;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Represents a full camera pose: position, rotation, projection params, and optional lookAt.
|
|
193
|
+
* This is the canonical data structure that flows through the camera pipeline.
|
|
194
|
+
*/
|
|
195
|
+
interface CameraPose {
|
|
196
|
+
position: Vector3;
|
|
197
|
+
rotation: Quaternion;
|
|
198
|
+
fov?: number;
|
|
199
|
+
zoom?: number;
|
|
200
|
+
near?: number;
|
|
201
|
+
far?: number;
|
|
202
|
+
/** When set, the camera orients to look at this point (takes priority over rotation). */
|
|
203
|
+
lookAt?: Vector3;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* An additive delta applied on top of a CameraPose.
|
|
207
|
+
* Used by CameraActions to apply transient offsets (shake, recoil, etc.).
|
|
208
|
+
*/
|
|
209
|
+
interface PoseDelta {
|
|
210
|
+
position?: Vector3;
|
|
211
|
+
rotation?: Quaternion;
|
|
212
|
+
fov?: number;
|
|
213
|
+
zoom?: number;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Minimal transform representation for pipeline targets.
|
|
217
|
+
*/
|
|
218
|
+
interface TransformLike {
|
|
219
|
+
position: Vector3;
|
|
220
|
+
rotation?: Quaternion;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Per-frame context passed to every pipeline module (perspectives, behaviors, actions).
|
|
224
|
+
*/
|
|
225
|
+
interface CameraContext {
|
|
226
|
+
/** Frame delta time in seconds. */
|
|
227
|
+
dt: number;
|
|
228
|
+
/** Elapsed time in seconds since camera started updating. */
|
|
229
|
+
time: number;
|
|
230
|
+
/** Current viewport dimensions and aspect ratio. */
|
|
231
|
+
viewport: {
|
|
232
|
+
width: number;
|
|
233
|
+
height: number;
|
|
234
|
+
aspect: number;
|
|
235
|
+
};
|
|
236
|
+
/** Named targets the camera can track. 'primary' is targets[0] by convention. */
|
|
237
|
+
targets: Record<string, TransformLike>;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* A perspective produces the base camera pose each frame.
|
|
241
|
+
* Exactly one perspective is active per camera at a time.
|
|
242
|
+
*/
|
|
243
|
+
interface CameraPerspective {
|
|
244
|
+
id: string;
|
|
245
|
+
/** Compute the raw desired pose for this frame given the current context. */
|
|
246
|
+
getBasePose(ctx: CameraContext): CameraPose;
|
|
247
|
+
/** Optional defaults for smoothing and other pipeline settings. */
|
|
248
|
+
defaults?: {
|
|
249
|
+
damping?: number;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Behaviors modify the desired pose each frame.
|
|
254
|
+
* They are keyed by name (idempotent add) and sorted by priority.
|
|
255
|
+
*/
|
|
256
|
+
interface CameraBehavior {
|
|
257
|
+
/** Receive current context and pose, return a modified pose. */
|
|
258
|
+
update(ctx: CameraContext, pose: CameraPose): CameraPose;
|
|
259
|
+
/** Called when the behavior is attached to the pipeline. */
|
|
260
|
+
onAttach?(ctx: CameraContext): void;
|
|
261
|
+
/** Called when the behavior is removed from the pipeline. */
|
|
262
|
+
onDetach?(ctx: CameraContext): void;
|
|
263
|
+
/** Sort order: lower runs first. Default 0. */
|
|
264
|
+
priority?: number;
|
|
265
|
+
/** When false, the behavior is skipped during the pipeline run. */
|
|
266
|
+
enabled?: boolean;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Actions are transient effects that apply additive deltas (screenshake, recoil, etc.).
|
|
270
|
+
* They self-expire when isDone() returns true and are automatically removed.
|
|
271
|
+
*/
|
|
272
|
+
interface CameraAction {
|
|
273
|
+
/** Return the additive delta for this frame. */
|
|
274
|
+
update(ctx: CameraContext): PoseDelta;
|
|
275
|
+
/** Return true when the action has completed and should be removed. */
|
|
276
|
+
isDone(ctx: CameraContext): boolean;
|
|
277
|
+
/** Sort order for action application. Default 0. */
|
|
278
|
+
priority?: number;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Debug snapshot returned by pipeline.getState().
|
|
282
|
+
*/
|
|
283
|
+
interface CameraPipelineState {
|
|
284
|
+
perspectiveId: string | null;
|
|
285
|
+
desiredPose: CameraPose | null;
|
|
286
|
+
finalPose: CameraPose | null;
|
|
287
|
+
activeBehaviors: string[];
|
|
288
|
+
activeActionCount: number;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* CameraPipeline runs a deterministic per-frame update:
|
|
293
|
+
*
|
|
294
|
+
* Perspective -> Behaviors (priority) -> Actions (deltas) -> Smoothing -> finalPose
|
|
295
|
+
*
|
|
296
|
+
* It separates "desired pose" from "final pose". Everything writes to desired;
|
|
297
|
+
* only smoothing converts desired into the final committed pose.
|
|
298
|
+
*/
|
|
299
|
+
declare class CameraPipeline {
|
|
300
|
+
/** Active perspective (exactly one at a time). */
|
|
301
|
+
perspective: CameraPerspective | null;
|
|
302
|
+
/** Keyed behaviors, sorted by priority each frame. */
|
|
303
|
+
private behaviors;
|
|
304
|
+
/** Active transient actions. Expired actions are auto-removed. */
|
|
305
|
+
private actions;
|
|
306
|
+
/** The desired pose after perspective + behaviors + actions. */
|
|
307
|
+
private _desiredPose;
|
|
308
|
+
/** The smoothed final pose committed to the Three.js camera. */
|
|
309
|
+
private _finalPose;
|
|
310
|
+
/** Whether the pipeline has run at least once (prevents lerp from origin on first frame). */
|
|
311
|
+
private _initialized;
|
|
312
|
+
/** Smoothing factor: 0 = no movement, 1 = instant snap. */
|
|
313
|
+
damping: number;
|
|
314
|
+
constructor(perspective?: CameraPerspective);
|
|
315
|
+
/**
|
|
316
|
+
* Run the full pipeline for one frame.
|
|
317
|
+
* Returns the final pose that should be committed to the Three.js camera.
|
|
318
|
+
*/
|
|
319
|
+
run(ctx: CameraContext): CameraPose;
|
|
320
|
+
/**
|
|
321
|
+
* Add or replace a behavior by key (idempotent).
|
|
322
|
+
* Calls onDetach on the old behavior and onAttach on the new one.
|
|
323
|
+
*/
|
|
324
|
+
addBehavior(key: string, behavior: CameraBehavior, ctx?: CameraContext): void;
|
|
325
|
+
/**
|
|
326
|
+
* Remove a behavior by key. Calls onDetach if a context is provided.
|
|
327
|
+
*/
|
|
328
|
+
removeBehavior(key: string, ctx?: CameraContext): boolean;
|
|
329
|
+
/**
|
|
330
|
+
* Check whether a behavior with the given key exists.
|
|
331
|
+
*/
|
|
332
|
+
hasBehavior(key: string): boolean;
|
|
333
|
+
/**
|
|
334
|
+
* Add a transient action. Actions self-expire via isDone().
|
|
335
|
+
*/
|
|
336
|
+
addAction(action: CameraAction): void;
|
|
337
|
+
/**
|
|
338
|
+
* Return a debug snapshot of the pipeline state.
|
|
339
|
+
*/
|
|
340
|
+
getState(): CameraPipelineState;
|
|
341
|
+
/**
|
|
342
|
+
* Set a new perspective. Resets the pipeline initialization flag so the
|
|
343
|
+
* first frame with the new perspective snaps instead of lerping from the old pose.
|
|
344
|
+
*/
|
|
345
|
+
setPerspective(perspective: CameraPerspective): void;
|
|
346
|
+
private getSortedBehaviors;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* ZylemCamera is a lightweight camera wrapper that manages the Three.js camera,
|
|
351
|
+
* the camera pose pipeline, and viewport configuration. Rendering is handled
|
|
352
|
+
* by RendererManager.
|
|
353
|
+
*
|
|
354
|
+
* The pipeline runs: Perspective -> Behaviors -> Actions -> Smoothing -> Commit.
|
|
355
|
+
* When orbit/debug controls are active, the pipeline is bypassed.
|
|
356
|
+
*/
|
|
357
|
+
declare class ZylemCamera {
|
|
358
|
+
/**
|
|
359
|
+
* @deprecated No longer used. Kept as null for backward compatibility
|
|
360
|
+
* with code that checks `camera.cameraRig` (e.g. scene graph insertion).
|
|
361
|
+
*/
|
|
362
|
+
cameraRig: Object3D | null;
|
|
363
|
+
camera: Camera;
|
|
364
|
+
screenResolution: Vector2;
|
|
365
|
+
_perspective: PerspectiveType;
|
|
366
|
+
frustumSize: number;
|
|
367
|
+
rendererType: RendererType;
|
|
368
|
+
sceneRef: Scene | null;
|
|
369
|
+
/** Name for camera manager lookup. */
|
|
370
|
+
name: string;
|
|
371
|
+
/**
|
|
372
|
+
* Viewport in normalized coordinates (0-1).
|
|
373
|
+
* Default is fullscreen: { x: 0, y: 0, width: 1, height: 1 }
|
|
374
|
+
*/
|
|
375
|
+
viewport: Viewport;
|
|
376
|
+
/**
|
|
377
|
+
* Multiple targets for the camera to follow/frame.
|
|
378
|
+
*/
|
|
379
|
+
targets: StageEntity[];
|
|
380
|
+
/**
|
|
381
|
+
* The camera pose pipeline.
|
|
382
|
+
* Exposed so CameraWrapper can delegate addBehavior/addAction/getState.
|
|
383
|
+
*/
|
|
384
|
+
pipeline: CameraPipeline;
|
|
385
|
+
/**
|
|
386
|
+
* Offscreen render target for render-to-texture (RTT) cameras.
|
|
387
|
+
* When set, the camera renders to this target instead of the screen viewport.
|
|
388
|
+
* Created via createRenderTarget() or automatically by setCameraFeed().
|
|
389
|
+
*
|
|
390
|
+
* Uses the backend-agnostic {@link RenderTarget} so it works with the
|
|
391
|
+
* WebGPU renderer (and Three's internal WebGL2 fallback).
|
|
392
|
+
*/
|
|
393
|
+
renderTarget: RenderTarget | null;
|
|
394
|
+
/**
|
|
395
|
+
* @deprecated Use `targets` array instead. Kept for backward compatibility.
|
|
396
|
+
*/
|
|
397
|
+
get target(): StageEntity | null;
|
|
398
|
+
set target(entity: StageEntity | null);
|
|
399
|
+
private orbitController;
|
|
400
|
+
private _useOrbitalControls;
|
|
401
|
+
/** When true, debug-mode orbital controls are not attached to this camera. */
|
|
402
|
+
_skipDebugOrbit: boolean;
|
|
403
|
+
/** Reference to the shared renderer manager (set during setup). */
|
|
404
|
+
private _rendererManager;
|
|
405
|
+
/** Elapsed time tracker for CameraContext. */
|
|
406
|
+
private _elapsedTime;
|
|
407
|
+
constructor(perspective: PerspectiveType, screenResolution: Vector2, frustumSize?: number, rendererType?: RendererType);
|
|
408
|
+
/**
|
|
409
|
+
* Setup the camera with a scene and renderer manager.
|
|
410
|
+
*/
|
|
411
|
+
setup(scene: Scene, rendererManager?: RendererManager): Promise<void>;
|
|
412
|
+
/**
|
|
413
|
+
* Legacy setup method for backward compatibility.
|
|
414
|
+
* Creates a temporary RendererManager internally.
|
|
415
|
+
* @deprecated Use setup(scene, rendererManager) instead.
|
|
416
|
+
*/
|
|
417
|
+
setupLegacy(scene: Scene): Promise<void>;
|
|
418
|
+
/**
|
|
419
|
+
* Update the camera each frame.
|
|
420
|
+
*
|
|
421
|
+
* When orbit/debug controls are active, the pipeline is skipped and
|
|
422
|
+
* orbit controls manage the camera directly. Otherwise, the pipeline
|
|
423
|
+
* runs: Perspective -> Behaviors -> Actions -> Smoothing -> Commit.
|
|
424
|
+
*/
|
|
425
|
+
update(delta: number): void;
|
|
426
|
+
/**
|
|
427
|
+
* Check if debug mode is active (orbit controls taking over camera).
|
|
428
|
+
*/
|
|
429
|
+
isDebugModeActive(): boolean;
|
|
430
|
+
/**
|
|
431
|
+
* True when debug orbit or user orbital controls are enabled (orbit controller is driving the camera).
|
|
432
|
+
*/
|
|
433
|
+
get isOrbitActive(): boolean;
|
|
434
|
+
/**
|
|
435
|
+
* Advance OrbitControls (damping, pointer release) and follow the debug-selection orbit target.
|
|
436
|
+
* Intended to run once per render frame — see `CameraManager.render` and legacy `setupLegacy` render loop.
|
|
437
|
+
*/
|
|
438
|
+
updateOrbitControls(): void;
|
|
439
|
+
/**
|
|
440
|
+
* Enable user-configured orbital controls (not debug mode).
|
|
441
|
+
*/
|
|
442
|
+
enableOrbitalControls(): void;
|
|
443
|
+
/**
|
|
444
|
+
* Disable user-configured orbital controls.
|
|
445
|
+
*/
|
|
446
|
+
disableOrbitalControls(): void;
|
|
447
|
+
/**
|
|
448
|
+
* Whether user orbital controls are enabled.
|
|
449
|
+
*/
|
|
450
|
+
get useOrbitalControls(): boolean;
|
|
451
|
+
/**
|
|
452
|
+
* Add a target entity for the camera to follow/frame.
|
|
453
|
+
*/
|
|
454
|
+
addTarget(entity: StageEntity): void;
|
|
455
|
+
/**
|
|
456
|
+
* Remove a target entity.
|
|
457
|
+
*/
|
|
458
|
+
removeTarget(entity: StageEntity): void;
|
|
459
|
+
/**
|
|
460
|
+
* Clear all targets.
|
|
461
|
+
*/
|
|
462
|
+
clearTargets(): void;
|
|
463
|
+
/**
|
|
464
|
+
* Set the viewport for this camera (normalized 0-1 coordinates).
|
|
465
|
+
*/
|
|
466
|
+
setViewport(x: number, y: number, width: number, height: number): void;
|
|
467
|
+
/**
|
|
468
|
+
* Resize camera projection.
|
|
469
|
+
*/
|
|
470
|
+
resize(width: number, height: number): void;
|
|
471
|
+
/**
|
|
472
|
+
* Create an offscreen render target for this camera.
|
|
473
|
+
* When a render target is present, CameraManager renders this camera
|
|
474
|
+
* to the target instead of the screen viewport.
|
|
475
|
+
*
|
|
476
|
+
* @param width Texture width in pixels (default 512)
|
|
477
|
+
* @param height Texture height in pixels (default 512)
|
|
478
|
+
*/
|
|
479
|
+
createRenderTarget(width?: number, height?: number): RenderTarget;
|
|
480
|
+
/**
|
|
481
|
+
* Get the texture from the render target (for applying to a mesh material).
|
|
482
|
+
* Returns null if no render target has been created.
|
|
483
|
+
*/
|
|
484
|
+
getRenderTexture(): Texture | null;
|
|
485
|
+
/**
|
|
486
|
+
* Dispose camera resources.
|
|
487
|
+
*/
|
|
488
|
+
destroy(): void;
|
|
489
|
+
/**
|
|
490
|
+
* Attach a delegate to react to debug state changes.
|
|
491
|
+
* Skipped when _skipDebugOrbit is true so the pipeline always runs.
|
|
492
|
+
*/
|
|
493
|
+
setDebugDelegate(delegate: CameraDebugDelegate | null): void;
|
|
494
|
+
/**
|
|
495
|
+
* Directly set the camera position.
|
|
496
|
+
*/
|
|
497
|
+
move(position: Vector3): void;
|
|
498
|
+
/**
|
|
499
|
+
* Apply incremental rotation to the camera.
|
|
500
|
+
*/
|
|
501
|
+
rotate(pitch: number, yaw: number, roll: number): void;
|
|
502
|
+
/**
|
|
503
|
+
* Get the DOM element for the renderer.
|
|
504
|
+
* @deprecated Access via RendererManager instead.
|
|
505
|
+
*/
|
|
506
|
+
getDomElement(): HTMLCanvasElement;
|
|
507
|
+
/**
|
|
508
|
+
* Get the renderer manager reference.
|
|
509
|
+
*/
|
|
510
|
+
getRendererManager(): RendererManager | null;
|
|
511
|
+
/**
|
|
512
|
+
* Set the renderer manager reference (used by CameraManager during setup).
|
|
513
|
+
*/
|
|
514
|
+
setRendererManager(manager: RendererManager): void;
|
|
515
|
+
/** @deprecated Renderer is now owned by RendererManager */
|
|
516
|
+
get renderer(): any;
|
|
517
|
+
/** @deprecated Post-processing is now owned by RendererManager */
|
|
518
|
+
get composer(): any;
|
|
519
|
+
/** @deprecated Use RendererManager.setPixelRatio() instead */
|
|
520
|
+
setPixelRatio(dpr: number): void;
|
|
521
|
+
/**
|
|
522
|
+
* Build a CameraContext from current ZylemCamera state.
|
|
523
|
+
* Converts StageEntity[] targets into Record<string, TransformLike>.
|
|
524
|
+
*/
|
|
525
|
+
private buildContext;
|
|
526
|
+
/**
|
|
527
|
+
* Apply the final pipeline pose to the Three.js camera.
|
|
528
|
+
*/
|
|
529
|
+
private commitPose;
|
|
530
|
+
/**
|
|
531
|
+
* Create a Three.js camera based on perspective type.
|
|
532
|
+
*/
|
|
533
|
+
private createCameraForPerspective;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* CameraManager orchestrates multiple cameras per stage.
|
|
538
|
+
*
|
|
539
|
+
* Responsibilities:
|
|
540
|
+
* - Named camera registry (add/remove/get by name or reference)
|
|
541
|
+
* - Active camera list management (determines which cameras render)
|
|
542
|
+
* - Always-available debug camera with orbit controls
|
|
543
|
+
* - Per-frame update of all active cameras' perspective controllers
|
|
544
|
+
* - Coordinating rendering via RendererManager for all active viewports
|
|
545
|
+
*/
|
|
546
|
+
declare class CameraManager {
|
|
547
|
+
/** Named camera registry */
|
|
548
|
+
private cameras;
|
|
549
|
+
/** Currently active cameras, ordered by render layer (first = bottom) */
|
|
550
|
+
private _activeCameras;
|
|
551
|
+
/** Auto-created debug camera with orbit controls */
|
|
552
|
+
private _debugCamera;
|
|
553
|
+
/** Reference to the shared renderer manager */
|
|
554
|
+
private _rendererManager;
|
|
555
|
+
/** Scene reference */
|
|
556
|
+
private _sceneRef;
|
|
557
|
+
/** Counter for auto-generated camera names */
|
|
558
|
+
private _autoNameCounter;
|
|
559
|
+
constructor();
|
|
560
|
+
/**
|
|
561
|
+
* Get the list of currently active cameras.
|
|
562
|
+
*/
|
|
563
|
+
get activeCameras(): ReadonlyArray<ZylemCamera>;
|
|
564
|
+
/**
|
|
565
|
+
* Get the primary active camera (first in the active list).
|
|
566
|
+
*/
|
|
567
|
+
get primaryCamera(): ZylemCamera | null;
|
|
568
|
+
/**
|
|
569
|
+
* Get the debug camera.
|
|
570
|
+
*/
|
|
571
|
+
get debugCamera(): ZylemCamera | null;
|
|
572
|
+
/**
|
|
573
|
+
* Get all registered cameras.
|
|
574
|
+
*/
|
|
575
|
+
get allCameras(): ReadonlyArray<ZylemCamera>;
|
|
576
|
+
/**
|
|
577
|
+
* Add a camera to the manager.
|
|
578
|
+
* If no name is provided, one is auto-generated.
|
|
579
|
+
* The first camera added becomes the active camera.
|
|
580
|
+
*
|
|
581
|
+
* @param camera The ZylemCamera instance to add
|
|
582
|
+
* @param name Optional name for lookup
|
|
583
|
+
* @returns The assigned name
|
|
584
|
+
*/
|
|
585
|
+
addCamera(camera: ZylemCamera, name?: string): string;
|
|
586
|
+
/**
|
|
587
|
+
* Remove a camera by name or reference.
|
|
588
|
+
* Cannot remove the debug camera via this method.
|
|
589
|
+
*/
|
|
590
|
+
removeCamera(nameOrRef: string | ZylemCamera): boolean;
|
|
591
|
+
/**
|
|
592
|
+
* Set a camera as the primary active camera (replaces all active cameras
|
|
593
|
+
* except additional viewport cameras).
|
|
594
|
+
*
|
|
595
|
+
* @param nameOrRef Camera name or reference to activate
|
|
596
|
+
*/
|
|
597
|
+
setActiveCamera(nameOrRef: string | ZylemCamera): boolean;
|
|
598
|
+
/**
|
|
599
|
+
* Add a camera as an additional active camera (for split-screen or PiP).
|
|
600
|
+
*/
|
|
601
|
+
addActiveCamera(nameOrRef: string | ZylemCamera): boolean;
|
|
602
|
+
/**
|
|
603
|
+
* Remove a camera from the active render list (does not remove from registry).
|
|
604
|
+
*/
|
|
605
|
+
deactivateCamera(nameOrRef: string | ZylemCamera): boolean;
|
|
606
|
+
/**
|
|
607
|
+
* Get a camera by name.
|
|
608
|
+
*/
|
|
609
|
+
getCamera(name: string): ZylemCamera | null;
|
|
610
|
+
/**
|
|
611
|
+
* Setup all cameras with the given scene and renderer manager.
|
|
612
|
+
* Also creates the debug camera.
|
|
613
|
+
*/
|
|
614
|
+
setup(scene: Scene, rendererManager: RendererManager): Promise<void>;
|
|
615
|
+
/**
|
|
616
|
+
* Update all active cameras' controllers.
|
|
617
|
+
*/
|
|
618
|
+
update(delta: number): void;
|
|
619
|
+
/**
|
|
620
|
+
* Render all active cameras through the renderer manager.
|
|
621
|
+
* RTT cameras (those with a renderTarget) are rendered first to their
|
|
622
|
+
* offscreen textures, then viewport cameras are rendered to the screen.
|
|
623
|
+
*/
|
|
624
|
+
render(scene: Scene): void;
|
|
625
|
+
private updateOrbitingCamerasForRender;
|
|
626
|
+
/**
|
|
627
|
+
* Create a default third-person camera if no cameras have been added.
|
|
628
|
+
*/
|
|
629
|
+
ensureDefaultCamera(): ZylemCamera;
|
|
630
|
+
/**
|
|
631
|
+
* Dispose all cameras and cleanup.
|
|
632
|
+
*/
|
|
633
|
+
dispose(): void;
|
|
634
|
+
/**
|
|
635
|
+
* Create the always-available debug camera with orbit controls.
|
|
636
|
+
*/
|
|
637
|
+
private createDebugCamera;
|
|
638
|
+
/**
|
|
639
|
+
* Resolve a camera from a name or reference.
|
|
640
|
+
*/
|
|
641
|
+
private resolveCamera;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
interface SceneState {
|
|
645
|
+
backgroundColor: Color | string;
|
|
646
|
+
backgroundImage: string | null;
|
|
647
|
+
backgroundShader?: ZylemShader | null;
|
|
648
|
+
/**
|
|
649
|
+
* When `false`, skip the engine's built-in ambient + directional lights so
|
|
650
|
+
* the caller can configure the scene's lighting entirely via
|
|
651
|
+
* `createLight(...)` entities. Defaults to `true` for backward
|
|
652
|
+
* compatibility with existing demos.
|
|
653
|
+
*/
|
|
654
|
+
defaultLighting?: boolean;
|
|
655
|
+
}
|
|
656
|
+
declare class ZylemScene implements Entity<ZylemScene> {
|
|
657
|
+
type: string;
|
|
658
|
+
_setup?: SetupFunction<ZylemScene>;
|
|
659
|
+
scene: Scene;
|
|
660
|
+
/** @deprecated Use cameraManager instead */
|
|
661
|
+
zylemCamera: ZylemCamera;
|
|
662
|
+
cameraManager: CameraManager | null;
|
|
663
|
+
containerElement: HTMLElement | null;
|
|
664
|
+
update: LifecycleFunction<ZylemScene>;
|
|
665
|
+
_collision?: ((entity: any, other: any, globals?: any) => void) | undefined;
|
|
666
|
+
_destroy?: ((globals?: any) => void) | undefined;
|
|
667
|
+
name?: string | undefined;
|
|
668
|
+
tag?: Set<string> | undefined;
|
|
669
|
+
private skyboxMaterial;
|
|
670
|
+
private skyboxMesh;
|
|
671
|
+
constructor(id: string, camera: ZylemCamera, state: SceneState);
|
|
672
|
+
/**
|
|
673
|
+
* Create a large inverted box with the shader for a skybox effect.
|
|
674
|
+
*
|
|
675
|
+
* WebGPU-only: background shaders must be authored in TSL
|
|
676
|
+
* ({@link ZylemTSLShader}). A GLSL shader logs a warning and is ignored
|
|
677
|
+
* (the solid background color is kept).
|
|
678
|
+
*/
|
|
679
|
+
private setupBackgroundShader;
|
|
680
|
+
setup(): void;
|
|
681
|
+
destroy(): void;
|
|
682
|
+
/**
|
|
683
|
+
* Setup camera with the scene.
|
|
684
|
+
* Supports both legacy single camera and CameraManager modes.
|
|
685
|
+
*/
|
|
686
|
+
setupCamera(scene: Scene, camera: ZylemCamera, rendererManager?: RendererManager): Promise<void>;
|
|
687
|
+
/**
|
|
688
|
+
* Setup with a CameraManager (multi-camera support).
|
|
689
|
+
*/
|
|
690
|
+
setupCameraManager(scene: Scene, cameraManager: CameraManager, rendererManager: RendererManager): Promise<void>;
|
|
691
|
+
/**
|
|
692
|
+
* Add a camera (rig or direct) to the scene graph.
|
|
693
|
+
*/
|
|
694
|
+
private addCameraToScene;
|
|
695
|
+
/**
|
|
696
|
+
* Setup scene lighting
|
|
697
|
+
*/
|
|
698
|
+
setupLighting(scene: Scene): void;
|
|
699
|
+
/**
|
|
700
|
+
* Update renderer size - delegates to camera manager or camera
|
|
701
|
+
*/
|
|
702
|
+
updateRenderer(width: number, height: number): void;
|
|
703
|
+
/**
|
|
704
|
+
* Add object to scene
|
|
705
|
+
*/
|
|
706
|
+
add(object: Object3D, position?: Vector3): void;
|
|
707
|
+
/**
|
|
708
|
+
* Add game entity to scene
|
|
709
|
+
*/
|
|
710
|
+
addEntity(entity: GameEntity<any>): void;
|
|
711
|
+
/**
|
|
712
|
+
* Add an entity's group or mesh to the scene (for late-loaded models).
|
|
713
|
+
* Uses entity's current body position if physics is active.
|
|
714
|
+
*
|
|
715
|
+
* Fog entities ({@link ZylemFog}) are routed through the normal add
|
|
716
|
+
* pipeline so their empty placeholder group is parented for cleanup,
|
|
717
|
+
* but they also get an `attachToScene` call that wires `scene.fog`
|
|
718
|
+
* and starts the optional material patcher.
|
|
719
|
+
*/
|
|
720
|
+
addEntityGroup(entity: GameEntity<any>): void;
|
|
721
|
+
private isAttachedOutsideScene;
|
|
722
|
+
/**
|
|
723
|
+
* Add debug helpers to scene
|
|
724
|
+
*/
|
|
725
|
+
debugScene(): void;
|
|
726
|
+
/**
|
|
727
|
+
* Per-frame skybox hook. Ensures the skybox cube follows the active camera
|
|
728
|
+
* position so it always appears infinitely far away regardless of camera
|
|
729
|
+
* movement. TSL background shaders animate via the `time` node, which the
|
|
730
|
+
* renderer advances automatically.
|
|
731
|
+
*/
|
|
732
|
+
updateSkybox(_delta: number): void;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Host-provided debug signals for wasm runtime adapters (no direct `debugState` import in adapters).
|
|
737
|
+
*/
|
|
738
|
+
interface RuntimeDebugBinding {
|
|
739
|
+
/** When true, show wasm-side diagnostics (e.g. instanced collision heat tint). */
|
|
740
|
+
runtimeDiagnostics(): boolean;
|
|
741
|
+
}
|
|
742
|
+
interface StageRuntimeContext {
|
|
743
|
+
scene: ZylemScene;
|
|
744
|
+
world: ZylemWorld;
|
|
745
|
+
camera: ZylemCamera;
|
|
746
|
+
/** Optional; when set, adapters may enable extra runtime visualization. */
|
|
747
|
+
debug?: RuntimeDebugBinding;
|
|
748
|
+
}
|
|
749
|
+
interface StageRuntimeStepContext extends StageRuntimeContext {
|
|
750
|
+
delta: number;
|
|
751
|
+
inputs: Inputs;
|
|
752
|
+
}
|
|
753
|
+
interface StageRuntimeAdapter {
|
|
754
|
+
init(context: StageRuntimeContext): Promise<void> | void;
|
|
755
|
+
step(context: StageRuntimeStepContext): void;
|
|
756
|
+
destroy(context: StageRuntimeContext | null): void;
|
|
757
|
+
ownsEntity(entity: GameEntity<any>): boolean;
|
|
758
|
+
rendersEntity(entity: GameEntity<any>): boolean;
|
|
759
|
+
registerEntity(entity: GameEntity<any>): void;
|
|
760
|
+
unregisterEntity(entity: GameEntity<any>): void;
|
|
761
|
+
/**
|
|
762
|
+
* Optional: when implemented, the stage debug delegate will draw the
|
|
763
|
+
* returned line segments alongside the TS Rapier debug overlay so wasm
|
|
764
|
+
* runtime adapters can visualize their own colliders. Returning `null`
|
|
765
|
+
* (or omitting the method entirely) disables the second pass.
|
|
766
|
+
*/
|
|
767
|
+
getDebugRender?(): {
|
|
768
|
+
vertices: Float32Array;
|
|
769
|
+
colors: Float32Array;
|
|
770
|
+
} | null;
|
|
771
|
+
}
|
|
772
|
+
interface ZylemRuntimeStageAdapterSource {
|
|
773
|
+
source: RequestInfo | URL | ArrayBuffer;
|
|
774
|
+
}
|
|
775
|
+
declare function createZylemRuntimeStageAdapter(options: ZylemRuntimeStageAdapterSource): StageRuntimeAdapter;
|
|
776
|
+
|
|
777
|
+
export { type CameraBehavior as C, type PerspectiveType as P, type RuntimeDebugBinding as R, type StageRuntimeAdapter as S, type TransformLike as T, type Viewport as V, type ZylemRenderer as Z, type StageRuntimeContext as a, type StageRuntimeStepContext as b, createZylemRuntimeStageAdapter as c, Perspectives as d, type RendererType as e, CameraManager as f, type CameraPose as g, type PoseDelta as h, isWebGPUSupported as i, type CameraContext as j, type CameraPerspective as k, type CameraAction as l, type CameraPipelineState as m, CameraPipeline as n, ZylemCamera as o, ZylemScene as p, RendererManager as q };
|