pixi-reels 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/cascade/CascadeAnticipationPhase.d.ts +23 -0
  3. package/dist/cascade/CascadeAnticipationPhase.d.ts.map +1 -0
  4. package/dist/cascade/DropRecipes.d.ts +40 -0
  5. package/dist/cascade/DropRecipes.d.ts.map +1 -0
  6. package/dist/config/types.d.ts +131 -3
  7. package/dist/config/types.d.ts.map +1 -1
  8. package/dist/core/Reel.d.ts +155 -3
  9. package/dist/core/Reel.d.ts.map +1 -1
  10. package/dist/core/ReelMotion.d.ts +8 -0
  11. package/dist/core/ReelMotion.d.ts.map +1 -1
  12. package/dist/core/ReelSet.d.ts +344 -3
  13. package/dist/core/ReelSet.d.ts.map +1 -1
  14. package/dist/core/ReelSetBuilder.d.ts +121 -2
  15. package/dist/core/ReelSetBuilder.d.ts.map +1 -1
  16. package/dist/core/ReelViewport.d.ts +89 -3
  17. package/dist/core/ReelViewport.d.ts.map +1 -1
  18. package/dist/debug/debug.d.ts +6 -1
  19. package/dist/debug/debug.d.ts.map +1 -1
  20. package/dist/events/ReelEvents.d.ts +91 -6
  21. package/dist/events/ReelEvents.d.ts.map +1 -1
  22. package/dist/frame/FrameBuilder.d.ts +1 -0
  23. package/dist/frame/FrameBuilder.d.ts.map +1 -1
  24. package/dist/index.cjs +4 -4
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.ts +21 -3
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +1133 -171
  29. package/dist/index.js.map +1 -1
  30. package/dist/pins/CellPin.d.ts +140 -0
  31. package/dist/pins/CellPin.d.ts.map +1 -0
  32. package/dist/spin/SpinController.d.ts +87 -1
  33. package/dist/spin/SpinController.d.ts.map +1 -1
  34. package/dist/spin/phases/AdjustPhase.d.ts +73 -0
  35. package/dist/spin/phases/AdjustPhase.d.ts.map +1 -0
  36. package/dist/spin/phases/DropStartPhase.d.ts +21 -0
  37. package/dist/spin/phases/DropStartPhase.d.ts.map +1 -0
  38. package/dist/spin/phases/DropStopPhase.d.ts +44 -0
  39. package/dist/spin/phases/DropStopPhase.d.ts.map +1 -0
  40. package/dist/spin/phases/PhaseFactory.d.ts +13 -2
  41. package/dist/spin/phases/PhaseFactory.d.ts.map +1 -1
  42. package/dist/spotlight/SymbolSpotlight.d.ts.map +1 -1
  43. package/dist/symbols/AnimatedSpriteSymbol.d.ts.map +1 -1
  44. package/dist/testing/testHarness.d.ts +23 -1
  45. package/dist/testing/testHarness.d.ts.map +1 -1
  46. package/dist/wins/Win.d.ts +7 -0
  47. package/dist/wins/Win.d.ts.map +1 -0
  48. package/dist/wins/WinPresenter.d.ts +100 -0
  49. package/dist/wins/WinPresenter.d.ts.map +1 -0
  50. package/package.json +1 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,65 @@
