Log inGet started
World

Wayfinder Studio: Minimap, Compass, Waypoint and Toast Kit

README.md

compass

The compass family, four genuinely different shapes:

  • bar: a strip along the top of the screen that scrolls with the camera heading. Its frame follows the theme (sci-fi tape, ornate fantasy scroll, cartoon pill, pixel box, minimal ticks).
  • dial: a round compass rose whose card turns with the camera.
  • ring: a bezel on the minimap's own edge, round or square to match it. North-up with a notch that swings to the heading, or turning with a heading-up or radar minimap. Tracked places sit on the rim, and the nearest waypoint's distance just inside.
  • arrow: no cardinal points. One arrow turns to point straight at the nearest waypoint, with its name, distance, how many others there are, and an up/down cue when it is above or below the viewer.

Called by navUiKit.hud (and the gallery) through Compass.build(cmds, ctx, variant, x, y, w, h), which draws into a canvas command list. Compass.variants lists the variants, Compass.labelH the strip each one reserves under its drawing, and Compass.RING_W / Compass.RING_GAP the band the ring adds round the minimap. Worlds pick one with Nav.setVariant("compass", "ring") and never call this module directly.