Skip to main content

Module transform

Module transform 

Source
Expand description

The map’s camera: the commands, animations, gestures and momentum that move it within its limits.

Each command is a transition whose frame function takes the state and returns the camera at the command’s progress, which apply_transitions composes with the other commands’ cameras. The transform calls no observer: it queues what happens as TransformEvents, which its owner drains once the call returns, so no callback runs while the transform changes. Over terrain, the rules of terrain stand the camera on the ground and keep its eye above it.

Structs§

CameraCommandId
Identifies a camera command that the transform started, in the TransformEvent::CommandEnded that reports its end. Each command the transform starts gets its own.
CommandEnd
How a camera command ended.
FrameClock
The time of the latest frame that a map’s host drew, which the map’s animations sample at and its camera commands start from (see Transform::set_frame_time). A clone shares the clock, so the thread that draws can set it while the map lives on another.
Transform