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

    Type Alias WriteImageOptions

    Options for writing a rendered splat image.

    type WriteImageOptions = {
        background?: { a: number; b: number; g: number; r: number };
        cameraEndPosition?: { x: number; y: number; z: number };
        cameraPosition?: { x: number; y: number; z: number };
        createDevice?: DeviceCreator;
        dataTable: DataTable;
        filename: string;
        focusDistance?: number;
        fov?: number;
        fStop?: number;
        height?: number;
        lookAt?: { x: number; y: number; z: number };
        lookAtEnd?: { x: number; y: number; z: number };
        motionSamples?: number;
        near?: number;
        projection?: Projection;
        sensorSize?: number;
        shutter?: number;
        up?: { x: number; y: number; z: number };
        upEnd?: { x: number; y: number; z: number };
        width?: number;
    }
    Index

    Properties

    background?: { a: number; b: number; g: number; r: number }

    RGBA background, each channel in [0, 1]. Default: (0, 0, 0, 1).

    cameraEndPosition?: { x: number; y: number; z: number }

    End camera position for motion blur. When set, enables camera motion blur: the renderer averages motionSamples sub-frames with the camera interpolated from (cameraPosition, lookAt, up) at shutter-open to (cameraEndPosition, lookAtEnd, upEnd) at shutter-close.

    cameraPosition?: { x: number; y: number; z: number }

    Camera position in world space. Default: (2, 1, -2).

    createDevice?: DeviceCreator

    Function returning a GraphicsDevice. Required — rasterization runs on GPU.

    dataTable: DataTable

    Gaussian splat data to render.

    filename: string

    Output filename ending in .webp.

    focusDistance?: number

    Camera-space Z of the focus plane in world units. Defaults to the distance from cameraPosition to lookAt along the forward axis (i.e. focus on the look-at point) when fStop is set. Has no effect without fStop. Pinhole only — passing this with projection: 'equirect' is an error.

    fov?: number

    Vertical field of view in degrees. Default: 60 for pinhole. Must be omitted for equirect (throws if supplied).

    fStop?: number

    Aperture as a photographic f-stop (e.g. 2.8, 5.6, 11). Enables defocus blur / depth-of-field: smaller numbers = stronger blur. Defaults to disabled. Pinhole only — passing this with projection: 'equirect' is an error.

    height?: number

    Output image height in pixels. Default: 720 (pinhole) or 1024 (equirect).

    lookAt?: { x: number; y: number; z: number }

    Point the camera looks at, in world space. Default: (0, 0, 0).

    lookAtEnd?: { x: number; y: number; z: number }

    End look-at target for motion blur. Defaults to lookAt when motion blur is enabled.

    motionSamples?: number

    Number of sub-frames to accumulate for motion blur. Cost is N× a single render. Default: 16. Only meaningful with cameraEndPosition.

    near?: number

    Near clip distance in world units. Splats with camera-space depth <= near are culled. Default: 0.2 (matches the reference 3DGS rasterizer).

    projection?: Projection

    Camera projection mode. Default: 'pinhole'.

    • 'pinhole' — perspective camera using fov.
    • 'equirect' — full 360° × 180° equirectangular panorama from cameraPosition. Ignores fov. Requires width === 2 × height; default resolution is 2048 × 1024.
    sensorSize?: number

    Vertical sensor height in world units, used to give fStop a defined physical meaning. Default 0.024 matches a 35mm full-frame sensor when world units are meters. Scale this with your scene's units (e.g. world unit = decimeter → 0.24, world unit = millimeter → 24). Has no effect without fStop.

    shutter?: number

    Shutter fraction in [0, 1]. Portion of the start→end segment actually integrated, centered on the midpoint (standard shutter-angle convention: 1.0 = full motion, 0.5 = 180° shutter). Default: 1. Only meaningful with cameraEndPosition.

    up?: { x: number; y: number; z: number }

    World-space up vector. Default: (0, 1, 0).

    upEnd?: { x: number; y: number; z: number }

    End up vector for motion blur. Defaults to up when motion blur is enabled.

    width?: number

    Output image width in pixels. Default: 1280 (pinhole) or 2048 (equirect).