@zylem/behaviors 0.4.1 → 0.5.2
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/README.md +13 -1
- package/dist/{behavior-system-y8SGrGWy.d.ts → behavior-system-CldqNUgr.d.ts} +334 -19
- package/dist/{chunk-GFARAJV2.js → chunk-2PAHQZZD.js} +44 -73
- package/dist/chunk-2PAHQZZD.js.map +1 -0
- package/dist/chunk-4CEW64HO.js +210 -0
- package/dist/chunk-4CEW64HO.js.map +1 -0
- package/dist/chunk-4LLK2FJI.js +344 -0
- package/dist/chunk-4LLK2FJI.js.map +1 -0
- package/dist/chunk-4MZ57HPD.js +323 -0
- package/dist/chunk-4MZ57HPD.js.map +1 -0
- package/dist/chunk-52FJIDGL.js +30 -0
- package/dist/chunk-52FJIDGL.js.map +1 -0
- package/dist/{chunk-UYFOLI2X.js → chunk-5A5AYP2C.js} +1 -1
- package/dist/{chunk-UYFOLI2X.js.map → chunk-5A5AYP2C.js.map} +1 -1
- package/dist/chunk-5WRI5ZAA.js +31 -0
- package/dist/chunk-5WRI5ZAA.js.map +1 -0
- package/dist/{chunk-ZRQWSURL.js → chunk-5XPPLTC7.js} +2 -2
- package/dist/chunk-5XPPLTC7.js.map +1 -0
- package/dist/{chunk-VMQHNJJI.js → chunk-7DGXUAPV.js} +17 -23
- package/dist/chunk-7DGXUAPV.js.map +1 -0
- package/dist/{chunk-5SM5SH5O.js → chunk-7JLWZXPA.js} +2 -2
- package/dist/{chunk-QDCJLJUV.js → chunk-7W3KY55G.js} +22 -13
- package/dist/chunk-7W3KY55G.js.map +1 -0
- package/dist/chunk-AS3HR7AS.js +188 -0
- package/dist/chunk-AS3HR7AS.js.map +1 -0
- package/dist/chunk-BAXJ7XHJ.js +155 -0
- package/dist/chunk-BAXJ7XHJ.js.map +1 -0
- package/dist/chunk-DZ4LLQON.js +867 -0
- package/dist/chunk-DZ4LLQON.js.map +1 -0
- package/dist/{chunk-4L36OPY2.js → chunk-G2KUXVU6.js} +81 -135
- package/dist/chunk-G2KUXVU6.js.map +1 -0
- package/dist/{chunk-BXP4K7RF.js → chunk-JVADRLWX.js} +57 -186
- package/dist/chunk-JVADRLWX.js.map +1 -0
- package/dist/{chunk-ZA43LPRM.js → chunk-KIYUUSPK.js} +2 -2
- package/dist/chunk-LZIHSJZR.js +191 -0
- package/dist/chunk-LZIHSJZR.js.map +1 -0
- package/dist/{chunk-WWVD5DR5.js → chunk-M3QDKKDF.js} +2 -8
- package/dist/chunk-M3QDKKDF.js.map +1 -0
- package/dist/{chunk-FTDZAKZW.js → chunk-NQPYMUDF.js} +7 -5
- package/dist/{chunk-FTDZAKZW.js.map → chunk-NQPYMUDF.js.map} +1 -1
- package/dist/{chunk-XP3ASVGJ.js → chunk-NW4SE5XW.js} +2 -2
- package/dist/{chunk-KDY5N6J4.js → chunk-OPZ2LVS2.js} +1 -22
- package/dist/{chunk-KDY5N6J4.js.map → chunk-OPZ2LVS2.js.map} +1 -1
- package/dist/{chunk-5XZWTFGF.js → chunk-PLIXVF7B.js} +3 -3
- package/dist/chunk-PLIXVF7B.js.map +1 -0
- package/dist/{chunk-27UPCP5B.js → chunk-QS3VXWVO.js} +22 -13
- package/dist/chunk-QS3VXWVO.js.map +1 -0
- package/dist/{chunk-Y7YIAWPW.js → chunk-SGHIGTVZ.js} +1 -11
- package/dist/{chunk-Y7YIAWPW.js.map → chunk-SGHIGTVZ.js.map} +1 -1
- package/dist/{chunk-UL6Q5HDP.js → chunk-TBUKJKY6.js} +3 -25
- package/dist/chunk-TBUKJKY6.js.map +1 -0
- package/dist/{chunk-Z72F2ENM.js → chunk-WU6XXL3D.js} +17 -26
- package/dist/chunk-WU6XXL3D.js.map +1 -0
- package/dist/{chunk-A4CA35DQ.js → chunk-Y4PHT2HG.js} +25 -45
- package/dist/chunk-Y4PHT2HG.js.map +1 -0
- package/dist/components-BmievOxF.d.ts +30 -0
- package/dist/cooldown.d.ts +2 -2
- package/dist/cooldown.js +2 -1
- package/dist/coordinators/boundary-ricochet-3d.d.ts +4 -4
- package/dist/coordinators/boundary-ricochet-3d.js +1 -0
- package/dist/coordinators/boundary-ricochet.d.ts +4 -4
- package/dist/coordinators/boundary-ricochet.js +3 -2
- package/dist/coordinators/first-person-shooter.js +1 -0
- package/dist/coordinators/multidirectional-space-shooter.d.ts +3 -3
- package/dist/coordinators/multidirectional-space-shooter.js +5 -3
- package/dist/coordinators/top-down-shooter.d.ts +3 -3
- package/dist/coordinators/top-down-shooter.js +5 -3
- package/dist/core.d.ts +298 -8
- package/dist/core.js +502 -14
- package/dist/core.js.map +1 -1
- package/dist/destructible-3d.d.ts +32 -4
- package/dist/destructible-3d.js +2 -1
- package/dist/destructible-prebake.js +1 -0
- package/dist/{entity-types-CmtQ-IBp.d.ts → entity-types-DhfsZbSK.d.ts} +5 -3
- package/dist/first-person.d.ts +27 -38
- package/dist/first-person.js +8 -8
- package/dist/index.d.ts +14 -15
- package/dist/index.js +38 -53
- package/dist/jumper-2d.d.ts +3 -17
- package/dist/jumper-2d.js +4 -9
- package/dist/jumper-3d.d.ts +5 -39
- package/dist/jumper-3d.js +5 -10
- package/dist/{moveable-Cl9h-_w7.d.ts → moveable-rdIvWiak.d.ts} +21 -4
- package/dist/particle-emitter/presets.js +1 -0
- package/dist/particle-emitter.d.ts +3 -3
- package/dist/particle-emitter.js +3 -2
- package/dist/platformer-2d.d.ts +21 -82
- package/dist/platformer-2d.js +4 -5
- package/dist/platformer-3d.d.ts +21 -78
- package/dist/platformer-3d.js +4 -5
- package/dist/ricochet-2d.d.ts +3 -3
- package/dist/ricochet-2d.js +4 -3
- package/dist/ricochet-3d.d.ts +3 -3
- package/dist/ricochet-3d.js +4 -3
- package/dist/runtime-2d.d.ts +2 -2
- package/dist/runtime-2d.js +1 -0
- package/dist/runtime-2d.js.map +1 -1
- package/dist/screen-visibility.d.ts +2 -2
- package/dist/screen-visibility.js +1 -0
- package/dist/screen-wrap.d.ts +2 -2
- package/dist/screen-wrap.js +4 -3
- package/dist/shooter-2d.d.ts +3 -3
- package/dist/shooter-2d.js +4 -3
- package/dist/thruster.d.ts +5 -34
- package/dist/thruster.js +4 -6
- package/dist/top-down-movement.d.ts +9 -27
- package/dist/top-down-movement.js +6 -6
- package/dist/{vector-Bm65-FOG.d.ts → vector-DjhLUrak.d.ts} +2 -4
- package/dist/world-boundary-2d.d.ts +2 -2
- package/dist/world-boundary-2d.js +5 -4
- package/dist/world-boundary-3d.d.ts +2 -2
- package/dist/world-boundary-3d.js +4 -3
- package/package.json +4 -5
- package/dist/chunk-27UPCP5B.js.map +0 -1
- package/dist/chunk-4L36OPY2.js.map +0 -1
- package/dist/chunk-4URF65BR.js +0 -44
- package/dist/chunk-4URF65BR.js.map +0 -1
- package/dist/chunk-5XZWTFGF.js.map +0 -1
- package/dist/chunk-67XLJ26X.js +0 -536
- package/dist/chunk-67XLJ26X.js.map +0 -1
- package/dist/chunk-75FJIUIG.js +0 -240
- package/dist/chunk-75FJIUIG.js.map +0 -1
- package/dist/chunk-A4CA35DQ.js.map +0 -1
- package/dist/chunk-BXP4K7RF.js.map +0 -1
- package/dist/chunk-F72WX4MH.js +0 -422
- package/dist/chunk-F72WX4MH.js.map +0 -1
- package/dist/chunk-GFARAJV2.js.map +0 -1
- package/dist/chunk-JXMF4NUI.js +0 -309
- package/dist/chunk-JXMF4NUI.js.map +0 -1
- package/dist/chunk-OTLSUYQQ.js +0 -29
- package/dist/chunk-OTLSUYQQ.js.map +0 -1
- package/dist/chunk-Q75LKHDF.js +0 -56
- package/dist/chunk-Q75LKHDF.js.map +0 -1
- package/dist/chunk-QDCJLJUV.js.map +0 -1
- package/dist/chunk-RDHSHEZM.js +0 -479
- package/dist/chunk-RDHSHEZM.js.map +0 -1
- package/dist/chunk-UIG7MWS2.js +0 -518
- package/dist/chunk-UIG7MWS2.js.map +0 -1
- package/dist/chunk-UL6Q5HDP.js.map +0 -1
- package/dist/chunk-VMQHNJJI.js.map +0 -1
- package/dist/chunk-WWVD5DR5.js.map +0 -1
- package/dist/chunk-Z72F2ENM.js.map +0 -1
- package/dist/chunk-ZRQWSURL.js.map +0 -1
- package/dist/components-BWG1GkZA.d.ts +0 -20
- package/dist/use-behavior-B85d5u7-.d.ts +0 -13
- /package/dist/{chunk-5SM5SH5O.js.map → chunk-7JLWZXPA.js.map} +0 -0
- /package/dist/{chunk-ZA43LPRM.js.map → chunk-KIYUUSPK.js.map} +0 -0
- /package/dist/{chunk-XP3ASVGJ.js.map → chunk-NW4SE5XW.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -3,47 +3,47 @@ import {
|
|
|
3
3
|
} from "./chunk-H4TJ7X4O.js";
|
|
4
4
|
import {
|
|
5
5
|
MultidirectionalSpaceShooterCoordinator
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NQPYMUDF.js";
|
|
7
7
|
import {
|
|
8
8
|
TopDownShooterCoordinator
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KIYUUSPK.js";
|
|
10
10
|
import {
|
|
11
|
-
fireShooter2DIfRequested
|
|
12
|
-
|
|
13
|
-
resolveAim2D
|
|
14
|
-
} from "./chunk-UL6Q5HDP.js";
|
|
11
|
+
fireShooter2DIfRequested
|
|
12
|
+
} from "./chunk-52FJIDGL.js";
|
|
15
13
|
import {
|
|
16
14
|
ScreenWrapBehavior,
|
|
17
15
|
ScreenWrapEvent,
|
|
18
16
|
ScreenWrapFSM,
|
|
19
17
|
ScreenWrapState
|
|
20
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2PAHQZZD.js";
|
|
21
19
|
import {
|
|
22
20
|
Shooter2DBehavior,
|
|
23
21
|
createShooter2DStateComponent
|
|
24
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-PLIXVF7B.js";
|
|
25
23
|
import {
|
|
26
24
|
ThrusterBehavior,
|
|
27
25
|
ThrusterEvent,
|
|
28
26
|
ThrusterFSM,
|
|
29
|
-
ThrusterState
|
|
30
|
-
|
|
31
|
-
} from "./chunk-75FJIUIG.js";
|
|
27
|
+
ThrusterState
|
|
28
|
+
} from "./chunk-BAXJ7XHJ.js";
|
|
32
29
|
import {
|
|
33
30
|
createThrusterInputComponent,
|
|
34
31
|
createThrusterMovementComponent,
|
|
35
32
|
createThrusterStateComponent
|
|
36
33
|
} from "./chunk-IZJFUAXB.js";
|
|
37
34
|
import {
|
|
38
|
-
TopDownMovementBehavior
|
|
39
|
-
|
|
40
|
-
} from "./chunk-A4CA35DQ.js";
|
|
35
|
+
TopDownMovementBehavior
|
|
36
|
+
} from "./chunk-Y4PHT2HG.js";
|
|
41
37
|
import {
|
|
42
38
|
createTopDownMovementComponent,
|
|
43
39
|
createTopDownMovementInputComponent,
|
|
44
40
|
createTopDownMovementStateComponent
|
|
45
41
|
} from "./chunk-EIWQM6U3.js";
|
|
46
|
-
import
|
|
42
|
+
import {
|
|
43
|
+
getEntityFacingAngle2D,
|
|
44
|
+
resolveAim2D
|
|
45
|
+
} from "./chunk-TBUKJKY6.js";
|
|
46
|
+
import "./chunk-SGHIGTVZ.js";
|
|
47
47
|
import {
|
|
48
48
|
WorldBoundary2DBehavior,
|
|
49
49
|
WorldBoundary2DEvent,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
WorldBoundary2DState,
|
|
52
52
|
computeWorldBoundary2DHits,
|
|
53
53
|
hasAnyWorldBoundary2DHit
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-7DGXUAPV.js";
|
|
55
55
|
import {
|
|
56
56
|
WorldBoundary3DBehavior,
|
|
57
57
|
WorldBoundary3DEvent,
|
|
@@ -59,11 +59,11 @@ import {
|
|
|
59
59
|
WorldBoundary3DState,
|
|
60
60
|
computeWorldBoundary3DHits,
|
|
61
61
|
hasAnyWorldBoundary3DHit
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-WU6XXL3D.js";
|
|
63
63
|
import {
|
|
64
64
|
BoundaryRicochetCoordinator
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-NW4SE5XW.js";
|
|
66
|
+
import "./chunk-OPZ2LVS2.js";
|
|
67
67
|
import {
|
|
68
68
|
BoundaryRicochet3DCoordinator
|
|
69
69
|
} from "./chunk-KFFETUAL.js";
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
import {
|
|
75
75
|
ParticleEmitterBehavior,
|
|
76
76
|
particlePresets
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-7JLWZXPA.js";
|
|
78
78
|
import {
|
|
79
79
|
particleEffect
|
|
80
80
|
} from "./chunk-7JJEIADR.js";
|
|
@@ -83,33 +83,31 @@ import {
|
|
|
83
83
|
Platformer2DEvent,
|
|
84
84
|
Platformer2DFSM,
|
|
85
85
|
Platformer2DState,
|
|
86
|
-
Platformer2DSystem,
|
|
87
86
|
createPlatformer2DInputComponent,
|
|
88
87
|
createPlatformer2DMovementComponent,
|
|
89
88
|
createPlatformer2DStateComponent
|
|
90
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-4MZ57HPD.js";
|
|
91
90
|
import {
|
|
92
91
|
Platformer3DBehavior,
|
|
93
92
|
Platformer3DEvent,
|
|
94
93
|
Platformer3DFSM,
|
|
95
94
|
Platformer3DState,
|
|
96
|
-
Platformer3DSystem,
|
|
97
95
|
createPlatformer3DInputComponent,
|
|
98
96
|
createPlatformer3DMovementComponent,
|
|
99
97
|
createPlatformer3DStateComponent
|
|
100
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-4LLK2FJI.js";
|
|
101
99
|
import {
|
|
102
100
|
Ricochet2DBehavior,
|
|
103
101
|
Ricochet2DEvent,
|
|
104
102
|
Ricochet2DFSM,
|
|
105
103
|
Ricochet2DState
|
|
106
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-7W3KY55G.js";
|
|
107
105
|
import {
|
|
108
106
|
Ricochet3DBehavior,
|
|
109
107
|
Ricochet3DEvent,
|
|
110
108
|
Ricochet3DFSM,
|
|
111
109
|
Ricochet3DState
|
|
112
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-QS3VXWVO.js";
|
|
113
111
|
import {
|
|
114
112
|
ScreenVisibilityBehavior,
|
|
115
113
|
ScreenVisibilityFSM
|
|
@@ -118,7 +116,7 @@ import {
|
|
|
118
116
|
createPhysicsBodyComponent,
|
|
119
117
|
createTransformComponent,
|
|
120
118
|
useBehavior
|
|
121
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-5A5AYP2C.js";
|
|
122
120
|
import {
|
|
123
121
|
CooldownBehavior,
|
|
124
122
|
fireCooldown,
|
|
@@ -127,57 +125,52 @@ import {
|
|
|
127
125
|
registerCooldown,
|
|
128
126
|
resetCooldown,
|
|
129
127
|
tickCooldowns
|
|
130
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-5XPPLTC7.js";
|
|
131
129
|
import {
|
|
132
130
|
Destructible3DBehavior,
|
|
133
131
|
DestructibleMesh,
|
|
134
132
|
FractureOptions
|
|
135
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-JVADRLWX.js";
|
|
136
134
|
import "./chunk-HZMY3TT4.js";
|
|
137
135
|
import {
|
|
138
136
|
FirstPersonBehavior,
|
|
139
137
|
FirstPersonEvent,
|
|
140
138
|
FirstPersonFSM,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
} from "./chunk-
|
|
139
|
+
FirstPersonPresentation,
|
|
140
|
+
FirstPersonState
|
|
141
|
+
} from "./chunk-G2KUXVU6.js";
|
|
144
142
|
import {
|
|
145
143
|
createFirstPersonInputComponent,
|
|
146
144
|
createFirstPersonMovementComponent,
|
|
147
145
|
createFirstPersonStateComponent
|
|
148
146
|
} from "./chunk-QVCMJ4Q2.js";
|
|
149
|
-
import "./chunk-
|
|
147
|
+
import "./chunk-M3QDKKDF.js";
|
|
150
148
|
import {
|
|
151
149
|
Jumper2DBehavior,
|
|
152
150
|
Jumper2DEvent,
|
|
153
151
|
Jumper2DFSM,
|
|
154
152
|
Jumper2DState,
|
|
155
|
-
Jumper2DSystem,
|
|
156
|
-
Jumper2DTickEvent,
|
|
157
153
|
createJumpConfig2D,
|
|
158
154
|
createJumpInput2D,
|
|
159
155
|
createJumpState2D
|
|
160
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-4CEW64HO.js";
|
|
161
157
|
import {
|
|
162
158
|
Jumper3DBehavior,
|
|
163
159
|
Jumper3DEvent,
|
|
164
160
|
Jumper3DFSM,
|
|
165
|
-
Jumper3DState
|
|
166
|
-
|
|
167
|
-
JumperTickEvent
|
|
168
|
-
} from "./chunk-RDHSHEZM.js";
|
|
161
|
+
Jumper3DState
|
|
162
|
+
} from "./chunk-LZIHSJZR.js";
|
|
169
163
|
import {
|
|
170
164
|
createJumpConfig3D,
|
|
171
165
|
createJumpInput3D,
|
|
172
166
|
createJumpState3D
|
|
173
167
|
} from "./chunk-4WH2ZN7P.js";
|
|
174
|
-
import "./chunk-
|
|
175
|
-
import "./chunk-
|
|
176
|
-
import "./chunk-4URF65BR.js";
|
|
177
|
-
import "./chunk-Q75LKHDF.js";
|
|
168
|
+
import "./chunk-AS3HR7AS.js";
|
|
169
|
+
import "./chunk-DZ4LLQON.js";
|
|
178
170
|
import {
|
|
179
171
|
defineBehavior
|
|
180
172
|
} from "./chunk-EZNCCO4L.js";
|
|
173
|
+
import "./chunk-5WRI5ZAA.js";
|
|
181
174
|
export {
|
|
182
175
|
BoundaryRicochet3DCoordinator,
|
|
183
176
|
BoundaryRicochetCoordinator,
|
|
@@ -187,34 +180,28 @@ export {
|
|
|
187
180
|
FirstPersonBehavior,
|
|
188
181
|
FirstPersonEvent,
|
|
189
182
|
FirstPersonFSM,
|
|
183
|
+
FirstPersonPresentation,
|
|
190
184
|
FirstPersonShooterCoordinator,
|
|
191
185
|
FirstPersonState,
|
|
192
|
-
FirstPersonSystem,
|
|
193
186
|
FractureOptions,
|
|
194
187
|
Jumper2DBehavior,
|
|
195
188
|
Jumper2DEvent,
|
|
196
189
|
Jumper2DFSM,
|
|
197
190
|
Jumper2DState,
|
|
198
|
-
Jumper2DSystem,
|
|
199
|
-
Jumper2DTickEvent,
|
|
200
191
|
Jumper3DBehavior,
|
|
201
192
|
Jumper3DEvent,
|
|
202
193
|
Jumper3DFSM,
|
|
203
194
|
Jumper3DState,
|
|
204
|
-
Jumper3DSystem,
|
|
205
|
-
JumperTickEvent,
|
|
206
195
|
MultidirectionalSpaceShooterCoordinator,
|
|
207
196
|
ParticleEmitterBehavior,
|
|
208
197
|
Platformer2DBehavior,
|
|
209
198
|
Platformer2DEvent,
|
|
210
199
|
Platformer2DFSM,
|
|
211
200
|
Platformer2DState,
|
|
212
|
-
Platformer2DSystem,
|
|
213
201
|
Platformer3DBehavior,
|
|
214
202
|
Platformer3DEvent,
|
|
215
203
|
Platformer3DFSM,
|
|
216
204
|
Platformer3DState,
|
|
217
|
-
Platformer3DSystem,
|
|
218
205
|
Ricochet2DBehavior,
|
|
219
206
|
Ricochet2DEvent,
|
|
220
207
|
Ricochet2DFSM,
|
|
@@ -234,9 +221,7 @@ export {
|
|
|
234
221
|
ThrusterEvent,
|
|
235
222
|
ThrusterFSM,
|
|
236
223
|
ThrusterState,
|
|
237
|
-
ThrusterSystem,
|
|
238
224
|
TopDownMovementBehavior,
|
|
239
|
-
TopDownMovementSystem,
|
|
240
225
|
TopDownShooterCoordinator,
|
|
241
226
|
WorldBoundary2DBehavior,
|
|
242
227
|
WorldBoundary2DEvent,
|
package/dist/jumper-2d.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { S as SyncStateMachine } from './sync-state-machine-CZyspBpj.js';
|
|
2
|
-
import
|
|
3
|
-
import { a as BehaviorDescriptor, T as TransformState } from './behavior-system-y8SGrGWy.js';
|
|
2
|
+
import { a as BehaviorDescriptor, Z as TransformState } from './behavior-system-CldqNUgr.js';
|
|
4
3
|
import 'typescript-fsm';
|
|
4
|
+
import '@zylem/runtime';
|
|
5
5
|
|
|
6
6
|
interface JumpConfig2D {
|
|
7
7
|
jumpHeight: number;
|
|
@@ -44,19 +44,6 @@ interface JumpState2D {
|
|
|
44
44
|
}
|
|
45
45
|
declare function createJumpState2D(): JumpState2D;
|
|
46
46
|
|
|
47
|
-
declare enum Jumper2DTickEvent {
|
|
48
|
-
None = "none",
|
|
49
|
-
Jump = "jump",
|
|
50
|
-
Fall = "fall",
|
|
51
|
-
Land = "land"
|
|
52
|
-
}
|
|
53
|
-
interface Jumper2DTickResult {
|
|
54
|
-
event: Jumper2DTickEvent;
|
|
55
|
-
}
|
|
56
|
-
declare class Jumper2DSystem {
|
|
57
|
-
tick(config: JumpConfig2D, input: JumpInput2D, ctx: JumpContext2D, state: JumpState2D): Jumper2DTickResult;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
47
|
declare enum Jumper2DState {
|
|
61
48
|
Grounded = "grounded",
|
|
62
49
|
Jumping = "jumping",
|
|
@@ -98,7 +85,6 @@ interface Jumper2DBehaviorOptions {
|
|
|
98
85
|
}
|
|
99
86
|
interface Jumper2DEntity {
|
|
100
87
|
uuid: string;
|
|
101
|
-
body: _dimforge_rapier3d_compat.RigidBody | null;
|
|
102
88
|
transformStore: TransformState;
|
|
103
89
|
jumper2d: JumpConfig2D;
|
|
104
90
|
$jumper2d: JumpInput2D;
|
|
@@ -111,4 +97,4 @@ declare const Jumper2DBehavior: BehaviorDescriptor<Jumper2DBehaviorOptions, {
|
|
|
111
97
|
getJumpsRemaining: () => number;
|
|
112
98
|
}, Jumper2DEntity>;
|
|
113
99
|
|
|
114
|
-
export { type JumpConfig2D, type JumpContext2D, type JumpInput2D, type JumpState2D, Jumper2DBehavior, type Jumper2DBehaviorOptions, type Jumper2DEntity, Jumper2DEvent, Jumper2DFSM, Jumper2DState,
|
|
100
|
+
export { type JumpConfig2D, type JumpContext2D, type JumpInput2D, type JumpState2D, Jumper2DBehavior, type Jumper2DBehaviorOptions, type Jumper2DEntity, Jumper2DEvent, Jumper2DFSM, Jumper2DState, createJumpConfig2D, createJumpInput2D, createJumpState2D };
|
package/dist/jumper-2d.js
CHANGED
|
@@ -3,24 +3,19 @@ import {
|
|
|
3
3
|
Jumper2DEvent,
|
|
4
4
|
Jumper2DFSM,
|
|
5
5
|
Jumper2DState,
|
|
6
|
-
Jumper2DSystem,
|
|
7
|
-
Jumper2DTickEvent,
|
|
8
6
|
createJumpConfig2D,
|
|
9
7
|
createJumpInput2D,
|
|
10
8
|
createJumpState2D
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-4URF65BR.js";
|
|
15
|
-
import "./chunk-Q75LKHDF.js";
|
|
9
|
+
} from "./chunk-4CEW64HO.js";
|
|
10
|
+
import "./chunk-AS3HR7AS.js";
|
|
11
|
+
import "./chunk-DZ4LLQON.js";
|
|
16
12
|
import "./chunk-EZNCCO4L.js";
|
|
13
|
+
import "./chunk-5WRI5ZAA.js";
|
|
17
14
|
export {
|
|
18
15
|
Jumper2DBehavior,
|
|
19
16
|
Jumper2DEvent,
|
|
20
17
|
Jumper2DFSM,
|
|
21
18
|
Jumper2DState,
|
|
22
|
-
Jumper2DSystem,
|
|
23
|
-
Jumper2DTickEvent,
|
|
24
19
|
createJumpConfig2D,
|
|
25
20
|
createJumpInput2D,
|
|
26
21
|
createJumpState2D
|
package/dist/jumper-3d.d.ts
CHANGED
|
@@ -1,42 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { V as Vec3Like, d as createJumpConfig3D, e as createJumpInput3D, f as createJumpState3D } from './components--hjBMTnz.js';
|
|
1
|
+
import { c as JumpState3D, J as JumpConfig3D, b as JumpInput3D } from './components--hjBMTnz.js';
|
|
2
|
+
export { a as JumpContext3D, 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
|
|
5
|
-
import { a as BehaviorDescriptor, T as TransformState } from './behavior-system-y8SGrGWy.js';
|
|
4
|
+
import { a as BehaviorDescriptor, Z as TransformState } from './behavior-system-CldqNUgr.js';
|
|
6
5
|
import 'typescript-fsm';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Jumper 3D Behavior — Pure Jump Physics
|
|
10
|
-
*
|
|
11
|
-
* A stateless tick function that receives configuration, input, context, and
|
|
12
|
-
* state, then applies jump physics through the context's velocity helpers.
|
|
13
|
-
*
|
|
14
|
-
* Vertical velocity (Y) is owned exclusively by this behavior.
|
|
15
|
-
* Horizontal velocity (X/Z) is only touched when airborne planar control
|
|
16
|
-
* is configured; otherwise the movement controller owns X/Z.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
declare class Jumper3DSystem {
|
|
20
|
-
/**
|
|
21
|
-
* Advance the jump system by one frame.
|
|
22
|
-
*
|
|
23
|
-
* Call order within a frame:
|
|
24
|
-
* 1. Movement controller writes X/Z via transformStore.dirty.velocityX/Z.
|
|
25
|
-
* 2. `tick()` writes Y via ctx.setVerticalVelocity().
|
|
26
|
-
* (Optionally writes X/Z when airborne planar control is active.)
|
|
27
|
-
*/
|
|
28
|
-
tick(config: JumpConfig3D, input: JumpInput3D, ctx: JumpContext3D, state: JumpState3D): JumperTickResult;
|
|
29
|
-
}
|
|
30
|
-
/** Events emitted by a single tick (used by FSM). */
|
|
31
|
-
declare enum JumperTickEvent {
|
|
32
|
-
None = "none",
|
|
33
|
-
Jump = "jump",
|
|
34
|
-
Fall = "fall",
|
|
35
|
-
Land = "land"
|
|
36
|
-
}
|
|
37
|
-
interface JumperTickResult {
|
|
38
|
-
event: JumperTickEvent;
|
|
39
|
-
}
|
|
6
|
+
import '@zylem/runtime';
|
|
40
7
|
|
|
41
8
|
/**
|
|
42
9
|
* Jumper 3D Finite State Machine
|
|
@@ -117,7 +84,6 @@ interface Jumper3DBehaviorOptions {
|
|
|
117
84
|
}
|
|
118
85
|
interface Jumper3DEntity {
|
|
119
86
|
uuid: string;
|
|
120
|
-
body: _dimforge_rapier3d_compat.RigidBody | null;
|
|
121
87
|
transformStore: TransformState;
|
|
122
88
|
jumper: JumpConfig3D;
|
|
123
89
|
$jumper: JumpInput3D;
|
|
@@ -162,4 +128,4 @@ declare const Jumper3DBehavior: BehaviorDescriptor<Jumper3DBehaviorOptions, {
|
|
|
162
128
|
getJumpsRemaining: () => number;
|
|
163
129
|
}, Jumper3DEntity>;
|
|
164
130
|
|
|
165
|
-
export { JumpConfig3D,
|
|
131
|
+
export { JumpConfig3D, JumpInput3D, JumpState3D, Jumper3DBehavior, type Jumper3DBehaviorOptions, type Jumper3DEntity, Jumper3DEvent, Jumper3DFSM, Jumper3DState };
|
package/dist/jumper-3d.js
CHANGED
|
@@ -2,27 +2,22 @@ import {
|
|
|
2
2
|
Jumper3DBehavior,
|
|
3
3
|
Jumper3DEvent,
|
|
4
4
|
Jumper3DFSM,
|
|
5
|
-
Jumper3DState
|
|
6
|
-
|
|
7
|
-
JumperTickEvent
|
|
8
|
-
} from "./chunk-RDHSHEZM.js";
|
|
5
|
+
Jumper3DState
|
|
6
|
+
} from "./chunk-LZIHSJZR.js";
|
|
9
7
|
import {
|
|
10
8
|
createJumpConfig3D,
|
|
11
9
|
createJumpInput3D,
|
|
12
10
|
createJumpState3D
|
|
13
11
|
} from "./chunk-4WH2ZN7P.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-4URF65BR.js";
|
|
17
|
-
import "./chunk-Q75LKHDF.js";
|
|
12
|
+
import "./chunk-AS3HR7AS.js";
|
|
13
|
+
import "./chunk-DZ4LLQON.js";
|
|
18
14
|
import "./chunk-EZNCCO4L.js";
|
|
15
|
+
import "./chunk-5WRI5ZAA.js";
|
|
19
16
|
export {
|
|
20
17
|
Jumper3DBehavior,
|
|
21
18
|
Jumper3DEvent,
|
|
22
19
|
Jumper3DFSM,
|
|
23
20
|
Jumper3DState,
|
|
24
|
-
Jumper3DSystem,
|
|
25
|
-
JumperTickEvent,
|
|
26
21
|
createJumpConfig3D,
|
|
27
22
|
createJumpInput3D,
|
|
28
23
|
createJumpState3D
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
import { Vector3 } from 'three';
|
|
2
|
-
import {
|
|
3
|
-
import { T as TransformState } from './behavior-system-y8SGrGWy.js';
|
|
2
|
+
import { Z as TransformState } from './behavior-system-CldqNUgr.js';
|
|
4
3
|
|
|
4
|
+
/** Plain `{ x, y, z }` vector returned by pose/velocity reads. */
|
|
5
|
+
interface Vector {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
z: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Structural slice of the host body reference used by the direct-body helpers
|
|
12
|
+
* below (`getPosition`, `setPosition`, `resetVelocity`, ...). The host's
|
|
13
|
+
* runtime-backed body proxy satisfies this shape.
|
|
14
|
+
*/
|
|
15
|
+
interface MoveableBodyLike {
|
|
16
|
+
translation(): Vector;
|
|
17
|
+
linvel(): Vector;
|
|
18
|
+
setTranslation(translation: Vector, wakeUp: boolean): void;
|
|
19
|
+
setLinvel(velocity: Vector, wakeUp: boolean): void;
|
|
20
|
+
setLinearDamping(damping: number): void;
|
|
21
|
+
}
|
|
5
22
|
interface EntityWithBody {
|
|
6
|
-
body:
|
|
23
|
+
body: MoveableBodyLike | null;
|
|
7
24
|
transformStore?: TransformState;
|
|
8
25
|
}
|
|
9
26
|
/**
|
|
@@ -97,4 +114,4 @@ interface MoveableEntity extends EntityWithBody {
|
|
|
97
114
|
*/
|
|
98
115
|
declare function makeMoveable<T extends EntityWithBody>(entity: T): T & MoveableEntity;
|
|
99
116
|
|
|
100
|
-
export { type EntityWithBody as E, type
|
|
117
|
+
export { type EntityWithBody as E, type MoveableBodyLike as M, type Vector as V, type MoveableEntity as a, getVelocity as b, move as c, moveForwardXY as d, moveX as e, moveXY as f, getPosition as g, moveXZ as h, moveY as i, moveZ as j, setPositionX as k, setPositionY as l, makeMoveable as m, setPositionZ as n, wrapAroundXY as o, resetVelocity as r, setPosition as s, wrapAround3D as w };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as BehaviorDescriptor } from './behavior-system-
|
|
2
|
-
import { i as Vec3Input } from './vector-
|
|
1
|
+
import { a as BehaviorDescriptor } from './behavior-system-CldqNUgr.js';
|
|
2
|
+
import { i as Vec3Input } from './vector-DjhLUrak.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';
|
|
5
5
|
import { ColorRepresentation } from 'three';
|
|
6
|
-
import '@
|
|
6
|
+
import '@zylem/runtime';
|
|
7
7
|
import 'three/webgpu';
|
|
8
8
|
|
|
9
9
|
interface BurstParticlePresetOptions extends ParticlePresetMaterialOptions {
|
package/dist/particle-emitter.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ParticleEmitterBehavior,
|
|
3
3
|
particlePresets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7JLWZXPA.js";
|
|
5
5
|
import {
|
|
6
6
|
particleEffect
|
|
7
7
|
} from "./chunk-7JJEIADR.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-M3QDKKDF.js";
|
|
9
9
|
import "./chunk-EZNCCO4L.js";
|
|
10
|
+
import "./chunk-5WRI5ZAA.js";
|
|
10
11
|
export {
|
|
11
12
|
ParticleEmitterBehavior,
|
|
12
13
|
particleEffect,
|
package/dist/platformer-2d.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { S as SyncStateMachine } from './sync-state-machine-CZyspBpj.js';
|
|
2
|
-
import {
|
|
3
|
-
import { Z as ZylemWorld, a as BehaviorDescriptor } from './behavior-system-y8SGrGWy.js';
|
|
2
|
+
import { a as BehaviorDescriptor } from './behavior-system-CldqNUgr.js';
|
|
4
3
|
import 'typescript-fsm';
|
|
4
|
+
import '@zylem/runtime';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Platformer 2D Components
|
|
@@ -153,85 +153,6 @@ declare class Platformer2DFSM {
|
|
|
153
153
|
update(input: Platformer2DInputComponent, state: Platformer2DStateComponent): void;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
/**
|
|
157
|
-
* Platformer 2D System
|
|
158
|
-
*
|
|
159
|
-
* Kinematic character controller (SNES-style) on the X/Y plane: the
|
|
160
|
-
* controller owns all motion and physics is only a collision database.
|
|
161
|
-
*
|
|
162
|
-
* - The entity's body is converted to `KinematicPositionBased` on first
|
|
163
|
-
* update; Rapier never applies forces to it.
|
|
164
|
-
* - Each tick, desired displacement (X input + integrated vertical velocity,
|
|
165
|
-
* z locked to 0) is run through Rapier's `KinematicCharacterController`
|
|
166
|
-
* (collide-and-slide with autostep, slope limits, and snap-to-ground) and
|
|
167
|
-
* the corrected movement is applied via `setNextKinematicTranslation`. The
|
|
168
|
-
* z coordinate is re-pinned to its first-seen value every tick so slide
|
|
169
|
-
* resolution can never drift the entity off the 2D plane.
|
|
170
|
-
* - Grounded comes from `controller.computedGrounded()` — no contact-pair or
|
|
171
|
-
* raycast probing.
|
|
172
|
-
* - Vertical velocity lives in `state.verticalVelocity` (`linvel()` is
|
|
173
|
-
* meaningless on kinematic bodies). Jump buffering, coyote time,
|
|
174
|
-
* multi-jump, and the jump-cut ramp all operate on that field.
|
|
175
|
-
*/
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Entity with 2D platformer components
|
|
179
|
-
*/
|
|
180
|
-
interface Platformer2DEntity {
|
|
181
|
-
uuid: string;
|
|
182
|
-
body: RigidBody;
|
|
183
|
-
collider?: Collider | null;
|
|
184
|
-
platformer2D: Platformer2DMovementComponent;
|
|
185
|
-
$platformer2D: Platformer2DInputComponent;
|
|
186
|
-
platformer2DState: Platformer2DStateComponent;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Platformer 2D movement system.
|
|
190
|
-
*
|
|
191
|
-
* Core kinematic controller for 2D platformer movement. Requires a live
|
|
192
|
-
* `ZylemWorld` with the raw Rapier `World` exposed on `.world` — without it
|
|
193
|
-
* the system is a no-op.
|
|
194
|
-
*/
|
|
195
|
-
declare class Platformer2DSystem {
|
|
196
|
-
private world;
|
|
197
|
-
/** Per-entity character controllers, keyed by entity uuid. */
|
|
198
|
-
private controllers;
|
|
199
|
-
/** Spawn-time z per entity; re-pinned every tick to hold the 2D plane. */
|
|
200
|
-
private planeZ;
|
|
201
|
-
constructor(world: ZylemWorld | null);
|
|
202
|
-
/**
|
|
203
|
-
* One-time per-entity physics setup: convert the body to a
|
|
204
|
-
* position-based kinematic body, record the plane z, and create the
|
|
205
|
-
* entity's character controller. Done lazily on the first update because
|
|
206
|
-
* the body isn't always available at construction time.
|
|
207
|
-
*/
|
|
208
|
-
private ensurePhysicsConfigured;
|
|
209
|
-
/**
|
|
210
|
-
* Handle jump logic with multi-jump, coyote time, buffering, and jump-cut
|
|
211
|
-
* ramp. All vertical motion is written to `state.verticalVelocity`.
|
|
212
|
-
*/
|
|
213
|
-
private handleJump;
|
|
214
|
-
/**
|
|
215
|
-
* Integrate gravity into `state.verticalVelocity`.
|
|
216
|
-
*
|
|
217
|
-
* While grounded (and not on the jump frame) vertical velocity is held at
|
|
218
|
-
* a small constant downward speed so the controller stays pressed into
|
|
219
|
-
* the ground. Skipped entirely on the frame a jump was applied — the
|
|
220
|
-
* grounded flag is still stale-true then and would clobber the jump.
|
|
221
|
-
*/
|
|
222
|
-
private applyGravity;
|
|
223
|
-
/**
|
|
224
|
-
* Update entity state from the controller's grounded result.
|
|
225
|
-
*/
|
|
226
|
-
private updateState;
|
|
227
|
-
/**
|
|
228
|
-
* Update one platformer entity. Invoked per linked entity by the
|
|
229
|
-
* Platformer2DBehaviorSystem adapter.
|
|
230
|
-
*/
|
|
231
|
-
updateEntity(entity: Platformer2DEntity, delta: number): void;
|
|
232
|
-
destroy(): void;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
156
|
/**
|
|
236
157
|
* Platformer 2D behavior options (typed for entity.use() autocomplete)
|
|
237
158
|
*/
|
|
@@ -265,6 +186,24 @@ interface Platformer2DBehaviorOptions {
|
|
|
265
186
|
snapToGroundDistance?: number;
|
|
266
187
|
/** Character controller collision offset (default: 0.05) */
|
|
267
188
|
characterOffset?: number;
|
|
189
|
+
/** Explicit KCC capsule override (requires `useAttachedCollider: false`). */
|
|
190
|
+
shape?: {
|
|
191
|
+
halfHeight: number;
|
|
192
|
+
radius: number;
|
|
193
|
+
offset?: [number, number, number];
|
|
194
|
+
};
|
|
195
|
+
/** When true (default), KCC reads shape + offset from the attached Rapier collider. */
|
|
196
|
+
useAttachedCollider?: boolean;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Entity with 2D platformer components (input written by the game; the wasm
|
|
200
|
+
* runtime owns the kinematic character controller and FSM).
|
|
201
|
+
*/
|
|
202
|
+
interface Platformer2DEntity {
|
|
203
|
+
uuid: string;
|
|
204
|
+
platformer2D: Platformer2DMovementComponent;
|
|
205
|
+
$platformer2D: Platformer2DInputComponent;
|
|
206
|
+
platformer2DState: Platformer2DStateComponent;
|
|
268
207
|
}
|
|
269
208
|
/**
|
|
270
209
|
* Platformer2DBehavior - typed descriptor for 2D platformer movement
|
|
@@ -303,4 +242,4 @@ declare const Platformer2DBehavior: BehaviorDescriptor<Platformer2DBehaviorOptio
|
|
|
303
242
|
getJumpCount: () => number;
|
|
304
243
|
}, Platformer2DEntity>;
|
|
305
244
|
|
|
306
|
-
export { Platformer2DBehavior, type Platformer2DBehaviorOptions, type Platformer2DCollisionContext, type Platformer2DContext, type Platformer2DEntity, Platformer2DEvent, Platformer2DFSM, type Platformer2DInputComponent, type Platformer2DMovementComponent, Platformer2DState, type Platformer2DStateComponent,
|
|
245
|
+
export { Platformer2DBehavior, type Platformer2DBehaviorOptions, type Platformer2DCollisionContext, type Platformer2DContext, type Platformer2DEntity, Platformer2DEvent, Platformer2DFSM, type Platformer2DInputComponent, type Platformer2DMovementComponent, Platformer2DState, type Platformer2DStateComponent, createPlatformer2DInputComponent, createPlatformer2DMovementComponent, createPlatformer2DStateComponent };
|
package/dist/platformer-2d.js
CHANGED
|
@@ -3,20 +3,19 @@ import {
|
|
|
3
3
|
Platformer2DEvent,
|
|
4
4
|
Platformer2DFSM,
|
|
5
5
|
Platformer2DState,
|
|
6
|
-
Platformer2DSystem,
|
|
7
6
|
createPlatformer2DInputComponent,
|
|
8
7
|
createPlatformer2DMovementComponent,
|
|
9
8
|
createPlatformer2DStateComponent
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-4MZ57HPD.js";
|
|
10
|
+
import "./chunk-AS3HR7AS.js";
|
|
11
|
+
import "./chunk-DZ4LLQON.js";
|
|
13
12
|
import "./chunk-EZNCCO4L.js";
|
|
13
|
+
import "./chunk-5WRI5ZAA.js";
|
|
14
14
|
export {
|
|
15
15
|
Platformer2DBehavior,
|
|
16
16
|
Platformer2DEvent,
|
|
17
17
|
Platformer2DFSM,
|
|
18
18
|
Platformer2DState,
|
|
19
|
-
Platformer2DSystem,
|
|
20
19
|
createPlatformer2DInputComponent,
|
|
21
20
|
createPlatformer2DMovementComponent,
|
|
22
21
|
createPlatformer2DStateComponent
|