Export options for XGFStreamExporter.

interface XGFStreamExportOptions {
    assetId?: string;
    assetLibraryChunkSize?: number;
    baseUri?: string;
    chunkBudget?: number;
    chunkDir?: string;
    chunkMetric?: XGFStreamChunkMetric;
    chunkSize?: number;
    collapseChunkObjects?: boolean;
    coordinateSystem?: any;
    gridCellSize?: number;
    ignoreNormals?: boolean;
    ignoreUVs?: boolean;
    index?: string;
    minChunkBudget?: number;
    onProgress?: (progress: LoaderProgress) => void;
    onWarning?: (message: string) => void;
    partition?: XGFStreamPartitionMode;
    runtimeIndex?: string;
    sharedAssetMinLibraryUses?: number;
    sharedAssetMode?: XGFStreamSharedAssetMode;
    sharedAssetShardSize?: number;
    signal?: AbortSignal;
    yieldIntervalMs?: number;
    [key: string]: any;
}

Hierarchy (View Summary)

Indexable

  • [key: string]: any

Properties

assetId?: string

Base ID used for generated asset-library chunks.

assetLibraryChunkSize?: number

Maximum number of shared assets per generated asset-library chunk.

baseUri?: string

URI prefix written into generated manifests.

chunkBudget?: number

Target per-chunk budget for the selected metric. Defaults to chunkSize.

chunkDir?: string

Directory, relative to the stream root, where chunk XGFs are written.

chunkMetric?: XGFStreamChunkMetric

Cost metric for grid partitioning. Defaults to "objects".

chunkSize?: number

Target object count for object-order partitioning, and fallback budget for grid partitioning. Defaults to 500.

collapseChunkObjects?: boolean

Experimental: write each references-only chunk as one SceneObject containing all chunk meshes.

coordinateSystem?: any

Target coordinate system for chunk payloads and stream index bounds. Defaults to the SceneModel coordinate system.

gridCellSize?: number

Explicit grid cell size. When omitted, the exporter estimates one.

ignoreNormals?: boolean

When true, exporters should omit vertex normals when the target format can represent the model without them. Exporters may ignore this when normals are unavoidable in the target format.

ignoreUVs?: boolean

When true, exporters should omit texture coordinates when the target format can represent the model without them. Exporters may ignore this when UVs are unavoidable in the target format.

index?: string

Human-readable stream index filename. Defaults to "index.json".

minChunkBudget?: number

Minimum chunk budget before adjacent small grid groups are merged.

onProgress?: (progress: LoaderProgress) => void

Optional progress callback. Same contract as ModelLoadOptions.onProgress — the exporter fires this from inside its hot loops at ≈60 Hz, paced by the same yieldToHost interval that keeps the main thread responsive.

Exporters may reuse a single object literal across emits to avoid per-yield allocations — copy out fields you need to retain past the synchronous call.

onWarning?: (message: string) => void

Optional callback for conversion-fidelity warnings — non-fatal notes about something the exporter could not faithfully represent and therefore dropped or flattened (for example, triplanar textures omitted because the target format has no world-projected texturing). When omitted, exporters fall back to console.warn. convert!modelConverter.ModelConverter collects these into each output's warnings for the conversion report.

Chunk partitioning strategy. Defaults to "grid".

runtimeIndex?: string

Optional compact runtime index filename.

sharedAssetMinLibraryUses?: number

Minimum reuse count before an asset is moved into a shared library.

sharedAssetMode?: XGFStreamSharedAssetMode

Reused asset placement when asset libraries are chunked.

"global" promotes reused assets into one shared dependency. "local" duplicates reused assets into each local library, allowing an initial frustum load to fetch only the local libraries for visible chunks. "sharded" splits reused assets into multiple shared dependencies, allowing already-loaded shards to be skipped before fetch.

sharedAssetShardSize?: number

Maximum number of reused assets per shared asset-library shard. Defaults to 512.

signal?: AbortSignal

Optional AbortSignal. Exporters that have been swept to cooperative-yield check signal.aborted at every yield point and throw a DOMException("Aborted", "AbortError") when the caller cancels. Exporters that pre-date the sweep ignore this field and run to completion.

yieldIntervalMs?: number

Minimum gap (in milliseconds) between cooperative yields during the export. Same contract as ModelLoadOptions.yieldIntervalMs — raise above the 16ms default to trade UI-update frequency for raw export speed on long-running exports.