feat(players): app Players library and circular NPC tokens on scenes

Add userData players/teams, scene npcTokens with hex-inscribed sizing, session scale synced to presentation, and Playwright e2e coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-30 13:38:35 +08:00
parent a3a03eb9e3
commit 101f595bac
57 changed files with 4176 additions and 317 deletions
@@ -0,0 +1,63 @@
.root {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
user-select: none;
}
.circle {
position: relative;
border-radius: 50%;
border: 4px solid #c9a227;
overflow: hidden;
background: #18181b;
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
flex-shrink: 0;
}
.circlePan {
cursor: grab;
touch-action: none;
}
.circlePan:active {
cursor: grabbing;
}
.avatar {
position: absolute;
left: 50%;
top: 50%;
width: 140%;
height: 140%;
object-fit: cover;
pointer-events: none;
}
.avatarEmpty {
position: absolute;
inset: 0;
background: repeating-linear-gradient(
-45deg,
#27272a,
#27272a 6px,
#3f3f46 6px,
#3f3f46 12px
);
}
.namePlate {
max-width: 100%;
padding: 4px 10px;
border-radius: 6px;
background: rgba(9, 9, 11, 0.88);
color: #fafafa;
font-size: 12px;
font-weight: 600;
line-height: 1.3;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}