update flow design 1.3

This commit is contained in:
2026-05-27 17:45:24 +00:00
parent 8fb34cde3d
commit 258b76dd29
2 changed files with 10 additions and 16 deletions
+8 -6
View File
@@ -2708,7 +2708,7 @@
quizWrongGhostImg = img;
return img;
}
/** วาด "ผี" คุมัวผู้เล่นในแมป mng8a80o เมื่อตอบผิด (ใช้กับ me/peers) */
/** วาด "ผี" คุมทับตัวผู้เล่นในแมป mng8a80o เมื่อตอบผิด — ครอบทั้งตัวละครเลย */
function drawQuizWrongGhostOverlayPlay(ax, ay, entId) {
if (!isQuizQuestionMissionUiMapPlay()) return;
const sid = String(entId == null ? '' : entId);
@@ -2719,16 +2719,18 @@
if (!wrong) return;
const img = getQuizWrongGhostImg();
if (!img || !img.complete || !img.naturalWidth) return;
/* ขนาด: ~1.6 tile (ใหญ่กว่าหัวเล็กน้อย แต่ไม่บัง avatar ทั้งตัว); ลอยเหนือหัว */
/* ผีครอบทับ avatar ทั้งตัว — กว้าง ~2.4 tile, สูงตามสัดส่วน, ลอยนิดๆ */
const tile = (typeof tileSize === 'number' && tileSize > 0) ? tileSize : 32;
const wPx = tile * 1.6;
const wPx = tile * 2.4;
const ratio = img.naturalHeight / Math.max(1, img.naturalWidth);
const hPx = wPx * ratio;
const tBob = Math.sin(performance.now() / 280) * (tile * 0.06);
const tBob = Math.sin(performance.now() / 320) * (tile * 0.05);
/* ทับตรงกลางตัว avatar — avatar กว้าง 1 tile, สูง ~1.6 tile (วาดจากมุมบนซ้าย) */
const avatarCenterY = ay + tile * 0.55;
const drawX = ax + (tile - wPx) / 2;
const drawY = ay - hPx * 0.78 + tBob;
const drawY = avatarCenterY - hPx / 2 + tBob;
ctx.save();
ctx.globalAlpha = 0.92;
ctx.globalAlpha = 0.85;
ctx.drawImage(img, drawX, drawY, wPx, hPx);
ctx.restore();
}
+2 -10
View File
@@ -4911,17 +4911,9 @@
var mid = col.getAttribute('data-member-id');
var watching = !!(mid && ready.indexOf(mid) < 0);
col.classList.toggle('is-watching', watching);
/* ลบ badge "กำลังดู.." ทั้งหมด — ไม่โชว์ใน reveal */
var badge = col.querySelector('.es-watch-badge');
if (watching) {
if (!badge) {
badge = document.createElement('div');
badge.className = 'es-watch-badge';
badge.textContent = 'กำลังดู..';
var anchor = col.querySelector('.es-card, .es-rev-none');
if (anchor) col.insertBefore(badge, anchor);
else col.appendChild(badge);
}
} else if (badge) badge.remove();
if (badge) badge.remove();
});
return;
}