---
url: https://cri-middleware.github.io/SSPlayerForReactNative/api/classes/SpriteStudioPlayer.md
---
# Class: SpriteStudioPlayer

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:214](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L214)

Layer 3 — the user-facing player: transport, clock and events.

**Externally clocked by default.** `advance(dt)` is the drive, called by
`<SpriteStudioView>` from its frame loop, so the whole tree ticks off one
clock instead of N. `startClock()` exists for headless use, where there is no
view to do it.

Everything below `advance`/`draw` is Layer 2's; everything above is React's.
This layer holds the resource, applies transport settings that were set
before a load finished, and turns the Brain's `isFinished` *state* into a
one-shot event.

## Implements

* [`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md)

## Constructors

### Constructor

> **new SpriteStudioPlayer**(`options?`): `SpriteStudioPlayer`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:353](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L353)

#### Parameters

##### options?

[`SpriteStudioPlayerOptions`](../interfaces/SpriteStudioPlayerOptions.md)

#### Returns

`SpriteStudioPlayer`

## Properties

### onAnimationChanged

> **onAnimationChanged**: [`SsAnimationCallback`](../type-aliases/SsAnimationCallback.md) | `null` = `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:323](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L323)

Fires when a **different** animation is mounted, with the new name.

Not on a re-`setAnimation` to the same name, which is a restart and reports
itself through `onAnimationStarted`.

`animation` is a **prop**, so a re-render can
mount a different clip without anything in the host calling `setAnimation`
at all — the switch happens in `applySettings`, below Layer 4. Without this
there is no way to observe it.

***

### onAnimationFinished

> **onAnimationFinished**: [`SsAnimationCallback`](../type-aliases/SsAnimationCallback.md) | `null` = `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:300](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L300)

Fires on the rising edge of the Brain's `isFinished`, so once per run.

***

### onAnimationLooped

> **onAnimationLooped**: [`SsAnimationCallback`](../type-aliases/SsAnimationCallback.md) | `null` = `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:302](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L302)

Fires on any frame the playhead crossed a loop boundary.

***

### onAnimationStarted

> **onAnimationStarted**: [`SsAnimationCallback`](../type-aliases/SsAnimationCallback.md) | `null` = `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:311](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L311)

Fires when playback **starts from the beginning** — not on resume.

Layer 3 folds start and resume into one `play()` verb because that is what a
`playing` prop means, but they are different events: one rewinds and re-arms
the loop counter, the other carries on. This is the first of the two, which
is the one worth reacting to.

***

### onAudio

> **onAudio**: ((`event`) => `void`) | `null` = `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:338](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L338)

Fires once per audio key the playhead crossed, in `advance`.

Gated exactly like `onUserData`, and for the same reason. **Nothing plays
it**: the event says what to play and where the file is, and an app that
leaves this null gets a silent animation rather than an error.

***

### onSignal

> **onSignal**: ((`event`) => `void`) | `null` = `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:345](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L345)

Fires once per active signal the playhead crossed, in `advance`.

Gated like the other two. Nothing here interprets `commandId` — dispatching
it is the whole point, and is the app's.

***

### onUserData

> **onUserData**: ((`event`) => `void`) | `null` = `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:330](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L330)

Fires once per user-data key the playhead crossed, in `advance`.

Only read from Layer 1 when something is listening — the Brain rebuilds its
list every collection, so a tick nobody watched costs nothing.

***

### textures

> `readonly` **textures**: [`SsTextureRegistry`](SsTextureRegistry.md)

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:349](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L349)

## Accessors

### advances

#### Get Signature

> **get** **advances**(): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:2013](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L2013)

Whether [advance](#advance) can change the frame. See `SsContext.advances`.

##### Returns

`boolean`

***

### canvasBox

#### Get Signature

> **get** **canvasBox**(): [`SsBox`](../interfaces/SsBox.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1892](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1892)

The animation's authored canvas, placed against the origin by its pivot, in
player-local units: what `fit` places against when the caller supplies no
`frame` and asked for no measurement. Null until an animation is set up.

##### Returns

[`SsBox`](../interfaces/SsBox.md) | `null`

***

### contentBox

#### Get Signature

> **get** **contentBox**(): [`SsBox`](../interfaces/SsBox.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1883](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1883)

The box the art occupies, in player-local units, or null when nothing has
been measured. What `fit` places against when present.

Null is not a failure — it is what a player loaded without a `measure`
request reports, and Layer 4 falls back to `canvasBox`.

##### Returns

[`SsBox`](../interfaces/SsBox.md) | `null`

***

### currentAnimation

#### Get Signature

> **get** **currentAnimation**(): `string` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:606](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L606)

##### Returns

`string` | `null`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`currentAnimation`](../interfaces/SpriteStudioPlayerApi.md#currentanimation)

***

### endFrame

#### Get Signature

> **get** **endFrame**(): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1072](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1072)

##### Returns

`number`

***

### frameNo

#### Get Signature

> **get** **frameNo**(): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:609](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L609)

##### Returns

`number`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`frameNo`](../interfaces/SpriteStudioPlayerApi.md#frameno)

***

### frameRate

#### Get Signature

> **get** **frameRate**(): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:651](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L651)

##### Returns

`number`

***

### frameSkipEnabled

#### Get Signature

> **get** **frameSkipEnabled**(): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1051](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1051)

