Interfaces

AtlasProps

Sprites are placed axis-aligned: tgfx's drawAtlas maps each sprite's bounding box, so a rotation would stretch the sprite rather than turn it. Rotate a <Group> around the whole batch, or use <TgfxImage> per sprite.

Extends

Properties

antiAlias?

optional antiAlias?: boolean;

Inherited from

PaintProps.antiAlias


blendMode?

optional blendMode?: BlendMode;

How this drawing composites onto what is already there. 'srcOver' by default.

Inherited from

PaintProps.blendMode


buffer?

optional buffer?: object;

A shared sprite buffer from useSpriteBuffer: seven floats per sprite, written in place from JS or a worklet and read by the renderer at draw. The zero-allocation path for particle systems.

capacity

capacity: number;

id

id: number;

children?

optional children?: ReactNode;

Inherited from

PaintProps.children


color?

optional color?: Animated<Color>;

Inherited from

PaintProps.color


count?

optional count?: Animated<number>;

How many buffer sprites to draw. A value slot; defaults to the capacity.


image

image: ImageLike | null;

The sprite sheet. null draws nothing.


opacity?

optional opacity?: Animated<number>;

Paint-wide alpha multiplier in [0, 1]; only one per chain can animate.

Inherited from

PaintProps.opacity


ref?

optional ref?: NodeHandle;

A handle from useNode(), for changing this node without a React render. See NodeHandle.

Inherited from

PaintProps.ref


sampling?

optional sampling?: Sampling;

Defaults to 'linear'.


sprites?

optional sprites?: AtlasSprite[];

Inline sprite list; ignored when buffer is given.


strokeCap?

optional strokeCap?: "butt" | "round" | "square";

Inherited from

PaintProps.strokeCap


strokeJoin?

optional strokeJoin?: "round" | "miter" | "bevel";

Inherited from

PaintProps.strokeJoin


strokeMiter?

optional strokeMiter?: Animated<number>;

Past this length-over-width ratio a 'miter' join falls back to bevel. Defaults to 4.

Inherited from

PaintProps.strokeMiter


strokeWidth?

optional strokeWidth?: Animated<number>;

Inherited from

PaintProps.strokeWidth


style?

optional style?: "fill" | "stroke";

'fill' (default) or 'stroke'.

Inherited from

PaintProps.style


visible?

optional visible?: Animated<number | boolean>;

Skip drawing (and hit-testing) this node. A value slot, so a handle or a SharedValue toggles it with no re-encode - the supported way to pool mounted nodes for particle systems and variable-count scenes.

Inherited from

PaintProps.visible