PixiRendererModule02 / 7

Pixi-only: a 2D game

Connect PixiJS for the game and UI.

For a 2D game, select PixiRendererModule. It renders Pixi nodes in one canvas. The blank project generated by gamedevland create uses this mode.

import { PixiRendererModule } from '@gamedevland/engine/renderers/pixi';

// Inside GameConfig:
system: { renderer: new PixiRendererModule() },

Install pixi.js. In JSON, use Container, Sprite, Text, Graphics and other Pixi types. Import their classes from @gamedevland/engine/renderers/pixi; import shared BaseComponent and BaseAction from /layouts.

JSONContainer → Sprite, Text
PixiJSOne canvas
InputClicks and taps on Pixi nodes

For a panel that stretches without distorting its corners, use NineSliceSprite: set asset, leftWidth, rightWidth, topHeight and bottomHeight in props, then set the panel size. The borders must leave an interior region in the texture.

This mode fits games whose world and UI use 2D elements. For a 3D object inside a Pixi screen, use the separate Three-texture mode.