See [setFrameSkipEnabled](#setframeskipenabled).

##### Returns

`boolean`

***

### internal

#### Get Signature

> **get** **internal**(): [`SsInternalPlayer`](SsInternalPlayer.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:596](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L596)

The Layer 2 player, or null before the first successful load.

##### Returns

[`SsInternalPlayer`](SsInternalPlayer.md) | `null`

***

### isFinished

#### Get Signature

> **get** **isFinished**(): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:615](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L615)

##### Returns

`boolean`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`isFinished`](../interfaces/SpriteStudioPlayerApi.md#isfinished)

***

### isLoaded

#### Get Signature

> **get** **isLoaded**(): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:600](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L600)

##### Returns

`boolean`

***

### isPausing

#### Get Signature

> **get** **isPausing**(): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:620](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L620)

Whether playback is held by [pause](#pause). Stays false before the first [play](#play).

##### Returns

`boolean`

***

### isPlaying

#### Get Signature

> **get** **isPlaying**(): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:612](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L612)

##### Returns

`boolean`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`isPlaying`](../interfaces/SpriteStudioPlayerApi.md#isplaying)

***

### isPlayingForward

#### Get Signature

> **get** **isPlayingForward**(): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:648](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L648)

Which way the playhead is actually travelling this frame.

Not `playbackDirection`, which is only the heading that was configured:
under ping-pong the return leg runs backward while the configured heading
still reads forward. Gate audio on this — SpriteStudio has no reverse audio,
so a key crossed on a backward leg is not meant to sound, and it is the test
the players that do play audio themselves apply.

```ts
player.onAudio = (e) => {
  if (player.isPlayingForward) mySoundBank.play(e.soundName, e.loopNum)
}
```

##### Returns

`boolean`

Whether the playhead is travelling forward this frame. Gate audio on it.

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`isPlayingForward`](../interfaces/SpriteStudioPlayerApi.md#isplayingforward)

***

### justLooped

#### Get Signature

> **get** **justLooped**(): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:630](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L630)

Whether the last [advance](#advance) crossed a loop boundary. A **pulse**, true
only inside the tick that crossed — take [onAnimationLooped](#onanimationlooped) instead if you would
rather have it delivered than polled. False after a tick that did not run.
Track 0's [trackJustLooped](#trackjustlooped).

##### Returns

`boolean`

***

### lastTextureReport

#### Get Signature

> **get** **lastTextureReport**(): [`SsTextureLoadReport`](../interfaces/SsTextureLoadReport.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:552](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L552)

What the last load could not resolve, or null before the first one.

Worth surfacing because a missing texture is silent: `drawInto` skips a
batch it has no paint for, so the symptom is a part that is simply not
there rather than an error.

##### Returns

[`SsTextureLoadReport`](../interfaces/SsTextureLoadReport.md) | `null`

#### Set Signature

> **set** **lastTextureReport**(`value`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:555](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L555)

##### Parameters

###### value

[`SsTextureLoadReport`](../interfaces/SsTextureLoadReport.md) | `null`

##### Returns

`void`

***

### loopCount

#### Get Signature

> **get** **loopCount**(): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1046](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1046)

Cycles configured for this run; `0` and `-1` are both infinite.

##### Returns

`number`

***

### needsDraw

#### Get Signature

> **get** **needsDraw**(): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:2005](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L2005)

Whether [draw](#draw) would draw something other than what it last drew.
False for a stopped player whose frame, textures and placement are as they
were, so a view can keep the picture it has.

##### Returns

`boolean`

***

### partCount

#### Get Signature

> **get** **partCount**(): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:654](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L654)

##### Returns

`number`

***

### playbackDirection

#### Get Signature

> **get** **playbackDirection**(): [`SsPlaybackDirection`](../type-aliases/SsPlaybackDirection.md)

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1059](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1059)

The heading that was **configured** — not [isPlayingForward](#isplayingforward), which is
where the playhead is actually going this frame.

##### Returns

[`SsPlaybackDirection`](../type-aliases/SsPlaybackDirection.md)

***

### playbackStyle

#### Get Signature

> **get** **playbackStyle**(): [`SsPlaybackStyle`](../type-aliases/SsPlaybackStyle.md)

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1064](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1064)

What the playhead does at the far end of the section.

##### Returns

[`SsPlaybackStyle`](../type-aliases/SsPlaybackStyle.md)

***

### rootTransform

#### Get Signature

> **get** **rootTransform**(): [`SsRootTransform`](../interfaces/SsRootTransform.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1924](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1924)

Where the origin lands and how it is scaled/mirrored. Held here as well as
on Layer 2 so it can be set before a load and survive one.

##### Returns

[`SsRootTransform`](../interfaces/SsRootTransform.md) | `null`

***

### speedScale

#### Get Signature

> **get** **speedScale**(): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1041](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1041)

Multiplier in effect, read back from the Brain rather than from what was
asked for. `0` and negatives clamp to a **stop** there, so setting `-2` and
reading this back gives `0` — the stop it actually became, not the reverse
playback the request looks like. Falls back to the pending setting before a
resource exists.

##### Returns

`number`

***

### startFrame

#### Get Signature

> **get** **startFrame**(): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1069](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1069)

First and last frame of the range being played — the section once one is set.

##### Returns

`number`

***

### subFrameEnabled

#### Get Signature

> **get** **subFrameEnabled**(): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1030](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1030)

See [setSubFrameEnabled](#setsubframeenabled).

##### Returns

`boolean`

***

### textureCacheKeys

#### Get Signature

> **get** **textureCacheKeys**(): `string`\[]

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:591](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L591)