1
+ # pixi-reels
2
+
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#61](https://github.com/schmooky/pixi-reels/pull/61) [`28551ca`](https://github.com/schmooky/pixi-reels/commit/28551ca72e6cbc1e95984cf1b35e71bdb5f18d22) Thanks [@schmooky](https://github.com/schmooky)! - Add: per-reel geometry, MultiWays, big symbols, and expanding wilds.
8
+
9
+ - **Per-reel static shape (pyramids):** `builder.visibleRowsPerReel([3, 5, 5, 5, 3])`, optional `reelPixelHeights`, `reelAnchor: 'top' | 'center' | 'bottom'`. Reels can now have non-uniform row counts at build time.
10
+ - **MultiWays (per-spin row variation):** `builder.multiways({ minRows, maxRows, reelPixelHeight })` plus `reelSet.setShape(rowsPerReel)` mid-spin. A new `AdjustPhase` (inserted only when `.multiways(...)` is called) reshapes reels between SPIN and STOP. Pin migration follows: pins gain a frozen `originRow` and migrate back toward it on each reshape.
11
+ - **Big symbols (`N×M` blocks):** `register('bonus', SymbolClass, { size: { w: 2, h: 2 } })`. The result grid stays `string[][]` — the engine paints OCCUPIED across the block. `getSymbolFootprint(col, row)` resolves any cell to the anchor.
12
+ - **Expanding wilds:** unchanged from the existing pin API; reaffirmed via tests as a degenerate big-symbol case.
13
+
14
+ New events: `shape:changed`, `adjust:start`, `adjust:complete`, `pin:migrated`. They only fire on MultiWays slots — non-MultiWays event surfaces are unchanged.
15
+
16
+ New runtime: `reelSet.setShape()`, `reelSet.getSymbolFootprint()`, `reelSet.getVisibleGrid()`, `reelSet.isMultiWaysSlot`. New builder fluents: `.visibleRowsPerReel()`, `.reelPixelHeights()`, `.reelAnchor()`, `.multiways()`, `.pinMigrationDuration()`, `.pinMigrationEase()`. Pin gains optional `originRow`.
17
+
18
+ AdjustPhase animates the reshape: every visible symbol tweens its height + Y from the old shape to the new one over `pinMigrationDuration` ms with the configurable `pinMigrationEase`. Pin overlays tween in lock-step so a sticky wild visibly slides to its migrated row. Set `pinMigrationDuration(0)` for an instant snap.
19
+
20
+ Constraints: big symbols and MultiWays are mutually exclusive per slot in v1. Cascade mode + MultiWays throws at build.
21
+
22
+ **Breaking** (debug-only, not protected by semver but called out): `DebugSnapshot.visibleRows` widens from `number` to `number[]` so jagged shapes are representable. Adapt downstream code that deep-reads the snapshot.
23
+
24
+ ### Patch Changes
25
+
26
+ - [#61](https://github.com/schmooky/pixi-reels/pull/61) [`4b22c00`](https://github.com/schmooky/pixi-reels/commit/4b22c00b0f5733d141de1fee4ed8bf515cc2a513) Thanks [@schmooky](https://github.com/schmooky)! - Fix and harden a handful of follow-ups from the per-reel-geometry / MultiWays / big-symbols PR:
27
+
28
+ - `Reel.reshape()` now keeps `_reelHeight` in sync with the new geometry so the field doesn't go stale after a reshape. Previously a direct external call left `reelHeight` reporting the construction-time value. The method is also marked `@internal` in JSDoc — `ReelSet.setShape()` is the supported entry point.
29
+ - `ReelSetBuilder.maskStrategy()` now validates its argument synchronously: passing `null`, `undefined`, or an object missing `build()` / `update()` methods throws with a grep-able error instead of crashing later inside `ReelViewport`.
30
+ - Added a comment in `SpinController.skip()` documenting the reshape-on-skip contract — pin overlays migrate instantly on slam-stop regardless of `pinMigrationDuration`, and the rationale (overlays are destroyed at land anyway).
31
+
32
+ No new public API; behaviour for existing well-formed callers is unchanged.
33
+
34
+ ## 0.2.0
35
+
36
+ ### Minor Changes
37
+
38
+ - [`3fd806a`](https://github.com/schmooky/pixi-reels/commit/3fd806a31d76be5fc6ac7ff8e23852814c542e1a) - Backfill for three engine PRs merged without changesets after `0.1.0`:
39
+
40
+ - Cascade drop-in mechanic and anticipation recipe ([#51](https://github.com/schmooky/pixi-reels/issues/51)).
41
+ - Engine primitives: `CellPin`, `movePin`, and `reelSet.frame` exposure ([#52](https://github.com/schmooky/pixi-reels/issues/52)).
42
+ - `ReelSet.getCellBounds` for overlays, paylines, and hit areas ([#53](https://github.com/schmooky/pixi-reels/issues/53)).
43
+
44
+ All three are additive, so this bundles them into a single minor bump.
45
+
46
+ - [`555c9f0`](https://github.com/schmooky/pixi-reels/commit/555c9f007d749a8e2329a53dc17208fc94d7b5f3) - Add: `WinPresenter` — a minimal win-presentation layer that animates winning cells and fires events. Paylines, cluster pops, scatter splashes all use the same shape. The library never draws lines or overlays; user code does that by reacting to events.
47
+
48
+ - `WinPresenter.show(wins: Win[])` — animates each win's cells, one by one. `stagger: 0` flashes simultaneously, `stagger > 0` sweeps left-to-right in cell order.
49
+ - `Win` — one shape: `{ cells: SymbolPosition[]; value?: number; kind?: string; id?: number }`. Covers paylines, clusters, cascade pops, scatters.
50
+ - `dimLosers` (default 0.35 alpha) fades non-winning cells during each win; restored on `win:end`.
51
+ - `symbolAnim`: `'win'` (default, calls `playWin()`), a named spine animation, or `(symbol, cell, win) => Promise<void>` for a custom callback.
52
+ - Events fire on `ReelSet.events`: `win:start` (full list), `win:group` (per-win), `win:symbol` (per-cell), `win:end` (`complete` / `aborted`). Subscribe with `reelSet.getCellBounds` to draw any overlay you want.
53
+ - Cascades: call `presenter.show([{ cells: winners }])` from `runCascade`'s `onWinnersVanish` hook — same API.
54
+ - Helper: `sortByValueDesc` exported for convenience.
55
+ - Types: `Win`, `SymbolPosition` (canonicalised to `config/types`, re-exported from events).
56
+ - Reels now have an explicit `container.zIndex = reelIndex` so the viewport's sorted `maskedContainer` draws reels deterministically — same order as before, but callers can flip it for bottom-left diagonal overflow.
57
+
58
+ No existing API is changed or removed.
59
+
60
+ ### Patch Changes
61
+
62
+ - [`7792142`](https://github.com/schmooky/pixi-reels/commit/779214217bb341cfb66f2db74616b2e8608893b9) - Fix: Two `AnimatedSpriteSymbol` bugs that only manifest on symbols with non-trivial win animations:
63
+
64
+ - `resize()` now positions the sprite according to its configured anchor, so `anchor: { x: 0.5, y: 0.5 }` renders the symbol centred in its cell instead of with its centre pinned to the cell's top-left corner (which clipped three quarters of the symbol under the reel mask). `anchor: (0, 0)` — the prior default and only combination that worked — is unchanged.
65
+ - `playWin()` now returns the animation to frame 0 (`gotoAndStop(0)`) when the sequence completes, so the idle visible state settles on the neutral base frame. Previously the sprite held its last animation frame indefinitely — fine for symmetric pulses that happen to end where they started, a visible glitch for anything else (AI-generated or keyframe sequences that end mid-action).
@@ -0,0 +1,23 @@
1
+ import { ReelPhase } from '../spin/phases/ReelPhase.js';
2
+ /**
3
+ * Anticipation phase for cascade drop-in mechanics.
4
+ *
5
+ * The default AnticipationPhase slows a spinning reel — useless when
6
+ * the reel is stationary. This phase shakes the column instead, giving
7
+ * the player a clear "something's about to drop here" signal.
8
+ *
9
+ * Register it to replace the default for cascade games:
10
+ * builder.phases(f => f.register('anticipation', CascadeAnticipationPhase))
11
+ *
12
+ * Duration is driven by speed.anticipationDelay (same as standard anticipation).
13
+ */
14
+ export declare class CascadeAnticipationPhase extends ReelPhase<void> {
15
+ readonly name = "anticipation";
16
+ readonly skippable = true;
17
+ private _tween;
18
+ private _baseX;
19
+ protected onEnter(): void;
20
+ update(_deltaMs: number): void;
21
+ protected onSkip(): void;
22
+ }
23
+ //# sourceMappingURL=CascadeAnticipationPhase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CascadeAnticipationPhase.d.ts","sourceRoot":"","sources":["../../src/cascade/CascadeAnticipationPhase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD;;;;;;;;;;;GAWG;AACH,qBAAa,wBAAyB,SAAQ,SAAS,CAAC,IAAI,CAAC;IAC3D,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,SAAS,QAAQ;IAE1B,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,MAAM,CAAK;IAEnB,SAAS,CAAC,OAAO,IAAI,IAAI;IA2BzB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAE9B,SAAS,CAAC,MAAM,IAAI,IAAI;CAKzB"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Configuration for cascade drop-in behavior.
3
+ * Passed to ReelSetBuilder.cascade() to replace the default strip-spin mechanic.
4
+ */
5
+ export interface CascadeDropConfig {
6
+ /** Stagger between rows dropping in (ms). 0 = all rows arrive simultaneously. Default: 0. */
7
+ rowDelay?: number;
8
+ /** Stagger between rows falling out (ms). 0 = all rows fall simultaneously. Default: 0. */
9
+ fallRowDelay?: number;
10
+ /** Distance symbols travel (px) — both falling out and dropping in. Default: auto (full column height). */
11
+ fromY?: number;
12
+ /** GSAP easing for the drop-in animation. Default: 'bounce.out'. */
13
+ easing?: string;
14
+ /** Duration of each symbol's drop-in animation (ms). 0 = instant. Default: 600. */
15
+ dropDuration?: number;
16
+ /** Duration of each symbol's fall-out animation (ms). 0 = skip fall. Default: 300. */
17
+ fallDuration?: number;
18
+ }
19
+ /**
20
+ * Named presets for common cascade drop patterns.
21
+ *
22
+ * Pass one to ReelSetBuilder.cascade():
23
+ * builder.cascade(DropRecipes.cascadeDrop)
24
+ *
25
+ * Control reel order per-spin with reelSet.setDropOrder():
26
+ * reelSet.setDropOrder('ltr') // left-to-right stagger
27
+ * reelSet.setDropOrder('rtl') // right-to-left stagger
28
+ * reelSet.setDropOrder('all') // all columns simultaneously
29
+ */
30
+ export declare const DropRecipes: {
31
+ /** Old symbols fall out, then new ones drop in row by row with bounce. Classic cascade feel. */
32
+ readonly cascadeDrop: CascadeDropConfig;
33
+ /** Stiff landing — no bounce. Symbols fall out then drop in cleanly with a hard stop. */
34
+ readonly stiffDrop: CascadeDropConfig;
35
+ /** Old symbols fall out, then all new symbols in a column drop simultaneously. Good for refills. */
36
+ readonly simultaneousDrop: CascadeDropConfig;
37
+ /** Instant placement — no fall, no drop animation. Equivalent to slam-stop. */
38
+ readonly slamDrop: CascadeDropConfig;
39
+ };
40
+ //# sourceMappingURL=DropRecipes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropRecipes.d.ts","sourceRoot":"","sources":["../../src/cascade/DropRecipes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2GAA2G;IAC3G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW;IACtB,gGAAgG;0BACH,iBAAiB;IAE9G,yFAAyF;wBACE,iBAAiB;IAE5G,oGAAoG;+BACH,iBAAiB;IAElH,+EAA+E;uBAChB,iBAAiB;CACxE,CAAC"}
@@ -31,17 +31,64 @@ export interface SymbolData {
31
31
  zIndex?: number;
32
32
  /** If true, this symbol renders above the reel mask (for oversized animations). */
33
33
  unmask?: boolean;
34
+ /**
35
+ * Footprint in cells. Default `{ w: 1, h: 1 }`. When `w * h > 1` this
36
+ * symbol is a "big symbol" — at landing it occupies an `w × h` block of
37
+ * cells anchored at the (col, row) where its id appears in the result.
38
+ * Big-symbol registration is rejected on MultiWays slots.
39
+ */
40
+ size?: {
41
+ w: number;
42
+ h: number;
43
+ };
44
+ }
45
+ /** How to vertically align reels of differing pixel heights. */
46
+ export type ReelAnchor = 'top' | 'center' | 'bottom';
47
+ /**
48
+ * MultiWays configuration knobs. Set via `builder.multiways({ ... })` —
49
+ * mutually exclusive with big-symbol registration.
50
+ */
51
+ export interface MultiWaysConfig {
52
+ /** Minimum visible rows the server can request. Inclusive. */
53
+ minRows: number;
54
+ /** Maximum visible rows the server can request. Inclusive. */
55
+ maxRows: number;
56
+ /**
57
+ * Pixel height of every reel box. Cell height per reel becomes
58
+ * `reelPixelHeight / visibleRows[i]` after each reshape.
59
+ */
60
+ reelPixelHeight: number;
34
61
  }
35
62
  /** Configuration for the reel grid layout. */
36
63
  export interface ReelGridConfig {
37
64
  /** Number of reel columns. */
38
65
  reelCount: number;
39
- /** Number of visible symbol rows per reel. */
66
+ /**
67
+ * Default visible rows when all reels are uniform. Ignored if
68
+ * `visibleRowsPerReel` is set.
69
+ */
40
70
  visibleRows: number;
71
+ /**
72
+ * Per-reel row counts (static shape). Length MUST equal `reelCount`.
73
+ * Example: `[3, 5, 5, 5, 3]` for a pyramid layout. Mutually exclusive
74
+ * with the scalar `visibleRows` field at the builder level.
75
+ */
76
+ visibleRowsPerReel?: number[];
41
77
  /** Symbol width in pixels. */
42
78
  symbolWidth: number;
43
- /** Symbol height in pixels. */
79
+ /** Symbol height in pixels. Used as the SPIN-time uniform cell height. */
44
80
  symbolHeight: number;
81
+ /**
82
+ * Per-reel pixel-box heights. Length MUST equal `reelCount` when set.
83
+ * For MultiWays: every entry is the same fixed reel height. For static
84
+ * pyramids: defaults to `visibleRowsPerReel[i] * symbolHeight`.
85
+ */
86
+ reelPixelHeights?: number[];
87
+ /**
88
+ * How short reels align vertically inside the tallest reel's height.
89
+ * Default: 'center'.
90
+ */
91
+ reelAnchor?: ReelAnchor;
45
92
  /** Gap between symbols. Default: { x: 0, y: 0 }. */
46
93
  symbolGap?: {
47
94
  x: number;
@@ -49,6 +96,13 @@ export interface ReelGridConfig {
49
96
  };
50
97
  /** Number of buffer symbols above and below the visible area. Default: 1. */
51
98
  bufferSymbols?: number;
99
+ /**
100
+ * MultiWays configuration. Set by `builder.multiways(...)`. When present:
101
+ * - `setShape(rowsPerReel)` becomes callable mid-spin
102
+ * - AdjustPhase is inserted between SPIN and STOP
103
+ * - big-symbol registration throws at build time
104
+ */
105
+ multiways?: MultiWaysConfig;
52
106
  }
53
107
  /** Extra symbols above/below config per reel. */
54
108
  export interface ReelExtraSymbols {
@@ -76,14 +130,88 @@ export interface Position {
76
130
  x: number;
77
131
  y: number;
78
132
  }
133
+ /**
134
+ * Axis-aligned bounding box of a single grid cell in ReelSet-local
135
+ * coordinates. Returned by `reelSet.getCellBounds(col, row)`.
136
+ *
137
+ * Use this to draw paylines, hit areas, debug overlays, or any graphic
138
+ * that needs to align precisely with a visible symbol cell.
139
+ */
140
+ export interface CellBounds {
141
+ /** Left edge of the cell in ReelSet-local pixels. */
142
+ x: number;
143
+ /** Top edge of the cell in ReelSet-local pixels. */
144
+ y: number;
145
+ /** Cell width — equals the configured symbol width. */
146
+ width: number;
147
+ /** Cell height — equals the configured symbol height. */
148
+ height: number;
149
+ }
150
+ /**
151
+ * A cell on the visible grid — `reelIndex` is the column, `rowIndex` the
152
+ * row from the top. This is the canonical grid-cell shape used across
153
+ * events (`win:symbol`, `spotlight:start`), `Spotlight.show`, and
154
+ * `ClusterWin.cells`.
155
+ *
156
+ * Named `SymbolPosition` for back-compat with the original events module.
157
+ */
158
+ export interface SymbolPosition {
159
+ reelIndex: number;
160
+ rowIndex: number;
161
+ }
162
+ /**
163
+ * One "win" as the presenter sees it: an ordered set of cells to highlight.
164
+ *
165
+ * Use cases collapse onto this one shape — whether those cells came from a
166
+ * classic payline ("row 1 across all 5 reels"), a cascade pop ("this cluster
167
+ * vanished"), a scatter splash, or a bonus reveal.
168
+ *
169
+ * The presenter's job is to **animate these cells**. Anything beyond that —
170
+ * drawing a polyline, a cluster outline, a number popup, a sound cue — is
171
+ * user-land code reacting to the `win:*` events. pixi-reels never draws wins.
172
+ *
173
+ * Order of `cells` matters when `WinPresenter.stagger > 0` (e.g. a
174
+ * left-to-right sweep): cell N starts animating `stagger` ms after cell N-1.
175
+ * Pass the cells in the order you want the sweep to run.
176
+ */
177
+ export interface Win {
178
+ /** Cells to highlight. Order matters when `stagger > 0`. */
179
+ cells: ReadonlyArray<SymbolPosition>;
180
+ /** Optional payout — used for the default value-desc sort. */
181
+ value?: number;
182
+ /** Optional tag for routing events to different handlers. */
183
+ kind?: string;
184
+ /** Optional stable id so event consumers can key per-win state. */
185
+ id?: number;
186
+ }
79
187
  /** Mask configuration for the reel viewport. */
80
188
  export interface MaskConfig {
81
189
  mask: Container;
82
190
  position: Position;
83
191
  }
192
+ /**
193
+ * Resolved grid view used internally — every defaulted field is filled in,
194
+ * but per-reel-shape and MultiWays extensions stay optional because they're
195
+ * genuinely opt-in.
196
+ */
197
+ export interface ResolvedReelGridConfig {
198
+ reelCount: number;
199
+ visibleRows: number;
200
+ symbolWidth: number;
201
+ symbolHeight: number;
202
+ symbolGap: {
203
+ x: number;
204
+ y: number;
205
+ };
206
+ bufferSymbols: number;
207
+ visibleRowsPerReel?: number[];
208
+ reelPixelHeights?: number[];
209
+ reelAnchor: ReelAnchor;
210
+ multiways?: MultiWaysConfig;
211
+ }
84
212
  /** Full internal configuration assembled by the builder. */
85
213
  export interface ReelSetInternalConfig {
86
- grid: Required<ReelGridConfig>;
214
+ grid: ResolvedReelGridConfig;
87
215
  symbols: Record<string, SymbolData>;
88
216
  speeds: Map<string, SpeedProfile>;
89
217
  initialSpeed: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EA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5B,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAED,4DAA4D;AAC5D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACpC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -21,7 +21,31 @@ export interface ReelConfig {
21
21
  symbolGapY: number;
22
22
  symbolsData: Record<string, SymbolData>;
23
23
  initialSymbols: string[];
24
+ /**
25
+ * Y offset of this reel relative to the viewport's top edge. Set by the
26
+ * builder so jagged shapes (pyramids) align according to `reelAnchor`.
27
+ * Default 0.
28
+ */
29
+ offsetY?: number;
30
+ /**
31
+ * Pixel height of this reel's box. Used for MultiWays cell-height
32
+ * derivation (`reelHeight / visibleRows`). Defaults to
33
+ * `visibleRows * symbolHeight`.
34
+ */
35
+ reelHeight?: number;
36
+ /**
37
+ * SPIN-time uniform cell height. During SPIN every reel uses this same
38
+ * height. AdjustPhase later swaps to per-reel `reelHeight / visibleRows`.
39
+ * Defaults to `symbolHeight`.
40
+ */
41
+ spinSymbolHeight?: number;
24
42
  }
43
+ /**
44
+ * Internal sentinel marking non-anchor cells of a big symbol's block.
45
+ * Never crosses the public API — `getVisibleSymbols()` resolves it to the
46
+ * anchor's id.
47
+ */
48
+ export declare const OCCUPIED_SENTINEL = "__pixi_reels_occupied__";
25
49
  /**
26
50
  * One vertical column of a slot board.
27
51
  *
@@ -59,8 +83,37 @@ export declare class Reel implements Disposable {
59
83
  private _bufferAbove;
60
84
  private _symbolWidth;
61
85
  private _symbolHeight;
86
+ private _offsetY;
87
+ private _reelHeight;
88
+ private _spinSymbolHeight;
89
+ private _symbolGapY;
90
+ private _symbolGapX;
62
91
  private _isDestroyed;
63
92
  private _isStopping;
93
+ /**
94
+ * Internal stub instances reused for OCCUPIED cells inside a big-symbol
95
+ * block. Allocated on demand (one per concurrent OCCUPIED cell on this
96
+ * reel), never pooled through `SymbolFactory`. The views are invisible —
97
+ * the anchor symbol is sized up to cover the whole block.
98
+ */
99
+ private _occupiedStubs;
100
+ /**
101
+ * Per-row marker recording which rows are non-anchor cells of a big
102
+ * symbol. Populated when frames are placed; consulted by `getVisibleSymbols`
103
+ * and `getSymbolAt` so anchor identity propagates through the block.
104
+ *
105
+ * Indexed by visible-row 0..visibleRows-1. Each entry is `null` for a
106
+ * normal cell, or `{ anchorRow }` for a cell occupied by another row's
107
+ * anchor.
108
+ */
109
+ private _occupancy;
110
+ /**
111
+ * Optional resolver for cross-reel OCCUPIED cells. Set by `ReelSet` so
112
+ * `getVisibleSymbols()` returns the anchor's id even when the anchor
113
+ * lives on a different reel (a 2×2 bonus straddles cols c, c+1).
114
+ * Without it, cross-reel OCCUPIED cells return the OCCUPIED sentinel.
115
+ */
116
+ private _crossReelResolver;
64
117
  constructor(config: ReelConfig, symbolFactory: SymbolFactory, randomProvider: RandomSymbolProvider, viewport: ReelViewport);
65
118
  get isDestroyed(): boolean;
66
119
  get isStopping(): boolean;
@@ -68,24 +121,106 @@ export declare class Reel implements Disposable {
68
121
  get bufferAbove(): number;
69
122
  get bufferBelow(): number;
70
123
  get visibleRows(): number;
124
+ /** The symbol cell width (in pixels). Constant for the reel's lifetime. */
125
+ get symbolWidth(): number;
126
+ /**
127
+ * The symbol cell height (in pixels). Mutates on MultiWays reshape via
128
+ * `reshape()`. During SPIN this still equals `spinSymbolHeight`; the
129
+ * per-reel target value comes into effect when AdjustPhase commits the
130
+ * reshape. For non-MultiWays slots this is constant for the reel's lifetime.
131
+ */
132
+ get symbolHeight(): number;
133
+ /** Pixel height of this reel's box. Set by builder, immutable. */
134
+ get reelHeight(): number;
135
+ /** Y offset of this reel relative to the viewport top. Set by builder, immutable. */
136
+ get offsetY(): number;
137
+ /**
138
+ * SPIN-time uniform cell height. All reels in a slot use this value during
139
+ * the SPIN phase regardless of their per-reel `symbolHeight`. Frozen at
140
+ * construction.
141
+ */
142
+ get spinSymbolHeight(): number;
71
143
  /** Update reel for one frame. Called by SpinController via ticker. */
72
144
  update(deltaMs: number): void;
73
145
  /** Set the target frame for stopping. */
74
146
  setStopFrame(frame: string[]): void;
75
- /** Get visible symbol IDs (top to bottom, excluding buffers). */
147
+ /**
148
+ * Get visible symbol IDs (top to bottom, excluding buffers).
149
+ *
150
+ * Big-symbol cells resolve to the anchor's id — both **same-reel**
151
+ * (the anchor lives on this reel) and **cross-reel** (the anchor is on
152
+ * a leftward reel of a wider block). The cross-reel resolver is
153
+ * injected by `ReelSet`; without it, cross-reel OCCUPIED cells would
154
+ * return the OCCUPIED sentinel, which is the only difference vs.
155
+ * `ReelSet.getVisibleGrid()`. With the resolver wired, the two are
156
+ * equivalent for any reel — `reels.map(r => r.getVisibleSymbols())`
157
+ * matches `reelSet.getVisibleGrid()`.
158
+ */
76
159
  getVisibleSymbols(): string[];
77
- /** Get symbol at a visible row (0-indexed from top visible). */
160
+ /**
161
+ * Internal: register a callback used to resolve cross-reel OCCUPIED
162
+ * cells to the originating big-symbol's id. Wired by `ReelSet` so this
163
+ * reel can answer "what id is at (myCol, row)?" even when the anchor is
164
+ * on a different reel.
165
+ *
166
+ * @internal
167
+ */
168
+ setCrossReelResolver(resolver: ((col: number, row: number) => string) | null): void;
169
+ /**
170
+ * Get symbol at a visible row (0-indexed from top visible).
171
+ * For non-anchor cells of a big symbol, walks up to the anchor row and
172
+ * returns the anchor symbol so animations target the actual visual.
173
+ */
78
174
  getSymbolAt(visibleRow: number): ReelSymbol;
175
+ /**
176
+ * Anchor row for a visible row. Equals `visibleRow` for normal cells;
177
+ * for non-anchor cells inside a big-symbol block, returns the row where
178
+ * the anchor lives.
179
+ *
180
+ * @internal — used by `ReelSet.getSymbolFootprint` and the cross-reel
181
+ * resolver wired in `ReelSet`'s constructor. Not intended for consumer
182
+ * use; prefer `ReelSet.getSymbolFootprint(col, row)` which returns full
183
+ * anchor + size info.
184
+ */
185
+ _getAnchorRow(visibleRow: number): number;
186
+ /**
187
+ * Record that the given visible row is the non-anchor cell of a big
188
+ * symbol whose anchor lives at `anchorRow`. Pass `null` to clear the
189
+ * occupancy mark.
190
+ *
191
+ * @internal — called by `_finalizeFrame` and the big-symbol coordinator.
192
+ */
193
+ _setOccupancy(visibleRow: number, anchorRow: number | null): void;
79
194
  /** Notify all visible symbols that the reel has started spinning. */
80
195
  notifySpinStart(): void;
81
196
  /** Notify all visible symbols that the reel is about to stop (just before bounce). */
82
197
  notifySpinEnd(): void;
83
198
  /** Notify all visible symbols that the reel has landed on its target. */
84
199
  notifyLanded(): void;
85
- /** Snap all symbols to grid. */
200
+ /**
201
+ * Snap all symbols to grid and finalize big-symbol layout. Called at the
202
+ * end of every stop sequence.
203
+ */
86
204
  snapToGrid(): void;
87
205
  /** Place symbols immediately at target positions (for skip/turbo). */
88
206
  placeSymbols(symbolIds: string[]): void;
207
+ /**
208
+ * @internal — MultiWays orchestration only.
209
+ *
210
+ * Commit a new visible-row count and per-reel cell height. Resizes every
211
+ * existing symbol on the strip to the new cell height, rebuilds the
212
+ * symbol array (extending or truncating buffers as needed), reshapes the
213
+ * motion layer, and recomputes `_reelHeight` from the new geometry so
214
+ * `reelHeight` stays consistent. Idempotent if the shape doesn't change.
215
+ *
216
+ * Only the engine should call this — `SpinController._applyReshape` is
217
+ * the single source of truth for reshape orchestration. Direct external
218
+ * calls are unsupported and may leave pin overlays, the cross-reel
219
+ * resolver, and the parent `ReelSet`'s shape state out of sync. Use
220
+ * `ReelSet.setShape()` instead, which gates this method on a MultiWays
221
+ * slot and migrates pins atomically.
222
+ */
223
+ reshape(newVisibleRows: number, newSymbolHeight: number, bufferAbove: number, bufferBelow: number): void;
89
224
  /**
90
225
  * Recompute `zIndex` for every symbol in the reel.
91
226
  *
@@ -102,5 +237,22 @@ export declare class Reel implements Disposable {
102
237
  private _setupSymbolPositions;
103
238
  private _onSymbolWrapped;
104
239
  private _replaceSymbol;
240
+ /**
241
+ * Acquire an OCCUPIED stub. Reuses any free stub stored locally; allocates
242
+ * a new one if none are available. Stubs are never returned to
243
+ * `SymbolFactory`.
244
+ */
245
+ private _acquireOccupiedStub;
246
+ private _releaseOccupiedStub;
247
+ /**
248
+ * After the visible target frame has been placed, scan visible rows to
249
+ * size big-symbol anchors and populate the OCCUPIED occupancy map.
250
+ *
251
+ * Called from `snapToGrid` and `placeSymbols` so it runs both for normal
252
+ * stop landing AND for skip/turbo. For non-anchor rows of a block, the
253
+ * anchor symbol is sized to span the block; the OCCUPIED stub at that
254
+ * row stays invisible underneath.
255
+ */
256
+ private _finalizeFrame;
105
257
  }
106
258
  //# sourceMappingURL=Reel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Reel.d.ts","sourceRoot":"","sources":["../../src/core/Reel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,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5B,OAAO,CAAC,oBAAoB;IAI5B;;;;;;;;OAQG;IACH,OAAO,CAAC,cAAc;CA2BvB"}
@@ -37,6 +37,14 @@ export declare class ReelMotion {
37
37
  /** Get the correct Y position for a symbol at a given row. */
38
38
  getRowY(row: number): number;
39
39
  get slotHeight(): number;
40
+ /**
41
+ * Reshape the motion layer for a new visible-row count and cell height.
42
+ * Recomputes wrap bounds and the slot height. Called by `Reel.reshape()`
43
+ * during AdjustPhase on MultiWays slots. The symbol array is re-bound by
44
+ * `Reel.reshape()` directly via the same array reference, so this method
45
+ * doesn't take a new array.
46
+ */
47
+ reshape(symbolHeight: number, symbolGapY: number, bufferAbove: number, visibleRows: number): void;
40
48
  private _wrapBottomToTop;
41
49
  private _wrapTopToBottom;
42
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ReelMotion.d.ts","sourceRoot":"","sources":["../../src/core/ReelMotion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D;;;;;;;;;;;;;;GAcG;AACH,qBAAa,UAAU;IAQnB,OAAO,CAAC,QAAQ;IAGhB,OAAO,CAAC,YAAY;IAEpB,OAAO,CAAC,gBAAgB;IAZ1B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,KAAK,CAAS;gBAGZ,QAAQ,EAAE,UAAU,EAAE,EAC9B,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EAC5B,WAAW,EAAE,MAAM,EACX,gBAAgB,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI;IAStG;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAY9B,mFA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