@zylem/game-lib 0.6.2 → 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/LICENSE +21 -0
- package/README.md +9 -16
- package/dist/actions.d.ts +30 -21
- package/dist/actions.js +793 -146
- 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 +296 -0
- package/dist/behavior/platformer-3d.js +761 -0
- package/dist/behavior/platformer-3d.js.map +1 -0
- package/dist/behavior/ricochet-2d.d.ts +275 -0
- package/dist/behavior/ricochet-2d.js +425 -0
- package/dist/behavior/ricochet-2d.js.map +1 -0
- 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 +87 -0
- package/dist/behavior/screen-wrap.js +246 -0
- package/dist/behavior/screen-wrap.js.map +1 -0
- 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 +11 -0
- package/dist/behavior/thruster.js +292 -0
- package/dist/behavior/thruster.js.map +1 -0
- 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 +142 -0
- package/dist/behavior/world-boundary-2d.js +235 -0
- package/dist/behavior/world-boundary-2d.js.map +1 -0
- 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-BXnVR8Ki.d.ts +159 -0
- package/dist/{blueprints-Cq3Ko6_G.d.ts → blueprints-DmbK2dki.d.ts} +2 -2
- package/dist/camera-4XO5gbQH.d.ts +905 -0
- package/dist/camera.d.ts +3 -2
- package/dist/camera.js +1653 -377
- package/dist/camera.js.map +1 -1
- package/dist/composition-BASvMKrW.d.ts +218 -0
- package/dist/{core-bO8TzV7u.d.ts → core-CARRaS55.d.ts} +110 -69
- package/dist/core.d.ts +11 -6
- package/dist/core.js +10766 -5626
- package/dist/core.js.map +1 -1
- package/dist/{entities-DvByhMGU.d.ts → entities-ChFirVL9.d.ts} +133 -29
- package/dist/entities.d.ts +5 -3
- package/dist/entities.js +4679 -3202
- package/dist/entities.js.map +1 -1
- package/dist/entity-vj-HTjzU.d.ts +1169 -0
- package/dist/global-change-2JvMaz44.d.ts +25 -0
- package/dist/main.d.ts +1118 -16
- package/dist/main.js +17538 -8499
- 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-C19IhuzA.d.ts +731 -0
- package/dist/stage.d.ts +11 -7
- package/dist/stage.js +8024 -3852
- package/dist/stage.js.map +1 -1
- package/dist/sync-state-machine-CZyspBpj.d.ts +16 -0
- package/dist/thruster-23lzoPZd.d.ts +180 -0
- package/dist/world-DfgxoNMt.d.ts +105 -0
- package/package.json +53 -13
- package/dist/behaviors.d.ts +0 -854
- package/dist/behaviors.js +0 -1209
- package/dist/behaviors.js.map +0 -1
- package/dist/camera-CeJPAgGg.d.ts +0 -116
- package/dist/moveable-B_vyA6cw.d.ts +0 -67
- package/dist/stage-types-Bd-KtcYT.d.ts +0 -375
- package/dist/transformable-CUhvyuYO.d.ts +0 -67
- package/dist/world-C8tQ7Plj.d.ts +0 -774
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SyncCallback, StateMachine, ITransition, ILogger } from 'typescript-fsm';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Local wrapper around typescript-fsm's SyncStateMachine.
|
|
5
|
+
*
|
|
6
|
+
* typescript-fsm@1.6.0 incorrectly reports callback-less transitions as
|
|
7
|
+
* unhandled even after moving to the next state, which causes noisy
|
|
8
|
+
* `No transition...` console errors for valid FSM dispatches.
|
|
9
|
+
*/
|
|
10
|
+
declare class SyncStateMachine<STATE extends string | number | symbol, EVENT extends string | number | symbol, CALLBACK extends Record<EVENT, SyncCallback> = Record<EVENT, SyncCallback>> extends StateMachine<STATE, EVENT, CALLBACK> {
|
|
11
|
+
constructor(init: STATE, transitions?: ITransition<STATE, EVENT, CALLBACK[EVENT]>[], logger?: ILogger);
|
|
12
|
+
dispatch<E extends EVENT>(_event: E, ..._args: unknown[]): Promise<void>;
|
|
13
|
+
syncDispatch<E extends EVENT>(event: E, ...args: unknown[]): boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { SyncStateMachine as S };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { S as SyncStateMachine } from './sync-state-machine-CZyspBpj.js';
|
|
2
|
+
import { Z as ZylemWorld } from './world-DfgxoNMt.js';
|
|
3
|
+
import { RigidBody } from '@dimforge/rapier3d-compat';
|
|
4
|
+
import { Vector3, Quaternion } from 'three';
|
|
5
|
+
import { c as BehaviorDescriptor } from './behavior-descriptor-BXnVR8Ki.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Core ECS Components
|
|
9
|
+
*
|
|
10
|
+
* These are pure data interfaces with no logic.
|
|
11
|
+
* They work alongside the existing bitecs components in transformable.system.ts
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
interface TransformComponent {
|
|
15
|
+
position: Vector3;
|
|
16
|
+
rotation: Quaternion;
|
|
17
|
+
}
|
|
18
|
+
declare function createTransformComponent(): TransformComponent;
|
|
19
|
+
interface PhysicsBodyComponent {
|
|
20
|
+
body: RigidBody;
|
|
21
|
+
}
|
|
22
|
+
declare function createPhysicsBodyComponent(body: RigidBody): PhysicsBodyComponent;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Thruster-specific ECS Components
|
|
26
|
+
*
|
|
27
|
+
* These components are specific to the thruster movement system.
|
|
28
|
+
*/
|
|
29
|
+
interface ThrusterMovementComponent {
|
|
30
|
+
/** Linear thrust force in Newtons (or scaled units) */
|
|
31
|
+
linearThrust: number;
|
|
32
|
+
/** Angular thrust torque scalar */
|
|
33
|
+
angularThrust: number;
|
|
34
|
+
/** Optional linear damping override */
|
|
35
|
+
linearDamping?: number;
|
|
36
|
+
/** Optional angular damping override */
|
|
37
|
+
angularDamping?: number;
|
|
38
|
+
}
|
|
39
|
+
declare function createThrusterMovementComponent(linearThrust: number, angularThrust: number, options?: {
|
|
40
|
+
linearDamping?: number;
|
|
41
|
+
angularDamping?: number;
|
|
42
|
+
}): ThrusterMovementComponent;
|
|
43
|
+
interface ThrusterInputComponent {
|
|
44
|
+
/** Forward thrust intent: 0..1 */
|
|
45
|
+
thrust: number;
|
|
46
|
+
/** Rotation intent: -1..1 */
|
|
47
|
+
rotate: number;
|
|
48
|
+
/** World-space X thrust intent: -1..1 */
|
|
49
|
+
thrustX: number;
|
|
50
|
+
/** World-space Y thrust intent: -1..1 */
|
|
51
|
+
thrustY: number;
|
|
52
|
+
}
|
|
53
|
+
declare function createThrusterInputComponent(): ThrusterInputComponent;
|
|
54
|
+
interface ThrusterStateComponent {
|
|
55
|
+
/** Whether the thruster is enabled */
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
/** Current thrust after FSM/gating */
|
|
58
|
+
currentThrust: number;
|
|
59
|
+
}
|
|
60
|
+
declare function createThrusterStateComponent(): ThrusterStateComponent;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* ThrusterFSM
|
|
64
|
+
*
|
|
65
|
+
* State machine controller for thruster behavior.
|
|
66
|
+
* FSM does NOT touch physics or ThrusterMovementBehavior - it only writes ThrusterInputComponent.
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
declare enum ThrusterState {
|
|
70
|
+
Idle = "idle",
|
|
71
|
+
Active = "active",
|
|
72
|
+
Boosting = "boosting",
|
|
73
|
+
Disabled = "disabled",
|
|
74
|
+
Docked = "docked"
|
|
75
|
+
}
|
|
76
|
+
declare enum ThrusterEvent {
|
|
77
|
+
Activate = "activate",
|
|
78
|
+
Deactivate = "deactivate",
|
|
79
|
+
Boost = "boost",
|
|
80
|
+
EndBoost = "endBoost",
|
|
81
|
+
Disable = "disable",
|
|
82
|
+
Enable = "enable",
|
|
83
|
+
Dock = "dock",
|
|
84
|
+
Undock = "undock"
|
|
85
|
+
}
|
|
86
|
+
interface ThrusterFSMContext {
|
|
87
|
+
input: ThrusterInputComponent;
|
|
88
|
+
}
|
|
89
|
+
interface PlayerInput {
|
|
90
|
+
thrust: number;
|
|
91
|
+
rotate: number;
|
|
92
|
+
thrustX?: number;
|
|
93
|
+
thrustY?: number;
|
|
94
|
+
}
|
|
95
|
+
declare class ThrusterFSM {
|
|
96
|
+
private ctx;
|
|
97
|
+
machine: SyncStateMachine<ThrusterState, ThrusterEvent, never>;
|
|
98
|
+
constructor(ctx: ThrusterFSMContext);
|
|
99
|
+
/**
|
|
100
|
+
* Get current state
|
|
101
|
+
*/
|
|
102
|
+
getState(): ThrusterState;
|
|
103
|
+
/**
|
|
104
|
+
* Dispatch an event to transition state
|
|
105
|
+
*/
|
|
106
|
+
dispatch(event: ThrusterEvent): void;
|
|
107
|
+
/**
|
|
108
|
+
* Update FSM state based on player input.
|
|
109
|
+
* Auto-transitions between Idle/Active to report current state.
|
|
110
|
+
* Does NOT modify input - just observes and reports.
|
|
111
|
+
*/
|
|
112
|
+
update(playerInput: PlayerInput): void;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* ThrusterMovementBehavior
|
|
117
|
+
*
|
|
118
|
+
* This is the heart of the thruster movement system - a pure, stateless force generator.
|
|
119
|
+
* Works identically for player, AI, and replay.
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Zylem-style Behavior interface
|
|
124
|
+
*/
|
|
125
|
+
interface Behavior {
|
|
126
|
+
update(dt: number): void;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Entity with thruster components
|
|
130
|
+
*/
|
|
131
|
+
interface ThrusterEntity {
|
|
132
|
+
physics: PhysicsBodyComponent;
|
|
133
|
+
thruster: ThrusterMovementComponent;
|
|
134
|
+
$thruster: ThrusterInputComponent;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* ThrusterMovementBehavior - Force generator for thruster-equipped entities
|
|
138
|
+
*
|
|
139
|
+
* Responsibilities:
|
|
140
|
+
* - Query entities with PhysicsBody, ThrusterMovement, and ThrusterInput components
|
|
141
|
+
* - Apply velocities based on thrust input (2D mode)
|
|
142
|
+
* - Apply angular velocity based on rotation input
|
|
143
|
+
*/
|
|
144
|
+
declare class ThrusterMovementBehavior implements Behavior {
|
|
145
|
+
private world;
|
|
146
|
+
constructor(world: ZylemWorld);
|
|
147
|
+
/**
|
|
148
|
+
* Update a single thruster-enabled entity.
|
|
149
|
+
*/
|
|
150
|
+
updateEntity(gameEntity: any, _dt: number): void;
|
|
151
|
+
update(dt: number): void;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Thruster behavior options (typed for entity.use() autocomplete)
|
|
156
|
+
*/
|
|
157
|
+
interface ThrusterBehaviorOptions {
|
|
158
|
+
/** Forward thrust force (default: 10) */
|
|
159
|
+
linearThrust: number;
|
|
160
|
+
/** Rotation torque (default: 5) */
|
|
161
|
+
angularThrust: number;
|
|
162
|
+
/** Optional linear damping override */
|
|
163
|
+
linearDamping?: number;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* ThrusterBehavior - typed descriptor for thruster movement.
|
|
167
|
+
*
|
|
168
|
+
* Uses the existing ThrusterMovementBehavior under the hood.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* import { ThrusterBehavior } from "@zylem/game-lib";
|
|
173
|
+
*
|
|
174
|
+
* const ship = createSprite({ ... });
|
|
175
|
+
* ship.use(ThrusterBehavior, { linearThrust: 15, angularThrust: 8 });
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
declare const ThrusterBehavior: BehaviorDescriptor<ThrusterBehaviorOptions, Record<string, never>, ThrusterEntity>;
|
|
179
|
+
|
|
180
|
+
export { type Behavior as B, type PhysicsBodyComponent as P, type ThrusterInputComponent as T, type TransformComponent as a, createPhysicsBodyComponent as b, createTransformComponent as c, type ThrusterMovementComponent as d, type ThrusterStateComponent as e, createThrusterMovementComponent as f, createThrusterInputComponent as g, createThrusterStateComponent as h, ThrusterState as i, ThrusterEvent as j, ThrusterFSM as k, type ThrusterFSMContext as l, type PlayerInput as m, ThrusterMovementBehavior as n, type ThrusterEntity as o, ThrusterBehavior as p, type ThrusterBehaviorOptions as q };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Vector3 } from 'three';
|
|
2
|
+
import RAPIER__default, { World } from '@dimforge/rapier3d-compat';
|
|
3
|
+
import { E as Entity } from './entity-Bq_eNEDI.js';
|
|
4
|
+
import { I as GameEntity, U as UpdateContext } from './entity-vj-HTjzU.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Interface for entities that handle collision events.
|
|
8
|
+
*/
|
|
9
|
+
interface CollisionHandlerDelegate {
|
|
10
|
+
handlePostCollision(params: any): boolean;
|
|
11
|
+
handleIntersectionEvent(params: any): void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Physics world wrapper supporting two modes:
|
|
15
|
+
*
|
|
16
|
+
* - **Direct mode** (default): Rapier world lives on the main thread.
|
|
17
|
+
* This is the original behavior with the Phase-1 fixed-timestep accumulator.
|
|
18
|
+
*
|
|
19
|
+
* - **Worker mode**: Physics runs in a Web Worker via {@link PhysicsProxy}.
|
|
20
|
+
* Entity bodies are replaced with {@link PhysicsBodyHandle} instances that
|
|
21
|
+
* cache transforms and queue write commands. Collision events are delivered
|
|
22
|
+
* asynchronously (one frame latency).
|
|
23
|
+
*/
|
|
24
|
+
declare class ZylemWorld implements Entity<ZylemWorld> {
|
|
25
|
+
type: string;
|
|
26
|
+
/** Rapier world instance (null in worker mode). */
|
|
27
|
+
world: World;
|
|
28
|
+
collisionMap: Map<string, GameEntity<any>>;
|
|
29
|
+
collisionBehaviorMap: Map<string, GameEntity<any>>;
|
|
30
|
+
_removalMap: Map<string, GameEntity<any>>;
|
|
31
|
+
private activeCollisionPairs;
|
|
32
|
+
private currentCollisionTimeMs;
|
|
33
|
+
/** Fixed timestep in seconds used for each physics step. */
|
|
34
|
+
readonly fixedTimestep: number;
|
|
35
|
+
/** Unprocessed time carried over between frames. */
|
|
36
|
+
private accumulator;
|
|
37
|
+
/** Maximum number of physics steps allowed per frame to prevent spiral-of-death. */
|
|
38
|
+
private static readonly MAX_STEPS_PER_FRAME;
|
|
39
|
+
/**
|
|
40
|
+
* Interpolation alpha (0..1) representing the fraction of an unprocessed
|
|
41
|
+
* timestep remaining after the last physics step. Can be used to interpolate
|
|
42
|
+
* rendering transforms between the previous and current physics state.
|
|
43
|
+
*/
|
|
44
|
+
interpolationAlpha: number;
|
|
45
|
+
/** When true, physics runs in a Web Worker via the proxy. */
|
|
46
|
+
readonly workerMode: boolean;
|
|
47
|
+
/** Physics worker proxy (only set in worker mode). */
|
|
48
|
+
private proxy;
|
|
49
|
+
/** Pending step promise (worker mode). */
|
|
50
|
+
private _pendingStep;
|
|
51
|
+
private readonly trackedDirectBodies;
|
|
52
|
+
static loadPhysics(gravity: Vector3): Promise<RAPIER__default.World>;
|
|
53
|
+
/**
|
|
54
|
+
* Initialize physics in worker mode. Returns a ZylemWorld that
|
|
55
|
+
* delegates all physics to a Web Worker.
|
|
56
|
+
*
|
|
57
|
+
* @param gravity World gravity.
|
|
58
|
+
* @param physicsRate Physics tick rate in Hz.
|
|
59
|
+
* @param workerUrl Optional URL to the worker script.
|
|
60
|
+
*/
|
|
61
|
+
static loadPhysicsWorker(gravity: Vector3, physicsRate?: number, workerUrl?: URL): Promise<ZylemWorld>;
|
|
62
|
+
/**
|
|
63
|
+
* @param world The Rapier physics world instance (null in worker mode).
|
|
64
|
+
* @param physicsRate Physics update rate in Hz (default 60).
|
|
65
|
+
* @param useWorker Whether to use worker mode (default false).
|
|
66
|
+
*/
|
|
67
|
+
constructor(world: World, physicsRate?: number, useWorker?: boolean);
|
|
68
|
+
addEntity(entity: any): void;
|
|
69
|
+
setForRemoval(entity: any): void;
|
|
70
|
+
destroyEntity(entity: GameEntity<any>): void;
|
|
71
|
+
setup(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Advance the physics simulation.
|
|
74
|
+
*
|
|
75
|
+
* In direct mode, uses the fixed-timestep accumulator on the main thread.
|
|
76
|
+
* In worker mode, sends a step command and awaits the result.
|
|
77
|
+
*/
|
|
78
|
+
update(params: UpdateContext<any>): void;
|
|
79
|
+
/**
|
|
80
|
+
* In worker mode, the step is async. Call this to await the
|
|
81
|
+
* pending step before reading transform data.
|
|
82
|
+
*/
|
|
83
|
+
awaitStep(): Promise<void>;
|
|
84
|
+
private addEntityDirect;
|
|
85
|
+
private destroyEntityDirect;
|
|
86
|
+
private updateDirect;
|
|
87
|
+
private captureDirectBodyPreviousPoses;
|
|
88
|
+
private captureDirectBodyCurrentPoses;
|
|
89
|
+
private patchDirectBodyPoseTracking;
|
|
90
|
+
private addEntityWorker;
|
|
91
|
+
private destroyEntityWorker;
|
|
92
|
+
private updateWorker;
|
|
93
|
+
updatePostCollisionBehaviors(delta: number): void;
|
|
94
|
+
private processPendingRemovals;
|
|
95
|
+
private removeEntityFromTracking;
|
|
96
|
+
private pruneActiveCollisionPairs;
|
|
97
|
+
private collectCollisionPairsFromWorld;
|
|
98
|
+
private processCollisionPairs;
|
|
99
|
+
private dispatchCollisionPhase;
|
|
100
|
+
private dispatchIntersectionDelegates;
|
|
101
|
+
destroy(): void;
|
|
102
|
+
private clearEntityPhysicsState;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export { type CollisionHandlerDelegate as C, ZylemWorld as Z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zylem/game-lib",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A powerful and easy-to-use framework for creating simple 3D digital interactive applications using TypeScript.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,9 +42,49 @@
|
|
|
42
42
|
"types": "./dist/actions.d.ts",
|
|
43
43
|
"import": "./dist/actions.js"
|
|
44
44
|
},
|
|
45
|
-
"./
|
|
46
|
-
"types": "./dist/
|
|
47
|
-
"import": "./dist/
|
|
45
|
+
"./behavior/thruster": {
|
|
46
|
+
"types": "./dist/behavior/thruster.d.ts",
|
|
47
|
+
"import": "./dist/behavior/thruster.js"
|
|
48
|
+
},
|
|
49
|
+
"./behavior/top-down-movement": {
|
|
50
|
+
"types": "./dist/behavior/top-down-movement.d.ts",
|
|
51
|
+
"import": "./dist/behavior/top-down-movement.js"
|
|
52
|
+
},
|
|
53
|
+
"./behavior/shooter-2d": {
|
|
54
|
+
"types": "./dist/behavior/shooter-2d.d.ts",
|
|
55
|
+
"import": "./dist/behavior/shooter-2d.js"
|
|
56
|
+
},
|
|
57
|
+
"./behavior/screen-wrap": {
|
|
58
|
+
"types": "./dist/behavior/screen-wrap.d.ts",
|
|
59
|
+
"import": "./dist/behavior/screen-wrap.js"
|
|
60
|
+
},
|
|
61
|
+
"./behavior/screen-visibility": {
|
|
62
|
+
"types": "./dist/behavior/screen-visibility.d.ts",
|
|
63
|
+
"import": "./dist/behavior/screen-visibility.js"
|
|
64
|
+
},
|
|
65
|
+
"./behavior/world-boundary-2d": {
|
|
66
|
+
"types": "./dist/behavior/world-boundary-2d.d.ts",
|
|
67
|
+
"import": "./dist/behavior/world-boundary-2d.js"
|
|
68
|
+
},
|
|
69
|
+
"./behavior/world-boundary-3d": {
|
|
70
|
+
"types": "./dist/behavior/world-boundary-3d.d.ts",
|
|
71
|
+
"import": "./dist/behavior/world-boundary-3d.js"
|
|
72
|
+
},
|
|
73
|
+
"./behavior/ricochet-2d": {
|
|
74
|
+
"types": "./dist/behavior/ricochet-2d.d.ts",
|
|
75
|
+
"import": "./dist/behavior/ricochet-2d.js"
|
|
76
|
+
},
|
|
77
|
+
"./behavior/ricochet-3d": {
|
|
78
|
+
"types": "./dist/behavior/ricochet-3d.d.ts",
|
|
79
|
+
"import": "./dist/behavior/ricochet-3d.js"
|
|
80
|
+
},
|
|
81
|
+
"./behavior/jumper-2d": {
|
|
82
|
+
"types": "./dist/behavior/jumper-2d.d.ts",
|
|
83
|
+
"import": "./dist/behavior/jumper-2d.js"
|
|
84
|
+
},
|
|
85
|
+
"./behavior/platformer-3d": {
|
|
86
|
+
"types": "./dist/behavior/platformer-3d.d.ts",
|
|
87
|
+
"import": "./dist/behavior/platformer-3d.js"
|
|
48
88
|
}
|
|
49
89
|
},
|
|
50
90
|
"keywords": [
|
|
@@ -65,14 +105,6 @@
|
|
|
65
105
|
"files": [
|
|
66
106
|
"dist"
|
|
67
107
|
],
|
|
68
|
-
"scripts": {
|
|
69
|
-
"build": "tsup",
|
|
70
|
-
"dev": "tsup --watch",
|
|
71
|
-
"lint": "biome check .",
|
|
72
|
-
"typecheck": "tsc --noEmit",
|
|
73
|
-
"test": "vitest --reporter=verbose",
|
|
74
|
-
"coverage": "vitest run --coverage"
|
|
75
|
-
},
|
|
76
108
|
"dependencies": {
|
|
77
109
|
"@dimforge/rapier3d-compat": "^0.11.2",
|
|
78
110
|
"@sinclair/typebox": "^0.34.41",
|
|
@@ -106,5 +138,13 @@
|
|
|
106
138
|
"typescript": "5.8.2",
|
|
107
139
|
"vite-plugin-solid": "^2.11.8",
|
|
108
140
|
"vitest": "^4.0.9"
|
|
141
|
+
},
|
|
142
|
+
"scripts": {
|
|
143
|
+
"build": "tsup",
|
|
144
|
+
"dev": "tsup --watch",
|
|
145
|
+
"lint": "biome check .",
|
|
146
|
+
"typecheck": "tsc --noEmit",
|
|
147
|
+
"test": "vitest --reporter=verbose",
|
|
148
|
+
"coverage": "vitest run --coverage"
|
|
109
149
|
}
|
|
110
|
-
}
|
|
150
|
+
}
|