# PlayerData

The table of a flow: its states, triggers and poses, as the export writes it (into the snippet, into
`<base>.player.json`, into a `.rupaplay` file). The keys are short because the table is pasted into every snippet.
`mount` checks a table it is given and leaves out a part that fails.

## Example

```ts
// A card that runs a 300 ms "hover" state while the pointer is over it, and runs it back when it leaves.
const data: PlayerData = {
	v: 1,
	r: "card",
	e: "idle",
	w: 0,
	m: 0,
	s: [
		["idle", null, 1, [["idle", 0]], null],
		["hover", 300, 0, [["hover", 0]], 300],
	],
	t: [["hover", ".card", "hover", 1]],
	p: [],
};
```

## Properties

### e

> `readonly` **e**: `string` | `null`

The state of the default chain, which plays while `data-rupa-state` names none; `null` without one.

***

### m

> `readonly` **m**: `0` | `1`

`1` when the export writes the reduced motion block: under `prefers-reduced-motion` no SMIL animation begins.

***

### p

> `readonly` **p**: readonly [`PlayerPose`](/reference/api/rupamotion/player/type-aliases/playerpose/)\[]

The poses a state starts from (`PlayerPose`).

***

### r

> `readonly` **r**: `string`

The root's class (the export's prefix): the root is the element with this class and `data-rupa`.

***

### s

> `readonly` **s**: readonly [`PlayerState`](/reference/api/rupamotion/player/type-aliases/playerstate/)\[]

The states (`PlayerState`).

***

### t

> `readonly` **t**: readonly [`PlayerTrigger`](/reference/api/rupamotion/player/type-aliases/playertrigger/)\[]

The triggers (`PlayerTrigger`).

***

### v

> `readonly` **v**: `1`

The format's version, `1`: raised only when the format changes.

***

### w

> `readonly` **w**: `0` | `1`

`1` when the default chain waits for the root to enter the viewport before it starts.
