pixi.js
    Preparing search index...

    Interface PixiTouch

    A PixiJS compatible touch event interface that extends the standard DOM Touch interface. Provides additional properties to normalize touch input with mouse/pointer events.

    // Access touch information
    sprite.on('touchstart', (event) => {
    // Standard touch properties
    console.log('Touch position:', event.clientX, event.clientY);
    console.log('Touch ID:', event.pointerId);

    // Additional PixiJS properties
    console.log('Pressure:', event.pressure);
    console.log('Size:', event.width, event.height);
    console.log('Tilt:', event.tiltX, event.tiltY);
    });
    interface PixiTouch {
        button: number;
        buttons: number;
        height: number;
        isNormalized: boolean;
        isPrimary: boolean;
        layerX: number;
        layerY: number;
        offsetX: number;
        offsetY: number;
        pointerId: number;
        pointerType: string;
        pressure: number;
        tangentialPressure: number;
        tiltX: number;
        tiltY: number;
        twist: number;
        type: string;
        width: number;
    }

    Hierarchy

    Index

    Properties

    button: number

    The button being pressed (0: left, 1: middle, 2: right)

    buttons: number

    Bitmap of currently pressed buttons

    height: number

    The height of the touch contact area

    isNormalized: boolean

    Whether the event was normalized by PixiJS

    isPrimary: boolean

    Whether this is the primary touch point

    layerX: number

    The x coordinate relative to the current layer

    layerY: number

    The y coordinate relative to the current layer

    offsetX: number

    The x coordinate relative to the target's offset parent

    offsetY: number

    The y coordinate relative to the target's offset parent

    pointerId: number

    Unique identifier for this touch point

    pointerType: string

    The type of pointer that triggered this event

    pressure: number

    The normalized pressure of the pointer (0 to 1)

    tangentialPressure: number

    The normalized tangential pressure of the pointer

    tiltX: number

    The angle of tilt along the x-axis (in degrees)

    tiltY: number

    The angle of tilt along the y-axis (in degrees)

    twist: number

    The rotation angle of the pointer (e.g., pen)

    type: string

    The type of touch event

    width: number

    The width of the touch contact area