Docs

Introduction

https://github.com/uno-build/ui

Build high-performance and pixel-perfect user interfaces for WebGPU. Use the rendering engine and UI framework of your choice.

Motivation

When you build a video game's UI with a library such as Three.js, you typically use HTML and CSS for the layout. This approach has two drawbacks. First, it ties your game to the web, so you must ship it for browsers, Electron, or another environment with a WebView. Second, it separates your UI from your game because they live in two different worlds.

uno UI solves both problems by rendering the UI directly through the game's rendering pipeline, without relying on HTML or the DOM. This lets your game run in non-web environments while keeping the UI and game in the same rendering system.

Key Features

Getting Started

  • First Layout: installation and your first WebGPU layout.
  • Interactivity: responding to node events.
  • Images: loading and displaying image resources.
  • Texts & Fonts: generating font atlases and rendering text.
  • Destroy: cleaning up nodes, UIs, and shared resources.

Components

  • React: components, event props, and UI access with React.
  • Vue: components, styles, and event bindings with Vue.
  • Solid: components, reactive updates, and compiler setup with Solid.

Engines

API reference

  • Styles: supported style properties and values.
  • Events: supported events, event data, propagation, and custom definitions.
  • ResourcesWebGPU: shared WebGPU resources and image and font registration.
  • UI: creation, viewport, events, updates, and drawing.
  • UIWorldSpace: engine factories, cameras, materials, and custom meshes.
  • Node: tree operations, styles, text, layout, and listeners.

Advanced

  • Render to Image: showing a texture rendered every frame, such as a 3D scene, as an image.

On this page