pixi-reels

API reference

SpeedProfileBase

pixi-reels


pixi-reels / index / SpeedProfileBase

Defined in: config/types.ts:325

The flat timing fields every speed profile has carried since v1.

This is the whole of a profile’s own shape; SpeedProfile adds the optional per-phase sections on top of it.

Properties#

PropertyModifierTypeDescriptionDefined in
accelerationDuration?readonlynumberMilliseconds for acceleration phase. Default: 300.config/types.ts:360
accelerationEase?readonlystringOptional GSAP ease string for acceleration. Default: ‘power2.in’.config/types.ts:350
anticipationDelayreadonlynumberMilliseconds to hold anticipation phase.config/types.ts:337
bounceDistancereadonlynumberPixels of overshoot when reel lands.config/types.ts:339
bounceDurationreadonlynumberMilliseconds for bounce-back animation.config/types.ts:341
bounceEase?readonlystringOptional GSAP ease for each leg of the landing bounce. Default 'power1.out'. The third of the bounce’s three numbers, beside bounceDistance and bounceDuration; bounce({ ease }) still wins over it, as every BounceOptions field wins over the profile’s.config/types.ts:348
decelerationEase?readonlystringDeprecated Does nothing, and never did: no phase reads it. It names a deceleration phase the engine does not have — a stop is a spin-out plus a bounce. If you set it meaning the landing’s ease, that is SpeedProfileBase.bounceEase, which phase.bounce() does read. Removed in the next major.config/types.ts:358
minimumSpinTime?readonlynumberMinimum spin time in ms before stop is allowed. Default: 500.config/types.ts:362
namereadonlystring-config/types.ts:326
spinDelayreadonlynumberMilliseconds between each reel starting to spin.config/types.ts:328
spinSpeedreadonlynumberPixels per frame at full spin speed.config/types.ts:330
stopDelayreadonlynumberMilliseconds between each reel stopping. On a Hold & Win board, the step of the cells’ landing wave (see HoldAndWinBuilder.stagger).config/types.ts:335
tumble?readonlyTumbleConfigOptional per-speed tumble timing overrides. When the active speed profile defines this, the cascade fall + drop-in phases merge these fields over the base config registered via .tumble(...) at build time. setSpeed('turbo') can shorten fall.duration, dropIn.duration, per-cell staggers, and the drop ease without the caller maintaining a parallel setTumble API. Fields are deep-merged with Partial semantics: omitted fields fall back to the base config. To suppress the cascade animation entirely for a profile (the canonical “snap on turbo” pattern), set fall.duration: 0 and dropIn.duration: 0. both phases short-circuit to their existing snap path. Phases capture the resolved config at onEnter time, so a setSpeed call between two refills picks up the new timings on the next refill. In-flight tweens keep their construction-time timings (mid-tween mutation is not supported).config/types.ts:382