@zylem/game-lib 0.6.4 → 0.8.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 +18 -2
- package/dist/actions.d.ts +321 -11
- package/dist/actions.js +1 -936
- package/dist/api/game-lib.api.json +54074 -0
- package/dist/api/game-lib.api.md +4544 -0
- package/dist/api/game-lib.d.ts +8258 -0
- package/dist/api/game-lib.typedoc.json +345421 -0
- package/dist/audio.d.ts +13 -0
- package/dist/audio.js +1 -0
- package/dist/base-node-life-cycle-D2NuN1VB.d.ts +151 -0
- package/dist/behavior.d.ts +2 -0
- package/dist/behavior.js +1 -0
- package/dist/blueprints-TbGY-h53.d.ts +162 -0
- package/dist/chunk-4QLJUQSJ.js +1 -0
- package/dist/chunk-7FR5JSQ2.js +1 -0
- package/dist/chunk-7GYFZKK7.js +1 -0
- package/dist/chunk-7WRQ2UAN.js +1 -0
- package/dist/chunk-BH53MBAZ.js +1 -0
- package/dist/chunk-BIGH6D34.js +0 -0
- package/dist/chunk-CM5YRNBJ.js +19 -0
- package/dist/chunk-COM6HJ2L.js +1 -0
- package/dist/chunk-D2PATZCC.js +1 -0
- package/dist/chunk-DFLI7ICU.js +0 -0
- package/dist/chunk-E3UBSUPX.js +1 -0
- package/dist/chunk-FKIKN7RP.js +24 -0
- package/dist/chunk-G4HONLWC.js +1 -0
- package/dist/chunk-IKWE2W6L.js +1 -0
- package/dist/chunk-IPWUDOV5.js +1 -0
- package/dist/chunk-JEHFHUH4.js +0 -0
- package/dist/chunk-JNKPTL77.js +1 -0
- package/dist/chunk-JQKS42G4.js +1 -0
- package/dist/chunk-M3XNO56P.js +1 -0
- package/dist/chunk-MSC2BEO5.js +1 -0
- package/dist/chunk-ORIDWL3T.js +0 -0
- package/dist/chunk-QB3NL7VQ.js +1 -0
- package/dist/chunk-QXVH6POE.js +1 -0
- package/dist/chunk-RXDTAWI2.js +29 -0
- package/dist/chunk-TAUWDQZF.js +9 -0
- package/dist/chunk-VS2D4B3W.js +1 -0
- package/dist/chunk-WQ3WMMZD.js +1 -0
- package/dist/chunk-XK63E4SX.js +1 -0
- package/dist/chunk-XNDS4YFR.js +1 -0
- package/dist/chunk-XNHVRFAK.js +1 -0
- package/dist/chunk-XRP4JJXL.js +1 -0
- package/dist/chunk-YHEWKN7N.js +1 -0
- package/dist/chunk-ZRT3ZQVH.js +1 -0
- package/dist/collision-builder-jF-toPIl.d.ts +38 -0
- package/dist/core.d.ts +223 -16
- package/dist/core.js +1 -12424
- package/dist/debug-state-BPT6jEog.d.ts +17 -0
- package/dist/debug.d.ts +76 -0
- package/dist/debug.js +1 -0
- package/dist/default-controls-0-vCnli7.d.ts +111 -0
- package/dist/{entity-vj-HTjzU.d.ts → entity-BdSI8CL3.d.ts} +119 -626
- package/dist/{entity-Bq_eNEDI.d.ts → entity-DZbFQ1Wg.d.ts} +4 -4
- package/dist/entity-type-map-Bd69SpAS.d.ts +928 -0
- package/dist/entity.d.ts +268 -0
- package/dist/entity.js +1 -0
- package/dist/events.d.ts +181 -0
- package/dist/events.js +1 -0
- package/dist/game-C1FHVqXl.d.ts +1886 -0
- package/dist/game-default-QHROHW2O.js +1 -0
- package/dist/game-interfaces-mchNYSZE.d.ts +90 -0
- package/dist/globals.d.ts +115 -0
- package/dist/globals.js +1 -0
- package/dist/graphics.d.ts +53 -0
- package/dist/graphics.js +1 -0
- package/dist/input-ui.d.ts +35 -0
- package/dist/input-ui.js +1 -0
- package/dist/input.d.ts +73 -0
- package/dist/input.js +1 -0
- package/dist/material-9vJ6SZaI.d.ts +126 -0
- package/dist/public.d.ts +38 -0
- package/dist/public.js +1 -0
- package/dist/runtime.d.ts +59 -0
- package/dist/runtime.js +1 -0
- package/dist/schema/entity.schema.json +244 -0
- package/dist/schema/game-config.schema.json +625 -0
- package/dist/schema/input-config.schema.json +499 -0
- package/dist/schema/stage-config.schema.json +93 -0
- package/dist/schema/stage.schema.json +271 -0
- package/dist/schema.d.ts +538 -0
- package/dist/schema.js +1 -0
- package/dist/stage-transition-CmGpV4tc.d.ts +46 -0
- package/dist/vector-CiSHbivc.d.ts +133 -0
- package/dist/web-components.d.ts +70 -0
- package/dist/web-components.js +1 -0
- package/dist/zylem-camera-C3bn6BTI.d.ts +575 -0
- package/package.json +70 -73
- package/dist/actions.js.map +0 -1
- package/dist/behavior/jumper-2d.d.ts +0 -114
- package/dist/behavior/jumper-2d.js +0 -711
- package/dist/behavior/jumper-2d.js.map +0 -1
- package/dist/behavior/platformer-3d.d.ts +0 -296
- package/dist/behavior/platformer-3d.js +0 -761
- package/dist/behavior/platformer-3d.js.map +0 -1
- package/dist/behavior/ricochet-2d.d.ts +0 -275
- package/dist/behavior/ricochet-2d.js +0 -425
- package/dist/behavior/ricochet-2d.js.map +0 -1
- package/dist/behavior/ricochet-3d.d.ts +0 -117
- package/dist/behavior/ricochet-3d.js +0 -443
- package/dist/behavior/ricochet-3d.js.map +0 -1
- package/dist/behavior/screen-visibility.d.ts +0 -79
- package/dist/behavior/screen-visibility.js +0 -358
- package/dist/behavior/screen-visibility.js.map +0 -1
- package/dist/behavior/screen-wrap.d.ts +0 -87
- package/dist/behavior/screen-wrap.js +0 -246
- package/dist/behavior/screen-wrap.js.map +0 -1
- package/dist/behavior/shooter-2d.d.ts +0 -79
- package/dist/behavior/shooter-2d.js +0 -180
- package/dist/behavior/shooter-2d.js.map +0 -1
- package/dist/behavior/thruster.d.ts +0 -11
- package/dist/behavior/thruster.js +0 -292
- package/dist/behavior/thruster.js.map +0 -1
- package/dist/behavior/top-down-movement.d.ts +0 -56
- package/dist/behavior/top-down-movement.js +0 -125
- package/dist/behavior/top-down-movement.js.map +0 -1
- package/dist/behavior/world-boundary-2d.d.ts +0 -142
- package/dist/behavior/world-boundary-2d.js +0 -235
- package/dist/behavior/world-boundary-2d.js.map +0 -1
- package/dist/behavior/world-boundary-3d.d.ts +0 -76
- package/dist/behavior/world-boundary-3d.js +0 -274
- package/dist/behavior/world-boundary-3d.js.map +0 -1
- package/dist/behavior-descriptor-BXnVR8Ki.d.ts +0 -159
- package/dist/blueprints-DmbK2dki.d.ts +0 -26
- package/dist/camera-4XO5gbQH.d.ts +0 -905
- package/dist/camera.d.ts +0 -6
- package/dist/camera.js +0 -1993
- package/dist/camera.js.map +0 -1
- package/dist/composition-BASvMKrW.d.ts +0 -218
- package/dist/core-CARRaS55.d.ts +0 -541
- package/dist/core.js.map +0 -1
- package/dist/entities-ChFirVL9.d.ts +0 -410
- package/dist/entities.d.ts +0 -9
- package/dist/entities.js +0 -4986
- package/dist/entities.js.map +0 -1
- package/dist/entity-types-DAu8sGJH.d.ts +0 -26
- package/dist/global-change-2JvMaz44.d.ts +0 -25
- package/dist/main.d.ts +0 -1353
- package/dist/main.js +0 -19525
- package/dist/main.js.map +0 -1
- package/dist/physics-pose-DCc4oE44.d.ts +0 -25
- package/dist/physics-protocol-BDD3P5W2.d.ts +0 -200
- package/dist/physics-worker.d.ts +0 -21
- package/dist/physics-worker.js +0 -306
- package/dist/physics-worker.js.map +0 -1
- package/dist/physics.d.ts +0 -205
- package/dist/physics.js +0 -577
- package/dist/physics.js.map +0 -1
- package/dist/stage-types-C19IhuzA.d.ts +0 -731
- package/dist/stage.d.ts +0 -52
- package/dist/stage.js +0 -8479
- package/dist/stage.js.map +0 -1
- package/dist/sync-state-machine-CZyspBpj.d.ts +0 -16
- package/dist/thruster-23lzoPZd.d.ts +0 -180
- package/dist/world-DfgxoNMt.d.ts +0 -105
|
@@ -1,410 +0,0 @@
|
|
|
1
|
-
import { I as GameEntity, P as GameEntityOptions, L as SetupContext, U as UpdateContext, M as DestroyContext, O as BaseNode, as as TexturePath, V as Vec3, R as MaterialOptions, aq as CleanupContext } from './entity-vj-HTjzU.js';
|
|
2
|
-
import { Vector3, Sprite, Color, Vector2, Object3D } from 'three';
|
|
3
|
-
import { C as CollisionHandlerDelegate } from './world-DfgxoNMt.js';
|
|
4
|
-
|
|
5
|
-
type SpriteImage = {
|
|
6
|
-
name: string;
|
|
7
|
-
file: string;
|
|
8
|
-
};
|
|
9
|
-
type SpriteAnimation = {
|
|
10
|
-
name: string;
|
|
11
|
-
frames: string[];
|
|
12
|
-
speed: number | number[];
|
|
13
|
-
loop: boolean;
|
|
14
|
-
};
|
|
15
|
-
type ZylemSpriteOptions = GameEntityOptions & {
|
|
16
|
-
images?: SpriteImage[];
|
|
17
|
-
animations?: SpriteAnimation[];
|
|
18
|
-
size?: Vector3;
|
|
19
|
-
collisionSize?: Vector3;
|
|
20
|
-
};
|
|
21
|
-
declare const SPRITE_TYPE: unique symbol;
|
|
22
|
-
declare class ZylemSprite extends GameEntity<ZylemSpriteOptions> {
|
|
23
|
-
static type: symbol;
|
|
24
|
-
protected sprites: Sprite[];
|
|
25
|
-
protected spriteMap: Map<string, number>;
|
|
26
|
-
protected currentSpriteIndex: number;
|
|
27
|
-
protected animations: Map<string, any>;
|
|
28
|
-
protected currentAnimation: any;
|
|
29
|
-
protected currentAnimationFrame: string;
|
|
30
|
-
protected currentAnimationIndex: number;
|
|
31
|
-
protected currentAnimationTime: number;
|
|
32
|
-
constructor(options?: ZylemSpriteOptions);
|
|
33
|
-
create(): this;
|
|
34
|
-
protected createSpritesFromImages(images: SpriteImage[]): void;
|
|
35
|
-
protected createAnimations(animations: SpriteAnimation[]): void;
|
|
36
|
-
setSprite(key: string): void;
|
|
37
|
-
setAnimation(name: string, delta: number): void;
|
|
38
|
-
private getCurrentRotationQuaternion;
|
|
39
|
-
private syncSpriteMaterials;
|
|
40
|
-
spriteSetup(_params: SetupContext<ZylemSpriteOptions>): void;
|
|
41
|
-
spriteUpdate(params: UpdateContext<ZylemSpriteOptions>): void;
|
|
42
|
-
spriteDestroy(params: DestroyContext<ZylemSpriteOptions>): void;
|
|
43
|
-
buildInfo(): Record<string, any>;
|
|
44
|
-
}
|
|
45
|
-
type SpriteOptions = BaseNode | Partial<ZylemSpriteOptions>;
|
|
46
|
-
declare function createSprite(...args: Array<SpriteOptions>): ZylemSprite;
|
|
47
|
-
|
|
48
|
-
type ZylemSphereOptions = GameEntityOptions & {
|
|
49
|
-
radius?: number;
|
|
50
|
-
};
|
|
51
|
-
declare const SPHERE_TYPE: unique symbol;
|
|
52
|
-
declare class ZylemSphere extends GameEntity<ZylemSphereOptions> {
|
|
53
|
-
static type: symbol;
|
|
54
|
-
constructor(options?: ZylemSphereOptions);
|
|
55
|
-
buildInfo(): Record<string, any>;
|
|
56
|
-
}
|
|
57
|
-
type SphereOptions = BaseNode | Partial<ZylemSphereOptions>;
|
|
58
|
-
declare function createSphere(...args: Array<SphereOptions>): ZylemSphere;
|
|
59
|
-
|
|
60
|
-
type ZylemRectOptions = GameEntityOptions & {
|
|
61
|
-
width?: number;
|
|
62
|
-
height?: number;
|
|
63
|
-
fillColor?: Color | string | null;
|
|
64
|
-
strokeColor?: Color | string | null;
|
|
65
|
-
strokeWidth?: number;
|
|
66
|
-
radius?: number;
|
|
67
|
-
padding?: number;
|
|
68
|
-
stickToViewport?: boolean;
|
|
69
|
-
screenPosition?: Vector2;
|
|
70
|
-
zDistance?: number;
|
|
71
|
-
anchor?: Vector2;
|
|
72
|
-
bounds?: {
|
|
73
|
-
screen?: {
|
|
74
|
-
x: number;
|
|
75
|
-
y: number;
|
|
76
|
-
width: number;
|
|
77
|
-
height: number;
|
|
78
|
-
};
|
|
79
|
-
world?: {
|
|
80
|
-
left: number;
|
|
81
|
-
right: number;
|
|
82
|
-
top: number;
|
|
83
|
-
bottom: number;
|
|
84
|
-
z?: number;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
declare const RECT_TYPE: unique symbol;
|
|
89
|
-
declare class ZylemRect extends GameEntity<ZylemRectOptions> {
|
|
90
|
-
static type: symbol;
|
|
91
|
-
private _sprite;
|
|
92
|
-
private _mesh;
|
|
93
|
-
private _texture;
|
|
94
|
-
private _canvas;
|
|
95
|
-
private _ctx;
|
|
96
|
-
private _cameraRef;
|
|
97
|
-
private _lastCanvasW;
|
|
98
|
-
private _lastCanvasH;
|
|
99
|
-
constructor(options?: ZylemRectOptions);
|
|
100
|
-
private createSprite;
|
|
101
|
-
private redrawRect;
|
|
102
|
-
getWidth(): number;
|
|
103
|
-
getHeight(): number;
|
|
104
|
-
private roundedRectPath;
|
|
105
|
-
private toCssColor;
|
|
106
|
-
/**
|
|
107
|
-
* Get the viewport resolution from the renderer DOM element,
|
|
108
|
-
* falling back to the camera's screenResolution if the renderer
|
|
109
|
-
* is not available (e.g. when using the new RendererManager path).
|
|
110
|
-
*/
|
|
111
|
-
private getResolution;
|
|
112
|
-
private rectSetup;
|
|
113
|
-
private rectUpdate;
|
|
114
|
-
private updateStickyTransform;
|
|
115
|
-
private worldToScreen;
|
|
116
|
-
private computeScreenBoundsFromOptions;
|
|
117
|
-
updateRect(options?: Partial<Pick<ZylemRectOptions, 'width' | 'height' | 'fillColor' | 'strokeColor' | 'strokeWidth' | 'radius'>>): void;
|
|
118
|
-
buildInfo(): Record<string, any>;
|
|
119
|
-
}
|
|
120
|
-
type RectOptions = BaseNode | Partial<ZylemRectOptions>;
|
|
121
|
-
declare function createRect(...args: Array<RectOptions>): ZylemRect;
|
|
122
|
-
|
|
123
|
-
type ZylemTextOptions = GameEntityOptions & {
|
|
124
|
-
text?: string;
|
|
125
|
-
fontFamily?: string;
|
|
126
|
-
fontSize?: number;
|
|
127
|
-
fontColor?: Color | string;
|
|
128
|
-
backgroundColor?: Color | string | null;
|
|
129
|
-
padding?: number;
|
|
130
|
-
stickToViewport?: boolean;
|
|
131
|
-
screenPosition?: Vector2;
|
|
132
|
-
zDistance?: number;
|
|
133
|
-
};
|
|
134
|
-
declare const TEXT_TYPE: unique symbol;
|
|
135
|
-
declare class ZylemText extends GameEntity<ZylemTextOptions> {
|
|
136
|
-
static type: symbol;
|
|
137
|
-
private _sprite;
|
|
138
|
-
private _texture;
|
|
139
|
-
private _canvas;
|
|
140
|
-
private _ctx;
|
|
141
|
-
private _cameraRef;
|
|
142
|
-
private _lastCanvasW;
|
|
143
|
-
private _lastCanvasH;
|
|
144
|
-
constructor(options?: ZylemTextOptions);
|
|
145
|
-
create(): this;
|
|
146
|
-
private createSprite;
|
|
147
|
-
private measureAndResizeCanvas;
|
|
148
|
-
private drawCenteredText;
|
|
149
|
-
private updateTexture;
|
|
150
|
-
private redrawText;
|
|
151
|
-
private toCssColor;
|
|
152
|
-
private textSetup;
|
|
153
|
-
private textUpdate;
|
|
154
|
-
private getResolution;
|
|
155
|
-
private getScreenPixels;
|
|
156
|
-
private computeWorldExtents;
|
|
157
|
-
private updateSpriteScale;
|
|
158
|
-
private updateStickyTransform;
|
|
159
|
-
updateText(_text: string): void;
|
|
160
|
-
buildInfo(): Record<string, any>;
|
|
161
|
-
/**
|
|
162
|
-
* Dispose of Three.js resources when the entity is destroyed.
|
|
163
|
-
*/
|
|
164
|
-
private textDestroy;
|
|
165
|
-
}
|
|
166
|
-
type TextOptions = BaseNode | Partial<ZylemTextOptions>;
|
|
167
|
-
declare function createText(...args: Array<TextOptions>): ZylemText;
|
|
168
|
-
|
|
169
|
-
type ZylemBoxOptions = GameEntityOptions;
|
|
170
|
-
declare const BOX_TYPE: unique symbol;
|
|
171
|
-
declare class ZylemBox extends GameEntity<ZylemBoxOptions> {
|
|
172
|
-
static type: symbol;
|
|
173
|
-
constructor(options?: ZylemBoxOptions);
|
|
174
|
-
buildInfo(): Record<string, any>;
|
|
175
|
-
}
|
|
176
|
-
type BoxOptions = BaseNode | Partial<ZylemBoxOptions>;
|
|
177
|
-
declare function createBox(...args: Array<BoxOptions>): ZylemBox;
|
|
178
|
-
|
|
179
|
-
type ZylemPlaneOptions = GameEntityOptions & {
|
|
180
|
-
tile?: Vector2;
|
|
181
|
-
repeat?: Vector2;
|
|
182
|
-
texture?: TexturePath;
|
|
183
|
-
subdivisions?: number;
|
|
184
|
-
randomizeHeight?: boolean;
|
|
185
|
-
heightMap?: number[];
|
|
186
|
-
heightScale?: number;
|
|
187
|
-
};
|
|
188
|
-
declare const PLANE_TYPE: unique symbol;
|
|
189
|
-
declare class ZylemPlane extends GameEntity<ZylemPlaneOptions> {
|
|
190
|
-
static type: symbol;
|
|
191
|
-
constructor(options?: ZylemPlaneOptions);
|
|
192
|
-
}
|
|
193
|
-
type PlaneOptions = BaseNode | Partial<ZylemPlaneOptions>;
|
|
194
|
-
declare function createPlane(...args: Array<PlaneOptions>): ZylemPlane;
|
|
195
|
-
|
|
196
|
-
type OnHeldParams = {
|
|
197
|
-
delta: number;
|
|
198
|
-
self: ZylemZone;
|
|
199
|
-
visitor: GameEntity<any>;
|
|
200
|
-
heldTime: number;
|
|
201
|
-
globals: any;
|
|
202
|
-
};
|
|
203
|
-
type OnEnterParams = Pick<OnHeldParams, 'self' | 'visitor' | 'globals'>;
|
|
204
|
-
type OnExitParams = Pick<OnHeldParams, 'self' | 'visitor' | 'globals'>;
|
|
205
|
-
type ZylemZoneOptions = GameEntityOptions & {
|
|
206
|
-
size?: Vector3;
|
|
207
|
-
static?: boolean;
|
|
208
|
-
onEnter?: (params: OnEnterParams) => void;
|
|
209
|
-
onHeld?: (params: OnHeldParams) => void;
|
|
210
|
-
onExit?: (params: OnExitParams) => void;
|
|
211
|
-
};
|
|
212
|
-
declare const ZONE_TYPE: unique symbol;
|
|
213
|
-
declare class ZylemZone extends GameEntity<ZylemZoneOptions> implements CollisionHandlerDelegate {
|
|
214
|
-
static type: symbol;
|
|
215
|
-
private _enteredZone;
|
|
216
|
-
private _exitedZone;
|
|
217
|
-
private _zoneEntities;
|
|
218
|
-
constructor(options?: ZylemZoneOptions);
|
|
219
|
-
handlePostCollision({ delta }: {
|
|
220
|
-
delta: number;
|
|
221
|
-
}): boolean;
|
|
222
|
-
handleIntersectionEvent({ other, delta }: {
|
|
223
|
-
other: any;
|
|
224
|
-
delta: number;
|
|
225
|
-
}): void;
|
|
226
|
-
onEnter(callback: (params: OnEnterParams) => void): this;
|
|
227
|
-
onHeld(callback: (params: OnHeldParams) => void): this;
|
|
228
|
-
onExit(callback: (params: OnExitParams) => void): this;
|
|
229
|
-
entered(other: any): void;
|
|
230
|
-
exited(delta: number, key: string): void;
|
|
231
|
-
held(delta: number, other: any): void;
|
|
232
|
-
}
|
|
233
|
-
type ZoneOptions = BaseNode | Partial<ZylemZoneOptions>;
|
|
234
|
-
declare function createZone(...args: Array<ZoneOptions>): ZylemZone;
|
|
235
|
-
|
|
236
|
-
interface EntityLoaderDelegate {
|
|
237
|
-
/** Initiates loading (may be async internally, but call returns immediately) */
|
|
238
|
-
load(): void;
|
|
239
|
-
/** Returns data synchronously (may be null if still loading) */
|
|
240
|
-
data(): any;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
type AnimationOptions = {
|
|
244
|
-
key: string;
|
|
245
|
-
pauseAtEnd?: boolean;
|
|
246
|
-
pauseAtPercentage?: number;
|
|
247
|
-
fadeToKey?: string;
|
|
248
|
-
fadeDuration?: number;
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Interface for entities that provide custom debug information
|
|
253
|
-
*/
|
|
254
|
-
interface DebugInfoProvider {
|
|
255
|
-
getDebugInfo(): Record<string, any>;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
type AnimationObject = {
|
|
259
|
-
key?: string;
|
|
260
|
-
path: string;
|
|
261
|
-
};
|
|
262
|
-
type CollisionShapeType = 'capsule' | 'bounds' | 'trimesh' | 'model';
|
|
263
|
-
type ZylemActorOptions = GameEntityOptions & {
|
|
264
|
-
static?: boolean;
|
|
265
|
-
animations?: AnimationObject[];
|
|
266
|
-
models?: string[];
|
|
267
|
-
scale?: Vec3;
|
|
268
|
-
material?: MaterialOptions;
|
|
269
|
-
collisionShape?: CollisionShapeType;
|
|
270
|
-
};
|
|
271
|
-
declare const ACTOR_TYPE: unique symbol;
|
|
272
|
-
declare class ZylemActor extends GameEntity<ZylemActorOptions> implements EntityLoaderDelegate, DebugInfoProvider {
|
|
273
|
-
static type: symbol;
|
|
274
|
-
private _object;
|
|
275
|
-
private _collisionSource;
|
|
276
|
-
private _animationDelegate;
|
|
277
|
-
private _modelFileNames;
|
|
278
|
-
private _assetLoader;
|
|
279
|
-
private _loadGeneration;
|
|
280
|
-
private _loadStatus;
|
|
281
|
-
controlledRotation: boolean;
|
|
282
|
-
hasWarnedDynamicTrimesh: boolean;
|
|
283
|
-
constructor(options?: ZylemActorOptions);
|
|
284
|
-
create(): this;
|
|
285
|
-
load(): void;
|
|
286
|
-
data(): any;
|
|
287
|
-
needsDeferredModelCollision(): boolean;
|
|
288
|
-
synchronizeRuntimeCollider(): void;
|
|
289
|
-
actorUpdate(params: UpdateContext<ZylemActorOptions>): void;
|
|
290
|
-
actorDestroy(): void;
|
|
291
|
-
_cleanup(params: CleanupContext<this>): void;
|
|
292
|
-
playAnimation(animationOptions: AnimationOptions): void;
|
|
293
|
-
get object(): Object3D | null;
|
|
294
|
-
get collisionSource(): Object3D | null;
|
|
295
|
-
getDebugInfo(): Record<string, any>;
|
|
296
|
-
private getResolvedCollisionShape;
|
|
297
|
-
private requiresLoadedCollisionSource;
|
|
298
|
-
private getRuntimeCollisionSource;
|
|
299
|
-
private getCollisionSourceSelection;
|
|
300
|
-
private disposeRuntimeState;
|
|
301
|
-
private loadModelsDeferred;
|
|
302
|
-
private applyMaterialOverrides;
|
|
303
|
-
}
|
|
304
|
-
type ActorOptions = BaseNode | ZylemActorOptions;
|
|
305
|
-
declare function createActor(...args: Array<ActorOptions>): ZylemActor;
|
|
306
|
-
|
|
307
|
-
type ZylemConeOptions = GameEntityOptions & {
|
|
308
|
-
/** Base radius of the cone */
|
|
309
|
-
radius?: number;
|
|
310
|
-
/** Height of the cone */
|
|
311
|
-
height?: number;
|
|
312
|
-
/** Number of radial segments (higher = smoother) */
|
|
313
|
-
radialSegments?: number;
|
|
314
|
-
};
|
|
315
|
-
declare const CONE_TYPE: unique symbol;
|
|
316
|
-
/**
|
|
317
|
-
* A cone entity with configurable radius, height, and radial segments.
|
|
318
|
-
* Uses a Rapier cone collider for physics.
|
|
319
|
-
*/
|
|
320
|
-
declare class ZylemCone extends GameEntity<ZylemConeOptions> {
|
|
321
|
-
static type: symbol;
|
|
322
|
-
constructor(options?: ZylemConeOptions);
|
|
323
|
-
buildInfo(): Record<string, any>;
|
|
324
|
-
}
|
|
325
|
-
type ConeOptions = BaseNode | Partial<ZylemConeOptions>;
|
|
326
|
-
/**
|
|
327
|
-
* Create a cone entity.
|
|
328
|
-
* @param args Options or child nodes
|
|
329
|
-
*/
|
|
330
|
-
declare function createCone(...args: Array<ConeOptions>): ZylemCone;
|
|
331
|
-
|
|
332
|
-
type ZylemPyramidOptions = GameEntityOptions & {
|
|
333
|
-
/** Base radius of the pyramid */
|
|
334
|
-
radius?: number;
|
|
335
|
-
/** Height of the pyramid */
|
|
336
|
-
height?: number;
|
|
337
|
-
};
|
|
338
|
-
declare const PYRAMID_TYPE: unique symbol;
|
|
339
|
-
/**
|
|
340
|
-
* A pyramid entity (4-sided cone).
|
|
341
|
-
* Uses ConeGeometry with 4 radial segments for the visual mesh
|
|
342
|
-
* and a Rapier cone collider for physics.
|
|
343
|
-
*/
|
|
344
|
-
declare class ZylemPyramid extends GameEntity<ZylemPyramidOptions> {
|
|
345
|
-
static type: symbol;
|
|
346
|
-
constructor(options?: ZylemPyramidOptions);
|
|
347
|
-
buildInfo(): Record<string, any>;
|
|
348
|
-
}
|
|
349
|
-
type PyramidOptions = BaseNode | Partial<ZylemPyramidOptions>;
|
|
350
|
-
/**
|
|
351
|
-
* Create a pyramid entity.
|
|
352
|
-
* @param args Options or child nodes
|
|
353
|
-
*/
|
|
354
|
-
declare function createPyramid(...args: Array<PyramidOptions>): ZylemPyramid;
|
|
355
|
-
|
|
356
|
-
type ZylemCylinderOptions = GameEntityOptions & {
|
|
357
|
-
/** Top radius of the cylinder */
|
|
358
|
-
radiusTop?: number;
|
|
359
|
-
/** Bottom radius of the cylinder */
|
|
360
|
-
radiusBottom?: number;
|
|
361
|
-
/** Height of the cylinder */
|
|
362
|
-
height?: number;
|
|
363
|
-
/** Number of radial segments (higher = smoother) */
|
|
364
|
-
radialSegments?: number;
|
|
365
|
-
};
|
|
366
|
-
declare const CYLINDER_TYPE: unique symbol;
|
|
367
|
-
/**
|
|
368
|
-
* A cylinder entity with configurable top/bottom radii, height, and segments.
|
|
369
|
-
* Uses a Rapier cylinder collider for physics.
|
|
370
|
-
*/
|
|
371
|
-
declare class ZylemCylinder extends GameEntity<ZylemCylinderOptions> {
|
|
372
|
-
static type: symbol;
|
|
373
|
-
constructor(options?: ZylemCylinderOptions);
|
|
374
|
-
buildInfo(): Record<string, any>;
|
|
375
|
-
}
|
|
376
|
-
type CylinderOptions = BaseNode | Partial<ZylemCylinderOptions>;
|
|
377
|
-
/**
|
|
378
|
-
* Create a cylinder entity.
|
|
379
|
-
* @param args Options or child nodes
|
|
380
|
-
*/
|
|
381
|
-
declare function createCylinder(...args: Array<CylinderOptions>): ZylemCylinder;
|
|
382
|
-
|
|
383
|
-
type ZylemPillOptions = GameEntityOptions & {
|
|
384
|
-
/** Radius of the capsule hemispheres */
|
|
385
|
-
radius?: number;
|
|
386
|
-
/** Length of the cylindrical middle section */
|
|
387
|
-
length?: number;
|
|
388
|
-
/** Number of cap segments (higher = smoother) */
|
|
389
|
-
capSegments?: number;
|
|
390
|
-
/** Number of radial segments (higher = smoother) */
|
|
391
|
-
radialSegments?: number;
|
|
392
|
-
};
|
|
393
|
-
declare const PILL_TYPE: unique symbol;
|
|
394
|
-
/**
|
|
395
|
-
* A pill/capsule entity with configurable radius and cylindrical length.
|
|
396
|
-
* Uses Three.js CapsuleGeometry for rendering and Rapier capsule collider for physics.
|
|
397
|
-
*/
|
|
398
|
-
declare class ZylemPill extends GameEntity<ZylemPillOptions> {
|
|
399
|
-
static type: symbol;
|
|
400
|
-
constructor(options?: ZylemPillOptions);
|
|
401
|
-
buildInfo(): Record<string, any>;
|
|
402
|
-
}
|
|
403
|
-
type PillOptions = BaseNode | Partial<ZylemPillOptions>;
|
|
404
|
-
/**
|
|
405
|
-
* Create a pill (capsule) entity.
|
|
406
|
-
* @param args Options or child nodes
|
|
407
|
-
*/
|
|
408
|
-
declare function createPill(...args: Array<PillOptions>): ZylemPill;
|
|
409
|
-
|
|
410
|
-
export { ACTOR_TYPE as A, BOX_TYPE as B, CONE_TYPE as C, createCylinder as D, createPill as E, PLANE_TYPE as P, RECT_TYPE as R, SPRITE_TYPE as S, TEXT_TYPE as T, ZylemSprite as Z, SPHERE_TYPE as a, ZylemSphere as b, ZylemRect as c, ZylemText as d, ZylemBox as e, ZylemPlane as f, ZONE_TYPE as g, ZylemZone as h, ZylemActor as i, ZylemCone as j, PYRAMID_TYPE as k, ZylemPyramid as l, CYLINDER_TYPE as m, ZylemCylinder as n, PILL_TYPE as o, ZylemPill as p, createBox as q, createSphere as r, createSprite as s, createPlane as t, createZone as u, createActor as v, createText as w, createRect as x, createCone as y, createPyramid as z };
|
package/dist/entities.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { e as ZylemBox, v as createActor, q as createBox, y as createCone, D as createCylinder, E as createPill, t as createPlane, z as createPyramid, x as createRect, r as createSphere, s as createSprite, w as createText, u as createZone } from './entities-ChFirVL9.js';
|
|
2
|
-
import './entity-vj-HTjzU.js';
|
|
3
|
-
import 'three';
|
|
4
|
-
import '@dimforge/rapier3d-compat';
|
|
5
|
-
import 'bitecs';
|
|
6
|
-
import 'mitt';
|
|
7
|
-
import './behavior-descriptor-BXnVR8Ki.js';
|
|
8
|
-
import './world-DfgxoNMt.js';
|
|
9
|
-
import './entity-Bq_eNEDI.js';
|