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

    Type Alias WriteVoxelOptions

    Options for writing a voxel octree file.

    type WriteVoxelOptions = {
        collisionMesh?: boolean | CollisionMeshShape;
        createDevice?: DeviceCreator;
        dataTable: DataTable;
        filename: string;
        floorFill?: boolean;
        floorFillDilation?: number;
        navCapsule?: { height: number; radius: number };
        navExteriorRadius?: number;
        navSeed?: NavSeed;
        opacityCutoff?: number;
        voxelResolution?: number;
    }
    Index

    Properties

    collisionMesh?: boolean | CollisionMeshShape

    When set, a collision mesh (.collision.glb) is generated alongside the voxel output. true is equivalent to smooth.

    createDevice?: DeviceCreator

    Optional function to create a GPU device for voxelization

    dataTable: DataTable

    Gaussian splat data to voxelize

    filename: string

    Output filename ending in .voxel.json

    floorFill?: boolean

    Fill each voxel column upward from the bottom until hitting solid. Runs before carve so the carve's BFS is confined to the actual navigable bubble. Default: false

    floorFillDilation?: number

    When floorFill is enabled, dilation radius in world units used to identify "interior" XZ columns to patch. Empty XZ areas larger than 2 * floorFillDilation from any solid column are treated as exterior and left empty. Default: 0 (patch every empty column).

    navCapsule?: { height: number; radius: number }

    Capsule dimensions for carve. Height of 0 disables carve. When height > 0, only voxels contactable from the seed are kept. Requires navSeed.

    navExteriorRadius?: number

    Exterior fill radius in world units. Enables exterior fill when set. Requires navSeed; ignored without it.

    navSeed?: NavSeed

    Seed position in world space for exterior fill and carve flood fill.

    opacityCutoff?: number

    Opacity threshold for solid voxels - voxels below this are considered empty. Default: 0.1

    voxelResolution?: number

    Size of each voxel in world units. Default: 0.05