@zylem/behaviors 0.3.0 → 0.4.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/LICENSE +21 -0
- package/dist/{behavior-system-DYbx-x_-.d.ts → behavior-system-DSNek0W9.d.ts} +205 -29
- package/dist/{chunk-RER2IDPW.js → chunk-4URF65BR.js} +1 -0
- package/dist/chunk-4URF65BR.js.map +1 -0
- package/dist/{chunk-YYJP62QD.js → chunk-4V7TIRO2.js} +1 -0
- package/dist/chunk-4V7TIRO2.js.map +1 -0
- package/dist/{chunk-F7E23E26.js → chunk-4WH2ZN7P.js} +1 -0
- package/dist/chunk-4WH2ZN7P.js.map +1 -0
- package/dist/{chunk-VPZ32CCD.js → chunk-5SM5SH5O.js} +29 -28
- package/dist/chunk-5SM5SH5O.js.map +1 -0
- package/dist/{chunk-L76JG73P.js → chunk-5XZWTFGF.js} +7 -4
- package/dist/chunk-5XZWTFGF.js.map +1 -0
- package/dist/{chunk-HIBJDA5Z.js → chunk-64HKCSXD.js} +21 -17
- package/dist/chunk-64HKCSXD.js.map +1 -0
- package/dist/{chunk-WSKD7GY3.js → chunk-7JJEIADR.js} +1 -0
- package/dist/chunk-7JJEIADR.js.map +1 -0
- package/dist/{chunk-F6LFX4V3.js → chunk-BXP4K7RF.js} +3 -2
- package/dist/chunk-BXP4K7RF.js.map +1 -0
- package/dist/{chunk-2HKY6WF7.js → chunk-EIWQM6U3.js} +1 -0
- package/dist/chunk-EIWQM6U3.js.map +1 -0
- package/dist/{chunk-YDLO5M7S.js → chunk-EZNCCO4L.js} +1 -0
- package/dist/chunk-EZNCCO4L.js.map +1 -0
- package/dist/{chunk-T2P4JTQN.js → chunk-FRJDQM23.js} +110 -155
- package/dist/chunk-FRJDQM23.js.map +1 -0
- package/dist/{chunk-FHDYJ5WP.js → chunk-FTDZAKZW.js} +5 -17
- package/dist/chunk-FTDZAKZW.js.map +1 -0
- package/dist/{chunk-D53GNZXP.js → chunk-GFARAJV2.js} +6 -7
- package/dist/chunk-GFARAJV2.js.map +1 -0
- package/dist/{chunk-IQRG5BAZ.js → chunk-GTLA6LOJ.js} +18 -23
- package/dist/chunk-GTLA6LOJ.js.map +1 -0
- package/dist/{chunk-VO5J64DG.js → chunk-H4TJ7X4O.js} +4 -6
- package/dist/chunk-H4TJ7X4O.js.map +1 -0
- package/dist/{chunk-6UMC6BB5.js → chunk-HNESASBB.js} +7 -8
- package/dist/chunk-HNESASBB.js.map +1 -0
- package/dist/{chunk-4DVDFCVY.js → chunk-HZMY3TT4.js} +1 -0
- package/dist/chunk-HZMY3TT4.js.map +1 -0
- package/dist/{chunk-2HLZBWGD.js → chunk-IZJFUAXB.js} +1 -0
- package/dist/chunk-IZJFUAXB.js.map +1 -0
- package/dist/{chunk-UFHYR2LV.js → chunk-JXMF4NUI.js} +51 -2
- package/dist/chunk-JXMF4NUI.js.map +1 -0
- package/dist/{chunk-ZHBD65AZ.js → chunk-KDY5N6J4.js} +1 -0
- package/dist/chunk-KDY5N6J4.js.map +1 -0
- package/dist/chunk-KFFETUAL.js +40 -0
- package/dist/chunk-KFFETUAL.js.map +1 -0
- package/dist/chunk-LL4FLHIY.js +12 -0
- package/dist/chunk-LL4FLHIY.js.map +1 -0
- package/dist/{chunk-BC3IJYS7.js → chunk-MJFMNRMZ.js} +15 -15
- package/dist/chunk-MJFMNRMZ.js.map +1 -0
- package/dist/{chunk-WHKPWIQO.js → chunk-OHCPV2NT.js} +1 -0
- package/dist/chunk-OHCPV2NT.js.map +1 -0
- package/dist/{chunk-RQWWUML4.js → chunk-OTLSUYQQ.js} +2 -1
- package/dist/chunk-OTLSUYQQ.js.map +1 -0
- package/dist/{chunk-E4HTCQPK.js → chunk-PWF757B6.js} +7 -8
- package/dist/chunk-PWF757B6.js.map +1 -0
- package/dist/{chunk-4EWASZHB.js → chunk-QVCMJ4Q2.js} +1 -0
- package/dist/chunk-QVCMJ4Q2.js.map +1 -0
- package/dist/{chunk-FOOM42MK.js → chunk-RONH2KDI.js} +12 -13
- package/dist/chunk-RONH2KDI.js.map +1 -0
- package/dist/chunk-RTRFJVCZ.js +454 -0
- package/dist/chunk-RTRFJVCZ.js.map +1 -0
- package/dist/{chunk-IEA7F73P.js → chunk-UL6Q5HDP.js} +25 -2
- package/dist/chunk-UL6Q5HDP.js.map +1 -0
- package/dist/{chunk-K6CWKFHL.js → chunk-UYFOLI2X.js} +1 -0
- package/dist/chunk-UYFOLI2X.js.map +1 -0
- package/dist/{chunk-RD2YTTXY.js → chunk-V74N7D6Q.js} +9 -8
- package/dist/chunk-V74N7D6Q.js.map +1 -0
- package/dist/{chunk-ERS6SNA5.js → chunk-WOMHL23C.js} +2 -1
- package/dist/chunk-WOMHL23C.js.map +1 -0
- package/dist/{chunk-RHW3IDQX.js → chunk-WWVD5DR5.js} +1 -0
- package/dist/chunk-WWVD5DR5.js.map +1 -0
- package/dist/{chunk-SBACY5SU.js → chunk-WXXXJ22R.js} +14 -15
- package/dist/chunk-WXXXJ22R.js.map +1 -0
- package/dist/{chunk-6Y3GB76J.js → chunk-XLUJDKCT.js} +9 -8
- package/dist/chunk-XLUJDKCT.js.map +1 -0
- package/dist/{chunk-7Y6JVZ5H.js → chunk-XP3ASVGJ.js} +14 -10
- package/dist/chunk-XP3ASVGJ.js.map +1 -0
- package/dist/{chunk-7U4WFBWM.js → chunk-Y7YIAWPW.js} +11 -0
- package/dist/chunk-Y7YIAWPW.js.map +1 -0
- package/dist/{chunk-7IZ36Y5G.js → chunk-ZA43LPRM.js} +5 -24
- package/dist/chunk-ZA43LPRM.js.map +1 -0
- package/dist/{chunk-J5XLB24H.js → chunk-ZRQWSURL.js} +3 -2
- package/dist/chunk-ZRQWSURL.js.map +1 -0
- package/dist/cooldown.d.ts +2 -1
- package/dist/cooldown.js +3 -2
- package/dist/cooldown.js.map +1 -0
- package/dist/coordinators/boundary-ricochet-3d.d.ts +12 -5
- package/dist/coordinators/boundary-ricochet-3d.js +4 -2
- package/dist/coordinators/boundary-ricochet-3d.js.map +1 -0
- package/dist/coordinators/boundary-ricochet.d.ts +9 -7
- package/dist/coordinators/boundary-ricochet.js +4 -2
- package/dist/coordinators/boundary-ricochet.js.map +1 -0
- package/dist/coordinators/first-person-shooter.d.ts +9 -8
- package/dist/coordinators/first-person-shooter.js +4 -3
- package/dist/coordinators/first-person-shooter.js.map +1 -0
- package/dist/coordinators/multidirectional-space-shooter.d.ts +12 -9
- package/dist/coordinators/multidirectional-space-shooter.js +5 -4
- package/dist/coordinators/multidirectional-space-shooter.js.map +1 -0
- package/dist/coordinators/top-down-shooter.d.ts +9 -8
- package/dist/coordinators/top-down-shooter.js +5 -4
- package/dist/coordinators/top-down-shooter.js.map +1 -0
- package/dist/core.d.ts +4 -4
- package/dist/core.js +9 -36
- package/dist/core.js.map +1 -0
- package/dist/destructible-3d.d.ts +2 -1
- package/dist/destructible-3d.js +4 -3
- package/dist/destructible-3d.js.map +1 -0
- package/dist/destructible-prebake.js +2 -1
- package/dist/destructible-prebake.js.map +1 -0
- package/dist/first-person.d.ts +12 -12
- package/dist/first-person.js +12 -11
- package/dist/first-person.js.map +1 -0
- package/dist/index.d.ts +37 -14
- package/dist/index.js +85 -55
- package/dist/index.js.map +1 -0
- package/dist/jumper-2d.d.ts +7 -6
- package/dist/jumper-2d.js +8 -7
- package/dist/jumper-2d.js.map +1 -0
- package/dist/jumper-3d.d.ts +12 -11
- package/dist/jumper-3d.js +9 -8
- package/dist/jumper-3d.js.map +1 -0
- package/dist/{moveable-BCRpjAQb.d.ts → moveable-BLTHO7Jq.d.ts} +2 -78
- package/dist/particle-emitter/presets.js +2 -1
- package/dist/particle-emitter/presets.js.map +1 -0
- package/dist/particle-emitter.d.ts +1 -1
- package/dist/particle-emitter.js +5 -4
- package/dist/particle-emitter.js.map +1 -0
- package/dist/platformer-2d.d.ts +306 -0
- package/dist/platformer-2d.js +23 -0
- package/dist/platformer-2d.js.map +1 -0
- package/dist/platformer-3d.d.ts +74 -87
- package/dist/platformer-3d.js +7 -6
- package/dist/platformer-3d.js.map +1 -0
- package/dist/ricochet-2d.d.ts +1 -1
- package/dist/ricochet-2d.js +5 -4
- package/dist/ricochet-2d.js.map +1 -0
- package/dist/ricochet-3d.d.ts +1 -1
- package/dist/ricochet-3d.js +5 -4
- package/dist/ricochet-3d.js.map +1 -0
- package/dist/runtime-2d.d.ts +93 -2
- package/dist/runtime-2d.js +146 -22
- package/dist/runtime-2d.js.map +1 -0
- package/dist/screen-visibility.d.ts +2 -1
- package/dist/screen-visibility.js +3 -2
- package/dist/screen-visibility.js.map +1 -0
- package/dist/screen-wrap.d.ts +2 -1
- package/dist/screen-wrap.js +5 -4
- package/dist/screen-wrap.js.map +1 -0
- package/dist/shooter-2d.d.ts +5 -3
- package/dist/shooter-2d.js +5 -4
- package/dist/shooter-2d.js.map +1 -0
- package/dist/shooter-fire-DGripl0z.d.ts +55 -0
- package/dist/thruster.d.ts +8 -18
- package/dist/thruster.js +9 -8
- package/dist/thruster.js.map +1 -0
- package/dist/top-down-movement.d.ts +7 -4
- package/dist/top-down-movement.js +8 -7
- package/dist/top-down-movement.js.map +1 -0
- package/dist/{use-behavior-D_82jAL3.d.ts → use-behavior-h9-T5FSv.d.ts} +1 -1
- package/dist/world-boundary-2d.d.ts +2 -1
- package/dist/world-boundary-2d.js +6 -5
- package/dist/world-boundary-2d.js.map +1 -0
- package/dist/world-boundary-3d.d.ts +2 -1
- package/dist/world-boundary-3d.js +6 -5
- package/dist/world-boundary-3d.js.map +1 -0
- package/package.json +8 -7
- package/dist/chunk-23HQH3GJ.js +0 -34
- package/dist/chunk-K4UBXSZL.js +0 -175
- package/dist/runtime-pong.d.ts +0 -92
- package/dist/runtime-pong.js +0 -37
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
plainFractureOptionsToPinata,
|
|
9
9
|
plainToBufferGeometry,
|
|
10
10
|
plainWorkerResultToTemplateParts
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HZMY3TT4.js";
|
|
12
12
|
export {
|
|
13
13
|
bufferGeometryToPlain,
|
|
14
14
|
buildFractureGeometryCacheKey,
|
|
@@ -20,3 +20,4 @@ export {
|
|
|
20
20
|
plainToBufferGeometry,
|
|
21
21
|
plainWorkerResultToTemplateParts
|
|
22
22
|
};
|
|
23
|
+
//# sourceMappingURL=destructible-prebake.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/first-person.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { F as FirstPersonInputComponent, b as FirstPersonStateComponent, a as Fi
|
|
|
2
2
|
export { c as createFirstPersonInputComponent, d as createFirstPersonMovementComponent, e as createFirstPersonStateComponent } from './components-qWwOsvwh.js';
|
|
3
3
|
import { S as SyncStateMachine } from './sync-state-machine-CZyspBpj.js';
|
|
4
4
|
import { Vector3, Euler } from 'three';
|
|
5
|
+
import { RigidBody } from '@dimforge/rapier3d-compat';
|
|
5
6
|
import { F as FirstPersonPerspective } from './first-person-perspective-C9Mptl0-.js';
|
|
6
|
-
import { a as BehaviorDescriptor } from './behavior-system-
|
|
7
|
+
import { T as TransformState, Z as ZylemWorld, a as BehaviorDescriptor } from './behavior-system-DSNek0W9.js';
|
|
7
8
|
import { i as Vec3Input } from './vector-Bm65-FOG.js';
|
|
8
9
|
import 'typescript-fsm';
|
|
9
|
-
import '@dimforge/rapier3d-compat';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* First Person Controller Finite State Machine
|
|
@@ -89,8 +89,8 @@ interface ViewmodelConfig {
|
|
|
89
89
|
*/
|
|
90
90
|
interface FirstPersonEntity {
|
|
91
91
|
uuid: string;
|
|
92
|
-
body:
|
|
93
|
-
transformStore:
|
|
92
|
+
body: RigidBody | null;
|
|
93
|
+
transformStore: TransformState;
|
|
94
94
|
firstPerson: FirstPersonMovementComponent;
|
|
95
95
|
$fps: FirstPersonInputComponent;
|
|
96
96
|
firstPersonState: FirstPersonStateComponent;
|
|
@@ -101,11 +101,11 @@ interface FirstPersonEntity {
|
|
|
101
101
|
* Core movement + look system for first-person cameras.
|
|
102
102
|
* Reads from entity.$fps input component and drives a FirstPersonPerspective.
|
|
103
103
|
*/
|
|
104
|
-
declare class
|
|
104
|
+
declare class FirstPersonSystem {
|
|
105
105
|
private world;
|
|
106
106
|
private perspectives;
|
|
107
107
|
private viewmodels;
|
|
108
|
-
constructor(world:
|
|
108
|
+
constructor(world: ZylemWorld | null);
|
|
109
109
|
/**
|
|
110
110
|
* Associate a FirstPersonPerspective with an entity (by uuid).
|
|
111
111
|
* Called once by the descriptor system when the behavior is initialized.
|
|
@@ -140,7 +140,7 @@ declare class FirstPersonControllerBehavior {
|
|
|
140
140
|
/**
|
|
141
141
|
* First-person controller behavior options (typed for entity.use() autocomplete).
|
|
142
142
|
*/
|
|
143
|
-
interface
|
|
143
|
+
interface FirstPersonBehaviorOptions {
|
|
144
144
|
/** Base walking speed (default: 8) */
|
|
145
145
|
walkSpeed?: number;
|
|
146
146
|
/** Sprint/run speed (default: 16) */
|
|
@@ -159,7 +159,7 @@ interface FirstPersonControllerOptions {
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
|
-
*
|
|
162
|
+
* FirstPersonBehavior - typed descriptor for first-person movement and camera control.
|
|
163
163
|
*
|
|
164
164
|
* Provides complete first-person controller including:
|
|
165
165
|
* - WASD movement relative to camera yaw
|
|
@@ -169,7 +169,7 @@ interface FirstPersonControllerOptions {
|
|
|
169
169
|
*
|
|
170
170
|
* @example
|
|
171
171
|
* ```typescript
|
|
172
|
-
* import {
|
|
172
|
+
* import { FirstPersonBehavior } from "@zylem/game-lib/behavior";
|
|
173
173
|
* import { createCamera, Perspectives, FirstPersonPerspective } from "@zylem/game-lib/core";
|
|
174
174
|
* import { createActor } from "@zylem/game-lib/entity";
|
|
175
175
|
*
|
|
@@ -177,7 +177,7 @@ interface FirstPersonControllerOptions {
|
|
|
177
177
|
* const fps = fpsCamera.getPerspective<FirstPersonPerspective>();
|
|
178
178
|
*
|
|
179
179
|
* const player = createActor({ name: 'player', ... });
|
|
180
|
-
* const controller = player.use(
|
|
180
|
+
* const controller = player.use(FirstPersonBehavior, {
|
|
181
181
|
* perspective: fps,
|
|
182
182
|
* walkSpeed: 8,
|
|
183
183
|
* runSpeed: 16,
|
|
@@ -194,11 +194,11 @@ interface FirstPersonControllerOptions {
|
|
|
194
194
|
* });
|
|
195
195
|
* ```
|
|
196
196
|
*/
|
|
197
|
-
declare const
|
|
197
|
+
declare const FirstPersonBehavior: BehaviorDescriptor<FirstPersonBehaviorOptions, {
|
|
198
198
|
getState: () => FirstPersonState;
|
|
199
199
|
getYaw: () => number;
|
|
200
200
|
getPitch: () => number;
|
|
201
201
|
attachViewmodel: (entity: any, offset: Vec3Input) => void;
|
|
202
202
|
}, FirstPersonEntity>;
|
|
203
203
|
|
|
204
|
-
export {
|
|
204
|
+
export { FirstPersonBehavior, type FirstPersonBehaviorOptions, type FirstPersonContext, type FirstPersonEntity, FirstPersonEvent, FirstPersonFSM, FirstPersonInputComponent, FirstPersonMovementComponent, FirstPersonState, FirstPersonStateComponent, FirstPersonSystem, type ViewmodelConfig };
|
package/dist/first-person.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
FirstPersonControllerBehavior,
|
|
2
|
+
FirstPersonBehavior,
|
|
4
3
|
FirstPersonEvent,
|
|
5
4
|
FirstPersonFSM,
|
|
6
|
-
FirstPersonState
|
|
7
|
-
|
|
5
|
+
FirstPersonState,
|
|
6
|
+
FirstPersonSystem
|
|
7
|
+
} from "./chunk-WXXXJ22R.js";
|
|
8
8
|
import {
|
|
9
9
|
createFirstPersonInputComponent,
|
|
10
10
|
createFirstPersonMovementComponent,
|
|
11
11
|
createFirstPersonStateComponent
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-QVCMJ4Q2.js";
|
|
13
|
+
import "./chunk-WWVD5DR5.js";
|
|
14
|
+
import "./chunk-OTLSUYQQ.js";
|
|
15
|
+
import "./chunk-4URF65BR.js";
|
|
16
|
+
import "./chunk-EZNCCO4L.js";
|
|
17
17
|
export {
|
|
18
|
-
|
|
19
|
-
FirstPersonControllerBehavior,
|
|
18
|
+
FirstPersonBehavior,
|
|
20
19
|
FirstPersonEvent,
|
|
21
20
|
FirstPersonFSM,
|
|
22
21
|
FirstPersonState,
|
|
22
|
+
FirstPersonSystem,
|
|
23
23
|
createFirstPersonInputComponent,
|
|
24
24
|
createFirstPersonMovementComponent,
|
|
25
25
|
createFirstPersonStateComponent
|
|
26
26
|
};
|
|
27
|
+
//# sourceMappingURL=first-person.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { a as BehaviorDescriptor,
|
|
2
|
-
export { u as useBehavior } from './use-behavior-
|
|
1
|
+
export { a as BehaviorDescriptor, c as BehaviorHandle, d as BehaviorRef, e as BehaviorSystem, g as BehaviorSystemFactory, D as DefineBehaviorConfig, K as defineBehavior } from './behavior-system-DSNek0W9.js';
|
|
2
|
+
export { u as useBehavior } from './use-behavior-h9-T5FSv.js';
|
|
3
3
|
export { P as PhysicsBodyComponent, T as TransformComponent, c as createPhysicsBodyComponent, a as createTransformComponent } from './components-BWG1GkZA.js';
|
|
4
4
|
export { T as ThrusterInputComponent, a as ThrusterMovementComponent, b as ThrusterStateComponent, c as createThrusterInputComponent, d as createThrusterMovementComponent, e as createThrusterStateComponent } from './components-B29WHGQN.js';
|
|
5
|
-
export {
|
|
5
|
+
export { PlayerInput, ThrusterBehavior, ThrusterBehaviorOptions, ThrusterEntity, ThrusterEvent, ThrusterFSM, ThrusterFSMContext, ThrusterState, ThrusterSystem } from './thruster.js';
|
|
6
6
|
export { T as TopDownMovementComponent, a as TopDownMovementInputComponent, b as TopDownMovementStateComponent, c as createTopDownMovementComponent, d as createTopDownMovementInputComponent, e as createTopDownMovementStateComponent } from './components-XCpL6IYt.js';
|
|
7
|
-
export { TopDownMovementBehavior, TopDownMovementBehaviorOptions, TopDownMovementEntity, TopDownMovementHandle,
|
|
7
|
+
export { TopDownMovementBehavior, TopDownMovementBehaviorOptions, TopDownMovementEntity, TopDownMovementHandle, TopDownMovementSystem } from './top-down-movement.js';
|
|
8
8
|
export { Shooter2DBehavior, Shooter2DBehaviorOptions, Shooter2DFireArgs, Shooter2DHandle, Shooter2DProjectileFactory, Shooter2DSourceEntity, Shooter2DStageLike, Shooter2DStateComponent, Shooter2DTarget, createShooter2DStateComponent } from './shooter-2d.js';
|
|
9
9
|
export { ScreenWrapBehavior, ScreenWrapEvent, ScreenWrapFSM, ScreenWrapOptions, ScreenWrapState } from './screen-wrap.js';
|
|
10
10
|
export { ScreenVisibilityBehavior, ScreenVisibilityChangeContext, ScreenVisibilityFSM, ScreenVisibilityHandle, ScreenVisibilityOptions, ScreenVisibilitySize, ScreenVisibilitySnapshot } from './screen-visibility.js';
|
|
@@ -12,22 +12,24 @@ export { WorldBoundary2DBehavior, WorldBoundary2DBounds, WorldBoundary2DEvent, W
|
|
|
12
12
|
export { WorldBoundary3DBehavior, WorldBoundary3DBounds, WorldBoundary3DEvent, WorldBoundary3DFSM, WorldBoundary3DHandle, WorldBoundary3DHit, WorldBoundary3DHits, WorldBoundary3DOptions, WorldBoundary3DPosition, WorldBoundary3DState, computeWorldBoundary3DHits, hasAnyWorldBoundary3DHit } from './world-boundary-3d.js';
|
|
13
13
|
export { Ricochet2DBehavior, Ricochet2DCollisionContext, Ricochet2DEvent, Ricochet2DFSM, Ricochet2DHandle, Ricochet2DOptions, Ricochet2DResult, Ricochet2DState, RicochetCallback } from './ricochet-2d.js';
|
|
14
14
|
export { Ricochet3DBehavior, Ricochet3DCallback, Ricochet3DCollisionContext, Ricochet3DEvent, Ricochet3DFSM, Ricochet3DHandle, Ricochet3DOptions, Ricochet3DResult, Ricochet3DState } from './ricochet-3d.js';
|
|
15
|
-
export {
|
|
15
|
+
export { Platformer2DBehavior, Platformer2DBehaviorOptions, Platformer2DCollisionContext, Platformer2DContext, Platformer2DEntity, Platformer2DEvent, Platformer2DFSM, Platformer2DInputComponent, Platformer2DMovementComponent, Platformer2DState, Platformer2DStateComponent, Platformer2DSystem, createPlatformer2DInputComponent, createPlatformer2DMovementComponent, createPlatformer2DStateComponent } from './platformer-2d.js';
|
|
16
|
+
export { Platformer3DBehavior, Platformer3DBehaviorOptions, Platformer3DContext, Platformer3DEntity, Platformer3DEvent, Platformer3DFSM, Platformer3DInputComponent, Platformer3DMovementComponent, Platformer3DState, Platformer3DStateComponent, Platformer3DSystem, PlatformerCollisionContext, createPlatformer3DInputComponent, createPlatformer3DMovementComponent, createPlatformer3DStateComponent } from './platformer-3d.js';
|
|
16
17
|
export { F as FirstPersonInputComponent, a as FirstPersonMovementComponent, b as FirstPersonStateComponent, c as createFirstPersonInputComponent, d as createFirstPersonMovementComponent, e as createFirstPersonStateComponent } from './components-qWwOsvwh.js';
|
|
17
|
-
export {
|
|
18
|
+
export { FirstPersonBehavior, FirstPersonBehaviorOptions, FirstPersonContext, FirstPersonEntity, FirstPersonEvent, FirstPersonFSM, FirstPersonState, FirstPersonSystem, ViewmodelConfig } from './first-person.js';
|
|
18
19
|
export { J as JumpConfig3D, a as JumpContext3D, b as JumpInput3D, c as JumpState3D, V as Vec3Like, d as createJumpConfig3D, e as createJumpInput3D, f as createJumpState3D } from './components--hjBMTnz.js';
|
|
19
|
-
export {
|
|
20
|
-
export { JumpConfig2D, JumpContext2D, JumpInput2D, JumpState2D,
|
|
20
|
+
export { Jumper3DBehavior, Jumper3DBehaviorOptions, Jumper3DEntity, Jumper3DEvent, Jumper3DFSM, Jumper3DState, Jumper3DSystem, JumperTickEvent, JumperTickResult } from './jumper-3d.js';
|
|
21
|
+
export { JumpConfig2D, JumpContext2D, JumpInput2D, JumpState2D, Jumper2DBehavior, Jumper2DBehaviorOptions, Jumper2DEntity, Jumper2DEvent, Jumper2DFSM, Jumper2DState, Jumper2DSystem, Jumper2DTickEvent, Jumper2DTickResult, createJumpConfig2D, createJumpInput2D, createJumpState2D } from './jumper-2d.js';
|
|
21
22
|
export { CooldownBehavior, CooldownConfig, CooldownEntry, CooldownHandle, CooldownOptions, fireCooldown, getCooldown, getCooldownStore, registerCooldown, resetCooldown, tickCooldowns } from './cooldown.js';
|
|
22
23
|
export { Destructible3DBehavior, Destructible3DBehaviorOptions, Destructible3DColliderOptions, Destructible3DFragmentColliderShape, Destructible3DFragmentPhysicsOptions, Destructible3DHandle, FractureOptionsInput } from './destructible-3d.js';
|
|
23
24
|
export { DestructibleMesh, FractureOptions, VoronoiOptions } from '@dgreenheck/three-pinata';
|
|
24
25
|
export { D as DestructiblePrebakeWorkerAPI, P as PlainBufferGeometryPayload, a as PlainFractureOptions, c as PrebakeWorkerRequest, d as PrebakeWorkerResponse } from './payload-BQzu-oY_.js';
|
|
25
26
|
export { BurstParticlePresetOptions, ParticleEmitterBehavior, ParticleEmitterBehaviorOptions, ParticleEmitterHandle, particlePresets } from './particle-emitter.js';
|
|
26
|
-
export { BoundaryRicochetCoordinator } from './coordinators/boundary-ricochet.js';
|
|
27
|
-
export { BoundaryRicochet3DCoordinator } from './coordinators/boundary-ricochet-3d.js';
|
|
28
|
-
export { FirstPersonShooterCoordinator, FirstPersonShooterInput } from './coordinators/first-person-shooter.js';
|
|
29
|
-
export { TopDownShooterCoordinator, TopDownShooterInput } from './coordinators/top-down-shooter.js';
|
|
30
|
-
export { MultidirectionalSpaceShooterCoordinator, MultidirectionalSpaceShooterInput } from './coordinators/multidirectional-space-shooter.js';
|
|
27
|
+
export { BoundaryRicochetCoordinator, BoundaryRicochetEntity } from './coordinators/boundary-ricochet.js';
|
|
28
|
+
export { BoundaryRicochet3DCoordinator, BoundaryRicochet3DEntity } from './coordinators/boundary-ricochet-3d.js';
|
|
29
|
+
export { FirstPersonShooterCoordinator, FirstPersonShooterEntity, FirstPersonShooterInput } from './coordinators/first-person-shooter.js';
|
|
30
|
+
export { TopDownShooterCoordinator, TopDownShooterEntity, TopDownShooterInput } from './coordinators/top-down-shooter.js';
|
|
31
|
+
export { MultidirectionalSpaceShooterCoordinator, MultidirectionalSpaceShooterEntity, MultidirectionalSpaceShooterInput } from './coordinators/multidirectional-space-shooter.js';
|
|
32
|
+
export { F as FacingAngle2DEntity, R as ResolvedAim2D, S as Shooter2DAimFireInput, f as fireShooter2DIfRequested, g as getEntityFacingAngle2D, r as resolveAim2D } from './shooter-fire-DGripl0z.js';
|
|
31
33
|
export { P as ParticleEffectDefinition, a as ParticleMagicAgency, b as ParticleMagicAlignment, c as ParticleMagicModifierInput, d as ParticleMagicModifierOptions, e as ParticleMagicOrder, f as ParticleMagicRealityEffect, g as ParticleMagicTemperament, h as ParticlePresetMaterialOptions, S as SemanticParticlePresetOptions, v as particleEffect } from './spark-Dx3cJbTW.js';
|
|
32
34
|
import '@dimforge/rapier3d-compat';
|
|
33
35
|
import 'three';
|
|
@@ -36,5 +38,26 @@ import 'typescript-fsm';
|
|
|
36
38
|
import './vector-Bm65-FOG.js';
|
|
37
39
|
import './entity-types-CmtQ-IBp.js';
|
|
38
40
|
import './first-person-perspective-C9Mptl0-.js';
|
|
39
|
-
import './moveable-
|
|
41
|
+
import './moveable-BLTHO7Jq.js';
|
|
40
42
|
import 'three/webgpu';
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Shared boundary→ricochet glue used by the 2D and 3D boundary-ricochet
|
|
46
|
+
* coordinators. Reads the boundary behavior's last hits, optionally snaps the
|
|
47
|
+
* body back inside the bounds, and applies the ricochet reflection.
|
|
48
|
+
*/
|
|
49
|
+
interface BoundaryRicochetUpdate<THits, TNormal> {
|
|
50
|
+
/** Boundary behavior handle (or any source of last-frame hits). */
|
|
51
|
+
getLastHits(): THits | null;
|
|
52
|
+
/** Whether any boundary face was hit this frame. */
|
|
53
|
+
hasAnyHit(hits: THits): boolean;
|
|
54
|
+
/** Convert hits into a reflection normal. */
|
|
55
|
+
getNormal(hits: THits): TNormal;
|
|
56
|
+
/** Optional pre-reflection snap (e.g. clamp the body back inside bounds). */
|
|
57
|
+
snapToClamped?(): void;
|
|
58
|
+
/** Apply the reflection; returns true when a ricochet occurred. */
|
|
59
|
+
applyRicochet(normal: TNormal): boolean;
|
|
60
|
+
}
|
|
61
|
+
declare function updateBoundaryRicochet<THits, TNormal>(update: BoundaryRicochetUpdate<THits, TNormal>): boolean;
|
|
62
|
+
|
|
63
|
+
export { type BoundaryRicochetUpdate, updateBoundaryRicochet };
|
package/dist/index.js
CHANGED
|
@@ -1,45 +1,49 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FirstPersonShooterCoordinator
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H4TJ7X4O.js";
|
|
4
4
|
import {
|
|
5
5
|
MultidirectionalSpaceShooterCoordinator
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FTDZAKZW.js";
|
|
7
7
|
import {
|
|
8
8
|
TopDownShooterCoordinator
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import
|
|
9
|
+
} from "./chunk-ZA43LPRM.js";
|
|
10
|
+
import {
|
|
11
|
+
fireShooter2DIfRequested,
|
|
12
|
+
getEntityFacingAngle2D,
|
|
13
|
+
resolveAim2D
|
|
14
|
+
} from "./chunk-UL6Q5HDP.js";
|
|
11
15
|
import {
|
|
12
16
|
ScreenWrapBehavior,
|
|
13
17
|
ScreenWrapEvent,
|
|
14
18
|
ScreenWrapFSM,
|
|
15
19
|
ScreenWrapState
|
|
16
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GFARAJV2.js";
|
|
17
21
|
import {
|
|
18
22
|
Shooter2DBehavior,
|
|
19
23
|
createShooter2DStateComponent
|
|
20
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5XZWTFGF.js";
|
|
21
25
|
import {
|
|
22
26
|
ThrusterBehavior,
|
|
23
27
|
ThrusterEvent,
|
|
24
28
|
ThrusterFSM,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
ThrusterState,
|
|
30
|
+
ThrusterSystem
|
|
31
|
+
} from "./chunk-MJFMNRMZ.js";
|
|
28
32
|
import {
|
|
29
33
|
createThrusterInputComponent,
|
|
30
34
|
createThrusterMovementComponent,
|
|
31
35
|
createThrusterStateComponent
|
|
32
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-IZJFUAXB.js";
|
|
33
37
|
import {
|
|
34
38
|
TopDownMovementBehavior,
|
|
35
|
-
|
|
36
|
-
} from "./chunk-
|
|
39
|
+
TopDownMovementSystem
|
|
40
|
+
} from "./chunk-64HKCSXD.js";
|
|
37
41
|
import {
|
|
38
42
|
createTopDownMovementComponent,
|
|
39
43
|
createTopDownMovementInputComponent,
|
|
40
44
|
createTopDownMovementStateComponent
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
45
|
+
} from "./chunk-EIWQM6U3.js";
|
|
46
|
+
import "./chunk-Y7YIAWPW.js";
|
|
43
47
|
import {
|
|
44
48
|
WorldBoundary2DBehavior,
|
|
45
49
|
WorldBoundary2DEvent,
|
|
@@ -47,7 +51,7 @@ import {
|
|
|
47
51
|
WorldBoundary2DState,
|
|
48
52
|
computeWorldBoundary2DHits,
|
|
49
53
|
hasAnyWorldBoundary2DHit
|
|
50
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-PWF757B6.js";
|
|
51
55
|
import {
|
|
52
56
|
WorldBoundary3DBehavior,
|
|
53
57
|
WorldBoundary3DEvent,
|
|
@@ -55,54 +59,67 @@ import {
|
|
|
55
59
|
WorldBoundary3DState,
|
|
56
60
|
computeWorldBoundary3DHits,
|
|
57
61
|
hasAnyWorldBoundary3DHit
|
|
58
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-HNESASBB.js";
|
|
59
63
|
import {
|
|
60
64
|
BoundaryRicochetCoordinator
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-XP3ASVGJ.js";
|
|
66
|
+
import "./chunk-KDY5N6J4.js";
|
|
63
67
|
import {
|
|
64
68
|
BoundaryRicochet3DCoordinator
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import "./chunk-
|
|
69
|
+
} from "./chunk-KFFETUAL.js";
|
|
70
|
+
import "./chunk-OHCPV2NT.js";
|
|
71
|
+
import {
|
|
72
|
+
updateBoundaryRicochet
|
|
73
|
+
} from "./chunk-LL4FLHIY.js";
|
|
67
74
|
import {
|
|
68
75
|
ParticleEmitterBehavior,
|
|
69
76
|
particlePresets
|
|
70
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-5SM5SH5O.js";
|
|
71
78
|
import {
|
|
72
79
|
particleEffect
|
|
73
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-7JJEIADR.js";
|
|
81
|
+
import {
|
|
82
|
+
Platformer2DBehavior,
|
|
83
|
+
Platformer2DEvent,
|
|
84
|
+
Platformer2DFSM,
|
|
85
|
+
Platformer2DState,
|
|
86
|
+
Platformer2DSystem,
|
|
87
|
+
createPlatformer2DInputComponent,
|
|
88
|
+
createPlatformer2DMovementComponent,
|
|
89
|
+
createPlatformer2DStateComponent
|
|
90
|
+
} from "./chunk-RTRFJVCZ.js";
|
|
74
91
|
import {
|
|
75
92
|
Platformer3DBehavior,
|
|
76
|
-
Platformer3DBehavior2,
|
|
77
93
|
Platformer3DEvent,
|
|
78
94
|
Platformer3DFSM,
|
|
79
95
|
Platformer3DState,
|
|
96
|
+
Platformer3DSystem,
|
|
80
97
|
createPlatformer3DInputComponent,
|
|
81
98
|
createPlatformer3DMovementComponent,
|
|
82
99
|
createPlatformer3DStateComponent
|
|
83
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-FRJDQM23.js";
|
|
84
101
|
import {
|
|
85
102
|
Ricochet2DBehavior,
|
|
86
103
|
Ricochet2DEvent,
|
|
87
104
|
Ricochet2DFSM,
|
|
88
105
|
Ricochet2DState
|
|
89
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-V74N7D6Q.js";
|
|
90
107
|
import {
|
|
91
108
|
Ricochet3DBehavior,
|
|
92
109
|
Ricochet3DEvent,
|
|
93
110
|
Ricochet3DFSM,
|
|
94
111
|
Ricochet3DState
|
|
95
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-XLUJDKCT.js";
|
|
96
113
|
import {
|
|
97
114
|
ScreenVisibilityBehavior,
|
|
98
115
|
ScreenVisibilityFSM
|
|
99
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-WOMHL23C.js";
|
|
100
117
|
import {
|
|
101
118
|
createPhysicsBodyComponent,
|
|
102
119
|
createTransformComponent,
|
|
103
120
|
useBehavior
|
|
104
|
-
} from "./chunk-
|
|
105
|
-
import "./chunk-
|
|
121
|
+
} from "./chunk-UYFOLI2X.js";
|
|
122
|
+
import "./chunk-4V7TIRO2.js";
|
|
106
123
|
import {
|
|
107
124
|
CooldownBehavior,
|
|
108
125
|
fireCooldown,
|
|
@@ -111,88 +128,93 @@ import {
|
|
|
111
128
|
registerCooldown,
|
|
112
129
|
resetCooldown,
|
|
113
130
|
tickCooldowns
|
|
114
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-ZRQWSURL.js";
|
|
115
132
|
import {
|
|
116
133
|
Destructible3DBehavior,
|
|
117
134
|
DestructibleMesh,
|
|
118
135
|
FractureOptions
|
|
119
|
-
} from "./chunk-
|
|
120
|
-
import "./chunk-
|
|
136
|
+
} from "./chunk-BXP4K7RF.js";
|
|
137
|
+
import "./chunk-HZMY3TT4.js";
|
|
121
138
|
import {
|
|
122
|
-
|
|
123
|
-
FirstPersonControllerBehavior,
|
|
139
|
+
FirstPersonBehavior,
|
|
124
140
|
FirstPersonEvent,
|
|
125
141
|
FirstPersonFSM,
|
|
126
|
-
FirstPersonState
|
|
127
|
-
|
|
142
|
+
FirstPersonState,
|
|
143
|
+
FirstPersonSystem
|
|
144
|
+
} from "./chunk-WXXXJ22R.js";
|
|
128
145
|
import {
|
|
129
146
|
createFirstPersonInputComponent,
|
|
130
147
|
createFirstPersonMovementComponent,
|
|
131
148
|
createFirstPersonStateComponent
|
|
132
|
-
} from "./chunk-
|
|
133
|
-
import "./chunk-
|
|
149
|
+
} from "./chunk-QVCMJ4Q2.js";
|
|
150
|
+
import "./chunk-WWVD5DR5.js";
|
|
134
151
|
import {
|
|
135
|
-
Jumper2D,
|
|
136
152
|
Jumper2DBehavior,
|
|
137
153
|
Jumper2DEvent,
|
|
138
154
|
Jumper2DFSM,
|
|
139
155
|
Jumper2DState,
|
|
156
|
+
Jumper2DSystem,
|
|
140
157
|
Jumper2DTickEvent,
|
|
141
158
|
createJumpConfig2D,
|
|
142
159
|
createJumpInput2D,
|
|
143
160
|
createJumpState2D
|
|
144
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-GTLA6LOJ.js";
|
|
145
162
|
import {
|
|
146
|
-
Jumper3D,
|
|
147
163
|
Jumper3DBehavior,
|
|
148
164
|
Jumper3DEvent,
|
|
149
165
|
Jumper3DFSM,
|
|
150
166
|
Jumper3DState,
|
|
167
|
+
Jumper3DSystem,
|
|
151
168
|
JumperTickEvent
|
|
152
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-RONH2KDI.js";
|
|
153
170
|
import {
|
|
154
171
|
createJumpConfig3D,
|
|
155
172
|
createJumpInput3D,
|
|
156
173
|
createJumpState3D
|
|
157
|
-
} from "./chunk-
|
|
158
|
-
import "./chunk-
|
|
159
|
-
import "./chunk-
|
|
160
|
-
import "./chunk-
|
|
174
|
+
} from "./chunk-4WH2ZN7P.js";
|
|
175
|
+
import "./chunk-JXMF4NUI.js";
|
|
176
|
+
import "./chunk-OTLSUYQQ.js";
|
|
177
|
+
import "./chunk-4URF65BR.js";
|
|
161
178
|
import {
|
|
162
179
|
defineBehavior
|
|
163
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-EZNCCO4L.js";
|
|
164
181
|
export {
|
|
165
182
|
BoundaryRicochet3DCoordinator,
|
|
166
183
|
BoundaryRicochetCoordinator,
|
|
167
184
|
CooldownBehavior,
|
|
168
185
|
Destructible3DBehavior,
|
|
169
186
|
DestructibleMesh,
|
|
170
|
-
|
|
171
|
-
FirstPersonControllerBehavior,
|
|
187
|
+
FirstPersonBehavior,
|
|
172
188
|
FirstPersonEvent,
|
|
173
189
|
FirstPersonFSM,
|
|
174
190
|
FirstPersonShooterCoordinator,
|
|
175
191
|
FirstPersonState,
|
|
192
|
+
FirstPersonSystem,
|
|
176
193
|
FractureOptions,
|
|
177
|
-
Jumper2D,
|
|
178
194
|
Jumper2DBehavior,
|
|
179
195
|
Jumper2DEvent,
|
|
180
196
|
Jumper2DFSM,
|
|
181
197
|
Jumper2DState,
|
|
198
|
+
Jumper2DSystem,
|
|
182
199
|
Jumper2DTickEvent,
|
|
183
|
-
Jumper3D,
|
|
184
200
|
Jumper3DBehavior,
|
|
185
201
|
Jumper3DEvent,
|
|
186
202
|
Jumper3DFSM,
|
|
187
203
|
Jumper3DState,
|
|
204
|
+
Jumper3DSystem,
|
|
188
205
|
JumperTickEvent,
|
|
189
206
|
MultidirectionalSpaceShooterCoordinator,
|
|
190
207
|
ParticleEmitterBehavior,
|
|
191
|
-
|
|
208
|
+
Platformer2DBehavior,
|
|
209
|
+
Platformer2DEvent,
|
|
210
|
+
Platformer2DFSM,
|
|
211
|
+
Platformer2DState,
|
|
212
|
+
Platformer2DSystem,
|
|
213
|
+
Platformer3DBehavior,
|
|
192
214
|
Platformer3DEvent,
|
|
193
215
|
Platformer3DFSM,
|
|
194
|
-
Platformer3DBehavior as Platformer3DMovementBehavior,
|
|
195
216
|
Platformer3DState,
|
|
217
|
+
Platformer3DSystem,
|
|
196
218
|
Ricochet2DBehavior,
|
|
197
219
|
Ricochet2DEvent,
|
|
198
220
|
Ricochet2DFSM,
|
|
@@ -211,10 +233,10 @@ export {
|
|
|
211
233
|
ThrusterBehavior,
|
|
212
234
|
ThrusterEvent,
|
|
213
235
|
ThrusterFSM,
|
|
214
|
-
ThrusterMovementBehavior,
|
|
215
236
|
ThrusterState,
|
|
237
|
+
ThrusterSystem,
|
|
216
238
|
TopDownMovementBehavior,
|
|
217
|
-
|
|
239
|
+
TopDownMovementSystem,
|
|
218
240
|
TopDownShooterCoordinator,
|
|
219
241
|
WorldBoundary2DBehavior,
|
|
220
242
|
WorldBoundary2DEvent,
|
|
@@ -236,6 +258,9 @@ export {
|
|
|
236
258
|
createJumpState2D,
|
|
237
259
|
createJumpState3D,
|
|
238
260
|
createPhysicsBodyComponent,
|
|
261
|
+
createPlatformer2DInputComponent,
|
|
262
|
+
createPlatformer2DMovementComponent,
|
|
263
|
+
createPlatformer2DStateComponent,
|
|
239
264
|
createPlatformer3DInputComponent,
|
|
240
265
|
createPlatformer3DMovementComponent,
|
|
241
266
|
createPlatformer3DStateComponent,
|
|
@@ -249,14 +274,19 @@ export {
|
|
|
249
274
|
createTransformComponent,
|
|
250
275
|
defineBehavior,
|
|
251
276
|
fireCooldown,
|
|
277
|
+
fireShooter2DIfRequested,
|
|
252
278
|
getCooldown,
|
|
253
279
|
getCooldownStore,
|
|
280
|
+
getEntityFacingAngle2D,
|
|
254
281
|
hasAnyWorldBoundary2DHit,
|
|
255
282
|
hasAnyWorldBoundary3DHit,
|
|
256
283
|
particleEffect,
|
|
257
284
|
particlePresets,
|
|
258
285
|
registerCooldown,
|
|
259
286
|
resetCooldown,
|
|
287
|
+
resolveAim2D,
|
|
260
288
|
tickCooldowns,
|
|
289
|
+
updateBoundaryRicochet,
|
|
261
290
|
useBehavior
|
|
262
291
|
};
|
|
292
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/jumper-2d.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { S as SyncStateMachine } from './sync-state-machine-CZyspBpj.js';
|
|
2
|
-
import
|
|
2
|
+
import * as _dimforge_rapier3d_compat from '@dimforge/rapier3d-compat';
|
|
3
|
+
import { a as BehaviorDescriptor, T as TransformState } from './behavior-system-DSNek0W9.js';
|
|
3
4
|
import 'typescript-fsm';
|
|
4
5
|
|
|
5
6
|
interface JumpConfig2D {
|
|
@@ -52,7 +53,7 @@ declare enum Jumper2DTickEvent {
|
|
|
52
53
|
interface Jumper2DTickResult {
|
|
53
54
|
event: Jumper2DTickEvent;
|
|
54
55
|
}
|
|
55
|
-
declare class
|
|
56
|
+
declare class Jumper2DSystem {
|
|
56
57
|
tick(config: JumpConfig2D, input: JumpInput2D, ctx: JumpContext2D, state: JumpState2D): Jumper2DTickResult;
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -97,17 +98,17 @@ interface Jumper2DBehaviorOptions {
|
|
|
97
98
|
}
|
|
98
99
|
interface Jumper2DEntity {
|
|
99
100
|
uuid: string;
|
|
100
|
-
body:
|
|
101
|
-
transformStore:
|
|
101
|
+
body: _dimforge_rapier3d_compat.RigidBody | null;
|
|
102
|
+
transformStore: TransformState;
|
|
102
103
|
jumper2d: JumpConfig2D;
|
|
103
104
|
$jumper2d: JumpInput2D;
|
|
104
105
|
jumper2dState: JumpState2D;
|
|
105
106
|
}
|
|
106
|
-
declare const
|
|
107
|
+
declare const Jumper2DBehavior: BehaviorDescriptor<Jumper2DBehaviorOptions, {
|
|
107
108
|
getState: () => Jumper2DState;
|
|
108
109
|
isJumping: () => boolean;
|
|
109
110
|
getJumpsUsed: () => number;
|
|
110
111
|
getJumpsRemaining: () => number;
|
|
111
112
|
}, Jumper2DEntity>;
|
|
112
113
|
|
|
113
|
-
export { type JumpConfig2D, type JumpContext2D, type JumpInput2D, type JumpState2D,
|
|
114
|
+
export { type JumpConfig2D, type JumpContext2D, type JumpInput2D, type JumpState2D, Jumper2DBehavior, type Jumper2DBehaviorOptions, type Jumper2DEntity, Jumper2DEvent, Jumper2DFSM, Jumper2DState, Jumper2DSystem, Jumper2DTickEvent, type Jumper2DTickResult, createJumpConfig2D, createJumpInput2D, createJumpState2D };
|
package/dist/jumper-2d.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Jumper2D,
|
|
3
2
|
Jumper2DBehavior,
|
|
4
3
|
Jumper2DEvent,
|
|
5
4
|
Jumper2DFSM,
|
|
6
5
|
Jumper2DState,
|
|
6
|
+
Jumper2DSystem,
|
|
7
7
|
Jumper2DTickEvent,
|
|
8
8
|
createJumpConfig2D,
|
|
9
9
|
createJumpInput2D,
|
|
10
10
|
createJumpState2D
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-GTLA6LOJ.js";
|
|
12
|
+
import "./chunk-JXMF4NUI.js";
|
|
13
|
+
import "./chunk-OTLSUYQQ.js";
|
|
14
|
+
import "./chunk-4URF65BR.js";
|
|
15
|
+
import "./chunk-EZNCCO4L.js";
|
|
16
16
|
export {
|
|
17
|
-
Jumper2D,
|
|
18
17
|
Jumper2DBehavior,
|
|
19
18
|
Jumper2DEvent,
|
|
20
19
|
Jumper2DFSM,
|
|
21
20
|
Jumper2DState,
|
|
21
|
+
Jumper2DSystem,
|
|
22
22
|
Jumper2DTickEvent,
|
|
23
23
|
createJumpConfig2D,
|
|
24
24
|
createJumpInput2D,
|
|
25
25
|
createJumpState2D
|
|
26
26
|
};
|
|
27
|
+
//# sourceMappingURL=jumper-2d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|