Pebble.Frame

Fixed-interval frame subscriptions.

These subscriptions are useful for games, animations, and any watch app that needs a regular update loop.

Types

Frame

type alias Frame =
    { dtMs : Int
    , elapsedMs : Int
    , frame : Int
    }

Information delivered with each frame.

Subscriptions

every

every : Int -> (Frame -> msg) -> Sub msg

Receive a frame message every intervalMs milliseconds.

atFps

atFps : Int -> (Frame -> msg) -> Sub msg

Receive frame messages at the requested frames per second.