pixi-reels

DropOffset

pixi-reels


pixi-reels / index / DropOffset

Interface: DropOffset

Defined in: cascade/tumbleAlgorithm.ts:33

Properties#

PropertyTypeDescriptionDefined in
cellnumberVisible cell in the new grid (start-to-end, 0-indexed).cascade/tumbleAlgorithm.ts:35
isNewbooleanTrue when this is a fresh symbol entering from off-grid, false for a survivor that was already on the reel. The discriminator every caller should branch on; originalCell < 0 is only equivalent under forward gravity.cascade/tumbleAlgorithm.ts:60
offsetCellsnumberSigned cell distance this symbol travels: cell - originalCell. Positive moves toward the end edge (forward gravity), negative toward the start edge (reverse gravity). Zero means the symbol stays put and must NOT be animated.cascade/tumbleAlgorithm.ts:53
originalCellnumberWhere this symbol “came from” expressed as a virtual cell index. Off-grid values name the cell the symbol enters from: under gravity: 'forward' new symbols come from negative indices (before cell 0); under 'reverse' they come from visibleCells and up. An index inside [0, visibleCells) is a survivor’s OLD cell. Read DropOffset.isNew rather than testing the sign - the sign only discriminates under forward gravity.cascade/tumbleAlgorithm.ts:46