Documentation - v19.16.0-dev
    Preparing search index...

    Voxel data for one spatial chunk (the voxels under one root voxel), stored as packed typed-array buffers so it can be transferred between workers without copying.

    interface SerializedVoxelChunk {
        bounds: Float64Array;
        coordinates: Int32Array;
        horizontalConnections?: Uint8Array<ArrayBufferLike>;
        levels: Uint8Array;
        rootCoordinates: Int32Array;
        states: Uint8Array;
        supportHeights?: Float32Array<ArrayBufferLike>;
        supportIds?: Int32Array<ArrayBufferLike>;
        verticalConnections?: Uint8Array<ArrayBufferLike>;
    }
    Index

    Properties

    bounds: Float64Array

    World-space AABB covered by the root voxel: [minX, minY, minZ, maxX, maxY, maxZ].

    coordinates: Int32Array

    Packed integer coordinates of voxel minimum corners, relative to VoxelGrid.origin and expressed at each voxel's resolution: [x0, y0, z0, x1, y1, z1, ...].

    horizontalConnections?: Uint8Array<ArrayBufferLike>

    One boolean byte per voxel marking a non-blocking horizontal doorway connection.

    levels: Uint8Array

    Resolution index for each voxel. granularities[levels[i]] gives its world-space size.

    rootCoordinates: Int32Array

    Integer coordinates of the root voxel owning this spatial chunk: [x, y, z].

    states: Uint8Array

    One VoxelState value for each voxel.

    supportHeights?: Float32Array<ArrayBufferLike>

    Sampled world-space support height per solid voxel. Non-solid or unavailable values are NaN.

    supportIds?: Int32Array<ArrayBufferLike>

    Geometry-instance identifier providing each sampled support, or -1 when unavailable.

    verticalConnections?: Uint8Array<ArrayBufferLike>

    One boolean byte per voxel, set for solid voxels intersecting a configured vertical type.