Clean up boop dialog

This commit is contained in:
Natsumi
2025-10-22 19:12:31 +11:00
parent 8a58c25084
commit 6af467b050
6 changed files with 71 additions and 46 deletions

View File

@@ -60,13 +60,13 @@ function getEmojiFileName(emoji) {
* @param {number} frameCount
* @param {string} loopStyle
*/
function generateEmojiStyle(url, fps, frameCount, loopStyle) {
function generateEmojiStyle(url, fps, frameCount, loopStyle, size) {
let framesPerLine = 2;
if (frameCount > 4) framesPerLine = 4;
if (frameCount > 16) framesPerLine = 8;
const animationDurationMs = (1000 / fps) * frameCount;
const frameSize = 1024 / framesPerLine;
const scale = 100 / (frameSize / 200);
const scale = 100 / (frameSize / size);
const animStyle = loopStyle === 'pingpong' ? 'alternate' : 'none';
const style = `
transform: scale(${scale / 100});