pixi.js
    Preparing search index...

    Interface DOMContainerOptions

    Options for configuring a DOMContainer. Controls how DOM elements are integrated into the PixiJS scene graph.

    // Create with a custom element
    const domContainer = new DOMContainer({
    element: document.createElement('input'),
    anchor: { x: 0.5, y: 0.5 } // or anchor: 0.5 to center both x and y
    });
    interface DOMContainerOptions {
        anchor?: number | PointData;
        element?: HTMLElement;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    anchor?: number | PointData

    The anchor point of the container.

    • Can be a single number to set both x and y
    • Can be a point-like object with x,y coordinates
    • (0,0) is top-left
    • (1,1) is bottom-right
    • (0.5,0.5) is center
    0
    
    element?: HTMLElement

    The DOM element to use for the container. Can be any HTML element like div, input, textarea, etc.

    If not provided, creates a new div element.

    document.createElement('div')