@zylem/game-lib 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.d.ts +5 -5
- package/dist/actions.js +196 -32
- package/dist/actions.js.map +1 -1
- package/dist/behavior/jumper-2d.d.ts +114 -0
- package/dist/behavior/jumper-2d.js +711 -0
- package/dist/behavior/jumper-2d.js.map +1 -0
- package/dist/behavior/platformer-3d.d.ts +14 -14
- package/dist/behavior/platformer-3d.js +347 -104
- package/dist/behavior/platformer-3d.js.map +1 -1
- package/dist/behavior/ricochet-2d.d.ts +4 -3
- package/dist/behavior/ricochet-2d.js +53 -22
- package/dist/behavior/ricochet-2d.js.map +1 -1
- package/dist/behavior/ricochet-3d.d.ts +117 -0
- package/dist/behavior/ricochet-3d.js +443 -0
- package/dist/behavior/ricochet-3d.js.map +1 -0
- package/dist/behavior/screen-visibility.d.ts +79 -0
- package/dist/behavior/screen-visibility.js +358 -0
- package/dist/behavior/screen-visibility.js.map +1 -0
- package/dist/behavior/screen-wrap.d.ts +4 -3
- package/dist/behavior/screen-wrap.js +100 -49
- package/dist/behavior/screen-wrap.js.map +1 -1
- package/dist/behavior/shooter-2d.d.ts +79 -0
- package/dist/behavior/shooter-2d.js +180 -0
- package/dist/behavior/shooter-2d.js.map +1 -0
- package/dist/behavior/thruster.d.ts +5 -4
- package/dist/behavior/thruster.js +133 -75
- package/dist/behavior/thruster.js.map +1 -1
- package/dist/behavior/top-down-movement.d.ts +56 -0
- package/dist/behavior/top-down-movement.js +125 -0
- package/dist/behavior/top-down-movement.js.map +1 -0
- package/dist/behavior/world-boundary-2d.d.ts +4 -3
- package/dist/behavior/world-boundary-2d.js +90 -36
- package/dist/behavior/world-boundary-2d.js.map +1 -1
- package/dist/behavior/world-boundary-3d.d.ts +76 -0
- package/dist/behavior/world-boundary-3d.js +274 -0
- package/dist/behavior/world-boundary-3d.js.map +1 -0
- package/dist/{behavior-descriptor-BWNWmIjv.d.ts → behavior-descriptor-BXnVR8Ki.d.ts} +22 -5
- package/dist/{blueprints-BWGz8fII.d.ts → blueprints-DmbK2dki.d.ts} +2 -2
- package/dist/camera-4XO5gbQH.d.ts +905 -0
- package/dist/camera.d.ts +1 -1
- package/dist/camera.js +876 -289
- package/dist/camera.js.map +1 -1
- package/dist/{composition-DrzFrbqI.d.ts → composition-BASvMKrW.d.ts} +1 -1
- package/dist/{core-DAkskq6Y.d.ts → core-CARRaS55.d.ts} +57 -14
- package/dist/core.d.ts +9 -8
- package/dist/core.js +4519 -1255
- package/dist/core.js.map +1 -1
- package/dist/{entities-DC9ce_vx.d.ts → entities-ChFirVL9.d.ts} +22 -28
- package/dist/entities.d.ts +4 -4
- package/dist/entities.js +1231 -314
- package/dist/entities.js.map +1 -1
- package/dist/{entity-BpbZqg19.d.ts → entity-vj-HTjzU.d.ts} +80 -11
- package/dist/{global-change-Dc8uCKi2.d.ts → global-change-2JvMaz44.d.ts} +1 -1
- package/dist/main.d.ts +718 -19
- package/dist/main.js +12129 -5959
- package/dist/main.js.map +1 -1
- package/dist/physics-pose-DCc4oE44.d.ts +25 -0
- package/dist/physics-protocol-BDD3P5W2.d.ts +200 -0
- package/dist/physics-worker.d.ts +21 -0
- package/dist/physics-worker.js +306 -0
- package/dist/physics-worker.js.map +1 -0
- package/dist/physics.d.ts +205 -0
- package/dist/physics.js +577 -0
- package/dist/physics.js.map +1 -0
- package/dist/{stage-types-BFsm3qsZ.d.ts → stage-types-C19IhuzA.d.ts} +253 -89
- package/dist/stage.d.ts +9 -8
- package/dist/stage.js +3782 -1041
- package/dist/stage.js.map +1 -1
- package/dist/sync-state-machine-CZyspBpj.d.ts +16 -0
- package/dist/{thruster-DhRaJnoL.d.ts → thruster-23lzoPZd.d.ts} +16 -8
- package/dist/world-DfgxoNMt.d.ts +105 -0
- package/package.json +25 -1
- package/dist/camera-B5e4c78l.d.ts +0 -468
- package/dist/world-Be5m1XC1.d.ts +0 -31
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as GameEntity, P as GameEntityOptions, U as UpdateContext, M as DestroyContext,
|
|
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
2
|
import { Vector3, Sprite, Color, Vector2, Object3D } from 'three';
|
|
3
|
-
import { C as CollisionHandlerDelegate } from './world-
|
|
3
|
+
import { C as CollisionHandlerDelegate } from './world-DfgxoNMt.js';
|
|
4
4
|
|
|
5
5
|
type SpriteImage = {
|
|
6
6
|
name: string;
|
|
@@ -35,6 +35,9 @@ declare class ZylemSprite extends GameEntity<ZylemSpriteOptions> {
|
|
|
35
35
|
protected createAnimations(animations: SpriteAnimation[]): void;
|
|
36
36
|
setSprite(key: string): void;
|
|
37
37
|
setAnimation(name: string, delta: number): void;
|
|
38
|
+
private getCurrentRotationQuaternion;
|
|
39
|
+
private syncSpriteMaterials;
|
|
40
|
+
spriteSetup(_params: SetupContext<ZylemSpriteOptions>): void;
|
|
38
41
|
spriteUpdate(params: UpdateContext<ZylemSpriteOptions>): void;
|
|
39
42
|
spriteDestroy(params: DestroyContext<ZylemSpriteOptions>): void;
|
|
40
43
|
buildInfo(): Record<string, any>;
|
|
@@ -256,7 +259,7 @@ type AnimationObject = {
|
|
|
256
259
|
key?: string;
|
|
257
260
|
path: string;
|
|
258
261
|
};
|
|
259
|
-
type CollisionShapeType = 'capsule' | 'model';
|
|
262
|
+
type CollisionShapeType = 'capsule' | 'bounds' | 'trimesh' | 'model';
|
|
260
263
|
type ZylemActorOptions = GameEntityOptions & {
|
|
261
264
|
static?: boolean;
|
|
262
265
|
animations?: AnimationObject[];
|
|
@@ -269,43 +272,34 @@ declare const ACTOR_TYPE: unique symbol;
|
|
|
269
272
|
declare class ZylemActor extends GameEntity<ZylemActorOptions> implements EntityLoaderDelegate, DebugInfoProvider {
|
|
270
273
|
static type: symbol;
|
|
271
274
|
private _object;
|
|
275
|
+
private _collisionSource;
|
|
272
276
|
private _animationDelegate;
|
|
273
277
|
private _modelFileNames;
|
|
274
278
|
private _assetLoader;
|
|
279
|
+
private _loadGeneration;
|
|
280
|
+
private _loadStatus;
|
|
275
281
|
controlledRotation: boolean;
|
|
282
|
+
hasWarnedDynamicTrimesh: boolean;
|
|
276
283
|
constructor(options?: ZylemActorOptions);
|
|
277
|
-
|
|
278
|
-
* Initiates model and animation loading in background (deferred).
|
|
279
|
-
* Call returns immediately; assets will be ready on subsequent updates.
|
|
280
|
-
*/
|
|
284
|
+
create(): this;
|
|
281
285
|
load(): void;
|
|
282
|
-
/**
|
|
283
|
-
* Returns current data synchronously.
|
|
284
|
-
* May return null values if loading is still in progress.
|
|
285
|
-
*/
|
|
286
286
|
data(): any;
|
|
287
|
+
needsDeferredModelCollision(): boolean;
|
|
288
|
+
synchronizeRuntimeCollider(): void;
|
|
287
289
|
actorUpdate(params: UpdateContext<ZylemActorOptions>): void;
|
|
288
|
-
/**
|
|
289
|
-
* Clean up actor resources including animations, models, and groups
|
|
290
|
-
*/
|
|
291
290
|
actorDestroy(): void;
|
|
292
|
-
|
|
293
|
-
* Deferred loading - starts async load and updates entity when complete.
|
|
294
|
-
* Called by synchronous load() method.
|
|
295
|
-
*/
|
|
296
|
-
private loadModelsDeferred;
|
|
291
|
+
_cleanup(params: CleanupContext<this>): void;
|
|
297
292
|
playAnimation(animationOptions: AnimationOptions): void;
|
|
298
|
-
/**
|
|
299
|
-
* Apply material overrides from options to all meshes in the loaded model.
|
|
300
|
-
* Only applies if material options are explicitly specified (not just defaults).
|
|
301
|
-
*/
|
|
302
|
-
private applyMaterialOverrides;
|
|
303
293
|
get object(): Object3D | null;
|
|
304
|
-
|
|
305
|
-
* Provide custom debug information for the actor
|
|
306
|
-
* This will be merged with the default debug information
|
|
307
|
-
*/
|
|
294
|
+
get collisionSource(): Object3D | null;
|
|
308
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;
|
|
309
303
|
}
|
|
310
304
|
type ActorOptions = BaseNode | ZylemActorOptions;
|
|
311
305
|
declare function createActor(...args: Array<ActorOptions>): ZylemActor;
|
package/dist/entities.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
2
|
-
import './entity-
|
|
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
3
|
import 'three';
|
|
4
4
|
import '@dimforge/rapier3d-compat';
|
|
5
5
|
import 'bitecs';
|
|
6
6
|
import 'mitt';
|
|
7
|
-
import './behavior-descriptor-
|
|
8
|
-
import './world-
|
|
7
|
+
import './behavior-descriptor-BXnVR8Ki.js';
|
|
8
|
+
import './world-DfgxoNMt.js';
|
|
9
9
|
import './entity-Bq_eNEDI.js';
|