Restore GUI operator HUD overlay

This commit is contained in:
Meta Vens 2026-05-05 03:49:37 +01:00
commit df735b92e3
4 changed files with 118 additions and 102 deletions

View file

@ -1517,60 +1517,65 @@ function AgentConstellation({
aria-hidden="true"
/>
<div className="agentStageVignette" aria-hidden="true" />
{variant === "band" ? (
agents.map((agent) => (
<button
className={`agentCharacter ${agent.shape} ${agent.tone} ${selectedAgentId === agent.id ? "selected" : ""}`}
key={agent.id}
type="button"
data-agent-node={agent.id}
onClick={() => setSelectedAgentId(agent.id)}
title={`${agent.name}: ${agent.thought}`}
style={
{
"--agent-x": `${agent.baseX}%`,
"--agent-y": `${agent.baseY}%`,
"--agent-color": agent.color,
"--agent-glow": agent.glow,
"--agent-activity": agent.activity,
"--agent-bubble-opacity": 0.38 + agent.activity * 0.28,
} as React.CSSProperties
}
>
<span className="agentGlyph" aria-hidden="true">{agent.glyph}</span>
<span className="agentCaption">
<strong>{agent.name}</strong>
<span>{agent.status}</span>
</span>
</button>
))
) : (
<div className="simulationOnlyControls">
{agents.map((agent) => (
<button
type="button"
key={agent.id}
onClick={() => setSelectedAgentId(agent.id)}
aria-label={`${agent.name} ${agent.status}`}
/>
))}
{agents.map((agent) => (
<button
className={`agentCharacter ${agent.shape} ${agent.tone} ${selectedAgentId === agent.id ? "selected" : ""}`}
key={agent.id}
type="button"
data-agent-node={agent.id}
onClick={() => setSelectedAgentId(agent.id)}
title={`${agent.name}: ${agent.thought}`}
style={
{
"--agent-x": `${agent.baseX}%`,
"--agent-y": `${agent.baseY}%`,
"--agent-color": agent.color,
"--agent-glow": agent.glow,
"--agent-activity": agent.activity,
"--agent-bubble-opacity": 0.38 + agent.activity * 0.28,
} as React.CSSProperties
}
>
<span className="agentGlyph" aria-hidden="true">{agent.glyph}</span>
<span className="agentCaption">
<strong>{agent.name}</strong>
<span>{agent.status}</span>
</span>
</button>
))}
{agents.map((agent) => (
<div
className={`thoughtBubble ${agent.tone} ${selectedAgentId === agent.id ? "selected" : ""}`}
key={`${agent.id}-thought`}
data-agent-thought={agent.id}
style={
{
"--agent-x": `${agent.baseX}%`,
"--agent-y": `${agent.baseY}%`,
"--agent-color": agent.color,
"--agent-glow": agent.glow,
"--agent-activity": agent.activity,
"--agent-bubble-opacity": 0.38 + agent.activity * 0.28,
} as React.CSSProperties
}
>
<strong>{agent.name}</strong>
<span>{agent.thought}</span>
</div>
)}
{variant === "band" && (
<div className="constellationInspector">
<div>
<span>{selectedAgent.title}</span>
<strong>{selectedAgent.name}</strong>
<p>{selectedAgent.thought}</p>
</div>
<dl className="facts compact">
<div><dt>Status</dt><dd><Pill tone={selectedAgent.tone}>{selectedAgent.status}</Pill></dd></div>
<div><dt>Detail</dt><dd>{selectedAgent.detail}</dd></div>
<div><dt>Jobs</dt><dd>{selectedAgent.jobs}</dd></div>
<div><dt>Review</dt><dd>{selectedAgent.review}</dd></div>
</dl>
))}
<div className="constellationInspector">
<div>
<span>{selectedAgent.title}</span>
<strong>{selectedAgent.name}</strong>
<p>{selectedAgent.thought}</p>
</div>
)}
<dl className="facts compact">
<div><dt>Status</dt><dd><Pill tone={selectedAgent.tone}>{selectedAgent.status}</Pill></dd></div>
<div><dt>Detail</dt><dd>{selectedAgent.detail}</dd></div>
<div><dt>Jobs</dt><dd>{selectedAgent.jobs}</dd></div>
<div><dt>Review</dt><dd>{selectedAgent.review}</dd></div>
</dl>
</div>
</div>
</section>
);

View file

@ -888,8 +888,6 @@ class WebglAquariumRenderer implements AquariumRenderer {
this.drawThoughtSource(ctx, activeAgent);
this.drawOptionsSource(ctx, activeAgent);
}
this.drawDeckSource(ctx);
this.drawOperatorSource(ctx, time);
this.drawParameterImpulseSource(ctx, time);
ctx.restore();
}
@ -1189,16 +1187,18 @@ class WebglAquariumRenderer implements AquariumRenderer {
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.clearRect(0, 0, this.crispCanvas.width, this.crispCanvas.height);
ctx.scale(scaleX, scaleY);
for (const agent of projected) {
const hot = agent.id === activeAgent?.id || agent.id === this.frame.selectedAgentId;
this.drawCrispAgent(ctx, agent, hot);
if (this.frame.variant !== "fullscreen") {
for (const agent of projected) {
const hot = agent.id === activeAgent?.id || agent.id === this.frame.selectedAgentId;
this.drawCrispAgent(ctx, agent, hot);
}
if (activeAgent) {
this.drawCrispThought(ctx, activeAgent);
this.drawCrispOptions(ctx, activeAgent);
}
this.drawCrispDeck(ctx);
this.drawOperatorUi(ctx, time);
}
if (activeAgent) {
this.drawCrispThought(ctx, activeAgent);
this.drawCrispOptions(ctx, activeAgent);
}
this.drawCrispDeck(ctx);
this.drawOperatorUi(ctx, time);
this.drawFluidPanel(ctx, time);
ctx.restore();
}
@ -1489,8 +1489,11 @@ class WebglAquariumRenderer implements AquariumRenderer {
private drawFluidPanel(ctx: CanvasRenderingContext2D, time: number) {
this.fluidParamZones = [];
const iconSize = 32;
const inspectorGuard = this.frame.variant === "fullscreen" && this.simWidth >= 720
? Math.min(230, this.simHeight * 0.25)
: 0;
const iconX = this.simWidth - iconSize - 16;
const iconY = this.simHeight - iconSize - 16;
const iconY = this.simHeight - iconSize - 16 - inspectorGuard;
const iconZone: FluidParamZone = { key: "toggle", x: iconX, y: iconY, width: iconSize, height: iconSize };
this.fluidParamZones.push(iconZone);
const nearIcon = this.pointer.active && pointInInflatedRect(this.pointer.x, this.pointer.y, iconZone, 54);

View file

@ -472,22 +472,6 @@ body:has(.immersiveShell) {
mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.8), transparent 72%);
}
.immersiveShell .hudGrid,
.immersiveShell .immersiveTopbar,
.immersiveShell .deckRail,
.immersiveShell .diegeticPanel,
.immersiveShell .hudToastStack {
position: absolute !important;
width: 1px !important;
height: 1px !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0 0 0 0) !important;
clip-path: inset(50%) !important;
opacity: 0 !important;
pointer-events: none !important;
}
.immersiveTopbar,
.deckRail,
.diegeticPanel,