Skip to content

[Epic] Touch/pointer input support #568

Description

@stormmuller

Goal

Add touch/pointer input support. src/input currently only has keyboard, mouse, and gamepad input sources (src/input/{keyboard,mouse,gamepad}) — there is no touch or unified pointer-event handling, so games can't currently support mobile/touch devices.

Scope (suggested)

  • A new src/input/touch (or unified pointer) input source module, following the existing input-source pattern used by keyboard/mouse/gamepad.
  • Multi-touch support (tracking multiple simultaneous touch points, not just a single pointer), since this is a common need for mobile games (virtual joysticks, pinch-to-zoom, multi-finger gestures).
  • Consider unifying mouse + touch behind a common "pointer" abstraction where it makes sense (e.g. tap/click, drag), while still exposing raw touch data for multi-touch-specific use cases.
  • Camera pan/zoom (src/rendering's camera system) is a natural first consumer to validate the API against, given it already supports mouse-driven pan/zoom.

Why this is a milestone, not a single issue

This is a new input-source module plus integration points across existing systems (camera controls, any future UI system), and needs e2e coverage (per AGENTS.md's e2e testing conventions) similar to the existing mouse-input.spec.ts/keyboard-input.spec.ts.

Acceptance criteria (top-level)

  • Touch input is captured as a first-class input source, supporting multi-touch
  • Covered by unit tests and an e2e spec (e2e/specs)
  • Documented in documentation-site/docs/docs/input

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions