camera

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

基类:Cmpt_Points, Generic

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

设置摄像机位置以及有关属性

  • points: 点集,必须只有一个点,表示摄像机中心位置

    另见 shift() move_to()

  • size: 摄像机视窗大小,格式为 [width, height]

    另见 scale()

  • fov: 摄像机视野角度,单位为度

  • orientation: 摄像机朝向,四元数表示

    另见 rotate()

reset() Self

将摄像机几何属性设置为初始状态

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

将摄像机缩放指定倍数

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

将摄像机绕 axis 轴进行旋转

  • 默认 absolute=True 表示绕全局坐标系旋转

  • absolute=False 表示绕相机自身坐标系旋转,并且此时 about_point 参数无效

property info: CameraInfo

摄像机的几何属性

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

基类:Points

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

设置物件自身的样式,不影响子物件

另见:set()