The minimum code
const promise = reelSet.spin();
// ...some time later, when the server response arrives:
reelSet.setAnticipation([3, 4]); // slow the last two reels
reelSet.setResult(response.symbols);
const result = await promise;
Reading the anticipation in progress
Listen to spin:stopping to tell UI state when any reel enters its stop-phase (anticipation counts as part of stopping):
reelSet.events.on('spin:stopping', (reelIndex) => {
if (anticipationReels.includes(reelIndex)) {
playTensionSound();
}
});
Customize the feel
The wait time and easing come from the active SpeedProfile.anticipationDelay. Per-game feel: define a custom profile and switch to it for bonus rounds.
builder.speed('cinematic', {
...SpeedPresets.NORMAL,
anticipationDelay: 1400,
decelerationEase: 'elastic.out(1, 0.5)',
});