PluginBench
Skill
Pass
Audit score 90

pixijs-create

pixijs/pixijs-skills

Scaffold a new PixiJS v8 project or add PixiJS to an existing one with create-pixi CLI.

What is pixijs-create?

Use create-pixi to scaffold a new PixiJS v8 project with your choice of bundler (Vite, Webpack, esbuild), framework (React), or creation template. For existing projects, install pixi.js directly via npm. Covers interactive and non-interactive flows, all available templates, and post-scaffold dev setup.

  • Scaffold new PixiJS v8 projects with interactive or non-interactive CLI prompts
  • Choose from bundler templates (Vite, Webpack, esbuild, import-map), creation templates (web with AssetPack/sound/UI), framework templates (React), and extension templates
  • Support npm, yarn, pnpm, and bun package managers with correct flag syntax
  • Install pixi.js into existing projects without scaffolding
  • Provide TypeScript and JavaScript variants for most templates
  • Generate projects with dev server, hot-reload, build, and lint scripts pre-configured

How to install pixijs-create

npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-create
Prerequisites
  • Node.js 18+ or 20+ (some templates like creation-web and framework-react may require newer versions)
  • npm 7+, yarn, pnpm, or bun installed
Claude Code
Cursor
Windsurf
Cline

How to use pixijs-create

  1. 1.Run `npm create pixi.js@latest` (or equivalent for your package manager) to start the interactive scaffolder
  2. 2.Select your project name, template category, and variant (TypeScript/JavaScript) from the prompts, or pass `--template bundler-vite` to skip prompts
  3. 3.Navigate into the created project directory with `cd my-game`
  4. 4.Install dependencies with `npm install` (or your package manager equivalent)
  5. 5.Start the dev server with `npm run dev` and open the local URL in your browser
  6. 6.For existing projects, run `npm install pixi.js` and import from `pixi.js` in your code

Use cases

Good for
  • Starting a new PixiJS game or interactive app from scratch with Vite bundler
  • Adding PixiJS to an existing React application
  • Creating a PixiJS extension or reusable package
  • Setting up a no-bundler demo using browser import maps
  • Building a scene-based game with the Creation Engine template including AssetPack and sound
Who it's for
  • Game developers starting a new PixiJS project
  • Web developers adding PixiJS to existing frameworks or bundlers
  • Teams scaffolding projects via CI or automation scripts
  • Developers learning PixiJS who want a quick starting template

pixijs-create FAQ

What's the difference between bundler, creation, and framework templates?

Bundler templates (bundler-vite, bundler-webpack, etc.) are minimal PixiJS setups with your chosen build tool. Creation templates (creation-web) include extras like AssetPack, sound, UI, and scene routing. Framework templates (framework-react) embed PixiJS inside a host framework like React.

Which template should I use for a new project?

For most new projects, `bundler-vite` is the recommended starting point. It provides a modern, fast dev experience with TypeScript support.

Do I need to use create-pixi if I already have a project?

No. If you already have a bundler or framework set up, skip the CLI and run `npm install pixi.js` directly, then import and use it in your code.

Why do I need `--` when using npm create with flags?

npm 7+ consumes flags before passing them to the create command. Use `npm create pixi.js@latest my-game -- --template bundler-vite` to pass `--template` to create-pixi. Yarn, pnpm, and bun don't require the separator.

What Node.js version do I need?

Node.js 18+ or 20+ is required. Some templates like creation-web and framework-react may require a newer version; your package manager will warn if your version is too old.

Full instructions (SKILL.md)

Source of truth, from pixijs/pixijs-skills.


name: pixijs-create description: "Use this skill when scaffolding a new PixiJS v8 project with the create-pixi CLI or adding PixiJS to an existing project. Covers npm/yarn/pnpm/bun create commands, interactive vs non-interactive flows, bundler vs creation template categories, available template presets (bundler-vite, bundler-webpack, bundler-esbuild, bundler-import-map, creation-web, framework-react, extension-default), Node version requirements, npm install pixi.js for existing projects, post-scaffold dev flow, and the Vite top-level-await production-build gotcha. Triggers on: create pixi.js, npm create, npm install pixi.js, scaffold, template, bundler-vite, bundler-webpack, creation-web, framework-react, new project, existing project, getting started, quick start." license: MIT

