Interface: Model3dCameraProps
Camera override for addModel3d(), mapping onto am3d:camera.
The defaults are what PowerPoint itself wrote for a 2×2×2 cube, and they are correct for any model whose bounding box is roughly cubic once meterPerModelUnit is right. The camera is expressed in metres, so the scale is what actually decides framing.
PowerPoint's own rule, measured against three models: it normalizes the model's largest bounding-box extent to 1 metre and then places the camera at
pos.z = |halfExtents / maxExtent| / sin(fov / 2)looking at the origin. A caller who knows their model's bounding box can reproduce that exactly; a caller who does not should at least set meterPerModelUnit to 1 / maxExtent.
Properties
fov?
optionalfov?:number
Vertical field of view in degrees (am3d:perspective@fov).
- range: greater than 0 and less than 180
Default
ts
45lookAt?
optionallookAt?:Model3dPoint
Point the camera aims at, in metres (am3d:camera/am3d:lookAt).
Default
ts
{ x: 0, y: 0, z: 0 }pos?
optionalpos?:Model3dPoint
Camera position in metres (am3d:camera/am3d:pos).
Default
ts
{ x: 0, y: 0, z: 2.2630334 }up?
optionalup?:Model3dPoint
Camera "up" direction (am3d:camera/am3d:up). Need not be normalized.
Default
ts
{ x: 0, y: 1, z: 0 }