@pixi/3d
    Preparing search index...

    Class ContainerSourceAdvanced

    A TextureSource whose pixels are a live 2D PixiJS Container

    The source behind ContainerTexture, whose docs cover when to render and which way up the picture is. Build one yourself to make several Textures, each with its own frame, over one container that renders once for all of them. TextureSource#resize changes its size.

    import { Rectangle, Texture } from 'pixi.js';

    const sheet = new ContainerSource({ container: icons, width: 256, height: 128, renderer: app.renderer });
    const play = new Texture({ source: sheet, frame: new Rectangle(0, 0, 128, 128) });
    const pause = new Texture({ source: sheet, frame: new Rectangle(128, 0, 128, 128) });

    Hierarchy

    Index
    • get autoUpdate(): boolean

      Whether the source re-renders every frame; ContainerSourceOptions#autoUpdate has the details

      Returns boolean

    • set autoUpdate(value: boolean): void

      Sets whether the source re-renders every frame

      Parameters

      • value: boolean

        true to re-render every frame.

      Returns void

    • get renderer(): Renderer | null

      The renderer kept for ContainerSource#render calls with no argument, or null

      Returns Renderer | null

    • set renderer(value: Renderer | null): void

      Sets the kept renderer

      Parameters

      • value: Renderer | null

        A renderer, or null to release it.

      Returns void

    • get transform(): Matrix

      The capture matrix ContainerSourceOptions#transform describes; change it or assign a new one, then render again

      Returns Matrix

    • set transform(value: Matrix): void

      Sets the capture matrix, copying value

      Parameters

      • value: Matrix

        The new capture matrix.

      Returns void

    • Frees the render target and stops ContainerSource#autoUpdate, leaving the container detached but intact unless you pass true

      Parameters

      • destroyContainer: boolean = false

        Also destroy the container and its children.

      Returns void

    • Renders the container into this source, as ContainerTexture#render describes

      Parameters

      • Optionalrenderer: Renderer

        Renderer to draw with, kept for later calls; omit to use the kept one.

      Returns void