Ore UI

repository·main·Indexed 20 days ago

https://github.com/mojang/ore-ui

A meta-repository of open-source building blocks from Mojang Studios for constructing video game user interfaces using web standards, React, and TypeScript. It includes @react-facet, an observable-based state management library designed for high-performance rendering and minimal re-renders in game UIs, along with supporting packages like @react-facet/core, @react-facet/dom-fiber, and @react-facet/dom-fiber-testing-library.

Tokens
52.8K
Snippets
125
Records
202
Agent score
69%

What's inside Ore UI

  1. Overview of Ore UI

    main
    Ore UI is a collection of open-source building blocks from Mojang Studios designed for constructing video game user interfaces (UIs) using web standards. It is used in titles such as Minecraft Bedrock Edition and Minecraft Legends. The ecosystem is built on React and TypeScript.
  2. Overview of @react-facet for Game UI Development

    main
    The @react-facet library is designed specifically for building user interfaces intended to run inside computer games (such as main menus, settings screens, and HUDs). It addresses the challenge of using web-inspired technologies (like React) within the stringent frame budgets of real-time games by optimizing for performance in environments like Coherent Lab's Gameface or the Chromium Embedded Framework (CEF).
  3. Use @react-facet/dom-fiber for React Facet rendering

    main
    The @react-facet/dom-fiber package is used when you need a React Renderer that understands Facets natively. It provides fast-* components which should be used instead of traditional JSX DOM elements to ensure optimal performance and compatibility when working with Facets.
  4. Use @react-facet/core for core Facet logic and React Hooks

    main
    The @react-facet/core package provides the fundamental building blocks for working with Facets. Use it to access the core Facet data structure, functions for constructing and operating on Facets, and React Hooks designed to integrate Facet logic into your React components.
  5. Use @react-facet/shared-facet for Gameface engine integration

    main

    The @react-facet/shared-facet package is specifically designed for interfacing with game engines that utilize Gameface. It includes:

    • A custom Facet implementation for direct engine interfacing.
    • A custom Context component to facilitate communication between React and the game engine.
    • Specialized React hooks and helper functions for managing sharedFacets.
  6. Use @react-facet/dom-fiber-testing-library for testing game UIs

    main

    The @react-facet/dom-fiber-testing-library is part of the React Facet ecosystem, which provides state management designed for performant game UIs. This specific package is intended for testing components within that ecosystem.

    For detailed usage instructions, API references, and integration guides, refer to the official documentation at https://react-facet.mojang.com/.