q5play
    Preparing search index...

    Class _Pointer

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    canvasPos: { x: number; y: number }

    The pointer's absolute position on the canvas.

    duration: number

    The amount of frames the pointer has been active for.

    holdThreshold: number

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

    12
    
    id: number

    The pointer's unique identifier.

    press: number

    The amount of frames the user has been clicking, touching, or drawing on the screen with the pointer.

    pressure: number

    The pointer's pressure level, from 0 to 1.

    On devices that do not support pressure sensitivity, the value is 0.5 when the pointer is pressing.

    x: number

    The pointer's x position in the physics world.

    y: number

    The pointer's y position in the physics world.

    Methods

    • Returns boolean

      true on the first frame that the pointer releases a grabbed sprite

    • Returns number

      the amount of frames the pointer has been grabbing a sprite

    • Returns boolean

      true on the first frame that the pointer grabs a sprite

    • Parameters

      • Optionalinp: string

      Returns boolean

      true on the first frame that the user released a held input

    • Parameters

      • Optionalinp: string

      Returns number

      the amount of frames the user has been holding the input

    • Parameters

      • Optionalinp: string

      Returns boolean

      true on the first frame that the user holds the input

    • Parameters

      Returns boolean

      true on the first frame that the pointer stops overlapping the sprite

    • Parameters

      Returns number

      the amount of frames the pointer has been overlapping the sprite

    • Parameters

      Returns boolean

      true on the first frame that the pointer overlaps the sprite

    • Same as the released function, which is preferred.

      Parameters

      • Optionalinp: string

      Returns boolean

      true on the first frame that the user released the input

    • Parameters

      • Optionalinp: string

      Returns boolean

      true on the first frame that the user presses the input

    • Parameters

      • Optionalinp: string

      Returns number

      the amount of frames the user has been pressing the input

    • Parameters

      • Optionalinp: string

      Returns boolean

      true on the first frame that the user released the input