Save point: Scene 3 recruitment text types faster (20-50ms), incubator stays calm
This commit is contained in:
@@ -593,7 +593,7 @@
|
||||
}, 500);
|
||||
}
|
||||
|
||||
function typeCalmly(elem, text, callback) {
|
||||
function typeCalmly(elem, text, callback, minDelay, maxDelay) {
|
||||
let i = 0;
|
||||
const total = text.length;
|
||||
|
||||
@@ -605,7 +605,9 @@
|
||||
elem.textContent += text[i];
|
||||
i++;
|
||||
const progress = i / total;
|
||||
const delay = 70 + progress * progress * 130;
|
||||
const dMin = minDelay || 70;
|
||||
const dMax = maxDelay || 130;
|
||||
const delay = dMin + progress * progress * (dMax - dMin);
|
||||
setTimeout(typeChar, delay);
|
||||
}
|
||||
typeChar();
|
||||
@@ -767,7 +769,7 @@
|
||||
}, 30);
|
||||
});
|
||||
}, 3000);
|
||||
});
|
||||
}, 20, 50);
|
||||
});
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user