API reference
SpeedProfileBase
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#
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
accelerationDuration? | readonly | number | Milliseconds for acceleration phase. Default: 300. | config/types.ts:360 |
accelerationEase? | readonly | string | Optional GSAP ease string for acceleration. Default: ‘power2.in’. | config/types.ts:350 |
anticipationDelay | readonly | number | Milliseconds to hold anticipation phase. | config/types.ts:337 |
bounceDistance | readonly | number | Pixels of overshoot when reel lands. | config/types.ts:339 |
bounceDuration | readonly | number | Milliseconds for bounce-back animation. | config/types.ts:341 |
bounceEase? | readonly | string | Optional 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? | readonly | string | Deprecated 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? | readonly | number | Minimum spin time in ms before stop is allowed. Default: 500. | config/types.ts:362 |
name | readonly | string | - | config/types.ts:326 |
spinDelay | readonly | number | Milliseconds between each reel starting to spin. | config/types.ts:328 |
spinSpeed | readonly | number | Pixels per frame at full spin speed. | config/types.ts:330 |
stopDelay | readonly | number | Milliseconds between each reel stopping. On a Hold & Win board, the step of the cells’ landing wave (see HoldAndWinBuilder.stagger). | config/types.ts:335 |
tumble? | readonly | TumbleConfig | Optional 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 |