dino-ge
    Preparing search index...

    Class Input

    Handles mouse and keyboard input and pointer gestures in paused debug mode.

    Index
    • get objectAlignment(): | {
          x: { coordinate: number; delta: number }
          | undefined;
          y: { coordinate: number; delta: number } | undefined;
      }
      | undefined

      Active world-space alignment guides for the current object drag.

      Returns
          | {
              x: { coordinate: number; delta: number }
              | undefined;
              y: { coordinate: number; delta: number } | undefined;
          }
          | undefined

    • Adds a global click listener that will be called when the canvas is clicked.

      Parameters

      • listener: (pos: Vector2) => void

        The function to run when a click occurs.

      Returns void

    • Polls an action as a signed value between -1 and 1. Keys and pressed buttons contribute 1, and axes retain their magnitude outside the dead zone. Scale can invert a binding. The strongest positive and negative values add together, so alternatives in the same direction do not stack.

      Parameters

      • name: string

      Returns number

    • Returns a connected standard-mapped pad, or the first one if no index is supplied.

      Parameters

      • Optionalindex: number

      Returns Gamepad | null

    • Checks if a specific key is currently held down.

      Parameters

      • key: string

        The key to check (e.g., 'w', 'ArrowUp', ' ').

      Returns boolean

    • Pan by a world-space delta during a paused drag and refresh the object under the pointer.

      Parameters

      • x: number
      • y: number

      Returns void