pixi-vn-ui

Build game UI screens with React, Vue, or PixiJS layers over the Pixi'VN canvas.

145|9|Updated Feb 14, 2024
One-click install
npx skills add https://github.com/DRincs-Productions/pixi-vn --skill pixi-vn-ui-drincs-productions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pixi-vn-ui
Source: https://github.com/DRincs-Productions/pixi-vn/tree/main/skills/ui
Command: npx skills add https://github.com/DRincs-Productions/pixi-vn --skill pixi-vn-ui-drincs-productions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Pixi'VN ships no built-in UI components, so developers must wire menus, HUDs, dialogue boxes, and settings screens themselves. This Skill provides the patterns for mounting HTML or PixiJS UI layers over the canvas, routing between screens, theming shadcn/ui templates, and keeping UI components in sync with game storage. ## Core Features & Use Cases - HTML UI Layers: Mount a React or Vue root onto the canvas with canvas.htmlLayers.add/get/remove, including pointer-events handling so interactive elements work without blocking canvas input. - PixiJS UI Layers: Build UI screens from plain PixiJS components via canvas.layers.add/get/remove, outside the save-able gameLayer, with support for libraries like PixiUI and PixiLayout. - Routing & Navigation: Navigate between UI screens with TanStack Router, wire navigate into narration steps via StepLabelProps, and block browser back/forward desync. - Storage Synchronization: Connect UI to game data using TanStack Store/Query patterns and storage.setStorageHandler so the UI refreshes when labels, steps, or save loads change storage. - Use Case: Build a settings screen where text speed persists in localStorage, a HUD showing an affection stat read from game storage, and a main menu routed with TanStack Router — all themed via a shadcn/ui theme generator. ## Quick Start Use the pixi-vn-ui skill to add a React main menu screen mounted as an HTML layer over the canvas with a working settings page connected to game storage.

Frequently Asked Questions about pixi-vn-ui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a React UI on top of a Pixi'VN canvas?

Use canvas.htmlLayers.add(id, element, style) to create a div layer above the canvas, then call createRoot on the returned element and render your React app into it. Set pointer-events: auto on interactive components since layers default to pointer-events: none.

How do I navigate between UI screens in a Pixi'VN game?

Use a routing library such as TanStack Router with file-based routes for each screen. Extend StepLabelProps with a navigate function so narration steps can change routes, and consider blocking browser back/forward buttons to avoid desyncing route state from narration state.

Why is my Pixi'VN UI button not responding to clicks?

HTML UI layers default to pointer-events: none, so all mouse and touch events pass through to the canvas. Set pointer-events: auto explicitly on each interactive component, or add a CSS rule targeting your component library's interactive elements.

Can I build a Pixi'VN UI without React or Vue?

Yes, use canvas.layers.add to attach a plain PixiJS Container directly to the stage as a UI layer. It accepts any PixiJS-compatible component, and libraries like PixiUI and PixiLayout provide buttons, sliders, and flex-style layout.

Is UI state included in Pixi'VN save files?

No, only canvas gameLayer state is saved; UI layer state is never included in saves. Persist UI values yourself in game storage if they must survive save/load and go-back, or in localStorage if they must persist across playthroughs.

How do I keep React components in sync with Pixi'VN game storage?

Read values through TanStack Query queryFn calls to storage.get, and register a single storage.setStorageHandler that invalidates queries on every storage write. Note that setStorageHandler replaces rather than stacks, so set it once near app startup.