Skip to content

UsePixelPerfectCameraOptions

Defined in: packages/three-flatland/src/react/usePixelPerfectCamera.ts:9

Options for usePixelPerfectCamera.

optional far?: number

Defined in: packages/three-flatland/src/cameras/PixelPerfectCamera.ts:29

Far clipping plane. Default: 1000.

PixelPerfectCameraOptions.far


optional makeDefault?: boolean

Defined in: packages/three-flatland/src/react/usePixelPerfectCamera.ts:11

Install the camera as the R3F root’s default camera. Default: true.


optional near?: number

Defined in: packages/three-flatland/src/cameras/PixelPerfectCamera.ts:27

Near clipping plane. Default: 0.1.

PixelPerfectCameraOptions.near


optional pixelScale?: PixelScale

Defined in: packages/three-flatland/src/cameras/PixelPerfectCamera.ts:25

Physical framebuffer pixels per world unit. 'auto' selects the largest fitting integer scale, with a minimum of 1. When the framebuffer is smaller than the requested design extent, the camera crops instead of introducing fractional downsampling. Default: 'auto'.

PixelPerfectCameraOptions.pixelScale


optional viewSize?: number

Defined in: packages/three-flatland/src/cameras/PixelPerfectCamera.ts:12

Minimum vertical world span kept visible when pixelScale is 'auto'. One world unit represents one source pixel. Default: 400.

PixelPerfectCameraOptions.viewSize


optional viewWidth?: number

Defined in: packages/three-flatland/src/cameras/PixelPerfectCamera.ts:18

Optional exact horizontal design extent used together with viewSize for automatic scale-to-fit. Omit it to reveal additional world space and fill the available output at an integer scale.

PixelPerfectCameraOptions.viewWidth