camera

class janim.camera.camera.Cmpt_CameraPoints(*args, **kwargs)

Bases: Cmpt_Points, Generic

set(points: VectArray | None = None, *, size: Vect | None = None, fov: float | None = None, orientation: Quaternion | None = None) Self

Set the camera position and related attributes

  • points: Point set. Must contain exactly one point, representing the center position of the camera

    See also shift() move_to()

  • size: Camera window size, in the format [width, height]

    See also scale()

  • fov: Camera field of view, in degrees

  • orientation: Camera orientation, represented by a quaternion

    See also rotate()

reset() Self

Reset camera geometric properties to initial state

copy() Self
become(other: Cmpt_CameraPoints) Self
not_changed(other: Cmpt_CameraPoints) Self
interpolate(cmpt1: ~typing.Self, cmpt2: ~typing.Self, alpha: float, *, path_func: PathFunc = <function straight_path>) None
property scaled_factor: float
property size: ndarray
property fov: float
property orientation: Quaternion
scale(scale_factor: float | Iterable, *, about_point: Vect | None = None, about_edge: Vect = array([0., 0., 0.]), **kwargs) Self

Scale the camera by a specified factor

rotate(angle: float, *, axis: Vect = array([0., 0., 1.]), absolute: bool = True, **kwargs) Self

Rotate the camera around the axis

  • Default absolute=True means rotating around the global coordinate system

  • absolute=False means rotating around the camera’s own coordinate system, and the about_point parameter is invalid in this case

property info: CameraInfo

Geometric properties of the camera

class janim.camera.camera.Camera(*points: Vect, **kwargs)

Bases: Points

points
apply_style(size: Vect | None = None, fov: float | None = None, orientation: Quaternion | None = None, **kwargs) Self

Sets the style of the item itself, does not affect child items

See also set()