create pixi.js is the official CLI for scaffolding a new PixiJS v8 project. Run it with any package manager (npm, yarn, pnpm, bun) and pick a template from the interactive menu, or pass --template to skip prompts. It writes a self-contained project folder; you then cd in, install dependencies, and run the dev script.

Quick Start

Scaffold a new project with interactive prompts:

npm create pixi.js@latest

Or skip prompts by passing a project name and template:

npm create pixi.js@latest my-game -- --template bundler-vite

Then:

cd my-game
npm install
npm run dev

Requires Node.js 18+ or 20+. Some templates (notably creation-web and framework-react) may require a newer Node version; the package manager will warn if so.

Adding PixiJS to an existing project

If you already have a bundler, framework, or project set up, skip the CLI and install the package directly:

npm install pixi.js

Then import from pixi.js and construct an Application as shown in pixijs-application. The CLI templates are a convenience for new projects; they don't add anything to the library that npm install pixi.js can't give you.

Related skills: pixijs-application (how the scaffolded new Application() + app.init() entry point works), pixijs-core-concepts (renderers and the render loop), pixijs-scene-core-concepts (scene graph fundamentals for the first things you'll add to the stage), pixijs-assets (loading textures, fonts, and bundles the template expects you to drop into public/ or src/assets/).

Core Patterns

Choose a package manager

The command is the same shape for every package manager:

npm create pixi.js@latest
yarn create pixi.js
pnpm create pixi.js
bun create pixi.js

Under npm 7+ you must pass a -- before CLI flags so npm doesn't consume them:

npm create pixi.js@latest my-game -- --template bundler-vite

Yarn, pnpm, and bun don't need the extra separator:

yarn create pixi.js my-game --template bundler-vite
pnpm create pixi.js my-game --template bundler-vite
bun create pixi.js my-game --template bundler-vite

Use . as the project name to scaffold into the current directory.

Interactive flow

Running with no arguments walks through prompts:

  1. Project name (defaults to pixi-project).
  2. Framework / template category.
  3. Variant (TypeScript vs JavaScript where applicable).
  4. Whether to install dependencies immediately (some runners).

At the end, the CLI prints the cd + install + dev commands for the manager you invoked it with.

Non-interactive flow

Pass a project name and --template to skip all prompts. This is the form you want for scripts, CI, and quickstart docs:

npm create pixi.js@latest my-game -- --template bundler-vite

Available template presets

Templates fall into two categories:

  • Bundler templates (bundler-*): generic PixiJS setup wired up with your bundler of choice. Use one of these when you want to pick your own structure.
  • Creation templates (creation-*): platform-tailored starters with extras already wired in (AssetPack, sound, UI, scene routing). Use one of these when you want batteries included.
  • Framework templates (framework-*): PixiJS embedded inside a host framework like React.
  • Extension templates (extension-*): scaffolding for building a reusable PixiJS package.

For most new projects, bundler-vite is the recommended starting point.

TemplateWhat you get
bundler-viteVite + TypeScript PixiJS project. The default first-stop template.
bundler-vite-jsVite + plain JavaScript.
bundler-webpackWebpack + TypeScript.
bundler-webpack-jsWebpack + plain JavaScript.
bundler-esbuildesbuild + TypeScript.
bundler-esbuild-jsesbuild + plain JavaScript.
bundler-import-mapNo-bundler setup using a browser import map (good for learning / demos).
creation-webPixiJS Creation Engine web template with scene-based game scaffolding, AssetPack, sound, and UI integration.
framework-reactReact + TypeScript + PixiJS via the @pixi/react package.
framework-react-jsReact + plain JavaScript + PixiJS.
extension-defaultStarter for building a reusable PixiJS extension/package.

The live list is maintained in the create-pixi repo; run npm create pixi.js@latest without arguments to see the current menu if you need to confirm.

Post-scaffold flow

Every template ships with the same three-step onboarding:

cd my-game
npm install
npm run dev

npm run dev starts the local dev server on the default port (Vite 5173, webpack 8080, etc.; the template's README has the exact number). Changes to src/ hot-reload without reloading the whole page.

Other scripts every template exposes (names may vary slightly by preset):

  • npm run build: produce a production build in dist/.
  • npm run preview / npm run serve: serve the production build locally.
  • npm run lint: run the template's configured linter if it ships one.

Scaffolding into an existing directory

Use . as the project name to write into the current working directory. The CLI refuses to run if non-empty and conflicting files exist unless you confirm the prompt.

mkdir my-game
cd my-game
npm create pixi.js@latest . -- --template bundler-vite

Next steps

After npm run dev starts, the template opens on a blank or bunny-sprite scene. The usual progression is:

  1. Read pixijs-application to understand how the template's entry point constructs new Application() and calls await app.init(...), how app.stage / app.renderer / app.canvas hang together, and how the ResizePlugin and TickerPlugin behave by default.
  2. Read pixijs-core-concepts for the renderer and render-loop mental model.
  3. Read pixijs-scene-core-concepts before adding your first non-trivial scene so you know the container-vs-leaf rule upfront.
  4. Drop in textures via pixijs-assets once you're ready to load real art.

Common Mistakes

[HIGH] Missing -- separator on npm 7+

Wrong:

npm create pixi.js@latest my-game --template bundler-vite

Correct:

npm create pixi.js@latest my-game -- --template bundler-vite

npm 7+ consumes flags after the package spec unless you pass -- to forward them. Without the separator, the CLI ignores --template and drops back to the interactive prompt. Yarn, pnpm, and bun don't need the separator.

[MEDIUM] Running with an old Node version

PixiJS requires Node 18+ or 20+. Some templates (framework-react, creation-web) expect a newer Node for their tooling. Upgrade Node before re-running the CLI if you see an "engines" warning from your package manager.

[MEDIUM] Top-level await app.init() broken in Vite production builds

On Vite versions <=6.0.6, top-level await works in dev but breaks in production builds, so a bundler-vite project that does this at module scope will fail after npm run build:

const app = new Application();
await app.init({ resizeTo: window }); // broken at module top level in prod

Wrap the init in an async IIFE instead:

(async () => {
  const app = new Application();
  await app.init({ resizeTo: window });
  document.body.appendChild(app.canvas);
})();

Upgrading Vite past 6.0.6 also resolves it, but the IIFE pattern is safe on every version and matches the PixiJS quick-start guide.

API Reference

Related skills

More from pixijs/pixijs-skills and the wider catalog.

PIpixijs-custom-rendering logo

pixijs-custom-rendering

pixijs/pixijs-skills

Write custom shaders, uniforms, filters, and batchers in PixiJS v8 with WebGL and WebGPU support.

2.0k installsAudited
PIpixijs-environments logo

pixijs-environments

pixijs/pixijs-skills

Run PixiJS v8 outside the browser: Web Workers, OffscreenCanvas, Node/SSR, and CSP-restricted contexts.

1.9k installsAudited
PIpixijs-events logo

pixijs-events

pixijs/pixijs-skills

Handle pointer, mouse, touch, and wheel input in PixiJS v8 with federated events.

2.0k installsAudited
PIpixijs-filters logo

pixijs-filters

pixijs/pixijs-skills

Apply visual effects to PixiJS v8 containers using built-in and custom filters with GLSL/WGSL shaders.

2.0k installsAudited
PIpixijs-html-source logo

pixijs-html-source

pixijs/pixijs-skills

Use this skill when rendering live HTML/DOM elements (or frozen snapshots of them) as PixiJS v8 textures via the EXPERIMENTAL HTML-in-Canvas browser APIs. Covers the pixi.js/html-source side-effect import, feature-detection with canvas.requestPaint, HTMLSource for a live, repainting element kept interactive in the browser (autoLayout/autoUpdate/autoRequestPaint, requestPaint, isReady, the direct-child-of-canvas + layoutsubtree requirement), ElementImageSource for an immutable captureElementImage() snapshot (autoClose, ready immediately), using the source on a Sprite/Texture/Mesh, fallback-only auto-detection via Texture.from at priority -10, and destroy/cleanup. Triggers on: HTMLSource, ElementImageSource, pixi.js/html-source, requestPaint, captureElementImage, ElementImage, layoutsubtree, autoRequestPaint, autoUpdate, autoClose, HTML in canvas, render DOM to texture, HTMLSourceOptions, ElementImageSourceOptions, HTMLSourceCanvas, experimental.

773 installsAudited
PIpixijs-math logo

pixijs-math

pixijs/pixijs-skills

PixiJS v8 math primitives: points, matrices, shapes, hit testing, and coordinate transforms.

2.0k installsAudited