splat-transform API Reference - v2.4.0
    Preparing search index...

    Type Alias RenderCamera

    Parameters describing a camera for headless splat rendering.

    Convention: PlayCanvas right-handed, Y-up world. Camera-space axes are right (image x increases), down (image y increases), forward (positive depth in front of the camera). The basis is built from a target - eye direction plus a world-up vector and assumes the camera looks roughly opposite the world up's perpendicular plane in a PlayCanvas-style scene (so e.g. camera at +Z looking at the origin places world +X on the right of the image).

    type RenderCamera = {
        apertureScale?: number;
        focusDistance?: number;
        fovY: number;
        height: number;
        near: number;
        position: Vec3;
        projection?: Projection;
        target: Vec3;
        up: Vec3;
        width: number;
    }
    Index

    Properties

    apertureScale?: number

    DoF strength as a pixel-space scalar: the CoC radius in pixels when |1 − focusDistance/cz| = 1. Pinhole only; ignored for equirect. Default 0 disables defocus.

    focusDistance?: number

    Camera-space Z of the focus plane in world units. Pinhole only; ignored for equirect. Optional — only meaningful when apertureScale > 0.

    fovY: number

    Vertical field of view in radians. Used only for pinhole projection.

    height: number

    Output image height in pixels.

    near: number

    Near clipping distance in world units. For pinhole, splats with cz <= near are culled; for equirect, splats with radial r <= near.

    position: Vec3

    Camera position in world space.

    projection?: Projection

    Projection mode. Defaults to 'pinhole' if omitted — back-compatible with callers (JS, or TS compiled against the pre-equirect type) that don't know the field exists.

    target: Vec3

    Point the camera looks at, in world space.

    up: Vec3

    World-space up vector (used to define camera roll).

    width: number

    Output image width in pixels. Equirect requires width === 2 × height.