Docs

Introduction

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.
  • UI: creation, viewport, events, updates, and drawing.
  • Node: tree operations, styles, text, layout, and listeners.
  • ResourcesWebGPU: shared WebGPU resources and image and font registration.
  • UIWorldSpace: engine factories, cameras, materials, and custom meshes.

On this page