PR pixi-reels

PinMigration

pixi-reels


pixi-reels / index / PinMigration

Type Alias: PinMigration

type PinMigration = "origin" | "frozen";

Defined in: pins/CellPin.ts:40

How a pin behaves when a MultiWays reshape changes the row count of its reel. Non-MultiWays slots never reshape, so this value is irrelevant there.

  • 'origin' (default). the pin migrates to min(originRow, newRows - 1) on every reshape. Clamps when the shape is too small; restores to the origin when the shape grows back. Prevents wander. a pin at originRow=3 clamped to row 2 on a 3-row shape returns to row 3 on a later 5-row shape. The right default for sticky wilds, trailing wilds, and any “this position has meaning” mechanic.

  • 'frozen'. the pin stays at its current row if the new shape fits, otherwise clamps to the last visible row AND updates originRow to the clamped position so it never restores. Use when the pin’s row should be locked to wherever it is now, regardless of future shape changes (e.g. a walking-wild on MultiWays where the wild’s “current row” IS the source of truth. restoring to a pre-walk row would undo the walk).