CameraState

State for animated scene-level camera transforms.

Enables animated zoom, pan, and rotation at the scene level. Inherits from State: pos: Pan offset (Point2D) scale: Zoom factor (1.0 = normal, <1 = zoom out, >1 = zoom in) rotation: Rotation in degrees Additional attributes: pivot: Zoom/rotation center point (Point2D)

Constructor

CameraState(
    pos: Point2D | None = None,
    scale: float | None = None,
    opacity: float | None = None,
    rotation: float | None = None,
    skew_x: float | None = None,
    skew_y: float | None = None,
    z_index: float = 0.0,
    clip_state: State | None = None,
    mask_state: State | None = None,
    clip_states: List[State] | None = None,
    mask_states: List[State] | None = None,
    filter: Filter | None = None,
    NON_INTERPOLATABLE_FIELDS: frozenset[str] = frozenset({'NON_INTERPOLATABLE_FIELDS'}),
    pivot: Point2D | None = None
) -> None

Methods

get_renderer_class

get_renderer_class()

Get the renderer class for this state.

Returns

The renderer class for this state, or None if not registered

get_vertex_renderer_class

get_vertex_renderer_class()

Get the vertex renderer class for morphing transitions.

is_angle

is_angle(field: Field) -> bool

need_morph

need_morph(state)

with_x

with_x(x: float) -> State

with_y

with_y(y: float) -> State

Properties

x
y