Skip to main content

Getting Started

Compatibility Note

PixiJS requires Node.js version 18+, 20+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.

With NPM:

npm create pixi.js@latest

With Yarn:

yarn create pixi.js

With PNPM:

pnpm create pixi.js

With Bun:

bun create pixi.js

Then follow the prompts!

Bundler Templates

Bundler templates are general templates that you can use to scaffold a PixiJS project with a specific bundler. They include the necessary configurations and dependencies to get you started however they are not particularly opinionated about the project structure.

Currently supported template presets include:

We have created some additional templates that you can use for creating projects for specific platforms. These templates include additional configurations and dependencies to help you get started with your app development. As such they are more opinionated than the general bundler templates.

The goal of these templates is to provide a more tailored experience for developers who are less experienced with setting up a PixiJS project from scratch.

Find out more about these templates in the Creation Template section.

Currently supported creation templates include:

  • Web: A general template for building web-based applications.

Coming soon:

Advanced Usage

You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a PixiJS + Vite project, run:

# npm 7+, extra double-dash is needed:
npm create pixi.js@latest pixi-project -- --template bundler-vite

# yarn
yarn create pixi.js pixi-project --template bundler-vite

# pnpm
pnpm create pixi.js pixi-project --template bundler-vite

# Bun
bun create pixi.js pixi-project --template bundler-vite

You can use . for the project name to scaffold in the current directory.

Template List

  • bundler-vite
  • bundler-webpack
  • bundler-esbuild
  • bundler-import-map
  • creation-web

License

This project is licensed under the MIT License

Acknowledgements

This project is based on amazing create-vite tool and inspired by the create-game project by Phaser. We are grateful for their work and the inspiration it provided.