> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/pinnagiveaways/features/animation.md).

# The Animation

When a giveaway rolls, every player (who didn't hide it) sees a reel of all participants' heads in front of them: it unfolds, spins, slows down for a long crawl and stops on the winner, who gets a glow, a spin, particles and their rewards. With several winners the reel rolls again for each one.

Everything is under `animation:` in config.yml. `animation.enabled: false` announces winners straight away.

## Placement

| Key                                 |                                                                                                     |
| ----------------------------------- | --------------------------------------------------------------------------------------------------- |
| `distance`                          | blocks in front of the eyes; the reel moves closer (and smaller, so it looks the same) before walls |
| `height-offset`                     | up / down from eye height                                                                           |
| `max-pitch`                         | the reel never goes further up / down than this, so players looking at the floor still see it       |
| `follow-player`, `follow-smoothing` | the reel follows walking players (it predicts their movement to keep up)                            |
| `refocus-angle`                     | 0 = always straight in front of the view; above 0 it stays still while they look around it          |

## The reel

`reel.visible-slots` (3-13), `curve-radius` (the drum the heads ride), `slot-spacing`, `head-scale`, `center-scale` (the head under the pointer), `head-rotation` (only change it, 0/180, if the backs of the heads show), `interpolation-ticks`.

## Timing (ticks)

| Key                           | Default |                                                                  |
| ----------------------------- | ------- | ---------------------------------------------------------------- |
| `intro`                       | 20      | the frame unfolding and the heads popping in                     |
| `spin`                        | 140     | the spin                                                         |
| `settle`                      | 16      | the glide onto the winner                                        |
| `reveal`                      | 80      | the celebration (the next roll starts after it)                  |
| `outro`                       | 14      | everything folding away                                          |
| `peak-speed`                  | 0.85    | heads per tick at top speed                                      |
| `acceleration`                | 0.09    | share of the spin spent speeding up                              |
| `deceleration`                | 2.6     | length of the slow crawl                                         |
| `landing-jitter`              | 0.4     | how far off-centre it stops before gliding on                    |
| `head-delay`, `head-stagger`  | 7, 1.1  | when the centre head pops in, and the delay per head further out |
| `winner-spins`, `winner-grow` | 2, 0.55 | turns and pop of the winning head                                |
| `flash-ticks`                 | 18      | how long the highlight flashes on the reveal                     |

## Layout

`layout.title-y`, `prize-y`, `pointer-y`, `name-y`, `panel-y` (blocks from the centre), `panel-height`, `panel-padding`, `title-scale`, `prize-scale`, `name-scale`, `pointer-scale`.

## Looks

* `frame`: the translucent `panel` and the pointer highlight colours (`#AARRGGBB`).
* `texts`: the title (with an animated light sweep: `shine`, `shine-speed`), the prize line, the name under the pointer, the pointers and the winner texts.
* `effects`: `winner-glow` colour, `particles: false` turns every particle off, `reveal-particles` and `reveal-extra-particles` (`'PARTICLE count spread speed'`).
* `sounds`: start, pop, tick (its pitch follows the speed: `tick-pitch-min` / `-max`), land, reveal, reveal-extra, winner (only the winner hears it), close. `'SOUND volume pitch'`, Bukkit names or resource-pack keys; `''` = none.

## Performance

The reel is built for hundreds of players at once. Each player's reel is a fixed set of displays riding one invisible display, and only that one moves when they walk; heads that leave one side come back on the other with a new head instead of being respawned. The server only reads where players are once per tick; everything else runs on the animation threads.

* `wall-check-ticks` (10): how often each player's reel checks for a wall in front of them (spread over these ticks).
* `render-threads` (0 = automatic from the CPU cores): threads that draw the reel when many players watch. Read at startup.

`/giveaway preview [id]` plays it for you alone, with the online players (topped up with recently seen players).