Atlas cache keys the last load leased — what `ssPreload` retains so its
throwaway player's `dispose` does not evict the very entries it warmed.

##### Returns

`string`\[]

***

### totalFrames

#### Get Signature

> **get** **totalFrames**(): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1077](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1077)

Frames in that range, both ends inclusive. Feed it to a scrubber.

##### Returns

`number`

***

### trackCount

#### Get Signature

> **get** **trackCount**(): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1353](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1353)

Tracks that exist, silent ones included. 0 before a load.

##### Returns

`number`

## Methods

### addListener()

> **addListener**(`listener`): () => `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:2065](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L2065)

Subscribes to load/transport changes. Returns the unsubscribe.

#### Parameters

##### listener

() => `void`

#### Returns

() => `void`

***

### addTrackSource()

> **addTrackSource**(`track`, `name`, `weight?`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1624](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1624)

Adds `name` to `track` as another weighted source — locomotion-style
blending within one track — and returns its handle, or `null` when it was
refused. `weight` only sets proportions among the track's sources.

#### Parameters

##### track

`number`

##### name

`string`

##### weight?

`number` = `1`

#### Returns

`number` | `null`

***

### advance()

> **advance**(`dtMilliseconds`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1952](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1952)

Advances the animation and dispatches the frame's events.

A stopped player (never played, stopped, or finished) holds its frame:
nothing advances, its parts with independent playback included, as in
SSPlayerForWeb. A paused one still advances, so those keep running, unless
it has no effect or instance part, in which case nothing could move. A
finished one still advances while the rest of the stack moves the pose:
track 0 ending does not stop the clock that runs on — see
`SsContext.advances`.

`isFinished` is a *state* the Brain latches until the next play/setup, so
`onAnimationFinished` is fired off its rising edge — polling the state itself would
fire it on every frame after the end.

#### Parameters

##### dtMilliseconds

`number`

#### Returns

`void`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`advance`](../interfaces/SpriteStudioPlayerApi.md#advance)

***

### cancelTrackFade()

> **cancelTrackFade**(`track`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1429](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1429)

Stops the fade on `track` where it stands; the next crossfade takes what it left.

#### Parameters

##### track

`number`

#### Returns

`boolean`

***

### cellmapNames()

> **cellmapNames**(): `string`\[]

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:697](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L697)

Cellmap names in the pack, without the `.ssce` extension — the namespace a
cell override takes. Empty before a load completes.

#### Returns

`string`\[]

***

### cellNames()

> **cellNames**(`cellmapName`): `string`\[]

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:702](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L702)

The cell names inside one cellmap — the other half a cell override takes.

#### Parameters

##### cellmapName

`string`

#### Returns

`string`\[]

***

### clearTrack()

> **clearTrack**(`track`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1377](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1377)

Silences `track` and cancels its fade. Track 0 cannot be cleared — fade it instead.

#### Parameters

##### track

`number`

#### Returns

`boolean`

***

### crossfade()

> **crossfade**(`track`, `name`, `durationMs`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1401](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1401)

Fades `track` over to `name` in `durationMs` (the unit [advance](#advance)
takes). Everything the track carries fades out together, and a crossfade
started while one runs takes the pose over where it stands.

On **track 0** the incoming animation takes over **from the call on**:
`currentAnimation`, `isPlaying` / `isFinished` / `justLooped`, the frame,
the events and the discrete attributes (cells, hiding, part colour) all
belong to it at once, and the outgoing one only fades away — it no longer
reports finishing, and by default fires no events
([setTrackOutgoingEventThreshold](#settrackoutgoingeventthreshold)). [onAnimationChanged](#onanimationchanged) fires,
[onAnimationStarted](#onanimationstarted) does not: it is a switch, not a `play()`. The
incoming animation plays at the track's speed, direction, frame rate and
frame skip, and loops [setLoopCount](#setloopcount) times; it starts from its head.

Fades run on the playback clock, so on a paused or stopped player the fade
waits for [resume](#resume) or [play](#play).

#### Parameters

##### track

`number`

##### name

`string`

##### durationMs

`number`

#### Returns

`boolean`

***

### dispose()

> **dispose**(): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:2117](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L2117)

Releases every native handle. Explicit, never left to GC — the lifetime
rule in `specs/SsRuntime.nitro.ts`. Idempotent.

#### Returns

`void`

***

### draw()

> **draw**(`canvas`): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:2019](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L2019)

Draws the current frame. Returns the number of vertices drawn.

#### Parameters

##### canvas

[`SkCanvas`](https://wcandillon.github.io/react-native-skia/)

#### Returns

`number`

***

### fadeTrack()

> **fadeTrack**(`track`, `alpha`, `durationMs`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1413](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1413)

Drives `track`'s alpha to `alpha` over `durationMs`. Fading track 0 to 0
brings the character to its setup pose.

#### Parameters

##### track

`number`

##### alpha

`number`

##### durationMs

`number`

#### Returns

`boolean`

***

### findPartIndex()

> **findPartIndex**(`partName`): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:659](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L659)

Resolve a part name to its index, or `-1` when the name is not in the animation.

#### Parameters

##### partName

`string`

#### Returns

`number`

***

### getAnimationNames()

> **getAnimationNames**(): `string`\[]

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:707](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L707)

See `SpriteStudioPlayerApi`. Empty before a load completes.

#### Returns

`string`\[]

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`getAnimationNames`](../interfaces/SpriteStudioPlayerApi.md#getanimationnames)

***

### getCellmapTexture()

> **getCellmapTexture**(`name`): [`SkImage`](https://wcandillon.github.io/react-native-skia/) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1856](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1856)

The runtime replacement in effect for `name`, or `null` when none is — the
**override value only**, never the pack's own texture. Use it to read back what
[setCellmapTexture](#setcellmaptexture) set.

#### Parameters

##### name

`string`

#### Returns

[`SkImage`](https://wcandillon.github.io/react-native-skia/) | `null`

***

### getLabelTable()

> **getLabelTable**(`animation?`): [`SsLabelTable`](../interfaces/SsLabelTable.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:973](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L973)

The labels of `animation` — the current one when omitted — in frame order,
with the animation's own first and last frame. Null before a load and for
an animation the pack does not have. Read from the pack on every call, so
hold the table rather than asking per frame.

#### Parameters

##### animation?

`string`

#### Returns

[`SsLabelTable`](../interfaces/SsLabelTable.md) | `null`

***

### getPartQuad()

> **getPartQuad**(`part`): [`SsPartQuad`](../interfaces/SsPartQuad.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1201](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1201)

The outline `part` is drawn with on the frame last built, in **view
pixels** — the root transform applied, so the space a touch on the view
reports, unlike [getPartTransform](#getparttransform). Null before a load, for an
unknown or hidden part, and for a part that draws nothing of its own.

A part with a cell is its four drawn corners, skew and vertex deform
included; a Mesh part the axis-aligned box around its vertices; a Shape its
size around its pivot. Null, bone, Instance and Effect parts have none, and
a part drawn at alpha 0 still has one.

#### Parameters

##### part

`string` | `number`

#### Returns

[`SsPartQuad`](../interfaces/SsPartQuad.md) | `null`

***

### getPartTransform()

> **getPartTransform**(`part`): [`SsPartTransform`](../interfaces/SsPartTransform.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1127](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1127)

Where a part is this frame, in player-local units, or null if it has no
matrix — an unknown name, or a frame before the first `advance`.

Player-local: `rootTransform` still has to be applied to reach the screen,
and `useSsPartTransform` is what does that.

Position, rotation and scale only. A part's Skew is a non-inheriting
local-vertex deform, so it never enters the world matrix this decomposes:
a followed part — or one under a sheared parent — is reported unsheared,
matching SpriteStudio, where Skew does not inherit to children.

#### Parameters

##### part

`string` | `number`

#### Returns

[`SsPartTransform`](../interfaces/SsPartTransform.md) | `null`

***

### getReplaceableTextureNames()

> **getReplaceableTextureNames**(): `string`\[]

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1870](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1870)

Every texture a [setCellmapTexture](#setcellmaptexture) can target — cellmap names, without
`.ssce`, followed by the external-texture file names a `TCHG` points at,
deduplicated. Empty before a load completes.

The external names are here because a `TCHG` binds through them, so they are
legitimately replaceable too — the list a UI would offer as "textures you can
swap". It is a snapshot of the loaded pack, cached from the last load rather
than re-read per call.

#### Returns

`string`\[]

***

### hitTestPart()

> **hitTestPart**(`x`, `y`, `parts?`): `number`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1231](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1231)

The index of the part on top whose [getPartQuad](#getpartquad) outline holds
`(x, y)`, a point in view pixels, among `parts` — names or indices, every
part when omitted — on the frame last built. `-1` when none does, as
[findPartIndex](#findpartindex) answers; a name the animation does not have is
skipped.

#### Parameters

##### x

`number`

##### y

`number`

##### parts?

readonly (`string` | `number`)\[]

#### Returns

`number`

***

### isPartHidden()

> **isPartHidden**(`part`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1156](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1156)

Whether `part` is hidden on the frame being displayed.

The companion to [getPartTransform](#getparttransform), which reports where a part
*would* be whether or not it is drawn. A view driven from a part needs
both: the transform to place it, and this to decide whether to show it —
the `onHide` option the sibling Players offer on their built-in
attachments. `useSsPartTransform` reports the pose only, so this is the
call a host makes alongside it.

Read from the **display** frame — floored when sub-frame is off, the same
frame that was drawn — so it cannot disagree with what is on screen. It is
that frame's hide: the animation's own, and a [setPartOverrides](#setpartoverrides)
`hide: true` too, on every descendant it hides when `cascade` is set. An
override shows up once the player next advances or seeks, and at once on
a stopped player. False for an
unknown name, an out-of-range index and before the first `advance`;
[findPartIndex](#findpartindex) is the existence test.

#### Parameters

##### part

`string` | `number`

#### Returns

`boolean`

***

### isPartSkinnedMesh()

> **isPartSkinnedMesh**(`part`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1181](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1181)

Whether `part` is a **skinned** mesh — a mesh part bound to bones, and so
the one kind of part a follower cannot sit on.

A skinned mesh draws its vertices from its bound bones, while the part's own
transform — what [getPartTransform](#getparttransform) and `useSsPartTransform` report —
stays at its setup node position, usually near the character root. So a view
following such a part lands near the root rather than on the deformed art.
To follow the art, add a NULL / bone part at that spot in SpriteStudio and
follow *that* — a null, joint, armature or bone-point part places its own
node where the art is. See [Following a part](/usage/parts#following-a-part).

False for a rigid (deform-only) mesh and every non-mesh part — those follow
correctly — and false for an unknown name or before a load. The judgement is
a `mesh_binding` present with at least one influence bone.

#### Parameters

##### part

`string` | `number`

#### Returns

`boolean`

***

### isTrackFinished()

> **isTrackFinished**(`track`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1579](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1579)

Whether `track`'s animation has played its loops out — a state, as
[isFinished](#isfinished) is for track 0. A finished track above 0 holds its last
frame; only track 0 finishing ends the character's playback.

#### Parameters

##### track

`number`

#### Returns

`boolean`

***

### load()

> **load**(`source`, `options?`): `Promise`<`void`>

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:367](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L367)

Loads a `.ssab` and, optionally, sets up an animation in it.

Replaces whatever was loaded before. Safe to call again while a previous
load is still in flight: the older one is discarded rather than racing the
newer one into place.

#### Parameters

##### source

[`SsSource`](../type-aliases/SsSource.md)

##### options?

###### animation?

`string`

###### loadTextures?

`boolean`

###### measure?

[`SsMeasureRequest`](../interfaces/SsMeasureRequest.md)

Measure the content box while loading, for `fit` to place against.

Off by default because it costs a bake of every frame it walks, and a
caller who supplies a `frame` — or wants the old scale-1 placement —
should not pay for it. See `SsMeasureRequest`.

#### Returns

`Promise`<`void`>

***

### partNames()

> **partNames**(): `string`\[]

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:689](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L689)

Part names in part-index order, empty before a load finishes.

This is what turns the `partIndex` on an event back into something a human
reads, and what fills a part picker. An unnamed part holds its slot as `''`
so the list stays index-aligned; `length` is the part count.

#### Returns

`string`\[]

***

### pause()

> **pause**(): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:851](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L851)

Holds playback where it stands. Idempotent, and ignored while nothing plays.

#### Returns

`void`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`pause`](../interfaces/SpriteStudioPlayerApi.md#pause)

***

### play()

> **play**(`startFrame?`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:815](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L815)

**Head-out**: rewinds to the start of the section and re-arms the loop
count.

Not a resume — [resume](#resume) is. Mapping a boolean prop onto the four verbs
is Layer 4's job, and it is the only layer that knows the prop exists.

#### Parameters

##### startFrame?

`number`

#### Returns

`void`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`play`](../interfaces/SpriteStudioPlayerApi.md#play)

***

### resume()

> **resume**(): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:829](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L829)

Lifts a [pause](#pause), carrying on from the same frame.

Idempotent, and a no-op on a stopped animation: starting one is
[play](#play)'s job, and `play` rewinds. No `onAnimationStarted` — a resume is
not a start, and firing it here would make the two indistinguishable.

#### Returns

`void`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`resume`](../interfaces/SpriteStudioPlayerApi.md#resume)

***

### seek()

> **seek**(`frameNo`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:863](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L863)

#### Parameters

##### frameNo

`number`

#### Returns

`void`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`seek`](../interfaces/SpriteStudioPlayerApi.md#seek)

***

### setAnimation()

> **setAnimation**(`name`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:729](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L729)

Select an animation, and pose it on its first frame. **Does not start
playback** — that is [play](#play)'s job, and keeping the two apart is what
lets a caller swap the animation on a paused player, or show an idle pose.

**Selecting the animation already set up does nothing at all.** It is a
switch, so with nothing to switch to it costs nothing and disturbs nothing:
the playhead stays, the loop budget is not re-armed, and the overrides
survive. That makes it safe for a state machine to assert its current clip
every frame. To restart, call [play](#play).

"Already set up" is what track 0 plays **now**: after `crossfade(0, 'run')`
that is `run`, even mid-fade, so naming it does nothing and the fade runs
on — while naming the animation the fade is leaving is a real switch. A
real switch collapses the track stack back to track 0, ending every
overlay and fade and every setting of the tracks above 0. Track 0's
playback settings stay.

#### Parameters

##### name

`string`

#### Returns

`boolean`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`setAnimation`](../interfaces/SpriteStudioPlayerApi.md#setanimation)

***

### setAnimationSection()

> **setAnimationSection**(`startFrame`, `endFrame`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:899](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L899)

Restricts playback to `[startFrame, endFrame]` of the **current** animation,
both ends included, so `play`, looping and ping-pong all work within that
range. An end outside the animation's frames is its edge on that side.

Returns false, changing nothing, when both ends are inside the animation
and the end is before the start, and says so on the console once per pair.
False too before a pack is loaded.

Not carried across a [setAnimation](#setanimation): frame numbers only mean something
inside the animation they were measured in. Set it after each switch.

#### Parameters

##### startFrame

`number`

##### endFrame

`number`

#### Returns

`boolean`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`setAnimationSection`](../interfaces/SpriteStudioPlayerApi.md#setanimationsection)

***

### setAnimationSectionByLabel()

> **setAnimationSectionByLabel**(`startLabel`, `endLabel`, `startOffset?`, `endOffset?`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:929](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L929)

[setAnimationSection](#setanimationsection) with the ends named by labels of the **current**
animation: from `startLabel`'s frame plus `startOffset` to `endLabel`'s
frame plus `endOffset`, the rule an Instance part's start and end labels
follow. `_start` and `_end` name the animation's first and last frame. It
does not play.

```ts
player.setAnimation('button')
player.setAnimationSectionByLabel('hover', 'pressed', 0, -1)
player.play()
```

Returns false, changing nothing, when the animation has no such label or
when the frames it lands on are a section [setAnimationSection](#setanimationsection)
refuses, and says so on the console once. False too, and silent, before a
pack is loaded. Like any section, [setAnimation](#setanimation) wipes it.

#### Parameters

##### startLabel

`string`

##### endLabel

`string`

##### startOffset?

`number` = `0`

##### endOffset?

`number` = `0`

#### Returns

`boolean`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`setAnimationSectionByLabel`](../interfaces/SpriteStudioPlayerApi.md#setanimationsectionbylabel)

***

### setCellmapTexture()

> **setCellmapTexture**(`name`, `image`, `options?`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1814](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1814)

Replaces the texture bound for a cellmap at runtime, or restores the pack's
own when `image` is `null`. A costume change or a dynamic expression, driven
from code rather than the authoring data.

`name` is a cellmap name — with no `.ssce` — or an external texture's file
name, whichever [getReplaceableTextureNames](#getreplaceabletexturenames) lists. The swap is keyed
by the same hash `DrawBatch.texture_hash` carries, so it takes effect on the
next drawn frame with nothing else to do. Returns false, with a dev warning,
for a name the loaded pack has no such texture for; a name set before the
first load is accepted and applied once the pack lands.

**The replacement reaches instance children.** The whole
player tree draws through one texture table here, so a child that samples the
same cellmap picks up the swap too — there is no per-child map to set
separately. It also **survives a `source` change**: the override is re-keyed
onto the new pack by name, and drops back out only when you clear it or
dispose the player.

The `image` stays the caller's to keep alive — the registry references it and
never disposes it, the same rule the `textures` prop follows. Two caveats:
a part under an authored texture change (`TCHG`)
binds through a *different* hash on the frames it applies to, so replace the
texture file name it points at (also in [getReplaceableTextureNames](#getreplaceabletexturenames))
rather than the cellmap name to affect those; and a replacement is assumed to
share the original's **size and layout**, since the UVs stay in the original
atlas's pixel space.

#### Parameters

##### name

`string`

##### image

[`SkImage`](https://wcandillon.github.io/react-native-skia/) | `null`

##### options?

[`SsTextureOptions`](../interfaces/SsTextureOptions.md)

#### Returns

`boolean`

***

### setFrameRate()

> **setFrameRate**(`fps`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1007](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1007)

Overrides the advance rate, in **absolute** frames per second — the host's
choice rather than the clip's, so it survives a [setAnimation](#setanimation). Pass
`0` (or a negative) to clear it and go back to whatever each animation was
authored at.

[setSpeedScale](#setspeedscale) is the other rate control and they compose, but they say
different things: speed is a *multiple* of whatever the clip was authored
at, so it means the same against every clip; this *replaces* the rate, so
60 against a 30fps clip is double speed and against a 60fps clip is none.

#### Parameters

##### fps

`number`

#### Returns

`void`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`setFrameRate`](../interfaces/SpriteStudioPlayerApi.md#setframerate)

***

### setFrameSkipEnabled()

> **setFrameSkipEnabled**(`enabled`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:991](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L991)

How a long tick is spent. On (the default) advances by the elapsed time and
drops the frames in between, keeping playback on the wall clock; off
advances exactly one frame per tick, so nothing is skipped but a stalled app
plays in slow motion.

Turn it off when every frame matters — an animation whose events must all
fire, or a deterministic capture.

#### Parameters

##### enabled

`boolean`

#### Returns

`void`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`setFrameSkipEnabled`](../interfaces/SpriteStudioPlayerApi.md#setframeskipenabled)

***

### setLoopCount()

> **setLoopCount**(`loops`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:873](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L873)

0 = infinite.

#### Parameters

##### loops

`number`

#### Returns

`void`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`setLoopCount`](../interfaces/SpriteStudioPlayerApi.md#setloopcount)

***

### setPartOverrides()

> **setPartOverrides**(`overrides`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1258](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1258)

Applies a whole override map, and **clears what a previous one set**.

Declarative rather than incremental: a part that has dropped out of the map
goes back to the animation, which is what makes the map describe the state
rather than a history of calls. That is also why `clearPartOverrides` is not
enough on its own — it would clear overrides another caller set through the
escape hatch, so only the parts this method last touched are reverted.

#### Parameters

##### overrides

[`SsPartOverrides`](../type-aliases/SsPartOverrides.md)

#### Returns

`void`

***

### setPlaybackDirection()

> **setPlaybackDirection**(`direction`, `style?`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:878](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L878)

#### Parameters

##### direction

[`SsPlaybackDirection`](../type-aliases/SsPlaybackDirection.md)

##### style?

[`SsPlaybackStyle`](../type-aliases/SsPlaybackStyle.md) = `SsPlaybackStyle.normal`

#### Returns

`void`

***

### setRootTransform()

> **setRootTransform**(`value`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1928](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1928)

#### Parameters

##### value

[`SsRootTransform`](../interfaces/SsRootTransform.md)

#### Returns

`void`

***

### setSourceEventThreshold()

> **setSourceEventThreshold**(`source`, `threshold`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1656](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1656)

The weight at or above which `source` fires its events. The default,
`Infinity`, leaves every source but track 0's main one silent; lower it to
hear an overlay's events, each arriving with its `source`.

#### Parameters

##### source

`number`

##### threshold

`number`

#### Returns

`boolean`

***

### setSourceFrame()

> **setSourceFrame**(`source`, `frameNo`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1642](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1642)

#### Parameters

##### source

`number`

##### frameNo

`number`

#### Returns

`boolean`

***

### setSourceWeight()

> **setSourceWeight**(`source`, `weight`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1633](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1633)

A source's share of its track, against the track's other sources.

#### Parameters

##### source

`number`

##### weight

`number`

#### Returns

`boolean`

***

### setSpeedScale()

> **setSpeedScale**(`rate`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:868](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L868)

Multiplier on the authored frame rate. `0` and negatives **stop** the
playhead where it stands rather than turning it around — reversing is
`setPlaybackDirection`'s job, not the speed's, and the Brain clamps both to
the same stop.

#### Parameters

##### rate

`number`

#### Returns

`void`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`setSpeedScale`](../interfaces/SpriteStudioPlayerApi.md#setspeedscale)

***

### setSubFrameEnabled()

> **setSubFrameEnabled**(`enabled`): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1023](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1023)

Sub-frame interpolation — whether the frame handed to the Brain **for
display** keeps its fraction. On by default, which is what makes playback
smooth on a display refreshing faster than the animation was authored at.

The playhead is a float either way ([frameNo](#frameno) reports it unrounded),
and the instance / effect children are always stepped from the unrounded
value. Turning this off only floors what is drawn, pinning playback to whole
authored frames — and it reaches the instance children too, which are drawn
at their own playhead and have to be floored on the same terms.

#### Parameters

##### enabled

`boolean`

#### Returns

`void`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`setSubFrameEnabled`](../interfaces/SpriteStudioPlayerApi.md#setsubframeenabled)

***

### setTrackAlpha()

> **setTrackAlpha**(`track`, `alpha`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1436](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1436)

How strongly `track` layers onto the pose below. Not clamped.

#### Parameters

##### track

`number`

##### alpha

`number`

#### Returns

`boolean`

***

### setTrackAnimation()

> **setTrackAnimation**(`track`, `name`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1368](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1368)

Lays `name` on `track`, replacing what it played, starting from its head
(or at track 0's phase under [setTrackSync](#settracksync)). Tracks grow on demand.

On **track 0** it is an animation switch with no fade: `currentAnimation`
names it from the call, [onAnimationChanged](#onanimationchanged) fires, and the loop count
set with [setLoopCount](#setloopcount) is put back on it — but unlike
[setAnimation](#setanimation) the other tracks stay, and nothing is re-posed or
restarted. A track above 0 that plays its loops out holds its last frame,
still blended in, until you clear it or lay something else.

#### Parameters

##### track

`number`

##### name

`string`

#### Returns

`boolean`

***

### setTrackBlend()

> **setTrackBlend**(`track`, `blend`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1446](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1446)

`mix` replaces the pose below by the track's alpha; `additive` adds its offset.

#### Parameters

##### track

`number`

##### blend

[`SsTrackBlend`](../type-aliases/SsTrackBlend.md)

#### Returns

`boolean`

***

### setTrackFrame()

> **setTrackFrame**(`track`, `frameNo`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1469](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1469)

Seeks `track`'s animation — how a modulation axis authored as an animation is driven.

#### Parameters

##### track

`number`

##### frameNo

`number`

#### Returns

`boolean`

***

### setTrackFrameRate()

> **setTrackFrameRate**(`track`, `fps`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1498](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1498)

`track`'s absolute frame-rate override; `0` clears it. Track 0's is [setFrameRate](#setframerate).

#### Parameters

##### track

`number`

##### fps

`number`

#### Returns

`boolean`

***

### setTrackFrameSkipEnabled()

> **setTrackFrameSkipEnabled**(`track`, `enabled`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1510](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1510)

Track 0's is [setFrameSkipEnabled](#setframeskipenabled).

#### Parameters

##### track

`number`

##### enabled

`boolean`

#### Returns

`boolean`

***

### setTrackLoopCount()

> **setTrackLoopCount**(`track`, `loops`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1562](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1562)

How many times `track`'s animation plays before it holds its last frame;
`0` is forever. **The animation's**, unlike the other track settings:
laying another one on a track above 0 starts it looping forever again.
Track 0's is [setLoopCount](#setloopcount), which this player puts back on every
animation track 0 switches to.

#### Parameters

##### track

`number`

##### loops

`number`

#### Returns

`boolean`

***

### setTrackOutgoingEventThreshold()

> **setTrackOutgoingEventThreshold**(`track`, `threshold`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1597](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1597)

How far into a crossfade on `track` its outgoing side keeps firing events:
while its share, `1 - progress`, is at least `threshold`. The default,
`Infinity`, silences it from the moment the fade begins — the moment the
incoming side starts firing. `0.5` keeps it firing through the first half.

#### Parameters

##### track

`number`

##### threshold

`number`

#### Returns

`boolean`

***

### setTrackPlaybackDirection()

> **setTrackPlaybackDirection**(`track`, `direction`, `style?`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1527](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1527)

Track 0's is [setPlaybackDirection](#setplaybackdirection).

#### Parameters

##### track

`number`

##### direction

[`SsPlaybackDirection`](../type-aliases/SsPlaybackDirection.md)

##### style?

[`SsPlaybackStyle`](../type-aliases/SsPlaybackStyle.md) = `SsPlaybackStyle.normal`

#### Returns

`boolean`

***

### setTrackSpeed()

> **setTrackSpeed**(`track`, `speed`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1484](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1484)

`track`'s speed multiplier. **A track setting**: it holds for every
animation laid on the track, both sides of a crossfade included, and a
track with nothing on it is created for it. Track 0's is
[setSpeedScale](#setspeedscale).

#### Parameters

##### track

`number`

##### speed

`number`

#### Returns

`boolean`

***

### setTrackSync()

> **setTrackSync**(`track`, `sync`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1459](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1459)

Where an animation laid on `track` starts — set it **before** laying one.
A track with nothing on it is created for it. Reset by [setAnimation](#setanimation).

#### Parameters

##### track

`number`

##### sync

[`SsTrackSync`](../type-aliases/SsTrackSync.md)

#### Returns

`boolean`

***

### sourceEventThreshold()

> **sourceEventThreshold**(`source`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1665](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1665)

#### Parameters

##### source

`number`

#### Returns

`number` | `null`

***

### sourceFrame()

> **sourceFrame**(`source`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1647](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1647)

#### Parameters

##### source

`number`

#### Returns

`number` | `null`

***

### sourceWeight()

> **sourceWeight**(`source`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1638](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1638)

#### Parameters

##### source

`number`

#### Returns

`number` | `null`

***

### startClock()

> **startClock**(): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:2038](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L2038)

Self-drives the animation off `requestAnimationFrame`.

Only for a player with no view attached — `<SpriteStudioView>` clocks its
player itself, and running both would advance every frame twice.

#### Returns

`void`

***

### stop()

> **stop**(): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:857](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L857)

Halts where it stands — nothing rewinds. The next `play()` heads out.

#### Returns

`void`

#### Implementation of

[`SpriteStudioPlayerApi`](../interfaces/SpriteStudioPlayerApi.md).[`stop`](../interfaces/SpriteStudioPlayerApi.md#stop)

***

### stopClock()

> **stopClock**(): `void`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:2056](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L2056)

#### Returns

`void`

***

### trackAlpha()

> **trackAlpha**(`track`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1441](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1441)

#### Parameters

##### track

`number`

#### Returns

`number` | `null`

***

### trackBlend()

> **trackBlend**(`track`): [`SsTrackBlend`](../type-aliases/SsTrackBlend.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1451](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1451)

#### Parameters

##### track

`number`

#### Returns

[`SsTrackBlend`](../type-aliases/SsTrackBlend.md) | `null`

***

### trackFadeProgress()

> **trackFadeProgress**(`track`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1424](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1424)

How far the fade in flight on `track` has got, `0`–`1`; `null` when none is.

#### Parameters

##### track

`number`

#### Returns

`number` | `null`

***

### trackFrame()

> **trackFrame**(`track`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1474](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1474)

#### Parameters

##### track

`number`

#### Returns

`number` | `null`

***

### trackFrameRate()

> **trackFrameRate**(`track`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1505](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1505)

The rate `track`'s animation plays at — `0` with no animation and no override.

#### Parameters

##### track

`number`

#### Returns

`number` | `null`

***

### trackFrameSkipEnabled()

> **trackFrameSkipEnabled**(`track`): `boolean` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1520](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1520)

#### Parameters

##### track

`number`

#### Returns

`boolean` | `null`

***

### trackJustLooped()

> **trackJustLooped**(`track`): `boolean`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1587](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1587)

Whether the last [advance](#advance) wrapped `track`'s animation — a pulse, as
[justLooped](#justlooped) is for track 0. False after a tick that did not run.

#### Parameters

##### track

`number`

#### Returns

`boolean`

***

### trackLoopCount()

> **trackLoopCount**(`track`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1569](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1569)

`-1` is forever; `null` for a track with no animation.

#### Parameters

##### track

`number`

#### Returns

`number` | `null`

***

### trackMainSource()

> **trackMainSource**(`track`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1615](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1615)

The source carrying `track`'s animation, or `null` when it has none. After
a crossfade begins, the incoming one. A finished fade releases its outgoing
sources and their handles are reused, so read this rather than keep one.

#### Parameters

##### track

`number`

#### Returns

`number` | `null`

***

### trackOutgoingEventThreshold()

> **trackOutgoingEventThreshold**(`track`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1606](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1606)

#### Parameters

##### track

`number`

#### Returns

`number` | `null`

***

### trackPlaybackDirection()

> **trackPlaybackDirection**(`track`): [`SsPlaybackDirection`](../type-aliases/SsPlaybackDirection.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1544](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1544)

#### Parameters

##### track

`number`

#### Returns

[`SsPlaybackDirection`](../type-aliases/SsPlaybackDirection.md) | `null`

***

### trackPlaybackStyle()

> **trackPlaybackStyle**(`track`): [`SsPlaybackStyle`](../type-aliases/SsPlaybackStyle.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1549](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1549)

#### Parameters

##### track

`number`

#### Returns

[`SsPlaybackStyle`](../type-aliases/SsPlaybackStyle.md) | `null`

***

### trackSpeed()

> **trackSpeed**(`track`): `number` | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1491](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1491)

What was stored — a negative speed reads back as the stop it became.

#### Parameters

##### track

`number`

#### Returns

`number` | `null`

***

### trackSync()

> **trackSync**(`track`): [`SsTrackSync`](../type-aliases/SsTrackSync.md) | `null`

Defined in: [packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts:1464](https://github.com/cri-middleware/SSPlayerForReactNative/blob/ddb0878ad347fd4a411e4e2eb0829a948cb07ff8/packages/react-native-spritestudio/src/player/SpriteStudioPlayer.ts#L1464)

#### Parameters

##### track

`number`

#### Returns

[`SsTrackSync`](../type-aliases/SsTrackSync.md) | `null`
