q5play
    Preparing search index...

    Class _Mouse

    Hierarchy (View Summary)

    Index
    center: number

    The mouse's center button.

    drag: {}

    Contains the drag status of each of the mouse's buttons.

    holdThreshold: number

    The amount of frames an input must be pressed to be considered held.

    12
    
    isActive: boolean

    True if the mouse has ever interacted with the canvas.

    false
    
    isOnCanvas: boolean

    True if the mouse is currently on the canvas.

    false
    
    left: number

    The mouse's left button.

    right: number

    The mouse's right button.

    scrollDelta: { x: number; y: number }

    Contains the scroll status of the mouse wheel.

    x: number

    The mouse's x position in the world.

    y: number

    The mouse's y position in the world.

    • get pos(): { x: number; y: number }

      Gets the mouse's current position in the world as a readonly object {x, y} that won't updated if the mouse moves.

      Returns { x: number; y: number }

    • Parameters

      • Optionalinp: string

      Returns boolean

      true on the first frame that the user releases the input after dragging the mouse

    • Parameters

      • Optionalinp: string

      Returns number

      the amount of frames the user has been moving the mouse while pressing the input

    • Parameters

      • Optionalinp: string

      Returns boolean

      true on the first frame that the user moves the mouse while pressing the input

    • Same as the released function, which is preferred.

      Parameters

      • Optionalinp: string

      Returns boolean

      true on the first frame that the user released the input