pixi.js
    Preparing search index...

    Interface PerspectivePlaneOptions

    Constructor options used for PerspectiveMesh instances. Defines the geometry and appearance of a 2D mesh with perspective projection.

    // Create a perspective mesh with a texture
    const mesh = new PerspectiveMesh({
    texture: Texture.from('myImage.png'),
    verticesX: 20,
    verticesY: 20,
    // Define corners clockwise from top-left
    x0: 0, y0: 0, // Top-left
    x1: 100, y1: 20, // Top-right (raised)
    x2: 100, y2: 100, // Bottom-right
    x3: 0, y3: 80 // Bottom-left (raised)
    });

    // Create a skewed perspective
    const skewedMesh = new PerspectiveMesh({
    texture: Texture.from('background.jpg'),
    verticesX: 15, // More vertices for smoother perspective
    verticesY: 15,
    x0: 0, y0: 30, // Shifted top-left
    x1: 128, y1: 0, // Raised top-right
    x2: 128, y2: 128, // Normal bottom-right
    x3: 0, y3: 98 // Shifted bottom-left
    });
    interface PerspectivePlaneOptions {
        x0?: number;
        x1?: number;
        x2?: number;
        x3?: number;
        y0?: number;
        y1?: number;
        y2?: number;
        y3?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    x0?: number

    The x-coordinate of the top-left corner

    x1?: number

    The x-coordinate of the top-right corner

    x2?: number

    The x-coordinate of the bottom-right corner

    x3?: number

    The x-coordinate of the bottom-left corner

    y0?: number

    The y-coordinate of the top-left corner

    y1?: number

    The y-coordinate of the top-right corner

    y2?: number

    The y-coordinate of the bottom-right corner

    y3?: number

    The y-coordinate of the bottom-left corner