Wireframe and system status
An orange vertical tab, a dark grid panel with a dashed icosahedron on canvas that turns and can be dragged, and a status readout with dotted leaders and a live sidereal clock.
Part of the style
Machine Shop Grid
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/machine-shop-grid/readout/figma.html?palette=bc1ef811028601b2
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/machine-shop-grid/readout/figma.html?palette=bc1ef811028601b2 and pass that whole HTML document to the html_to_figma tool, so the part "Wireframe and system status" lands as editable layers in my open Figma file. Fonts come from Google Fonts: if a face is missing in Figma, pick the closest one.
Code
<style>
/* Goes after the pack's base.css */
:root {
--page: #fcf45e;
--ink: #110f08;
--ink-soft: rgba(18, 16, 8, 0.65);
--paper: #fffff5;
--on-dark: #fcf45e;
--rule-col: #dcd553;
--grid-dark: rgba(252, 244, 94, 0.12);
--hatch: #e6df57;
--steel: #d1cb50;
--accent: #8d8a46;
}
</style>
<section class="readout" aria-labelledby="readout-title">
<p class="readout__tab"><span>Works / Abisko</span></p>
<div class="readout__panel">
<canvas class="readout__shape" role="img" aria-label="A dashed wireframe icosahedron turning slowly on a square grid"></canvas>
<span class="readout__corner readout__corner--top">FIG. 07 / MIRROR CELL</span>
<span class="readout__corner readout__corner--end">AXIS θ <output class="readout__angle">000.0°</output></span>
</div>
<div class="readout__status">
<h2 class="readout__title" id="readout-title">System status</h2>
<dl class="readout__rows">
<div class="readout__row"><dt>Pointing</dt><dd>±0.4 arcsec</dd></div>
<div class="readout__row"><dt>Tracking drift</dt><dd>0.02″ / min</dd></div>
<div class="readout__row"><dt>Mirrors in grind</dt><dd>3</dd></div>
<div class="readout__row"><dt>Field returns</dt><dd>0</dd></div>
<div class="readout__row"><dt>First reply</dt><dd>2 days</dd></div>
<div class="readout__row readout__row--live"><dt>Sidereal, Abisko</dt><dd><time class="readout__clock" data-longitude="18.83">00:00:00</time></dd></div>
</dl>
<p class="readout__note">Last bench calibration on the 14th, against the north collimator. Next sky check tonight at 22:40.</p>
</div>
</section>
<style>
.readout {
display: grid;
grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1fr);
gap: var(--space-l);
padding: var(--space-l) var(--gutter);
border-inline: var(--frame) solid var(--ink);
background:
repeating-linear-gradient(90deg,
transparent 0 calc(var(--col-step) - var(--col-rule)),
var(--rule-col) calc(var(--col-step) - var(--col-rule)) var(--col-step))
calc(var(--col-offset) - var(--col-step) + var(--col-rule)) 0 / auto,
var(--page);
}
.readout__tab {
display: flex;
align-items: flex-start;
justify-content: center;
margin: 0;
padding-top: 20px;
background: var(--accent);
font: var(--weight-label) var(--text-label)/var(--lh-label) var(--font-display);
text-transform: uppercase;
white-space: nowrap;
}
.readout__tab span {
writing-mode: vertical-rl;
rotate: 180deg;
}
.readout__panel {
position: relative;
height: 320px;
background-color: var(--ink);
background-image:
linear-gradient(var(--grid-dark) 1px, transparent 1px),
linear-gradient(90deg, var(--grid-dark) 1px, transparent 1px);
background-size: 33px 33px;
background-position: -1px -1px;
color: var(--on-dark);
cursor: grab;
}
.readout__panel:active {
cursor: grabbing;
}
.readout__shape {
width: 100%;
height: 100%;
touch-action: pan-y;
}
.readout__corner {
position: absolute;
font: var(--weight-label) 12px/var(--lh-label) var(--font-display);
letter-spacing: 0.04em;
pointer-events: none;
}
.readout__corner--top {
top: 12px;
left: 14px;
}
.readout__corner--end {
right: 14px;
bottom: 12px;
color: var(--accent);
}
.readout__angle {
font-variant-numeric: tabular-nums;
}
.readout__status {
align-self: start;
}
.readout__title {
margin: 0 0 var(--space-m);
font: var(--weight-mid) var(--title-m)/var(--lh-title-m) var(--font-display);
text-transform: uppercase;
}
.readout__rows {
margin: 0;
}
.readout__row {
display: flex;
align-items: baseline;
gap: var(--space-xs);
height: 28px;
font: var(--weight-label) var(--text-label)/var(--lh-label) var(--font-display);
text-transform: uppercase;
}
.readout__row::after {
content: "";
order: 1;
flex: 1;
min-width: var(--space-m);
border-bottom: var(--dot-leader) dotted var(--ink);
translate: 0 -3px;
}
.readout__row dt {
order: 0;
}
.readout__row dd {
order: 2;
margin: 0;
font-variant-numeric: tabular-nums;
}
.readout__note {
max-width: 30em;
margin: var(--space-m) 0 0;
color: var(--ink-soft);
}
.readout__row--live dd {
display: flex;
align-items: center;
gap: var(--space-xs);
color: var(--ink);
}
.readout__row--live dd::before {
content: "";
width: 8px;
height: 8px;
background: var(--accent);
animation: readout-blink 1s steps(1) infinite;
}
@keyframes readout-blink {
50% { opacity: 0; }
}
@media (max-width: 56rem) {
.readout {
grid-template-columns: minmax(0, 1fr);
gap: var(--space-m);
}
.readout__tab {
height: 40px;
align-items: center;
padding: 0;
}
.readout__tab span {
writing-mode: horizontal-tb;
rotate: none;
}
.readout__panel {
height: 280px;
}
}
</style>
<script>
(() => {
const still = matchMedia('(prefers-reduced-motion: reduce)');
const turnPerSecond = 0.1;
function icosahedron() {
const g = (1 + Math.sqrt(5)) / 2;
const raw = [
[-1, g, 0], [1, g, 0], [-1, -g, 0], [1, -g, 0],
[0, -1, g], [0, 1, g], [0, -1, -g], [0, 1, -g],
[g, 0, -1], [g, 0, 1], [-g, 0, -1], [-g, 0, 1],
];
const size = Math.hypot(1, g);
const points = raw.map((p) => p.map((v) => v / size));
const near = (a, b) => Math.abs(Math.hypot(...a.map((v, i) => v - b[i])) - 2 / size) < 1e-6;
const edges = [];
for (let a = 0; a < 12; a++) for (let b = a + 1; b < 12; b++) if (near(points[a], points[b])) edges.push([a, b]);
const faces = [];
for (const [a, b] of edges) for (let c = b + 1; c < 12; c++) if (near(points[a], points[c]) && near(points[b], points[c])) faces.push([a, b, c]);
const facesOfEdge = edges.map(([a, b]) => faces.filter((f) => f.includes(a) && f.includes(b)));
return { points, edges, faces, facesOfEdge };
}
function rotate([x, y, z], yaw, pitch) {
const x1 = x * Math.cos(yaw) + z * Math.sin(yaw);
const z1 = -x * Math.sin(yaw) + z * Math.cos(yaw);
const y2 = y * Math.cos(pitch) - z1 * Math.sin(pitch);
const z2 = y * Math.sin(pitch) + z1 * Math.cos(pitch);
return [x1, y2, z2];
}
function run(panel) {
const canvas = panel.querySelector('.readout__shape');
const angleOut = panel.querySelector('.readout__angle');
const context = canvas.getContext('2d');
const shape = icosahedron();
const camera = 3.2;
let yaw = 0.6;
let pitch = -0.35;
let pull = 0;
let dragFrom = null;
let last = 0;
let frame = 0;
function paint() {
const width = canvas.clientWidth;
const height = canvas.clientHeight;
const radius = Math.min(width, height) * 0.4;
const turned = shape.points.map((p) => rotate(p, yaw, pitch));
const flat = turned.map(([x, y, z]) => {
const scale = camera / (camera - z);
return [width / 2 + x * radius * scale, height / 2 + y * radius * scale];
});
const facing = shape.faces.map((face) => {
const centre = [0, 1, 2].map((i) => face.reduce((sum, v) => sum + turned[v][i], 0) / 3);
const toCamera = [-centre[0], -centre[1], camera - centre[2]];
return centre.reduce((sum, v, i) => sum + v * toCamera[i], 0) > 0;
});
const ink = getComputedStyle(panel).color;
context.clearRect(0, 0, width, height);
context.lineWidth = 1.5;
context.lineCap = 'round';
context.setLineDash([6, 3]);
context.strokeStyle = ink;
for (const front of [false, true]) {
context.globalAlpha = front ? 1 : 0.3;
context.beginPath();
shape.edges.forEach(([a, b], i) => {
const seen = shape.facesOfEdge[i].some((f) => facing[shape.faces.indexOf(f)]);
if (seen !== front) return;
context.moveTo(...flat[a]);
context.lineTo(...flat[b]);
});
context.stroke();
}
context.globalAlpha = 1;
context.setLineDash([]);
context.fillStyle = ink;
flat.forEach(([x, y], i) => {
if (turned[i][2] > 0) context.fillRect(x - 1.5, y - 1.5, 3, 3);
});
const degrees = ((yaw * 180 / Math.PI) % 360 + 360) % 360;
angleOut.textContent = `${degrees.toFixed(1).padStart(5, '0')}°`;
}
function fit() {
const density = Math.min(2, devicePixelRatio || 1);
canvas.width = canvas.clientWidth * density;
canvas.height = canvas.clientHeight * density;
context.setTransform(density, 0, 0, density, 0, 0);
paint();
}
function tick(now) {
const seconds = last ? Math.min(0.05, (now - last) / 1000) : 0;
last = now;
if (!dragFrom) {
yaw += (turnPerSecond + pull) * seconds;
pull *= 0.94;
}
paint();
frame = requestAnimationFrame(tick);
}
function start() {
cancelAnimationFrame(frame);
last = 0;
frame = requestAnimationFrame(tick);
}
panel.addEventListener('pointerdown', (event) => {
dragFrom = { x: event.clientX, y: event.clientY, yaw, pitch, at: performance.now() };
panel.setPointerCapture(event.pointerId);
});
panel.addEventListener('pointermove', (event) => {
if (!dragFrom) return;
yaw = dragFrom.yaw + (event.clientX - dragFrom.x) * 0.01;
pitch = Math.max(-1.2, Math.min(1.2, dragFrom.pitch + (event.clientY - dragFrom.y) * 0.01));
if (still.matches || !frame) paint();
});
const release = (event) => {
if (!dragFrom) return;
const held = Math.max(16, performance.now() - dragFrom.at) / 1000;
pull = Math.max(-3, Math.min(3, (event.clientX - dragFrom.x) * 0.01 / held * 0.3));
dragFrom = null;
};
panel.addEventListener('pointerup', release);
panel.addEventListener('pointercancel', release);
new ResizeObserver(fit).observe(canvas);
new IntersectionObserver(([entry]) => {
cancelAnimationFrame(frame);
frame = 0;
if (entry.isIntersecting && !still.matches) start();
}).observe(canvas);
}
function siderealTime(date, longitude) {
const days = date.getTime() / 86400000 + 2440587.5 - 2451545.0;
const hours = (((18.697374558 + 24.06570982441908 * days + longitude / 15) % 24) + 24) % 24;
const seconds = Math.floor(hours * 3600);
return [seconds / 3600, (seconds / 60) % 60, seconds % 60].map((v) => String(Math.floor(v)).padStart(2, '0')).join(':');
}
function runClock(clock) {
const longitude = Number(clock.dataset.longitude);
const show = () => { clock.textContent = siderealTime(new Date(), longitude); };
show();
setInterval(show, 1000);
}
document.querySelectorAll('.readout__panel').forEach(run);
document.querySelectorAll('.readout__clock').forEach(runClock);
})();
</script>