# Spinning art

> While a reel spins it shows a blurred still of each symbol, so heavy art costs nothing and reads as motion.

Source: https://pixi-reels.schmooky.dev/mechanics/spinning-art/

A symbol at rest can be anything: a Spine skeleton, an animated sprite, a
container of layers. Register it through `StaticSpinSymbol` and give it a
`createInner` that builds the real symbol. At rest the inner symbol is live,
so idle loops and win animations play as usual. When the reel starts, the
wrapper deactivates it and spins a plain sprite of it instead. On landing it
brings the inner symbol back with the final id.

The sprite's texture comes from a `SpinTextureCache` shared by the set, which
snapshots each id once. With `spinTexture: 'blurred'`, the default, it also
bakes a motion blur along the reel's travel and crossfades to it over
`blurRampMs`. `spinTexture: 'static'` spins the sharp snapshot instead. No
filter runs during the spin, and no skeleton updates while the strip moves.

`prewarmSpinTextures` bakes every id before the first spin. Without it, each
id is baked the first time it is needed. If you have hand-drawn blur frames,
`cache.setBlurred(id, texture)` makes the cache use them instead.

## Demos

Each demo spins through `StaticSpinSymbol`. The first bakes the blur for plain cards, the second does the same for a Spine set, and the third uses blur frames drawn by hand.

## Baked blur

The cache snapshots each card once and bakes a motion blur from the snapshot, and the reels spin on those textures. There is no blur art in the demo, and no filter runs during the spin. `prewarmSpinTextures` bakes every id before the first spin so it does not stall.

Live demo (static-spin-blur): https://pixi-reels.schmooky.dev/mechanics/spinning-art/#auto-baked-motion-blur-static-spin

## Spine at rest

At rest every cell is a live Spine skeleton with its idle and landing animations. When the reels start, each cell switches to a cached snapshot and the skeleton is deactivated, so no skeleton updates while the reels spin. On landing the skeletons come back and play their landing animation.

Live demo (static-spin-spine): https://pixi-reels.schmooky.dev/mechanics/spinning-art/#spin-static-not-spine

## Your own blur art

The round symbols use blur frames drawn in the atlas, handed to the cache with `cache.setStatic(id, texture)` and `cache.setBlurred(id, texture)`. The cache uses those as they are and never bakes or destroys them. The royal symbols have no blur frames, so the cache bakes theirs. Both kinds spin through the same `StaticSpinSymbol`.

Live demo (static-spin-provided-blur): https://pixi-reels.schmooky.dev/mechanics/spinning-art/#bring-your-own-blur-textures
