Development
Set up reparticle locally to make and test changes.
Set up
Install Node.js 24 or later and pnpm 10.32.1, then clone the repository:
git clone https://github.com/reparticlejs/reparticle.git
cd reparticle
pnpm installRun the site
pnpm dev:siteStarts the website with the docs, lab, and examples. Open the URL shown in your terminal.
Run the examples
pnpm devStarts the example gallery on its own.
Run these commands from the repository root. Both build the library packages before starting. After changing library code, stop and rerun the command to rebuild it. Restart pnpm dev:site after changing source comments or types to refresh the generated API docs.
Build shaders and API docs
Simulation is written in TypeScript with TypeGPU. Building core generates the WebGL2 shaders. Applications receive the generated shaders; they do not need TypeGPU or a build plugin.
pnpm --filter @reparticle/core buildAPI pages come from the packages’ exported types and comments. Edit the source, then regenerate the pages:
pnpm --filter @reparticle/site build:apiDo not edit generated shaders or API pages by hand. Both are rebuilt by pnpm build.
See Particle architecture for storage, updates, and resource ownership.
Check your changes
pnpm checkTests include real WebGL2 simulation and Pixi rendering. pnpm test installs Chromium automatically when needed. CI installs Linux system dependencies separately.
Checks formatting, lint, types, and tests, then builds the project. To fix formatting, run pnpm format.
pnpm install enables Git hooks. Commits check formatting and lint on staged files; pushes run type checks and tests.
Type-aware linting first builds core and pixi so their exported types are available. Turbo reuses those builds when the packages have not changed.
GitHub Actions runs pnpm check on pull requests and pushes to main. Publishing a package from this workspace also runs the full check first. Publishing a prebuilt tarball bypasses package hooks, so run pnpm check before packing a release.