OptionalantialiasWhether to multisample the render target, which smooths the edges of shapes drawn into it
OptionalautoWhether to re-render the container every frame, for animated content
Needs a ContainerSourceOptions#renderer; without one it warns and waits until one is set.
It renders from Ticker.shared just before an application that renders from it
(sharedTicker: true); a default application has its own ticker and shows the previous frame's
capture. While it's on, Ticker.shared holds the source, so turn it off or destroy the source
when you're done.
OptionalclearColour the capture fills the texture with before it draws the container
Transparent keeps the container's alpha, so the parts it leaves empty show what's behind a
material in alphaMode: 'blend' or 'mask', a Sprite3D or a 2D Sprite. A material in
the default alphaMode: 'opaque' draws those parts black, and the anti-aliased edges next to them
turn hard; pass 'black' there to keep them smooth. Change it later through the texture's
clearColor property.
The 2D Container to draw; it moves out of its current parent, so it stops drawing on the stage
OptionalfirstWhether to render once during construction, so the texture has a picture before anything samples it
Needs ContainerSourceOptions#renderer; without one, an explicit true warns.
OptionalheightHeight of the capture in logical pixels, measured when omitted as ContainerSourceOptions#width describes
OptionalrendererRenderer to keep for render() calls with no argument; ContainerSourceOptions#firstRender
and ContainerSourceOptions#autoUpdate need it
OptionalresolutionTexels per logical pixel; 2 gives a sharper texture for four times the memory
OptionaltransformMatrix applied to the container when it's captured, to move or scale it into the capture
Omitted, when you give neither width nor height, it moves the top-left corner of the
container's contents, measured once at construction, to the origin; otherwise the capture is
the window from (0, 0) to (width, height). The container's own position, pivot, scale and
rotation still apply inside the capture, but the measurement leaves them out, so leave them at
their defaults or pass width, height and transform yourself.
new Matrix().translate(128, 128) centres a 256 × 256 capture on the origin of a container left
at its defaults; change it later through the texture's transform property.
OptionalwidthWidth of the capture in logical pixels; omitted, it's measured once from the container's local bounds
ContainerSourceOptions#transform says where the container sits in the capture.
Options for ContainerTexture and ContainerSource
Example