Skip to content

Holographic HUD

Still scrolling? Then you are the kind of developer who reads the source of the docs site too. The last hidden console is for you, and it floats.

hologram is a hidden pack: an original homage to the translucent cyan heads-up displays of modern science-fiction films. Thin 1px line-work on a deep navy ground, chamfered panels with corner brackets, radial gauges and segmented rings, hexagon accents, tiny spaced capitals and a soft glow on everything; amber warns, red is critical. Every label, number and place below is invented. Select it with import Hologram (also HUD, HoloHUD) or pack="hologram" on the fence. The dark appearance is the canonical projection; the light appearance is a daylight AR variant — dark cyan line-work on a pale, translucent ground, for when the visor is pointed at the sky.

HUDFrame (alias Panel) is the chamfered panel: cut corners, drawn edges, corner brackets, a hexagon bullet before the title, code: in an outlined tag and a footer: strip; .variant(.alert) turns it amber. DataPanel is its small sibling with a filled title strip. The rest: Reticle and TargetLock, RadialGauge, Ring, SegmentBar, Scanner (a radar sweep), Alert (amber by default; severity: .error is critical red), Critical (the full-width banner), Readout, HexBadge, Telemetry, Waveform, DataTable (bracketed rows), HUDButton (chamfered outline; .solid, .ghost), Header, Caption and Rule. Charts, tables, buttons, toggles and sliders from the core are restyled to match.

The reusable pieces (HUDFooter, SystemMeter, SystemPanel) live in mockups/hologram/hud.mockitdown and are imported with import "hologram/hud".

Flight display

The main display: a targeting reticle between two radial gauges, readouts along the bottom and the mode buttons.

FLIGHTVECTOR ASSIST
MK-07
THRUST72%
SHIELD45%
ENERGY38%
COOLANT86%
ALTITUDE
12 480
+120M
AIRSPEED
0.84
HEADING
117°
-2
RANGE
41.0
ASSISTHOVERCRUISE
STABILISERNIGHT
NOMINALLAT 41.207 · LON 12.884
LINK 98%21:47:06
Light
FLIGHTVECTOR ASSIST
MK-07
THRUST72%
SHIELD45%
ENERGY38%
COOLANT86%
ALTITUDE
12 480
+120M
AIRSPEED
0.84
HEADING
117°
-2
RANGE
41.0
ASSISTHOVERCRUISE
STABILISERNIGHT
NOMINALLAT 41.207 · LON 12.884
LINK 98%21:47:06
Dark
Flight display
Source
import "hologram/hud"

HUDFrame("FLIGHT", subtitle: "VECTOR ASSIST", code: "MK-07") {
  HStack(alignment: .center, spacing: 28) {
    VStack(spacing: 18) {
      RadialGauge("THRUST", value: 0.72)
      Ring(0.45, label: "SHIELD", showValue: true)
    }
    .frame(width: 160)
    ZStack {
      Reticle().frame(width: 220, height: 220)
    }
    .frame(maxWidth: .infinity)
    VStack(spacing: 18) {
      RadialGauge("ENERGY", value: 0.38)
      Ring(0.86, label: "COOLANT", showValue: true)
    }
    .frame(width: 160)
  }
  HStack(spacing: 14) {
    Readout("ALTITUDE", value: "12 480", change: "+120", unit: "M")
    Readout("AIRSPEED", value: "0.84", unit: "MACH")
    Readout("HEADING", value: "117°", change: "-2")
    Readout("RANGE", value: "41.0", unit: "KM").color(.orange)
  }
  HStack(spacing: 10) {
    HUDButton("ASSIST", variant: .solid)
    HUDButton("HOVER")
    HUDButton("CRUISE")
    Spacer()
    Toggle("STABILISER", isOn: true)
    Toggle("NIGHT", isOn: false)
  }
} footer: {
  HUDFooter()
}

Systems diagnostic

A grid of SystemPanels, a telemetry trace and a bar chart, and the module table with bracketed rows (one in warning).

SYSTEMSDIAGNOSTIC SWEEP 3
DX-3
POWER CELL
P-1
OUTPUT82%
THERMAL41%
RESERVE66%
ARMATURE
A-4
OUTPUT58%
THERMAL73%
RESERVE30%
OPTICS
O-2
OUTPUT91%
THERMAL22%
RESERVE88%
THERMAL TELEMETRY
CORESKIN
JOINT TORQUE
MODULESTATELOADTEMPUPTIME
PWR-01ONLINE82%41°212:04
ARM-04STRAIN97%88°011:52
OPT-02ONLINE35%29°212:04
DIAGLAT 41.207 · LON 12.884
LINK 98%21:47:06
Diagnostic

Scanner

The sweep: a Scanner with three contacts and the planned track, a TargetLock on the nearest contact, the contact list and a waveform of the return signal.

SCANPASSIVE ARRAY
SC-1
SELFCONTACT 1CONTACT 2BEACON
NEAREST CONTACTCONTACT 1
C1LOCK
IDBRGRNGCLOSURE
CONTACT 1312°2.4 KM-0.8
CONTACT 2128°5.1 KM+0.2
BEACON041°7.9 KM0.0
RETURN SIGNAL
GAIN
0.6
SCANLAT 41.207 · LON 12.884
LINK 98%21:47:06
Light
SCANPASSIVE ARRAY
SC-1
SELFCONTACT 1CONTACT 2BEACON
NEAREST CONTACTCONTACT 1
C1LOCK
IDBRGRNGCLOSURE
CONTACT 1312°2.4 KM-0.8
CONTACT 2128°5.1 KM+0.2
BEACON041°7.9 KM0.0
RETURN SIGNAL
GAIN
0.6
SCANLAT 41.207 · LON 12.884
LINK 98%21:47:06
Dark
Scanner

Proximity warning

The alarm state: a red Critical banner, the frame in its amber .alert variant, warnings and a critical Alert, and the abort controls.

COLLISIONAUTOMATIC EVASION
AL-1
IMPACT88%
TIME TO CONTACT
00:04.3
EVADEABORTSILENCE
ALERTLAT 41.207 · LON 12.884
LINK 98%21:47:11
Light
COLLISIONAUTOMATIC EVASION
AL-1
IMPACT88%
TIME TO CONTACT
00:04.3
EVADEABORTSILENCE
ALERTLAT 41.207 · LON 12.884
LINK 98%21:47:11
Dark
Proximity warning

Anatomy of a display

The parts of a HUD panel, numbered. The chamfered frame 1 has its edges drawn along the cut corners and brackets on the square ones; the hexagon before the title 2 is the panel's bullet, and the code tag 3 sits at the right. A RadialGauge 4 puts its value inside a tick ring; a Ring 5 is segmented; a Readout 6 is a bracketed number; HUDButtons 7 are chamfered outlines; and the footer 8 carries a HexBadge and the clock.

POWER CELL
P-1
OUTPUT64%
4
RESERVE40%
5
DRAW
17.9
6
BOOST
7
ISOLATE
NOMINAL
8
21:47:06
123
4
5
6
7
8
123
Anatomy

The other hidden consoles: the starship console, the phosphor terminal and this one, the holographic HUD. And from before anything floated, the Retro packs.