@zylem/behaviors 0.3.1 → 0.4.1
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-y8SGrGWy.d.ts +580 -0
- package/dist/{chunk-ARJWUNRE.js → chunk-27UPCP5B.js} +10 -10
- package/dist/{chunk-ARJWUNRE.js.map → chunk-27UPCP5B.js.map} +1 -1
- package/dist/{chunk-YUO6SKJD.js → chunk-4L36OPY2.js} +33 -23
- package/dist/chunk-4L36OPY2.js.map +1 -0
- package/dist/{chunk-DYLH6K7B.js → chunk-4WH2ZN7P.js} +1 -1
- package/dist/{chunk-DYLH6K7B.js.map → chunk-4WH2ZN7P.js.map} +1 -1
- package/dist/{chunk-ZPSAXX73.js → chunk-5SM5SH5O.js} +26 -26
- package/dist/chunk-5SM5SH5O.js.map +1 -0
- package/dist/{chunk-STCCNLPC.js → chunk-5XZWTFGF.js} +5 -3
- package/dist/chunk-5XZWTFGF.js.map +1 -0
- package/dist/{chunk-JAN34G6S.js → chunk-67XLJ26X.js} +152 -168
- package/dist/chunk-67XLJ26X.js.map +1 -0
- package/dist/{chunk-2CLT36VB.js → chunk-75FJIUIG.js} +22 -23
- package/dist/chunk-75FJIUIG.js.map +1 -0
- package/dist/{chunk-OYWFPIHF.js → chunk-A4CA35DQ.js} +20 -17
- package/dist/chunk-A4CA35DQ.js.map +1 -0
- package/dist/{chunk-SS7ELMJ7.js → chunk-F72WX4MH.js} +49 -33
- package/dist/chunk-F72WX4MH.js.map +1 -0
- package/dist/{chunk-RTRVBEIB.js → chunk-FTDZAKZW.js} +5 -18
- package/dist/chunk-FTDZAKZW.js.map +1 -0
- package/dist/{chunk-XIJNE67Y.js → chunk-GFARAJV2.js} +3 -5
- package/dist/{chunk-XIJNE67Y.js.map → chunk-GFARAJV2.js.map} +1 -1
- package/dist/{chunk-VAN4WW3F.js → chunk-H4TJ7X4O.js} +4 -7
- package/dist/chunk-H4TJ7X4O.js.map +1 -0
- package/dist/{chunk-KS72RZHX.js → chunk-IZJFUAXB.js} +1 -1
- package/dist/{chunk-KS72RZHX.js.map → chunk-IZJFUAXB.js.map} +1 -1
- package/dist/{chunk-SVLNF434.js → chunk-JXMF4NUI.js} +51 -3
- package/dist/chunk-JXMF4NUI.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-RTVRUNYR.js → chunk-OTLSUYQQ.js} +2 -2
- package/dist/chunk-OTLSUYQQ.js.map +1 -0
- package/dist/{chunk-Y6UJOUE5.js → chunk-Q75LKHDF.js} +14 -2
- package/dist/chunk-Q75LKHDF.js.map +1 -0
- package/dist/{chunk-KOZUNIIE.js → chunk-QDCJLJUV.js} +10 -10
- package/dist/{chunk-KOZUNIIE.js.map → chunk-QDCJLJUV.js.map} +1 -1
- package/dist/{chunk-LD5SMIB3.js → chunk-QVCMJ4Q2.js} +1 -1
- package/dist/{chunk-LD5SMIB3.js.map → chunk-QVCMJ4Q2.js.map} +1 -1
- package/dist/{chunk-F3KRX2V4.js → chunk-RDHSHEZM.js} +46 -24
- package/dist/chunk-RDHSHEZM.js.map +1 -0
- package/dist/chunk-UIG7MWS2.js +518 -0
- package/dist/chunk-UIG7MWS2.js.map +1 -0
- package/dist/{chunk-6C6NXNEW.js → chunk-UL6Q5HDP.js} +25 -3
- package/dist/chunk-UL6Q5HDP.js.map +1 -0
- package/dist/{chunk-XG2YMCJW.js → chunk-VMQHNJJI.js} +6 -8
- package/dist/{chunk-XG2YMCJW.js.map → chunk-VMQHNJJI.js.map} +1 -1
- package/dist/{chunk-GCNRXAKH.js → chunk-XP3ASVGJ.js} +13 -10
- package/dist/chunk-XP3ASVGJ.js.map +1 -0
- package/dist/{chunk-ID5QJYF5.js → chunk-Y7YIAWPW.js} +11 -1
- package/dist/chunk-Y7YIAWPW.js.map +1 -0
- package/dist/{chunk-4I6E6DGV.js → chunk-Z72F2ENM.js} +6 -8
- package/dist/{chunk-4I6E6DGV.js.map → chunk-Z72F2ENM.js.map} +1 -1
- package/dist/{chunk-FPTWVCPN.js → chunk-ZA43LPRM.js} +4 -24
- package/dist/chunk-ZA43LPRM.js.map +1 -0
- package/dist/{chunk-K3UNLQ7W.js → chunk-ZRQWSURL.js} +2 -2
- package/dist/chunk-ZRQWSURL.js.map +1 -0
- package/dist/cooldown.d.ts +2 -1
- package/dist/cooldown.js +1 -1
- package/dist/coordinators/boundary-ricochet-3d.d.ts +12 -5
- package/dist/coordinators/boundary-ricochet-3d.js +2 -1
- package/dist/coordinators/boundary-ricochet.d.ts +9 -7
- package/dist/coordinators/boundary-ricochet.js +2 -1
- package/dist/coordinators/first-person-shooter.d.ts +9 -8
- package/dist/coordinators/first-person-shooter.js +3 -3
- package/dist/coordinators/multidirectional-space-shooter.d.ts +12 -9
- package/dist/coordinators/multidirectional-space-shooter.js +4 -4
- package/dist/coordinators/top-down-shooter.d.ts +9 -8
- package/dist/coordinators/top-down-shooter.js +3 -3
- package/dist/core.d.ts +4 -4
- package/dist/core.js +17 -39
- package/dist/core.js.map +1 -1
- package/dist/destructible-3d.d.ts +2 -1
- package/dist/first-person.d.ts +12 -12
- package/dist/first-person.js +9 -8
- package/dist/index.d.ts +37 -14
- package/dist/index.js +73 -44
- package/dist/jumper-2d.d.ts +7 -6
- package/dist/jumper-2d.js +6 -5
- package/dist/jumper-3d.d.ts +12 -11
- package/dist/jumper-3d.js +7 -6
- package/dist/{moveable-BCRpjAQb.d.ts → moveable-Cl9h-_w7.d.ts} +2 -78
- package/dist/particle-emitter.d.ts +1 -1
- package/dist/particle-emitter.js +1 -1
- package/dist/platformer-2d.d.ts +306 -0
- package/dist/platformer-2d.js +24 -0
- package/dist/platformer-3d.d.ts +74 -87
- package/dist/platformer-3d.js +5 -4
- package/dist/ricochet-2d.d.ts +1 -1
- package/dist/ricochet-2d.js +2 -2
- package/dist/ricochet-3d.d.ts +1 -1
- package/dist/ricochet-3d.js +2 -2
- package/dist/runtime-2d.d.ts +93 -2
- package/dist/runtime-2d.js +145 -22
- package/dist/runtime-2d.js.map +1 -1
- package/dist/screen-visibility.d.ts +2 -1
- package/dist/screen-wrap.d.ts +2 -1
- package/dist/screen-wrap.js +1 -1
- package/dist/shooter-2d.d.ts +5 -3
- package/dist/shooter-2d.js +2 -2
- package/dist/shooter-fire-DGripl0z.d.ts +55 -0
- package/dist/thruster.d.ts +8 -18
- package/dist/thruster.js +6 -6
- package/dist/top-down-movement.d.ts +7 -4
- package/dist/top-down-movement.js +5 -5
- package/dist/{use-behavior-D_82jAL3.d.ts → use-behavior-B85d5u7-.d.ts} +1 -1
- package/dist/world-boundary-2d.d.ts +2 -1
- package/dist/world-boundary-2d.js +2 -2
- package/dist/world-boundary-3d.d.ts +2 -1
- package/dist/world-boundary-3d.js +2 -2
- package/package.json +7 -5
- package/dist/behavior-system-DYbx-x_-.d.ts +0 -307
- package/dist/chunk-2C3Z5GE7.js +0 -176
- package/dist/chunk-2C3Z5GE7.js.map +0 -1
- package/dist/chunk-2CLT36VB.js.map +0 -1
- package/dist/chunk-3PYGRHAL.js +0 -35
- package/dist/chunk-3PYGRHAL.js.map +0 -1
- package/dist/chunk-6C6NXNEW.js.map +0 -1
- package/dist/chunk-F3KRX2V4.js.map +0 -1
- package/dist/chunk-FPTWVCPN.js.map +0 -1
- package/dist/chunk-GCNRXAKH.js.map +0 -1
- package/dist/chunk-ID5QJYF5.js.map +0 -1
- package/dist/chunk-JAN34G6S.js.map +0 -1
- package/dist/chunk-K3UNLQ7W.js.map +0 -1
- package/dist/chunk-OYWFPIHF.js.map +0 -1
- package/dist/chunk-RTRVBEIB.js.map +0 -1
- package/dist/chunk-RTVRUNYR.js.map +0 -1
- package/dist/chunk-SS7ELMJ7.js.map +0 -1
- package/dist/chunk-STCCNLPC.js.map +0 -1
- package/dist/chunk-SVLNF434.js.map +0 -1
- package/dist/chunk-VAN4WW3F.js.map +0 -1
- package/dist/chunk-Y6UJOUE5.js.map +0 -1
- package/dist/chunk-YUO6SKJD.js.map +0 -1
- package/dist/chunk-ZPSAXX73.js.map +0 -1
- package/dist/runtime-pong.d.ts +0 -92
- package/dist/runtime-pong.js +0 -38
- /package/dist/{runtime-pong.js.map → platformer-2d.js.map} +0 -0
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-75FJIUIG.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-A4CA35DQ.js";
|
|
37
41
|
import {
|
|
38
42
|
createTopDownMovementComponent,
|
|
39
43
|
createTopDownMovementInputComponent,
|
|
40
44
|
createTopDownMovementStateComponent
|
|
41
45
|
} from "./chunk-EIWQM6U3.js";
|
|
42
|
-
import "./chunk-
|
|
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-VMQHNJJI.js";
|
|
51
55
|
import {
|
|
52
56
|
WorldBoundary3DBehavior,
|
|
53
57
|
WorldBoundary3DEvent,
|
|
@@ -55,44 +59,57 @@ import {
|
|
|
55
59
|
WorldBoundary3DState,
|
|
56
60
|
computeWorldBoundary3DHits,
|
|
57
61
|
hasAnyWorldBoundary3DHit
|
|
58
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-Z72F2ENM.js";
|
|
59
63
|
import {
|
|
60
64
|
BoundaryRicochetCoordinator
|
|
61
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-XP3ASVGJ.js";
|
|
62
66
|
import "./chunk-KDY5N6J4.js";
|
|
63
67
|
import {
|
|
64
68
|
BoundaryRicochet3DCoordinator
|
|
65
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-KFFETUAL.js";
|
|
66
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
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-UIG7MWS2.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-67XLJ26X.js";
|
|
84
101
|
import {
|
|
85
102
|
Ricochet2DBehavior,
|
|
86
103
|
Ricochet2DEvent,
|
|
87
104
|
Ricochet2DFSM,
|
|
88
105
|
Ricochet2DState
|
|
89
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-QDCJLJUV.js";
|
|
90
107
|
import {
|
|
91
108
|
Ricochet3DBehavior,
|
|
92
109
|
Ricochet3DEvent,
|
|
93
110
|
Ricochet3DFSM,
|
|
94
111
|
Ricochet3DState
|
|
95
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-27UPCP5B.js";
|
|
96
113
|
import {
|
|
97
114
|
ScreenVisibilityBehavior,
|
|
98
115
|
ScreenVisibilityFSM
|
|
@@ -102,7 +119,6 @@ import {
|
|
|
102
119
|
createTransformComponent,
|
|
103
120
|
useBehavior
|
|
104
121
|
} from "./chunk-UYFOLI2X.js";
|
|
105
|
-
import "./chunk-Y6UJOUE5.js";
|
|
106
122
|
import {
|
|
107
123
|
CooldownBehavior,
|
|
108
124
|
fireCooldown,
|
|
@@ -111,7 +127,7 @@ import {
|
|
|
111
127
|
registerCooldown,
|
|
112
128
|
resetCooldown,
|
|
113
129
|
tickCooldowns
|
|
114
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-ZRQWSURL.js";
|
|
115
131
|
import {
|
|
116
132
|
Destructible3DBehavior,
|
|
117
133
|
DestructibleMesh,
|
|
@@ -119,45 +135,46 @@ import {
|
|
|
119
135
|
} from "./chunk-BXP4K7RF.js";
|
|
120
136
|
import "./chunk-HZMY3TT4.js";
|
|
121
137
|
import {
|
|
122
|
-
|
|
123
|
-
FirstPersonControllerBehavior,
|
|
138
|
+
FirstPersonBehavior,
|
|
124
139
|
FirstPersonEvent,
|
|
125
140
|
FirstPersonFSM,
|
|
126
|
-
FirstPersonState
|
|
127
|
-
|
|
141
|
+
FirstPersonState,
|
|
142
|
+
FirstPersonSystem
|
|
143
|
+
} from "./chunk-4L36OPY2.js";
|
|
128
144
|
import {
|
|
129
145
|
createFirstPersonInputComponent,
|
|
130
146
|
createFirstPersonMovementComponent,
|
|
131
147
|
createFirstPersonStateComponent
|
|
132
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-QVCMJ4Q2.js";
|
|
133
149
|
import "./chunk-WWVD5DR5.js";
|
|
134
150
|
import {
|
|
135
|
-
Jumper2D,
|
|
136
151
|
Jumper2DBehavior,
|
|
137
152
|
Jumper2DEvent,
|
|
138
153
|
Jumper2DFSM,
|
|
139
154
|
Jumper2DState,
|
|
155
|
+
Jumper2DSystem,
|
|
140
156
|
Jumper2DTickEvent,
|
|
141
157
|
createJumpConfig2D,
|
|
142
158
|
createJumpInput2D,
|
|
143
159
|
createJumpState2D
|
|
144
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-F72WX4MH.js";
|
|
145
161
|
import {
|
|
146
|
-
Jumper3D,
|
|
147
162
|
Jumper3DBehavior,
|
|
148
163
|
Jumper3DEvent,
|
|
149
164
|
Jumper3DFSM,
|
|
150
165
|
Jumper3DState,
|
|
166
|
+
Jumper3DSystem,
|
|
151
167
|
JumperTickEvent
|
|
152
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-RDHSHEZM.js";
|
|
153
169
|
import {
|
|
154
170
|
createJumpConfig3D,
|
|
155
171
|
createJumpInput3D,
|
|
156
172
|
createJumpState3D
|
|
157
|
-
} from "./chunk-
|
|
158
|
-
import "./chunk-
|
|
159
|
-
import "./chunk-
|
|
173
|
+
} from "./chunk-4WH2ZN7P.js";
|
|
174
|
+
import "./chunk-JXMF4NUI.js";
|
|
175
|
+
import "./chunk-OTLSUYQQ.js";
|
|
160
176
|
import "./chunk-4URF65BR.js";
|
|
177
|
+
import "./chunk-Q75LKHDF.js";
|
|
161
178
|
import {
|
|
162
179
|
defineBehavior
|
|
163
180
|
} from "./chunk-EZNCCO4L.js";
|
|
@@ -167,32 +184,37 @@ export {
|
|
|
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,15 +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
|
};
|
|
263
292
|
//# sourceMappingURL=index.js.map
|
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-y8SGrGWy.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,24 +1,25 @@
|
|
|
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-
|
|
11
|
+
} from "./chunk-F72WX4MH.js";
|
|
12
|
+
import "./chunk-JXMF4NUI.js";
|
|
13
|
+
import "./chunk-OTLSUYQQ.js";
|
|
14
14
|
import "./chunk-4URF65BR.js";
|
|
15
|
+
import "./chunk-Q75LKHDF.js";
|
|
15
16
|
import "./chunk-EZNCCO4L.js";
|
|
16
17
|
export {
|
|
17
|
-
Jumper2D,
|
|
18
18
|
Jumper2DBehavior,
|
|
19
19
|
Jumper2DEvent,
|
|
20
20
|
Jumper2DFSM,
|
|
21
21
|
Jumper2DState,
|
|
22
|
+
Jumper2DSystem,
|
|
22
23
|
Jumper2DTickEvent,
|
|
23
24
|
createJumpConfig2D,
|
|
24
25
|
createJumpInput2D,
|
package/dist/jumper-3d.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { J as JumpConfig3D, b as JumpInput3D, a as JumpContext3D, c as JumpState3D } from './components--hjBMTnz.js';
|
|
2
2
|
export { V as Vec3Like, d as createJumpConfig3D, e as createJumpInput3D, f as createJumpState3D } from './components--hjBMTnz.js';
|
|
3
3
|
import { S as SyncStateMachine } from './sync-state-machine-CZyspBpj.js';
|
|
4
|
-
import
|
|
4
|
+
import * as _dimforge_rapier3d_compat from '@dimforge/rapier3d-compat';
|
|
5
|
+
import { a as BehaviorDescriptor, T as TransformState } from './behavior-system-y8SGrGWy.js';
|
|
5
6
|
import 'typescript-fsm';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -15,7 +16,7 @@ import 'typescript-fsm';
|
|
|
15
16
|
* is configured; otherwise the movement controller owns X/Z.
|
|
16
17
|
*/
|
|
17
18
|
|
|
18
|
-
declare class
|
|
19
|
+
declare class Jumper3DSystem {
|
|
19
20
|
/**
|
|
20
21
|
* Advance the jump system by one frame.
|
|
21
22
|
*
|
|
@@ -116,26 +117,26 @@ interface Jumper3DBehaviorOptions {
|
|
|
116
117
|
}
|
|
117
118
|
interface Jumper3DEntity {
|
|
118
119
|
uuid: string;
|
|
119
|
-
body:
|
|
120
|
-
transformStore:
|
|
120
|
+
body: _dimforge_rapier3d_compat.RigidBody | null;
|
|
121
|
+
transformStore: TransformState;
|
|
121
122
|
jumper: JumpConfig3D;
|
|
122
123
|
$jumper: JumpInput3D;
|
|
123
124
|
jumperState: JumpState3D;
|
|
124
125
|
}
|
|
125
126
|
/**
|
|
126
|
-
*
|
|
127
|
+
* Jumper3DBehavior — composable 3D jump behavior.
|
|
127
128
|
*
|
|
128
129
|
* Provides height-based jumping, multi-jump, coyote time, jump buffering,
|
|
129
130
|
* variable jump height, configurable fall gravity, and optional air control.
|
|
130
131
|
*
|
|
131
|
-
* Designed to compose with any movement controller (e.g.
|
|
132
|
-
* — the controller writes X/Z velocity and
|
|
132
|
+
* Designed to compose with any movement controller (e.g. FirstPersonBehavior)
|
|
133
|
+
* — the controller writes X/Z velocity and Jumper3DBehavior writes Y velocity.
|
|
133
134
|
*
|
|
134
135
|
* @example
|
|
135
136
|
* ```typescript
|
|
136
|
-
* import {
|
|
137
|
+
* import { Jumper3DBehavior } from "@zylem/game-lib/behavior";
|
|
137
138
|
*
|
|
138
|
-
* const jumper = player.use(
|
|
139
|
+
* const jumper = player.use(Jumper3DBehavior, {
|
|
139
140
|
* jumpHeight: 2.5,
|
|
140
141
|
* gravity: 20,
|
|
141
142
|
* maxJumps: 2,
|
|
@@ -154,11 +155,11 @@ interface Jumper3DEntity {
|
|
|
154
155
|
* });
|
|
155
156
|
* ```
|
|
156
157
|
*/
|
|
157
|
-
declare const
|
|
158
|
+
declare const Jumper3DBehavior: BehaviorDescriptor<Jumper3DBehaviorOptions, {
|
|
158
159
|
getState: () => Jumper3DState;
|
|
159
160
|
isJumping: () => boolean;
|
|
160
161
|
getJumpsUsed: () => number;
|
|
161
162
|
getJumpsRemaining: () => number;
|
|
162
163
|
}, Jumper3DEntity>;
|
|
163
164
|
|
|
164
|
-
export { JumpConfig3D, JumpContext3D, JumpInput3D, JumpState3D,
|
|
165
|
+
export { JumpConfig3D, JumpContext3D, JumpInput3D, JumpState3D, Jumper3DBehavior, type Jumper3DBehaviorOptions, type Jumper3DEntity, Jumper3DEvent, Jumper3DFSM, Jumper3DState, Jumper3DSystem, JumperTickEvent, type JumperTickResult };
|
package/dist/jumper-3d.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Jumper3D,
|
|
3
2
|
Jumper3DBehavior,
|
|
4
3
|
Jumper3DEvent,
|
|
5
4
|
Jumper3DFSM,
|
|
6
5
|
Jumper3DState,
|
|
6
|
+
Jumper3DSystem,
|
|
7
7
|
JumperTickEvent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RDHSHEZM.js";
|
|
9
9
|
import {
|
|
10
10
|
createJumpConfig3D,
|
|
11
11
|
createJumpInput3D,
|
|
12
12
|
createJumpState3D
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-4WH2ZN7P.js";
|
|
14
|
+
import "./chunk-JXMF4NUI.js";
|
|
15
|
+
import "./chunk-OTLSUYQQ.js";
|
|
16
16
|
import "./chunk-4URF65BR.js";
|
|
17
|
+
import "./chunk-Q75LKHDF.js";
|
|
17
18
|
import "./chunk-EZNCCO4L.js";
|
|
18
19
|
export {
|
|
19
|
-
Jumper3D,
|
|
20
20
|
Jumper3DBehavior,
|
|
21
21
|
Jumper3DEvent,
|
|
22
22
|
Jumper3DFSM,
|
|
23
23
|
Jumper3DState,
|
|
24
|
+
Jumper3DSystem,
|
|
24
25
|
JumperTickEvent,
|
|
25
26
|
createJumpConfig3D,
|
|
26
27
|
createJumpInput3D,
|
|
@@ -1,82 +1,6 @@
|
|
|
1
1
|
import { Vector3 } from 'three';
|
|
2
2
|
import { RigidBody, Vector } from '@dimforge/rapier3d-compat';
|
|
3
|
-
|
|
4
|
-
type VelocityIntentMode = 'replace' | 'add';
|
|
5
|
-
interface VelocityIntent {
|
|
6
|
-
x?: number;
|
|
7
|
-
y?: number;
|
|
8
|
-
z?: number;
|
|
9
|
-
mode: VelocityIntentMode;
|
|
10
|
-
priority?: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Transform state managed by Valtio for batched physics updates.
|
|
14
|
-
*
|
|
15
|
-
* This store accumulates transformation intents during the frame,
|
|
16
|
-
* then applies them all at once after onUpdate() callbacks complete.
|
|
17
|
-
*
|
|
18
|
-
* Design decisions:
|
|
19
|
-
* - Position: Accumulated deltas (additive)
|
|
20
|
-
* - Rotation: Last value wins (replacement)
|
|
21
|
-
* - Velocity: Accumulated deltas (additive)
|
|
22
|
-
* - Angular velocity: Accumulated deltas (additive)
|
|
23
|
-
*/
|
|
24
|
-
interface TransformState {
|
|
25
|
-
/** Position deltas to be applied (accumulated) */
|
|
26
|
-
position: {
|
|
27
|
-
x: number;
|
|
28
|
-
y: number;
|
|
29
|
-
z: number;
|
|
30
|
-
};
|
|
31
|
-
/** Rotation quaternion (last value wins) */
|
|
32
|
-
rotation: {
|
|
33
|
-
x: number;
|
|
34
|
-
y: number;
|
|
35
|
-
z: number;
|
|
36
|
-
w: number;
|
|
37
|
-
};
|
|
38
|
-
/** Linear velocity (accumulated) */
|
|
39
|
-
velocity: {
|
|
40
|
-
x: number;
|
|
41
|
-
y: number;
|
|
42
|
-
z: number;
|
|
43
|
-
};
|
|
44
|
-
/** Angular velocity (accumulated) */
|
|
45
|
-
angularVelocity: {
|
|
46
|
-
x: number;
|
|
47
|
-
y: number;
|
|
48
|
-
z: number;
|
|
49
|
-
};
|
|
50
|
-
/** Per-source velocity intents composed once per frame */
|
|
51
|
-
velocityChannels: Record<string, VelocityIntent>;
|
|
52
|
-
/** Dirty flags to track what needs to be applied */
|
|
53
|
-
dirty: {
|
|
54
|
-
position: boolean;
|
|
55
|
-
rotation: boolean;
|
|
56
|
-
/** @deprecated Use per-axis velocityX/Y/Z flags for new code */
|
|
57
|
-
velocity: boolean;
|
|
58
|
-
velocityX: boolean;
|
|
59
|
-
velocityY: boolean;
|
|
60
|
-
velocityZ: boolean;
|
|
61
|
-
velocityChannels: boolean;
|
|
62
|
-
angularVelocity: boolean;
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Create a new transform store with optional initial values.
|
|
67
|
-
* The store is a Valtio proxy, making it reactive for debugging/visualization.
|
|
68
|
-
*
|
|
69
|
-
* @param initial Optional initial state values
|
|
70
|
-
* @returns Reactive transform state
|
|
71
|
-
*/
|
|
72
|
-
declare function createTransformStore(initial?: Partial<TransformState>): TransformState;
|
|
73
|
-
/**
|
|
74
|
-
* Reset a transform store to its initial clean state.
|
|
75
|
-
* Called after applying changes to prepare for the next frame.
|
|
76
|
-
*
|
|
77
|
-
* @param store The transform store to reset
|
|
78
|
-
*/
|
|
79
|
-
declare function resetTransformStore(store: TransformState): void;
|
|
3
|
+
import { T as TransformState } from './behavior-system-y8SGrGWy.js';
|
|
80
4
|
|
|
81
5
|
interface EntityWithBody {
|
|
82
6
|
body: RigidBody | null;
|
|
@@ -173,4 +97,4 @@ interface MoveableEntity extends EntityWithBody {
|
|
|
173
97
|
*/
|
|
174
98
|
declare function makeMoveable<T extends EntityWithBody>(entity: T): T & MoveableEntity;
|
|
175
99
|
|
|
176
|
-
export { type EntityWithBody as E, type MoveableEntity as M,
|
|
100
|
+
export { type EntityWithBody as E, type MoveableEntity as M, getVelocity as a, move as b, moveForwardXY as c, moveX as d, moveXY as e, moveXZ as f, getPosition as g, moveY as h, moveZ as i, setPositionX as j, setPositionY as k, setPositionZ as l, makeMoveable as m, wrapAroundXY as n, resetVelocity as r, setPosition as s, wrapAround3D as w };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as BehaviorDescriptor } from './behavior-system-
|
|
1
|
+
import { a as BehaviorDescriptor } from './behavior-system-y8SGrGWy.js';
|
|
2
2
|
import { i as Vec3Input } from './vector-Bm65-FOG.js';
|
|
3
3
|
import { h as ParticlePresetMaterialOptions, P as ParticleEffectDefinition, C as spark, o as ember, p as flamelet, l as blaze, A as smolder, t as mist, E as spray, D as splash, n as drizzle, H as torrent, I as vapor, z as smoke, q as haze, w as plume, s as miasma, B as spark$1, j as arc, G as surge, y as pulse, F as storm, k as arcane, r as holy, m as corrupted, u as nature, J as voidMagic, x as psychic, i as Particles } from './spark-Dx3cJbTW.js';
|
|
4
4
|
export { a as ParticleMagicAgency, b as ParticleMagicAlignment, c as ParticleMagicModifierInput, d as ParticleMagicModifierOptions, e as ParticleMagicOrder, f as ParticleMagicRealityEffect, g as ParticleMagicTemperament, S as SemanticParticlePresetOptions, v as particleEffect } from './spark-Dx3cJbTW.js';
|