elm-lang/core/1.1.0

NOTE: this package moved to elm/core

NOTE: this package is not compatible with Elm 0.19.1

Touch

This is an early version of the touch library. It will likely grow to include gestures that would be useful for both games and web-pages.

Touches

type alias Touch =
{ x : Int
, y : Int
, id : Int
, x0 : Int
, y0 : Int
, t0 : Time
}

Every Touch has xy coordinates. It also has an identifier id to distinguish one touch from another.

A touch also keeps info about the initial point and time of contact: x0, y0, and t0. This helps compute more complicated gestures like taps, drags, and swipes which need to know about timing or direction.

touches : Signal (List Touch)

A list of ongoing touches.

Gestures

Signal
{ x : Int
, y : Int
}

The last position that was tapped. Default value is {x=0,y=0}. Updates whenever the user taps the screen.