> 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/edcoinflip/coinflips/scene.md).

# The 3D Flip

`animation.style` in `config.yml`:

* `SCENE` (default): a small 3D coinflip floats in front of the players while they keep playing. Mini versions of the two players (with their skins) sit on seats facing each other, the viewer always on the left. The coin between them carries both players' faces: it is flicked up, flips (a tick on every face), slows down and lands on the winner's face. The winner bounces on the seat cheering, the loser slumps; each sees "You won" or "You lost" and the amounts. It is packet-only: nobody else sees it and nothing is spawned in the world. It follows the player and moves closer before walls (PinnaPrison mine blocks included).
* `MENU`: the flip menu (`guis/coinflip-animation.yml`). Also used for Bedrock players (`scene.bedrock-menu`) and on servers without packet support.

`/cf preview [player] [win|lose]` plays the scene for you with nothing at stake.

## `animation.scene`

| Key                                                                            | Default                  |                                                                              |
| ------------------------------------------------------------------------------ | ------------------------ | ---------------------------------------------------------------------------- |
| `distance`                                                                     | 3.0                      | blocks in front of the eyes                                                  |
| `height-offset` / `side-offset`                                                | 0 / 0                    | up/down and left/right, in blocks                                            |
| `size`                                                                         | 1.35                     | 1 = about 2.7 blocks wide                                                    |
| `max-pitch`                                                                    | 40                       | the scene never goes further up/down than this angle                         |
| `follow-smoothing`                                                             | 1                        | ticks each follow move glides for                                            |
| `refocus-angle` / `refocus-speed`                                              | 0 / 0.5                  | stays still until you look this far away, then glides back at this speed     |
| `wall-ease`                                                                    | 0.3                      | how fast it shrinks / grows before walls                                     |
| `interpolation-ticks`                                                          | 2                        | client smoothing of every frame                                              |
| `timing.intro/toss/land/reveal/outro`                                          | 18 / 70 / 12 / 64 / 12   | ticks of each phase                                                          |
| `timing.toss-height`                                                           | 0.55                     | how high the coin flies                                                      |
| `players.scale`, `you-seat`, `opponent-seat`, `seat-rotation`, `hold-currency` | 0.55, stairs             | mini players and seats                                                       |
| `coin.size`, `rim`, `pedestal`, `glow`, `face-rotation`                        | 0.44, gold block, quartz | the coin                                                                     |
| `frame.*`                                                                      |                          | panel and highlight colours (`#AARRGGBB`)                                    |
| `texts.*`                                                                      |                          | title (with a shine sweep), pot line, VS, name labels, result title and line |
| `particles`                                                                    | true                     | all particles on / off                                                       |
| `sounds.*`                                                                     |                          | every sound (`sound;volume;pitch`)                                           |

### `layout` (scene units, times `size`)

`panel-width`, `panel-bottom`, `seat-spacing`, `seat-height`, `seat-angle` (degrees), `coin-height`, `coin-forward`, `highlight-width`, `label-scale`, `pot-scale`, `title-scale`, `vs-scale`, `gap`, `pedestal-width`, `rim-size`, `rim-depth`, `face-depth`.

### `motion`

`max-spin` (radians per tick; much higher and the client draws the coin spinning backwards), `intro-bob`, `toss-forward`, `toss-grow`, `land-bounce`, `land-wobble`, `reveal-rise`, `reveal-forward`, `reveal-grow`, `reveal-sway`, `title-pop`, `winner-grow`, `loser-scale`, `winner-hop`, `celebrate-ticks`, `cheer-every`, `flash-ticks`, `flash-every`, `loser-look-down`.

### `particle-effects`

Lists of `'PARTICLE count spread speed'` for `land`, `winner`, `winner-again` (with `winner-again-tick`), `loser` and `vanish`. `[]` = none for that moment. Particles that need extra data (dust colours...) are refused with a warning.

## Flip menu (`animation`)

`frame-delays` (ticks between coin faces, one face per number), `tick-sound`, `win-sound`, `lose-sound`, `close-delay-ticks` (how long the result stays before the menu closes), `open-for-creator`.
