ecspresso
    Preparing search index...
    • Convert screen coordinates (e.g. clientX/clientY) to isometric world (tile) coordinates, accounting for camera position and zoom.

      Parameters

      • screenX: number

        Screen-space X coordinate (e.g. clientX from a pointer event)

      • screenY: number

        Screen-space Y coordinate (e.g. clientY from a pointer event)

      • cameraState: { x: number; y: number; zoom: number }

        Camera state with position and zoom

      • isoState: IsoProjectionState

        Isometric projection state

      • canvas: HTMLCanvasElement

        The HTMLCanvasElement used for rendering

      Returns { x: number; y: number }

      World-space { x, y } in tile coordinates