Log inGet started
World

Wayfinder Studio: Minimap, Compass, Waypoint and Toast Kit

README.md

toasts

Notifications that slide, pop and fade by themselves:

  • slide: cards that slide in from the right and stack.
  • banner: a band across the top, one at a time.
  • pixel: stepped motion and typewriter text.
  • achievement: a medallion pop with a shine.
  • minimal: a quiet pill.
  • prompt: a controlsKit button glyph and an action, such as "Press E to open".

Each variant has a visible cap. Extras queue, and on a short phone screen the cards wait for room under a banner instead of overlapping it.

While on-screen touch controls show, toasts keep clear of them: cards stack from the top in a column free of the thumb buttons, the stick corner and the Menu button, and bottom pills and prompts lift above the controls. Toasts.touchControls() lists the controls (from zinput.touchControls.layout(), controlsKit's included); the HUD passes them to build as ctx.touch = { circles, rects }. Keyboard and gamepad layouts are unchanged.

Worlds call Nav.toast(text, opts). The HUD owns one state per viewer: Toasts.newState(), Toasts.push(state, toast, now), Toasts.step(state, now, max) and Toasts.build(cmds, ctx, state).