Skip to content

Function: useSpriteStudioPlayer() ​

useSpriteStudioPlayer(props): SsPlayerState

Defined in: packages/react-native-spritestudio/src/view/useSpriteStudioPlayer.ts:152

Owns one Layer 3 player for a component: loads it, keeps the transport props on it, and reports when it is drawable.

Deliberately not a clock. Who advances the player is the caller's business, and that is the whole difference between the two Layer 4 components: a <SpriteStudioView> runs its own frame loop, while every <SpriteStudioSprite> in a scene is advanced by the one loop the scene owns.

Parameters ​

props ​

SsPlayerProps

Returns ​

SsPlayerState