Jumper3DFSM
@zylem/game-lib / behavior / Jumper3DFSM
Class: Jumper3DFSM
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/jumper-3d.d.ts:34
Behaviors Module Index
Behaviors now live in the standalone, tree-shakable @zylem/behaviors
package (built on @zylem/behaviors/core). This barrel re-exports that public
surface so existing @zylem/game-lib/behavior consumers keep working.
IMPORTANT: do NOT use export * from '@zylem/behaviors' here. Because
@zylem/behaviors is external in game-lib's tsup build, esbuild compiles a
star re-export of an external into a runtime __reExport helper with no
static export names. Downstream bundlers (e.g. the examples/arena Vite
builds) then cannot statically resolve named value imports such as
FractureOptions and fail with "X is not exported by game-lib/dist/behavior.js".
Explicit named re-exports below are preserved statically and keep a single
runtime copy of @zylem/behaviors (no bundling/duplication).
The lists mirror the full public API of @zylem/behaviors (values from its
built dist/index.js export block; types are the remaining dist/index.d.ts
exports). When behaviors are added/removed in @zylem/behaviors, update these
lists to match.
Constructors
Constructor
new Jumper3DFSM(
ctx):Jumper3DFSM
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/jumper-3d.d.ts:37
Parameters
ctx
Jumper3DFSMContext
Returns
Jumper3DFSM
Properties
machine
machine:
SyncStateMachine<Jumper3DState,Jumper3DEvent,never>
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/jumper-3d.d.ts:36
Methods
applyTickEvent()
applyTickEvent(
tickEvent,isGrounded):void
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/jumper-3d.d.ts:50
Translate a tick event into an FSM dispatch. Also handles the implicit Grounded→Falling transition when the entity is no longer grounded but no explicit event was emitted (e.g. walked off a ledge without jumping).
Parameters
tickEvent
string
isGrounded
boolean
Returns
void
dispatch()
dispatch(
event):void
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/jumper-3d.d.ts:39
Parameters
event
Returns
void
getJumpsUsed()
getJumpsUsed():
number
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/jumper-3d.d.ts:43
Returns
number
getState()
getState():
Jumper3DState
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/jumper-3d.d.ts:38
Returns
isFalling()
isFalling():
boolean
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/jumper-3d.d.ts:41
Returns
boolean
isGrounded()
isGrounded():
boolean
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/jumper-3d.d.ts:42
Returns
boolean
isJumping()
isJumping():
boolean
Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/jumper-3d.d.ts:40
Returns
boolean