Atlas Engine
API Referenceatlasatlas/input

MousePacket

Mouse position and motion offsets passed to interactive callbacks.

Module: atlas/input

Mouse position and motion offsets passed to interactive callbacks.

Declaration

export type MousePacket = {
        /**
         * The cursor's horizontal position.
         */
        xpos: number;
        /**
         * The cursor's vertical position.
         */
        ypos: number;
        /**
         * The horizontal input offset since the previous event.
         */
        xoffset: number;
        /**
         * The vertical input offset since the previous event.
         */
        yoffset: number;
        /**
         * Whether mouse pitch is constrained.
         */
        constrainPitch: boolean;
        /**
         * Whether this is the first mouse sample after initialization or capture.
         */
        firstMouse: boolean;
    };

Properties

xpos

The cursor's horizontal position.

xpos: number;

ypos

The cursor's vertical position.

ypos: number;

xoffset

The horizontal input offset since the previous event.

xoffset: number;

yoffset

The vertical input offset since the previous event.

yoffset: number;

constrainPitch

Whether mouse pitch is constrained.

constrainPitch: boolean;

firstMouse

Whether this is the first mouse sample after initialization or capture.

firstMouse: boolean;

On this page