@motion-script/core / PerspectiveCamera3D
Interface: PerspectiveCamera3D
Defined in: render3d/camera.ts:11
A perspective camera — converging rays, so distant things shrink. What you want unless you specifically need the flat look of an orthographic projection.
Extends Transform3D, so placement and aim use the same vocabulary as
everything else: .perspective({ position: [0, 2, 6], lookAt: 0 }).
Extends
Properties
aspect?
optionalaspect?:number
Defined in: render3d/camera.ts:21
Aspect ratio override. Omit to track the node's layout box, which is almost always what you want — otherwise the render is stretched.
castShadow?
optionalcastShadow?:boolean
Defined in: render3d/transform.ts:32
Inherited from
far?
optionalfar?:number
Defined in: render3d/camera.ts:16
fov?
optionalfov?:number
Defined in: render3d/camera.ts:14
Vertical field of view in degrees. Default 50.
key?
optionalkey?:string
Defined in: render3d/transform.ts:48
Explicit reconciler identity.
By default the renderer caches one live 3D object per op, keyed by the op's
structural path — its group() nesting plus its index within that
group. That is stable for a builder that emits the same ops in the same
order every frame, which is the normal case.
Set key when your builder emits ops conditionally, so a slot's meaning
shifts between frames (if (t > 2) g.box(...)). Without it, inserting an
op renumbers every later slot and forces the tail of the cache to rebuild.
Inherited from
lookAt?
optionallookAt?:Vector3Input
Defined in: render3d/transform.ts:29
World-space point to orient toward, applied after position. Wins over both rotation and quaternion.
Inherited from
near?
optionalnear?:number
Defined in: render3d/camera.ts:15
params?
optionalparams?:Record<string,unknown>
Defined in: render3d/geometry.ts:14
Inherited from
position?
optionalposition?:Vector3Input
Defined in: render3d/transform.ts:12
Position in the parent's local space. Default origin.
Inherited from
quaternion?
optionalquaternion?:Quaternion
Defined in: render3d/transform.ts:22
Rotation as a unit quaternion. Wins over rotation — use it (with
slerpQuaternion) for tumbles where Euler interpolation would gimbal.
Inherited from
receiveShadow?
optionalreceiveShadow?:boolean
Defined in: render3d/transform.ts:33
Inherited from
renderOrder?
optionalrenderOrder?:number
Defined in: render3d/transform.ts:35
Draw-order override, for tuning transparent sorting.
Inherited from
rotation?
optionalrotation?:Vector3Input|Euler3
Defined in: render3d/transform.ts:17
Euler rotation in degrees, applied in order (default "XYZ").
Ignored when quaternion is set.
Inherited from
scale?
optionalscale?:Vector3Input
Defined in: render3d/transform.ts:24
Per-axis scale; a scalar scales uniformly. Default 1.
Inherited from
type
type:
"perspective"
Defined in: render3d/camera.ts:12
visible?
optionalvisible?:boolean
Defined in: render3d/transform.ts:31
Hide without removing (keeps the cached object alive). Default true.
Inherited from
zoom?
optionalzoom?:number
Defined in: render3d/camera.ts:23
Zoom factor applied on top of fov.