@zylem/behaviors 0.5.2 → 0.5.7
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/{behavior-system-CldqNUgr.d.ts → behavior-system-HEt67el5.d.ts} +14 -1
- package/dist/{chunk-EIWQM6U3.js → chunk-2HKY6WF7.js} +0 -1
- package/dist/{chunk-IZJFUAXB.js → chunk-2HLZBWGD.js} +0 -1
- package/dist/{chunk-LL4FLHIY.js → chunk-2YF7J3H4.js} +0 -1
- package/dist/{chunk-SGHIGTVZ.js → chunk-3X3CL24Z.js} +0 -1
- package/dist/{chunk-HZMY3TT4.js → chunk-4DVDFCVY.js} +0 -1
- package/dist/{chunk-QVCMJ4Q2.js → chunk-4EWASZHB.js} +0 -1
- package/dist/{chunk-4LLK2FJI.js → chunk-55CFXXZH.js} +3 -4
- package/dist/{chunk-4MZ57HPD.js → chunk-57GLKGEX.js} +3 -4
- package/dist/{chunk-QS3VXWVO.js → chunk-7GGR26YA.js} +3 -4
- package/dist/{chunk-Y4PHT2HG.js → chunk-7LHXAEOZ.js} +4 -5
- package/dist/{chunk-PLIXVF7B.js → chunk-7TIIRJKF.js} +3 -4
- package/dist/{chunk-LZIHSJZR.js → chunk-CB3C7CRD.js} +4 -5
- package/dist/{chunk-G2KUXVU6.js → chunk-CTSYM56P.js} +30 -12
- package/dist/{chunk-2PAHQZZD.js → chunk-CVRN7YAI.js} +3 -4
- package/dist/{chunk-NW4SE5XW.js → chunk-DD4U42FG.js} +2 -3
- package/dist/{chunk-BAXJ7XHJ.js → chunk-E2MOFIDH.js} +3 -4
- package/dist/{chunk-WOMHL23C.js → chunk-ERS6SNA5.js} +1 -2
- package/dist/{chunk-4WH2ZN7P.js → chunk-F7E23E26.js} +0 -1
- package/dist/{chunk-DZ4LLQON.js → chunk-GZ3DQIIZ.js} +23 -2
- package/dist/{chunk-5WRI5ZAA.js → chunk-JSBRDJBE.js} +0 -1
- package/dist/{chunk-5A5AYP2C.js → chunk-K6CWKFHL.js} +0 -1
- package/dist/{chunk-52FJIDGL.js → chunk-LAN7U3AK.js} +1 -2
- package/dist/{chunk-WU6XXL3D.js → chunk-LLDLVVG4.js} +4 -5
- package/dist/{chunk-M3QDKKDF.js → chunk-LWM346FW.js} +0 -1
- package/dist/{chunk-7DGXUAPV.js → chunk-M25QJBDN.js} +4 -5
- package/dist/{chunk-7JLWZXPA.js → chunk-NDJO56BB.js} +3 -4
- package/dist/{chunk-AS3HR7AS.js → chunk-OBF6BIA2.js} +1 -2
- package/dist/{chunk-KIYUUSPK.js → chunk-OSPQFWQF.js} +2 -3
- package/dist/{chunk-4CEW64HO.js → chunk-OU2SW4U5.js} +3 -4
- package/dist/{chunk-H4TJ7X4O.js → chunk-QU6GQ657.js} +2 -3
- package/dist/{chunk-KFFETUAL.js → chunk-RR3XNDKG.js} +2 -3
- package/dist/{chunk-JVADRLWX.js → chunk-SHZZ2QRV.js} +2 -3
- package/dist/{chunk-7W3KY55G.js → chunk-TK3AXXXI.js} +3 -4
- package/dist/{chunk-OPZ2LVS2.js → chunk-TZQQYJYK.js} +0 -1
- package/dist/{chunk-7JJEIADR.js → chunk-UF7QPYUX.js} +299 -157
- package/dist/{chunk-NQPYMUDF.js → chunk-UKGBQTHL.js} +3 -4
- package/dist/{chunk-5XPPLTC7.js → chunk-UUMH3DC3.js} +1 -2
- package/dist/{chunk-TBUKJKY6.js → chunk-VJ3UA6OD.js} +1 -2
- package/dist/{chunk-OHCPV2NT.js → chunk-WHKPWIQO.js} +0 -1
- package/dist/{chunk-EZNCCO4L.js → chunk-YDLO5M7S.js} +0 -1
- package/dist/{components-BmievOxF.d.ts → components-JZQoO2sU.d.ts} +1 -1
- package/dist/cooldown.d.ts +1 -1
- package/dist/cooldown.js +3 -4
- package/dist/coordinators/boundary-ricochet-3d.d.ts +2 -2
- package/dist/coordinators/boundary-ricochet-3d.js +4 -5
- package/dist/coordinators/boundary-ricochet.d.ts +2 -2
- package/dist/coordinators/boundary-ricochet.js +4 -5
- package/dist/coordinators/first-person-shooter.js +4 -5
- package/dist/coordinators/multidirectional-space-shooter.d.ts +1 -1
- package/dist/coordinators/multidirectional-space-shooter.js +6 -7
- package/dist/coordinators/top-down-shooter.d.ts +1 -1
- package/dist/coordinators/top-down-shooter.js +6 -7
- package/dist/core.d.ts +21 -6
- package/dist/core.js +29 -7
- package/dist/destructible-3d.d.ts +1 -1
- package/dist/destructible-3d.js +4 -5
- package/dist/destructible-prebake.js +2 -3
- package/dist/{first-person-perspective-C9Mptl0-.d.ts → first-person-perspective-BxFHgFln.d.ts} +2 -0
- package/dist/first-person.d.ts +12 -3
- package/dist/first-person.js +7 -8
- package/dist/index.d.ts +5 -5
- package/dist/index.js +40 -41
- package/dist/jumper-2d.d.ts +1 -1
- package/dist/jumper-2d.js +5 -6
- package/dist/jumper-3d.d.ts +1 -1
- package/dist/jumper-3d.js +6 -7
- package/dist/{moveable-rdIvWiak.d.ts → moveable-BdFmI3s1.d.ts} +1 -1
- package/dist/particle-emitter/presets.d.ts +1 -1
- package/dist/particle-emitter/presets.js +2 -3
- package/dist/particle-emitter.d.ts +3 -3
- package/dist/particle-emitter.js +5 -6
- package/dist/platformer-2d.d.ts +1 -1
- package/dist/platformer-2d.js +5 -6
- package/dist/platformer-3d.d.ts +1 -1
- package/dist/platformer-3d.js +5 -6
- package/dist/ricochet-2d.d.ts +1 -1
- package/dist/ricochet-2d.js +5 -6
- package/dist/ricochet-3d.d.ts +1 -1
- package/dist/ricochet-3d.js +5 -6
- package/dist/runtime-2d.d.ts +1 -1
- package/dist/runtime-2d.js +2 -3
- package/dist/screen-visibility.d.ts +1 -1
- package/dist/screen-visibility.js +3 -4
- package/dist/screen-wrap.d.ts +1 -1
- package/dist/screen-wrap.js +5 -6
- package/dist/shooter-2d.d.ts +1 -1
- package/dist/shooter-2d.js +5 -6
- package/dist/{spark-Dx3cJbTW.d.ts → spark-C4Tp-52_.d.ts} +4 -2
- package/dist/thruster.d.ts +1 -1
- package/dist/thruster.js +5 -6
- package/dist/top-down-movement.d.ts +1 -1
- package/dist/top-down-movement.js +7 -8
- package/dist/world-boundary-2d.d.ts +1 -1
- package/dist/world-boundary-2d.js +6 -7
- package/dist/world-boundary-3d.d.ts +1 -1
- package/dist/world-boundary-3d.js +6 -7
- package/package.json +159 -161
- package/dist/chunk-2PAHQZZD.js.map +0 -1
- package/dist/chunk-4CEW64HO.js.map +0 -1
- package/dist/chunk-4LLK2FJI.js.map +0 -1
- package/dist/chunk-4MZ57HPD.js.map +0 -1
- package/dist/chunk-4WH2ZN7P.js.map +0 -1
- package/dist/chunk-52FJIDGL.js.map +0 -1
- package/dist/chunk-5A5AYP2C.js.map +0 -1
- package/dist/chunk-5WRI5ZAA.js.map +0 -1
- package/dist/chunk-5XPPLTC7.js.map +0 -1
- package/dist/chunk-7DGXUAPV.js.map +0 -1
- package/dist/chunk-7JJEIADR.js.map +0 -1
- package/dist/chunk-7JLWZXPA.js.map +0 -1
- package/dist/chunk-7W3KY55G.js.map +0 -1
- package/dist/chunk-AS3HR7AS.js.map +0 -1
- package/dist/chunk-BAXJ7XHJ.js.map +0 -1
- package/dist/chunk-DZ4LLQON.js.map +0 -1
- package/dist/chunk-EIWQM6U3.js.map +0 -1
- package/dist/chunk-EZNCCO4L.js.map +0 -1
- package/dist/chunk-G2KUXVU6.js.map +0 -1
- package/dist/chunk-H4TJ7X4O.js.map +0 -1
- package/dist/chunk-HZMY3TT4.js.map +0 -1
- package/dist/chunk-IZJFUAXB.js.map +0 -1
- package/dist/chunk-JVADRLWX.js.map +0 -1
- package/dist/chunk-KFFETUAL.js.map +0 -1
- package/dist/chunk-KIYUUSPK.js.map +0 -1
- package/dist/chunk-LL4FLHIY.js.map +0 -1
- package/dist/chunk-LZIHSJZR.js.map +0 -1
- package/dist/chunk-M3QDKKDF.js.map +0 -1
- package/dist/chunk-NQPYMUDF.js.map +0 -1
- package/dist/chunk-NW4SE5XW.js.map +0 -1
- package/dist/chunk-OHCPV2NT.js.map +0 -1
- package/dist/chunk-OPZ2LVS2.js.map +0 -1
- package/dist/chunk-PLIXVF7B.js.map +0 -1
- package/dist/chunk-QS3VXWVO.js.map +0 -1
- package/dist/chunk-QVCMJ4Q2.js.map +0 -1
- package/dist/chunk-SGHIGTVZ.js.map +0 -1
- package/dist/chunk-TBUKJKY6.js.map +0 -1
- package/dist/chunk-WOMHL23C.js.map +0 -1
- package/dist/chunk-WU6XXL3D.js.map +0 -1
- package/dist/chunk-Y4PHT2HG.js.map +0 -1
- package/dist/cooldown.js.map +0 -1
- package/dist/coordinators/boundary-ricochet-3d.js.map +0 -1
- package/dist/coordinators/boundary-ricochet.js.map +0 -1
- package/dist/coordinators/first-person-shooter.js.map +0 -1
- package/dist/coordinators/multidirectional-space-shooter.js.map +0 -1
- package/dist/coordinators/top-down-shooter.js.map +0 -1
- package/dist/core.js.map +0 -1
- package/dist/destructible-3d.js.map +0 -1
- package/dist/destructible-prebake.js.map +0 -1
- package/dist/first-person.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/jumper-2d.js.map +0 -1
- package/dist/jumper-3d.js.map +0 -1
- package/dist/particle-emitter/presets.js.map +0 -1
- package/dist/particle-emitter.js.map +0 -1
- package/dist/platformer-2d.js.map +0 -1
- package/dist/platformer-3d.js.map +0 -1
- package/dist/ricochet-2d.js.map +0 -1
- package/dist/ricochet-3d.js.map +0 -1
- package/dist/runtime-2d.js.map +0 -1
- package/dist/screen-visibility.js.map +0 -1
- package/dist/screen-wrap.js.map +0 -1
- package/dist/shooter-2d.js.map +0 -1
- package/dist/thruster.js.map +0 -1
- package/dist/top-down-movement.js.map +0 -1
- package/dist/world-boundary-2d.js.map +0 -1
- package/dist/world-boundary-3d.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fireShooter2DIfRequested
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LAN7U3AK.js";
|
|
4
4
|
import {
|
|
5
5
|
createThrusterInputComponent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2HLZBWGD.js";
|
|
7
7
|
import {
|
|
8
8
|
getEntityFacingAngle2D,
|
|
9
9
|
resolveAim2D
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VJ3UA6OD.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/coordinators/multidirectional-space-shooter.coordinator.ts
|
|
13
13
|
var MultidirectionalSpaceShooterCoordinator = class {
|
|
@@ -42,4 +42,3 @@ var MultidirectionalSpaceShooterCoordinator = class {
|
|
|
42
42
|
export {
|
|
43
43
|
MultidirectionalSpaceShooterCoordinator
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-NQPYMUDF.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineBehavior
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YDLO5M7S.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/behaviors/cooldown/cooldown-store.ts
|
|
6
6
|
import { proxy } from "valtio/vanilla";
|
|
@@ -115,4 +115,3 @@ export {
|
|
|
115
115
|
getCooldownStore,
|
|
116
116
|
CooldownBehavior
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=chunk-5XPPLTC7.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
directionFromAngle2D,
|
|
4
4
|
getRotationAngle2D,
|
|
5
5
|
normalizeDirection2D
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3X3CL24Z.js";
|
|
7
7
|
|
|
8
8
|
// src/lib/coordinators/shared/top-down-aim.ts
|
|
9
9
|
function getEntityFacingAngle2D(entity) {
|
|
@@ -35,4 +35,3 @@ export {
|
|
|
35
35
|
getEntityFacingAngle2D,
|
|
36
36
|
resolveAim2D
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=chunk-TBUKJKY6.js.map
|
package/dist/cooldown.d.ts
CHANGED
package/dist/cooldown.js
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
registerCooldown,
|
|
7
7
|
resetCooldown,
|
|
8
8
|
tickCooldowns
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-UUMH3DC3.js";
|
|
10
|
+
import "./chunk-YDLO5M7S.js";
|
|
11
|
+
import "./chunk-JSBRDJBE.js";
|
|
12
12
|
export {
|
|
13
13
|
CooldownBehavior,
|
|
14
14
|
fireCooldown,
|
|
@@ -18,4 +18,3 @@ export {
|
|
|
18
18
|
resetCooldown,
|
|
19
19
|
tickCooldowns
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=cooldown.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as MoveableEntity } from '../moveable-
|
|
1
|
+
import { a as MoveableEntity } from '../moveable-BdFmI3s1.js';
|
|
2
2
|
import { B as BaseEntityInterface } from '../entity-types-DhfsZbSK.js';
|
|
3
3
|
import { Ricochet3DHandle } from '../ricochet-3d.js';
|
|
4
4
|
import { WorldBoundary3DHandle } from '../world-boundary-3d.js';
|
|
5
5
|
import 'three';
|
|
6
|
-
import '../behavior-system-
|
|
6
|
+
import '../behavior-system-HEt67el5.js';
|
|
7
7
|
import '@zylem/runtime';
|
|
8
8
|
import '../sync-state-machine-CZyspBpj.js';
|
|
9
9
|
import 'typescript-fsm';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BoundaryRicochet3DCoordinator
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-RR3XNDKG.js";
|
|
4
|
+
import "../chunk-WHKPWIQO.js";
|
|
5
|
+
import "../chunk-2YF7J3H4.js";
|
|
6
|
+
import "../chunk-JSBRDJBE.js";
|
|
7
7
|
export {
|
|
8
8
|
BoundaryRicochet3DCoordinator
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=boundary-ricochet-3d.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Ricochet2DHandle } from '../ricochet-2d.js';
|
|
2
2
|
import { WorldBoundary2DHandle } from '../world-boundary-2d.js';
|
|
3
|
-
import { a as MoveableEntity } from '../moveable-
|
|
3
|
+
import { a as MoveableEntity } from '../moveable-BdFmI3s1.js';
|
|
4
4
|
import { B as BaseEntityInterface } from '../entity-types-DhfsZbSK.js';
|
|
5
5
|
import '../sync-state-machine-CZyspBpj.js';
|
|
6
6
|
import 'typescript-fsm';
|
|
7
|
-
import '../behavior-system-
|
|
7
|
+
import '../behavior-system-HEt67el5.js';
|
|
8
8
|
import '@zylem/runtime';
|
|
9
9
|
import 'three';
|
|
10
10
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BoundaryRicochetCoordinator
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-DD4U42FG.js";
|
|
4
|
+
import "../chunk-TZQQYJYK.js";
|
|
5
|
+
import "../chunk-2YF7J3H4.js";
|
|
6
|
+
import "../chunk-JSBRDJBE.js";
|
|
7
7
|
export {
|
|
8
8
|
BoundaryRicochetCoordinator
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=boundary-ricochet.js.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FirstPersonShooterCoordinator
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-QU6GQ657.js";
|
|
4
|
+
import "../chunk-4EWASZHB.js";
|
|
5
|
+
import "../chunk-F7E23E26.js";
|
|
6
|
+
import "../chunk-JSBRDJBE.js";
|
|
7
7
|
export {
|
|
8
8
|
FirstPersonShooterCoordinator
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=first-person-shooter.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T as ThrusterInputComponent } from '../components-B29WHGQN.js';
|
|
2
2
|
import { Shooter2DSourceEntity, Shooter2DHandle, Shooter2DStageLike } from '../shooter-2d.js';
|
|
3
3
|
import { S as Shooter2DAimFireInput } from '../shooter-fire-DGripl0z.js';
|
|
4
|
-
import '../behavior-system-
|
|
4
|
+
import '../behavior-system-HEt67el5.js';
|
|
5
5
|
import '@zylem/runtime';
|
|
6
6
|
import '../vector-DjhLUrak.js';
|
|
7
7
|
import 'three';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MultidirectionalSpaceShooterCoordinator
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-UKGBQTHL.js";
|
|
4
|
+
import "../chunk-LAN7U3AK.js";
|
|
5
|
+
import "../chunk-2HLZBWGD.js";
|
|
6
|
+
import "../chunk-VJ3UA6OD.js";
|
|
7
|
+
import "../chunk-3X3CL24Z.js";
|
|
8
|
+
import "../chunk-JSBRDJBE.js";
|
|
9
9
|
export {
|
|
10
10
|
MultidirectionalSpaceShooterCoordinator
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=multidirectional-space-shooter.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as TopDownMovementInputComponent } from '../components-XCpL6IYt.js';
|
|
2
2
|
import { Shooter2DSourceEntity, Shooter2DHandle, Shooter2DStageLike } from '../shooter-2d.js';
|
|
3
3
|
import { S as Shooter2DAimFireInput } from '../shooter-fire-DGripl0z.js';
|
|
4
|
-
import '../behavior-system-
|
|
4
|
+
import '../behavior-system-HEt67el5.js';
|
|
5
5
|
import '@zylem/runtime';
|
|
6
6
|
import '../vector-DjhLUrak.js';
|
|
7
7
|
import 'three';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TopDownShooterCoordinator
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-OSPQFWQF.js";
|
|
4
|
+
import "../chunk-LAN7U3AK.js";
|
|
5
|
+
import "../chunk-2HKY6WF7.js";
|
|
6
|
+
import "../chunk-VJ3UA6OD.js";
|
|
7
|
+
import "../chunk-3X3CL24Z.js";
|
|
8
|
+
import "../chunk-JSBRDJBE.js";
|
|
9
9
|
export {
|
|
10
10
|
TopDownShooterCoordinator
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=top-down-shooter.js.map
|
package/dist/core.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as VelocityIntentMode, Z as TransformState, e as BehaviorRuntime, J as StagePose, l as StageBehaviorSnapshot, U as StageThrusterOptions, V as StageTopDownOptions, T as StageShooter2DOptions, R as StageScreenWrapOptions, r as StageBoundaryDimValue, Y as StageWorldBoundaryOptions, N as StageRicochetDimValue, O as StageRicochetOptions, H as StagePlatformer3DOptions, F as StagePlatformer2DOptions, z as StageFirstPersonOptions, y as StageFirstPersonInput, A as StageJumper2DOptions, E as StageJumper3DOptions, a1 as WasmStageRuntime, a2 as WasmStageRuntimeOptions, p as StageBodyKindValue, t as StageColliderShape, L as StageRenderSlot, K as StageRaycastHit, n as StageBodyInfo, u as StageDebugRender } from './behavior-system-
|
|
2
|
-
export { B as BaseBehaviorHandle, a as BehaviorDescriptor, b as BehaviorEntityLink, c as BehaviorHandle, d as BehaviorRef, f as BehaviorSystem, g as BehaviorSystemContext, h as BehaviorSystemFactory, C as CreateEntityFn, D as DefineBehaviorConfig, G as GameEntity, i as GameEntityOptions, S as STAGE_INPUT_BUTTON_JUMP, j as STAGE_INPUT_BUTTON_RUN, k as STAGE_INVALID_SLOT, m as StageBodyConfig, o as StageBodyKind, q as StageBoundaryDim, s as StageColliderConfig, v as StageEvent, w as StageEventType, x as StageEventTypeValue, I as StagePlatformerShapeSource, M as StageRicochetDim, P as StageRicochetReflection, Q as StageRicochetReflectionValue, W as StageTopDownPlane, X as StageTopDownPlaneValue, _ as VelocityIntent, a0 as WasmSnapshotBackref, a3 as createTransformStore, a4 as createWasmStageRuntime, a5 as defineBehavior, a6 as readBehaviorSnapshot, a7 as readStageRenderSlot } from './behavior-system-
|
|
3
|
-
export { P as PhysicsBodyComponent, T as TransformComponent, c as createPhysicsBodyComponent, a as createTransformComponent, u as useBehavior } from './components-
|
|
4
|
-
export { E as EntityWithBody, M as MoveableBodyLike, a as MoveableEntity, V as Vector, g as getPosition, b as getVelocity, m as makeMoveable, c as move, d as moveForwardXY, e as moveX, f as moveXY, h as moveXZ, i as moveY, j as moveZ, r as resetVelocity, s as setPosition, k as setPositionX, l as setPositionY, n as setPositionZ, w as wrapAround3D, o as wrapAroundXY } from './moveable-
|
|
1
|
+
import { $ as VelocityIntentMode, Z as TransformState, e as BehaviorRuntime, J as StagePose, l as StageBehaviorSnapshot, U as StageThrusterOptions, V as StageTopDownOptions, T as StageShooter2DOptions, R as StageScreenWrapOptions, r as StageBoundaryDimValue, Y as StageWorldBoundaryOptions, N as StageRicochetDimValue, O as StageRicochetOptions, H as StagePlatformer3DOptions, F as StagePlatformer2DOptions, z as StageFirstPersonOptions, y as StageFirstPersonInput, A as StageJumper2DOptions, E as StageJumper3DOptions, a1 as WasmStageRuntime, a2 as WasmStageRuntimeOptions, p as StageBodyKindValue, t as StageColliderShape, L as StageRenderSlot, K as StageRaycastHit, n as StageBodyInfo, u as StageDebugRender } from './behavior-system-HEt67el5.js';
|
|
2
|
+
export { B as BaseBehaviorHandle, a as BehaviorDescriptor, b as BehaviorEntityLink, c as BehaviorHandle, d as BehaviorRef, f as BehaviorSystem, g as BehaviorSystemContext, h as BehaviorSystemFactory, C as CreateEntityFn, D as DefineBehaviorConfig, G as GameEntity, i as GameEntityOptions, S as STAGE_INPUT_BUTTON_JUMP, j as STAGE_INPUT_BUTTON_RUN, k as STAGE_INVALID_SLOT, m as StageBodyConfig, o as StageBodyKind, q as StageBoundaryDim, s as StageColliderConfig, v as StageEvent, w as StageEventType, x as StageEventTypeValue, I as StagePlatformerShapeSource, M as StageRicochetDim, P as StageRicochetReflection, Q as StageRicochetReflectionValue, W as StageTopDownPlane, X as StageTopDownPlaneValue, _ as VelocityIntent, a0 as WasmSnapshotBackref, a3 as createTransformStore, a4 as createWasmStageRuntime, a5 as defineBehavior, a6 as readBehaviorSnapshot, a7 as readStageRenderSlot } from './behavior-system-HEt67el5.js';
|
|
3
|
+
export { P as PhysicsBodyComponent, T as TransformComponent, c as createPhysicsBodyComponent, a as createTransformComponent, u as useBehavior } from './components-JZQoO2sU.js';
|
|
4
|
+
export { E as EntityWithBody, M as MoveableBodyLike, a as MoveableEntity, V as Vector, g as getPosition, b as getVelocity, m as makeMoveable, c as move, d as moveForwardXY, e as moveX, f as moveXY, h as moveXZ, i as moveY, j as moveZ, r as resetVelocity, s as setPosition, k as setPositionX, l as setPositionY, n as setPositionZ, w as wrapAround3D, o as wrapAroundXY } from './moveable-BdFmI3s1.js';
|
|
5
5
|
export { V as VEC2_ONE, a as VEC2_ZERO, b as VEC3_ONE, c as VEC3_ZERO, d as Vec2, e as Vec2Components, f as Vec2Input, g as Vec3, h as Vec3Components, i as Vec3Input, j as isVec2Input, k as isVec3Input, n as normalizeVec2, l as normalizeVec3, t as toThreeVector2, m as toThreeVector3 } from './vector-DjhLUrak.js';
|
|
6
6
|
export { S as SyncStateMachine } from './sync-state-machine-CZyspBpj.js';
|
|
7
|
-
export { F as FirstPersonPerspective } from './first-person-perspective-
|
|
7
|
+
export { F as FirstPersonPerspective } from './first-person-perspective-BxFHgFln.js';
|
|
8
8
|
export { ILogger, ITransition, SyncCallback, t } from 'typescript-fsm';
|
|
9
9
|
export { STAGE_EVENT_STRIDE, STAGE_INPUT_STRIDE, STAGE_RENDER_STRIDE, STAGE_SNAPSHOT_STRIDE, StageWasmExports } from '@zylem/runtime';
|
|
10
10
|
import 'three';
|
|
@@ -233,8 +233,20 @@ interface SimulationFrame {
|
|
|
233
233
|
interface SimulationOptions extends WasmStageRuntimeOptions {
|
|
234
234
|
/** Fixed physics timestep in seconds (default 1/60). */
|
|
235
235
|
fixedTimestep?: number;
|
|
236
|
-
/** Max fixed steps per `update()` to avoid death spirals (default
|
|
236
|
+
/** Max fixed steps per `update()` to avoid death spirals (default 2). */
|
|
237
237
|
maxSubSteps?: number;
|
|
238
|
+
/**
|
|
239
|
+
* Rapier contact solver iterations (default 4; auto-drops to 2 when a
|
|
240
|
+
* stage has 512+ dynamic bodies). Lower = faster, less stable stacks.
|
|
241
|
+
*/
|
|
242
|
+
solverIterations?: number;
|
|
243
|
+
/**
|
|
244
|
+
* Sleep activation overrides applied after create. Defaults match the
|
|
245
|
+
* aggressive canSleep policy on newly attached bodies.
|
|
246
|
+
*/
|
|
247
|
+
sleepLinearThreshold?: number;
|
|
248
|
+
sleepAngularThreshold?: number;
|
|
249
|
+
timeUntilSleep?: number;
|
|
238
250
|
}
|
|
239
251
|
/**
|
|
240
252
|
* The behavior world. Construct via {@link createSimulation}.
|
|
@@ -294,6 +306,9 @@ declare class Simulation {
|
|
|
294
306
|
readPreviousRenderSlot(handle: EntityHandle, out?: StageRenderSlot): StageRenderSlot | null;
|
|
295
307
|
readSnapshot(handle: EntityHandle, out?: StageBehaviorSnapshot): StageBehaviorSnapshot | null;
|
|
296
308
|
setGravity(x: number, y: number, z: number): void;
|
|
309
|
+
setSolverIterations(iterations: number): void;
|
|
310
|
+
setSleepThresholds(normalizedLinearThreshold: number, angularThreshold: number, timeUntilSleep: number): void;
|
|
311
|
+
awakeDynamicCount(): number;
|
|
297
312
|
/** Physics raycast; the hit's slot is resolved to an entity handle. */
|
|
298
313
|
castRay(origin: readonly [number, number, number], dir: readonly [number, number, number], maxDistance: number, solidOnly?: boolean): (Omit<StageRaycastHit, 'slot'> & {
|
|
299
314
|
entity: EntityHandle | null;
|
package/dist/core.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createPhysicsBodyComponent,
|
|
3
3
|
createTransformComponent,
|
|
4
4
|
useBehavior
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-K6CWKFHL.js";
|
|
6
6
|
import {
|
|
7
7
|
VEC2_ONE,
|
|
8
8
|
VEC2_ZERO,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
normalizeVec3,
|
|
15
15
|
toThreeVector2,
|
|
16
16
|
toThreeVector3
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LWM346FW.js";
|
|
18
18
|
import {
|
|
19
19
|
SyncStateMachine,
|
|
20
20
|
import_typescript_fsm
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OBF6BIA2.js";
|
|
22
22
|
import {
|
|
23
23
|
STAGE_EVENT_STRIDE,
|
|
24
24
|
STAGE_INPUT_BUTTON_JUMP,
|
|
@@ -38,11 +38,11 @@ import {
|
|
|
38
38
|
createWasmStageRuntime,
|
|
39
39
|
readBehaviorSnapshot,
|
|
40
40
|
readStageRenderSlot
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-GZ3DQIIZ.js";
|
|
42
42
|
import {
|
|
43
43
|
defineBehavior
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
} from "./chunk-YDLO5M7S.js";
|
|
45
|
+
import "./chunk-JSBRDJBE.js";
|
|
46
46
|
|
|
47
47
|
// src/lib/capabilities/transform-store.ts
|
|
48
48
|
import { proxy } from "valtio/vanilla";
|
|
@@ -442,6 +442,16 @@ var Simulation = class {
|
|
|
442
442
|
this.adapter = adapter;
|
|
443
443
|
this.fixedTimestep = options.fixedTimestep ?? DEFAULT_FIXED_TIMESTEP;
|
|
444
444
|
this.maxSubSteps = Math.max(1, options.maxSubSteps ?? DEFAULT_MAX_SUB_STEPS);
|
|
445
|
+
if (options.solverIterations !== void 0) {
|
|
446
|
+
this.adapter.setSolverIterations(options.solverIterations);
|
|
447
|
+
}
|
|
448
|
+
if (options.sleepLinearThreshold !== void 0 || options.sleepAngularThreshold !== void 0 || options.timeUntilSleep !== void 0) {
|
|
449
|
+
this.adapter.setSleepThresholds(
|
|
450
|
+
options.sleepLinearThreshold ?? 0.8,
|
|
451
|
+
options.sleepAngularThreshold ?? 1,
|
|
452
|
+
options.timeUntilSleep ?? 0.5
|
|
453
|
+
);
|
|
454
|
+
}
|
|
445
455
|
}
|
|
446
456
|
// ─── Entity lifecycle ───────────────────────────────────────────────
|
|
447
457
|
/**
|
|
@@ -634,6 +644,19 @@ var Simulation = class {
|
|
|
634
644
|
setGravity(x, y, z) {
|
|
635
645
|
this.adapter.setGravity(x, y, z);
|
|
636
646
|
}
|
|
647
|
+
setSolverIterations(iterations) {
|
|
648
|
+
this.adapter.setSolverIterations(iterations);
|
|
649
|
+
}
|
|
650
|
+
setSleepThresholds(normalizedLinearThreshold, angularThreshold, timeUntilSleep) {
|
|
651
|
+
this.adapter.setSleepThresholds(
|
|
652
|
+
normalizedLinearThreshold,
|
|
653
|
+
angularThreshold,
|
|
654
|
+
timeUntilSleep
|
|
655
|
+
);
|
|
656
|
+
}
|
|
657
|
+
awakeDynamicCount() {
|
|
658
|
+
return this.adapter.awakeDynamicCount();
|
|
659
|
+
}
|
|
637
660
|
/** Physics raycast; the hit's slot is resolved to an entity handle. */
|
|
638
661
|
castRay(origin, dir, maxDistance, solidOnly = true) {
|
|
639
662
|
const hit = this.adapter.castRay(origin, dir, maxDistance, solidOnly);
|
|
@@ -790,4 +813,3 @@ export {
|
|
|
790
813
|
wrapAround3D,
|
|
791
814
|
wrapAroundXY
|
|
792
815
|
};
|
|
793
|
-
//# sourceMappingURL=core.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as BehaviorDescriptor } from './behavior-system-
|
|
1
|
+
import { a as BehaviorDescriptor } from './behavior-system-HEt67el5.js';
|
|
2
2
|
import { Material } from 'three';
|
|
3
3
|
import { FractureOptions, DestructibleMesh } from '@dgreenheck/three-pinata';
|
|
4
4
|
export { DestructibleMesh, FractureOptions, VoronoiOptions } from '@dgreenheck/three-pinata';
|
package/dist/destructible-3d.js
CHANGED
|
@@ -2,13 +2,12 @@ import {
|
|
|
2
2
|
Destructible3DBehavior,
|
|
3
3
|
DestructibleMesh,
|
|
4
4
|
FractureOptions
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-SHZZ2QRV.js";
|
|
6
|
+
import "./chunk-4DVDFCVY.js";
|
|
7
|
+
import "./chunk-YDLO5M7S.js";
|
|
8
|
+
import "./chunk-JSBRDJBE.js";
|
|
9
9
|
export {
|
|
10
10
|
Destructible3DBehavior,
|
|
11
11
|
DestructibleMesh,
|
|
12
12
|
FractureOptions
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=destructible-3d.js.map
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
plainFractureOptionsToPinata,
|
|
9
9
|
plainToBufferGeometry,
|
|
10
10
|
plainWorkerResultToTemplateParts
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-4DVDFCVY.js";
|
|
12
|
+
import "./chunk-JSBRDJBE.js";
|
|
13
13
|
export {
|
|
14
14
|
bufferGeometryToPlain,
|
|
15
15
|
buildFractureGeometryCacheKey,
|
|
@@ -21,4 +21,3 @@ export {
|
|
|
21
21
|
plainToBufferGeometry,
|
|
22
22
|
plainWorkerResultToTemplateParts
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=destructible-prebake.js.map
|
package/dist/{first-person-perspective-C9Mptl0-.d.ts → first-person-perspective-BxFHgFln.d.ts}
RENAMED
|
@@ -18,6 +18,8 @@ interface FirstPersonPerspective {
|
|
|
18
18
|
look(deltaYaw: number, deltaPitch: number): void;
|
|
19
19
|
/** Set absolute yaw and pitch. */
|
|
20
20
|
setLook?(yaw: number, pitch: number): void;
|
|
21
|
+
/** Set eye height above the followed target. */
|
|
22
|
+
setEyeHeight?(height: number): void;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export type { FirstPersonPerspective as F };
|
package/dist/first-person.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { F as FirstPersonInputComponent, b as FirstPersonStateComponent, a as FirstPersonMovementComponent } from './components-qWwOsvwh.js';
|
|
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
|
-
import { Vector3, Euler } from 'three';
|
|
5
|
-
import { F as FirstPersonPerspective } from './first-person-perspective-
|
|
6
|
-
import { Z as TransformState, e as BehaviorRuntime, a as BehaviorDescriptor } from './behavior-system-
|
|
4
|
+
import { Vector3, Euler, Object3D } from 'three';
|
|
5
|
+
import { F as FirstPersonPerspective } from './first-person-perspective-BxFHgFln.js';
|
|
6
|
+
import { Z as TransformState, e as BehaviorRuntime, a as BehaviorDescriptor } from './behavior-system-HEt67el5.js';
|
|
7
7
|
import { i as Vec3Input } from './vector-DjhLUrak.js';
|
|
8
8
|
import 'typescript-fsm';
|
|
9
9
|
import '@zylem/runtime';
|
|
@@ -95,6 +95,12 @@ interface ViewmodelConfig {
|
|
|
95
95
|
offset: Vector3;
|
|
96
96
|
/** Additional rotation applied to the viewmodel in local space (Euler angles in radians). */
|
|
97
97
|
rotation?: Euler;
|
|
98
|
+
/**
|
|
99
|
+
* When set, the viewmodel group is parented to this Object3D (typically the
|
|
100
|
+
* Three.js camera) and kept at the local offset/rotation. This avoids
|
|
101
|
+
* world-space teleport jitter from physics pose sync fighting the camera.
|
|
102
|
+
*/
|
|
103
|
+
cameraObject?: Object3D;
|
|
98
104
|
}
|
|
99
105
|
/**
|
|
100
106
|
* Presentation system driven by runtime pose + snapshot reads.
|
|
@@ -120,6 +126,7 @@ declare class FirstPersonPresentation {
|
|
|
120
126
|
syncEntity(entityUuid: string, runtime: BehaviorRuntime, handle: number, movement: FirstPersonMovementComponent, state: FirstPersonStateComponent | undefined): void;
|
|
121
127
|
/**
|
|
122
128
|
* Position a viewmodel entity relative to the camera's eye position and rotation.
|
|
129
|
+
* Prefer `cameraObject` parenting for jitter-free follow during movement.
|
|
123
130
|
*/
|
|
124
131
|
private positionViewmodel;
|
|
125
132
|
/** Cleanup */
|
|
@@ -145,6 +152,8 @@ interface FirstPersonBehaviorOptions {
|
|
|
145
152
|
entity: any;
|
|
146
153
|
offset: Vec3Input;
|
|
147
154
|
rotation?: Euler;
|
|
155
|
+
/** Parent the viewmodel to this Object3D (e.g. the Three.js camera) for jitter-free follow. */
|
|
156
|
+
cameraObject?: Object3D;
|
|
148
157
|
};
|
|
149
158
|
}
|
|
150
159
|
/**
|
package/dist/first-person.js
CHANGED
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
FirstPersonFSM,
|
|
5
5
|
FirstPersonPresentation,
|
|
6
6
|
FirstPersonState
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CTSYM56P.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-
|
|
17
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-4EWASZHB.js";
|
|
13
|
+
import "./chunk-LWM346FW.js";
|
|
14
|
+
import "./chunk-OBF6BIA2.js";
|
|
15
|
+
import "./chunk-GZ3DQIIZ.js";
|
|
16
|
+
import "./chunk-YDLO5M7S.js";
|
|
17
|
+
import "./chunk-JSBRDJBE.js";
|
|
18
18
|
export {
|
|
19
19
|
FirstPersonBehavior,
|
|
20
20
|
FirstPersonEvent,
|
|
@@ -25,4 +25,3 @@ export {
|
|
|
25
25
|
createFirstPersonMovementComponent,
|
|
26
26
|
createFirstPersonStateComponent
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=first-person.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { a as BehaviorDescriptor, c as BehaviorHandle, d as BehaviorRef, f as BehaviorSystem, h as BehaviorSystemFactory, D as DefineBehaviorConfig, a5 as defineBehavior } from './behavior-system-
|
|
2
|
-
export { P as PhysicsBodyComponent, T as TransformComponent, c as createPhysicsBodyComponent, a as createTransformComponent, u as useBehavior } from './components-
|
|
1
|
+
export { a as BehaviorDescriptor, c as BehaviorHandle, d as BehaviorRef, f as BehaviorSystem, h as BehaviorSystemFactory, D as DefineBehaviorConfig, a5 as defineBehavior } from './behavior-system-HEt67el5.js';
|
|
2
|
+
export { P as PhysicsBodyComponent, T as TransformComponent, c as createPhysicsBodyComponent, a as createTransformComponent, u as useBehavior } from './components-JZQoO2sU.js';
|
|
3
3
|
export { T as ThrusterInputComponent, a as ThrusterMovementComponent, b as ThrusterStateComponent, c as createThrusterInputComponent, d as createThrusterMovementComponent, e as createThrusterStateComponent } from './components-B29WHGQN.js';
|
|
4
4
|
export { PlayerInput, ThrusterBehavior, ThrusterBehaviorOptions, ThrusterEntity, ThrusterEvent, ThrusterFSM, ThrusterFSMContext, ThrusterState } from './thruster.js';
|
|
5
5
|
export { T as TopDownMovementComponent, a as TopDownMovementInputComponent, b as TopDownMovementStateComponent, c as createTopDownMovementComponent, d as createTopDownMovementInputComponent, e as createTopDownMovementStateComponent } from './components-XCpL6IYt.js';
|
|
@@ -29,15 +29,15 @@ export { FirstPersonShooterCoordinator, FirstPersonShooterEntity, FirstPersonSho
|
|
|
29
29
|
export { TopDownShooterCoordinator, TopDownShooterEntity, TopDownShooterInput } from './coordinators/top-down-shooter.js';
|
|
30
30
|
export { MultidirectionalSpaceShooterCoordinator, MultidirectionalSpaceShooterEntity, MultidirectionalSpaceShooterInput } from './coordinators/multidirectional-space-shooter.js';
|
|
31
31
|
export { F as FacingAngle2DEntity, R as ResolvedAim2D, S as Shooter2DAimFireInput, f as fireShooter2DIfRequested, g as getEntityFacingAngle2D, r as resolveAim2D } from './shooter-fire-DGripl0z.js';
|
|
32
|
-
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-
|
|
32
|
+
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-C4Tp-52_.js';
|
|
33
33
|
import '@zylem/runtime';
|
|
34
34
|
import 'three';
|
|
35
35
|
import './sync-state-machine-CZyspBpj.js';
|
|
36
36
|
import 'typescript-fsm';
|
|
37
37
|
import './vector-DjhLUrak.js';
|
|
38
38
|
import './entity-types-DhfsZbSK.js';
|
|
39
|
-
import './first-person-perspective-
|
|
40
|
-
import './moveable-
|
|
39
|
+
import './first-person-perspective-BxFHgFln.js';
|
|
40
|
+
import './moveable-BdFmI3s1.js';
|
|
41
41
|
import 'three/webgpu';
|
|
42
42
|
|
|
43
43
|
/**
|