slightly change timing on blastinRoulette

This commit is contained in:
2025-11-22 01:04:27 +01:00
parent d91bd63e16
commit acfba423ed
2 changed files with 9 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ export type pointRedeemOptions = {
cost: number;
color?: string;
sfxredeem?: boolean;
input?: boolean;
execution: (message: EventSubChannelRedemptionAddEvent, sender: User) => Promise<void>;
};
@@ -19,6 +20,7 @@ export default class PointRedeem {
public readonly cost: number;
public readonly color?: string;
public readonly sfxredeem?: boolean;
public readonly input?: boolean;
public readonly execute: (message: EventSubChannelRedemptionAddEvent, sender: User) => Promise<void>;
constructor(options: pointRedeemOptions) {
this.name = options.name.toLowerCase();
@@ -28,6 +30,7 @@ export default class PointRedeem {
this.color = options.color;
this.execute = options.execution;
this.sfxredeem = options.sfxredeem;
this.input = options.input;
};
};
@@ -72,7 +75,8 @@ for (const [_, redeem] of Array.from(namedRedeems)) {
title: redeem.title,
prompt: redeem.prompt,
cost: redeem.cost,
backgroundColor: redeem.color
backgroundColor: redeem.color,
userInputRequired: redeem.input
});
logger.ok(`Created custom point redeem ${redeem.title}`);
idMap.set(redeem.name, creation.id);

View File

@@ -30,8 +30,8 @@ export default async function execute(alert: blastinRoulette) {
div.appendChild(text);
// animation parameters
const totalDuration = 4000; // 4 sec
const finalHold = 2000; // hold final word for 2 sec
const totalDuration = 4200; // 4 sec
const finalHold = 1800; // hold final word for 2 sec
const steps = 60; // how many changes before settling
let lastPick = '';
@@ -57,8 +57,8 @@ export default async function execute(alert: blastinRoulette) {
chosenFinal = pick;
// brief flicker effect: toggle opacity a few times
const flickerTimes = 6;
const flickerInterval = 80; // ms
const flickerTimes = 8;
const flickerInterval = 120; // ms
// ensure opacity starts at 1
text.style.opacity = '1';
for (let k = 0; k < flickerTimes; k++) {