Skip to main content

Platformer3DStateComponent

@zylem/game-lib


@zylem/game-lib / behavior / Platformer3DStateComponent

Interface: Platformer3DStateComponent

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/platformer-3d.d.ts:57

Properties​

collisionGrounded​

collisionGrounded: 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/platformer-3d.d.ts:75

Is currently colliding with ground (from physics collision callback)


currentSpeed​

currentSpeed: 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/platformer-3d.d.ts:69

Current movement speed being applied


falling​

falling: 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/platformer-3d.d.ts:63

Is falling (not jumping)


grounded​

grounded: 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/platformer-3d.d.ts:59

Is the entity on the ground


groundedCollisionTime​

groundedCollisionTime: 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/platformer-3d.d.ts:77

Timestamp of last ground collision


jumpBuffered​

jumpBuffered: 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/platformer-3d.d.ts:81

Is a jump allowed due to buffer?


jumpBufferTimer​

jumpBufferTimer: 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/platformer-3d.d.ts:83

Time remaining in jump buffer


jumpCount​

jumpCount: 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/platformer-3d.d.ts:65

Current jump count (for multi-jump)


jumpCutApplied​

jumpCutApplied: 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/platformer-3d.d.ts:87

Has the jump cut been applied for this jump?


jumpCutRampTimer​

jumpCutRampTimer: 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/platformer-3d.d.ts:95

Remaining seconds of jump-cut velocity ramp; while > 0, verticalVelocity lerps toward verticalVelocity * jumpCutMultiplier.


jumpedThisFrame​

jumpedThisFrame: 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/platformer-3d.d.ts:93

True for the single frame on which a jump impulse was applied; prevents gravity from clobbering jump velocity.


jumpHeld​

jumpHeld: 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/platformer-3d.d.ts:85

Is jump button currently held


jumping​

jumping: 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/platformer-3d.d.ts:61

Is currently in a jump arc


jumpPressedLastFrame​

jumpPressedLastFrame: 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/platformer-3d.d.ts:73

Was jump button pressed last frame (for edge detection)


jumpReleasedSinceLastJump​

jumpReleasedSinceLastJump: 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/platformer-3d.d.ts:89

Has jump button been released since last jump (required for multi-jump)


jumpStartHeight​

jumpStartHeight: 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/platformer-3d.d.ts:67

Y position when jump started


lastGroundedY​

lastGroundedY: 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/platformer-3d.d.ts:71

Last known ground Y position


timeSinceGrounded​

timeSinceGrounded: 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/platformer-3d.d.ts:79

Time in seconds since last grounded


timeSinceJump​

timeSinceJump: 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/platformer-3d.d.ts:91

Time since current jump started (for multi-jump window)


verticalVelocity​

verticalVelocity: 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/platformer-3d.d.ts:101

Controller-owned vertical velocity (units/second). The body is kinematic, so linvel() is meaningless — this field is the single source of truth for jump/gravity motion on the Y axis.