pixi-reels

API reference

SpeedProfile

pixi-reels


pixi-reels / index / SpeedProfile

type SpeedProfile = SpeedProfileBase & PhaseSections;

Defined in: config/types.ts:537

Timing and animation profile for a speed mode.

The flat fields (SpeedProfileBase) are the profile’s contract and have not moved: a phase that always read profile.spinSpeed still does. On top of them a profile may carry one optional section per phase, which restates any of those fields for that phase alone, configures the phase’s named steps, and can vary itself for a reel that teased:

Example#

const normal = {
  name: 'normal',
  spinDelay: 0,
  spinSpeed: 200,
  stopDelay: 140,
  anticipationDelay: 450,
  bounceDistance: 80,
  bounceDuration: 600,
  stop: {
    bounceDistance: 40,
    steps: { bounce: { ease: 'power1.out' } },
    whenAnticipated: { steps: { bounce: { ease: 'sine.out' } } },
  },
} satisfies SpeedProfile;