Skip to content

Variable: SpriteStudioView ​

const SpriteStudioView: ForwardRefExoticComponent<SpriteStudioViewProps & RefAttributes<SpriteStudioViewRef>>

Defined in: packages/react-native-spritestudio/src/view/SpriteStudioView.tsx:175

Layer 4 — the declarative view: one animation, fitted to its own box.

A Skia Canvas plus a frame loop. Each tick advances Layer 3 and re-records one SkPicture; the picture goes to the canvas through a Reanimated shared value, so a frame costs no React render.

The heavy lifting is one drawInto call per frame regardless of vertex count: Layer 1 owns the drawing, and this component owns only the clock and the placement.

For several animations at once, reach for <SpriteStudioScene> instead. This component is one canvas and one requestAnimationFrame loop, so twenty of them are twenty of each; a scene is one of each for the lot, which is the arrangement Layer 3 was built for (advance(dt) is externally clocked precisely so a tree can tick off one clock).