Skip to main content

@novorender/api / RenderStateCamera

Interface: RenderStateCamera

Defined in: @novorender/src/core3d/state/index.ts:227

Camera related render state.

Properties

far

readonly far: number;

Defined in: @novorender/src/core3d/state/index.ts:275

Camera's far clipping plane distance.

Remarks

This value must be larger than the near clipping plane. Any pixels that are farther away from the image plane will be clipped. Smaller values improves z-buffer resolution, which helps reduce z-fighting. Smaller values also increases the # objects culled, which could help improve rendering performance.


fov

readonly fov: number;

Defined in: @novorender/src/core3d/state/index.ts:257

Camera's vertical field of view.

Remarks

For pinhole cameras, this value is interpreted as the angle between the top and bottom edge of the frustum in degrees. For orthographic cameras, this value is interpreted as the distance between the top and bottom edge of the view frustum in meters.


kind

readonly kind: "pinhole" | "orthographic";

Defined in: @novorender/src/core3d/state/index.ts:233

The type of camera projection to use.

See

pinhole orthographic


near

readonly near: number;

Defined in: @novorender/src/core3d/state/index.ts:266

Camera's near clipping plane distance.

Remarks

This value must be larger than 0, preferable as large as it can comfortable be without excessive visual clipping artifacts. Any pixels that are closer to the image plane will be clipped. Larger values will greatly improve z-buffer resolution, which helps reduce z-fighting.


pivot

readonly pivot: undefined | ReadonlyVec3;

Defined in: @novorender/src/core3d/state/index.ts:250

Camera pivot point in world space.

Remarks

This is used to visualize a point around which the camera will pivot when moved. (Currently not implemented)


position

readonly position: ReadonlyVec3;

Defined in: @novorender/src/core3d/state/index.ts:236

Camera position in world space.


rotation

readonly rotation: ReadonlyQuat;

Defined in: @novorender/src/core3d/state/index.ts:243

Camera rotation in world space.

Remarks

This rotation is from camera->world space, much like that of a local->world space transformation of any rendered object. It should not be confused with the inverse transformation, i.e. world->camera space, commonly used in shaders.