Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(play): park world billboards off screen until the first projection places them

nirholas44fc9d26ee2a
diff --git a/src/game/coincommunities.css b/src/game/coincommunities.css
index a1261dcf8..def24c913 100644
--- a/src/game/coincommunities.css
+++ b/src/game/coincommunities.css
@@ -1350,9 +1350,13 @@ body.is-zen #cc-photo-btn:hover, body.is-zen #cc-photo-btn:focus-visible { opaci
}
/* chat bubbles over avatars + name labels */
+/* Parked off-screen until _updateLabels projects it. Anchored at left:0 with a
+ -50% shift, a nameplate otherwise sits half over the left edge of the screen
+ for the frames between being created and being placed. The placement code
+ writes `transform` inline, so this only applies before that first write. */
.cc-label, .cc-bubble {
position: fixed; left: 0; top: 0; z-index: 15; pointer-events: none;
- transform: translate(-50%, -100%); white-space: nowrap;
+ transform: translate(-50%, -100%) translate(-9999px, -9999px); white-space: nowrap;
}
.cc-label {
font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: #fff;
@@ -3449,7 +3453,10 @@ select.npc-svc-input { cursor: pointer; appearance: none; -webkit-appearance: no
.cc-it-marker {
position: fixed; left: 0; top: 0; z-index: 18;
pointer-events: none;
- transform: translate(-50%, -100%);
+ /* Off-screen until the projection places it, for the same reason as .cc-label
+ above: anchored at left:0 with a -50% shift, it otherwise spends its first
+ frames straddling the left edge of the screen. */
+ transform: translate(-50%, -100%) translate(-9999px, -9999px);
background: rgba(220, 30, 30, 0.88);
color: #fff;
font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
diff --git a/src/game/combat-system.css b/src/game/combat-system.css
index 849f13c15..1421810d3 100644
--- a/src/game/combat-system.css
+++ b/src/game/combat-system.css
@@ -3,9 +3,15 @@
tokens (--cc-*) defined in coincommunities.css so combat reads as part of
the same product, not a bolted-on minigame. */
+/* Parked off-screen until the first projection places it. A billboard anchored
+ at left:0 with a -50% shift otherwise spends its first frames half over the
+ left edge of the screen, which is a nameplate and a health bar flashing in the
+ corner every time a mob spawns. The placement code writes `transform` inline,
+ so this default only ever applies before that first write. */
.combat-mob-label {
position: fixed; left: 0; top: 0; z-index: 15; pointer-events: none;
- transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 3px;
+ transform: translate(-50%, -100%) translate(-9999px, -9999px);
+ display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.combat-mob-name {
font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
diff --git a/src/game/economy-ui.css b/src/game/economy-ui.css
index 6d9c7bd9a..a8dc71108 100644
--- a/src/game/economy-ui.css
+++ b/src/game/economy-ui.css
@@ -155,11 +155,18 @@
}
@media (max-width: 480px) {
- .ec-card { width: 100%; }
+ /* Fixed height, not content height. The card is centred, so every time its
+ body swapped a five-row skeleton for a full jobs board it grew and its top
+ edge climbed: measured at 320px, that one swap was a 0.246 layout shift,
+ almost all of the page's CLS. At this width the panel is effectively a
+ sheet, so giving it the full height it was going to reach anyway costs
+ nothing and the body scrolls inside it instead of resizing it. */
+ .ec-card { width: 100%; height: min(640px, 88vh); }
/* Thumb-sized targets on a phone: the WCAG 2.5.5 bar is 44px, and these are
the controls a player taps mid-session with one hand. */
.ec-x { width: 40px; height: 40px; }
- .ec-tab { padding: 12px 0; }
+ /* Padding alone landed this a hair under 40px. */
+ .ec-tab { padding: 12px 0; min-height: 40px; }
/* Padding alone left this at 36px, under the 40px bar: the jobs board's
Accept button is the one control a player taps most in a run. */
.ec-row-btn { padding: 11px 14px; min-height: 40px; }