TexturedGraphicsOptions
graphics/abstract-textured-graphics.types.ts:11 Extends GraphicsOptions
The visual options shared by every textured graphics component —
Sprite, AnimatedSprite, TilingSprite, and
Text. Extends the base GraphicsOptions (alpha, visible)
with the two properties a textured display object adds: an anchor and a
tint. Each component's own options type extends this with its specifics.
Properties
alpha?: number Opacity in the range 0 (fully transparent) to 1 (fully opaque).
Defaults to 1.
anchor?: number | PointPrimitive The anchor point — the spot on the graphic that sits on the host
WorldObject's position — as a fraction of the graphic's size in
each axis. 0 is the left/top edge, 1 the right/bottom, 0.5 the
centre. Pass a single number to use it for both axes, or a
PointPrimitive for independent values.
Defaults to 0.5 (centred), which differs from the renderer's own
top-left default. Centring matches arcade2d's convention that a
WorldObject's position is its visual origin.
layer?: Layer The render layer this graphic draws in, as a Layer token from the
world's LayerSet (e.g. layers.get('characters')).
Layers are opt-in per world. If the world was created with layers, this
is required — omitting it throws ErrorCode.LAYER_UNSPECIFIED,
since a layered world has no implicit default band. If the world has no
layer set, this must be omitted — passing it throws
ErrorCode.LAYER_SET_ABSENT. Change it later with
AbstractGraphics.layer to move the graphic between bands.
tint?: number Multiplicative tint as a 24-bit RGB integer (e.g. 0xff0000 for red).
0xffffff (white) leaves colours unchanged. For Text this
multiplies on top of the glyph TextOptions.fill. Defaults to
0xffffff.
visible?: boolean Whether the graphic is drawn at all. A hidden graphic still ticks and
keeps its transform in sync; it is simply skipped by the renderer.
Defaults to true.