Merge pull request #2536 from IvarK/fix-flickering-text-on-doom-classic-subtab-buttons

Fix text flickering on zalgoed subtab buttons
This commit is contained in:
Dys 2022-04-30 11:05:29 +08:00 committed by GitHub
commit 961830b040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -268,7 +268,7 @@ export const Pelle = {
// Transition text from "from" to "to", stage is 0-1, 0 is fully "from" and 1 is fully "to"
// Also adds more zalgo the bigger the stage
transitionText(from, to, stage = 0) {
const len = (from.length * (1 - stage) + to.length * stage);
const len = Math.round((from.length * (1 - stage) + to.length * stage) * 1e8) / 1e8;
const toInterval = len * (1 - stage);
let req = toInterval;
let str = "";