Skip to main content

Choosing a template

Every template is a working PixiJS project. They differ in build tool, in how much code they start you with, and in what you're building.

TemplateWhat you getBuild toolTypeScriptJavaScript
Starter, WebGameA bunny that jumps when you press a button. A standalone browser game built with Vite.Vitestarter-webstarter-web-js
Starter, Web, multiplayerGameA bunny that jumps when you press a button. A standalone browser game built with Vite. Adds a Colyseus server that keeps every player in sync.Vitestarter-web-multiplayerstarter-web-multiplayer-js
Starter, Discord ActivityGameA bunny that jumps when you press a button. Runs inside Discord as an Activity, with Discord sign-in.Vitestarter-discordstarter-discord-js
Starter, Discord Activity, multiplayerGameA bunny that jumps when you press a button. Runs inside Discord as an Activity, with Discord sign-in. Adds a Colyseus server that keeps every player in sync.Vitestarter-discord-multiplayerstarter-discord-multiplayer-js
ViteBundlerInstant dev server that reloads on save. The recommended starting point.Vitebundler-vitebundler-vite-js
webpackBundlerwebpack with esbuild-loader for fast TypeScript builds.webpackbundler-webpackbundler-webpack-js
esbuildBundlerPlain esbuild scripts with a live-reloading dev server and no plugins.esbuildbundler-esbuildbundler-esbuild-js
Import mapBundlerNo build step. PixiJS loads from a CDN through a browser import map.None–bundler-import-map
ReactFrameworkReact with @pixi/react, built with Vite.Viteframework-reactframework-react-js
DefaultExtensionBuild, test, document and publish a PixiJS extension with PixiJS Extension Scripts.Extension Scriptsextension-default–

Which one to pick​

If you wantUse
A browser game with animation, UI, sound, filters and SpineStarter on the web
A multiplayer game where a server keeps every player in syncStarter on the web, multiplayer
A game that people launch from a Discord channelStarter on Discord
A multiplayer game that people play together inside DiscordStarter on Discord, multiplayer
A blank PixiJS app and no strong opinion on toolingVite
webpack, because your team or another project already uses itwebpack
A build you can read in full: two short scripts and no pluginsesbuild
No build step, for a quick prototype or a page on a static hostImport map
PixiJS inside a React appReact
To publish a library that adds features to PixiJSExtension

If you're making a game, start with a game template: pick the platform it runs on, and whether it's multiplayer. It's the Vite template plus the libraries most games add, and you can remove the ones you don't need. For anything else, or if you're unsure, start with Vite. Its config only sets base: "./", the dev server port and open: true. The game and React templates use Vite too, so you can move to them later without learning a new build tool.

What every app template includes​

All templates except the extension template share these:

  • A public/ folder for static files such as images and the favicon.
  • A dev server on port 8080. See change the dev server port.
  • oxlint and oxfmt with lint and format scripts, plus VS Code settings that use the Oxc extension to lint and format on save.
  • A .gitignore for node_modules, dist and editor files.
  • PixiJS 3D, with a spinning cube that shows 3D and 2D on one stage.

The extension template uses PixiJS Extension Scripts for building, linting and testing instead, and lists PixiJS 3D as a peer dependency.

TypeScript or JavaScript​

The table above shows which languages each template comes in. When a template has both, pick JavaScript at the language prompt or use its -js id. TypeScript and JavaScript explains how the two versions differ.