Skip to content

Repository files navigation

Layout

A retained UI engine for HUDs, virtual displays, and immersive WebGPU interfaces. Built for MetaFor.

Pages WebGPU MetaFor

Layout provides a WebGPU interface runtime. It owns one Engine renderer and retained Space, then coordinates surfaces, pointer and keyboard input, camera-locked HUDs, texture-target descriptors, and optional world-space displays without imposing a visual component library.

Why it exists

Most interface frameworks stop at a flat browser viewport. Layout is built for software that may run as a conventional 2D HUD today and move the same interface into glasses, headsets, spatial canvases, or multiple virtual displays tomorrow.

  • one render-on-demand runtime instead of a second animation engine;
  • retained surface identity and transform-only updates;
  • logical UI pixels mapped to millimetre-based world coordinates;
  • HUD and spatial-display targets, plus texture-target descriptors;
  • mouse, touch, keyboard, IME, clipping, focus, and display navigation;
  • a compact FlexBox planner for deterministic interface geometry.

Layout is infrastructure, not a theme. Visual Elements and Components live in zavx0z/ui; high-performance node editors live in zavx0z/node; GPU primitives come from zavx0z/engine.

The default TTF remains owned by Engine. A ready application declares its served URL once in HTML; UiRuntime fetches it lazily and shares the parsed font. Passing another font or fontUrl skips the default request entirely.

Storybook

The static Layout Storybook demonstrates the same runtime as a flat HUD and as a spatial display. It is built on every green main and deployed to GitHub Pages.

Workspace

packages/
  core/       @layout/core
  storybook/  @layout/storybook

Packages are internal build identities. Local development links them directly; they are not published to npm.

Development

cd ../engine/packages/core && bun link
cd ../../../layout
bun install
bun run check
bun run storybook

See ARCHITECTURE.md for ownership and CONTRIBUTING.md for contribution workflow.

License

MIT

About

Retained UI-engine infrastructure for HUDs and immersive WebGPU interfaces, built for MetaFor.

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages