pixi-reels

API reference

SpeedPresets

pixi-reels


pixi-reels / index / SpeedPresets

const SpeedPresets: {
  NORMAL: {
     accelerationDuration: 300;
     accelerationEase: "power2.in";
     anticipationDelay: 450;
     bounceDistance: 22;
     bounceDuration: 220;
     decelerationEase: "power2.out";
     minimumSpinTime: 500;
     name: "normal";
     spinDelay: 100;
     spinSpeed: 30;
     stopDelay: 140;
  };
  SUPER_TURBO: {
     accelerationDuration: 50;
     accelerationEase: "power1.in";
     anticipationDelay: 0;
     bounceDistance: 8;
     bounceDuration: 90;
     decelerationEase: "power1.out";
     minimumSpinTime: 100;
     name: "superTurbo";
     spinDelay: 0;
     spinSpeed: 80;
     stopDelay: 0;
  };
  TURBO: {
     accelerationDuration: 200;
     accelerationEase: "power2.in";
     anticipationDelay: 250;
     bounceDistance: 14;
     bounceDuration: 140;
     decelerationEase: "power2.out";
     minimumSpinTime: 300;
     name: "turbo";
     spinDelay: 30;
     spinSpeed: 50;
     stopDelay: 0;
  };
};

Defined in: config/SpeedPresets.ts:12

Built-in speed profiles covering common slot game needs.

Bounce values are tuned for the typical 120-200px symbol range: a short, firm settle, about a sixth of a cell, so a landing reads as a stop and not a spring. For larger or smaller symbols, register a custom profile or override bounceDistance. bounceDuration is the total time for the two-leg bounce (down then back).

Type Declaration#

NameTypeDefault valueDefined in
NORMAL{ accelerationDuration: 300; accelerationEase: "power2.in"; anticipationDelay: 450; bounceDistance: 22; bounceDuration: 220; decelerationEase: "power2.out"; minimumSpinTime: 500; name: "normal"; spinDelay: 100; spinSpeed: 30; stopDelay: 140; }-config/SpeedPresets.ts:13
NORMAL.accelerationDuration300300config/SpeedPresets.ts:23
NORMAL.accelerationEase"power2.in"'power2.in'config/SpeedPresets.ts:21
NORMAL.anticipationDelay450450config/SpeedPresets.ts:18
NORMAL.bounceDistance2222config/SpeedPresets.ts:19
NORMAL.bounceDuration220220config/SpeedPresets.ts:20
NORMAL.decelerationEase"power2.out"'power2.out'config/SpeedPresets.ts:22
NORMAL.minimumSpinTime500500config/SpeedPresets.ts:24
NORMAL.name"normal"'normal'config/SpeedPresets.ts:14
NORMAL.spinDelay100100config/SpeedPresets.ts:15
NORMAL.spinSpeed3030config/SpeedPresets.ts:16
NORMAL.stopDelay140140config/SpeedPresets.ts:17
SUPER_TURBO{ accelerationDuration: 50; accelerationEase: "power1.in"; anticipationDelay: 0; bounceDistance: 8; bounceDuration: 90; decelerationEase: "power1.out"; minimumSpinTime: 100; name: "superTurbo"; spinDelay: 0; spinSpeed: 80; stopDelay: 0; }-config/SpeedPresets.ts:39
SUPER_TURBO.accelerationDuration5050config/SpeedPresets.ts:49
SUPER_TURBO.accelerationEase"power1.in"'power1.in'config/SpeedPresets.ts:47
SUPER_TURBO.anticipationDelay00config/SpeedPresets.ts:44
SUPER_TURBO.bounceDistance88config/SpeedPresets.ts:45
SUPER_TURBO.bounceDuration9090config/SpeedPresets.ts:46
SUPER_TURBO.decelerationEase"power1.out"'power1.out'config/SpeedPresets.ts:48
SUPER_TURBO.minimumSpinTime100100config/SpeedPresets.ts:50
SUPER_TURBO.name"superTurbo"'superTurbo'config/SpeedPresets.ts:40
SUPER_TURBO.spinDelay00config/SpeedPresets.ts:41
SUPER_TURBO.spinSpeed8080config/SpeedPresets.ts:42
SUPER_TURBO.stopDelay00config/SpeedPresets.ts:43
TURBO{ accelerationDuration: 200; accelerationEase: "power2.in"; anticipationDelay: 250; bounceDistance: 14; bounceDuration: 140; decelerationEase: "power2.out"; minimumSpinTime: 300; name: "turbo"; spinDelay: 30; spinSpeed: 50; stopDelay: 0; }-config/SpeedPresets.ts:26
TURBO.accelerationDuration200200config/SpeedPresets.ts:36
TURBO.accelerationEase"power2.in"'power2.in'config/SpeedPresets.ts:34
TURBO.anticipationDelay250250config/SpeedPresets.ts:31
TURBO.bounceDistance1414config/SpeedPresets.ts:32
TURBO.bounceDuration140140config/SpeedPresets.ts:33
TURBO.decelerationEase"power2.out"'power2.out'config/SpeedPresets.ts:35
TURBO.minimumSpinTime300300config/SpeedPresets.ts:37
TURBO.name"turbo"'turbo'config/SpeedPresets.ts:27
TURBO.spinDelay3030config/SpeedPresets.ts:28
TURBO.spinSpeed5050config/SpeedPresets.ts:29
TURBO.stopDelay00config/SpeedPresets.ts:30