# Getting started

> Install pixi-reels and get a 5x3 reel set spinning in a PixiJS v8 app.

Source: https://pixi-reels.schmooky.dev/learn/getting-started/

pixi-reels is a reel engine for a PixiJS v8 app. You add it to the stage like any other container.

## You need

- Node 20 or newer, and pnpm, npm or yarn
- A PixiJS v8 app. The engine runs off `app.ticker`
- For Spine symbols, `@esotericsoftware/spine-pixi-v8` as well

## Install

```bash
pnpm add pixi-reels pixi.js gsap
# only if you want Spine symbols
pnpm add @esotericsoftware/spine-pixi-v8
```

## Boot Pixi, build a ReelSet

```ts
import { Application } from 'pixi.js';
import { ReelSetBuilder, SpriteSymbol } from 'pixi-reels';
import { cherryTex, sevenTex, barTex } from './textures';

const app = new Application();
await app.init({ width: 900, height: 540, background: '#0a0d14' });
document.body.appendChild(app.canvas);

const reelSet = new ReelSetBuilder()
  .reels(5)
  .visibleCells(3)
  .symbolSize(140, 140)
  .symbols((r) => {
    r.register('cherry', SpriteSymbol, { textures: { cherry: cherryTex } });
    r.register('seven',  SpriteSymbol, { textures: { seven: sevenTex } });
    r.register('bar',    SpriteSymbol, { textures: { bar: barTex } });
  })
  .weights({ cherry: 40, seven: 10, bar: 20 })
  .ticker(app.ticker)
  .build();

app.stage.addChild(reelSet);

const result = await reelSet.spin();
console.log(result.symbols);
```

## Did it work

The reels spin, then stop on three rows of random symbols.

If nothing happened, it is usually one of these.

| You see | Do this |
|---|---|
| Blank canvas | Set `reelSet.x` and `reelSet.y`. The set sits at (0,0) until you move it. |
| `ticker() must be called` | Add `.ticker(app.ticker)` to the builder. |
| Symbols invisible | The texture never loaded, or `symbolSize()` does not match your art. The engine calls `resize()` on every symbol swap. |

## Where next

- [Your first reelset](/learn/your-first-reelset/) builds a real slot step by step
- [Spin lifecycle](/mechanics/skip/#concept) explains the spin API
- [Cheats & testing](/learn/cheats-and-testing/) shows how to test a mechanic
- [Recipes](/mechanics/) shows what the engine can do
