pixi-reels

prewarmSpinTextures()

pixi-reels


pixi-reels / index / prewarmSpinTextures

Function: prewarmSpinTextures()

function prewarmSpinTextures(options: PrewarmSpinTexturesOptions): void;

Defined in: snapshot/SpinTextureCache.ts:296

Bake spin textures for every symbolId up front (at load or between rounds) so the first spin never pays a capture hitch. Ids that already have a user-provided or captured texture are skipped by the cache.

prewarmSpinTextures({
  cache,
  ids: ['cherry', 'lemon', 'seven'],
  createSymbol: () => new SpineReelSymbol(spineOpts),
  width: 150,
  height: 150,
});

Parameters

ParameterType
optionsPrewarmSpinTexturesOptions

Returns

void