Interface ExportAssetOptions

interface ExportAssetOptions {
    animations?: AnimationClip[];
    compress?: boolean;
    convertMeshToIndexed?: boolean;
    embedUrlImagePreviews?: boolean;
    embedUrlImages?: boolean;
    encodeUint16Rgbe?: boolean;
    encrypt?: boolean;
    encryptKey?: string | Uint8Array;
    exportExt?: string;
    externalImagesInExtras?: boolean;
    forceIndices?: boolean;
    includeCustomExtensions?: boolean;
    jsonSpaces?: number;
    maxTextureSize?: number;
    name?: string;
    onlyVisible?: boolean;
    preserveUUIDs?: boolean;
    trs?: boolean;
    truncateDrawRange?: boolean;
    viewerConfig?: boolean;
}

Hierarchy (view full)

Properties

animations?: AnimationClip[]

List of animations to be included in the export.

compress?: boolean
convertMeshToIndexed?: boolean
embedUrlImagePreviews?: boolean

Embed previews of images in glb

Default

false
embedUrlImages?: boolean

embed images in glb even when remote url is available

Default

false
encodeUint16Rgbe?: boolean

see GLTFViewerExport->processViewer

Default

false
encrypt?: boolean

Encrypt the exported file in a GLB container using encryptKey

Default

false.
Works only for glb export.
encryptKey?: string | Uint8Array

Encryption key, if not provided, will be prompted

Default

undefined.
Works only for glb export.
exportExt?: string

Extension to export to, default for object/scene = glb, default for viewerConfig = json, default for material = mat, otherwise determined by exporter

externalImagesInExtras?: boolean

see GLTFDracoExporter and GLTFMaterialExtrasExtension

forceIndices?: boolean

Generate indices for non-index geometry and export with them. Default is false.

includeCustomExtensions?: boolean

Export custom glTF extensions defined on an object's userData.gltfExtensions property. Default is true.

jsonSpaces?: number

Number of spaces to use when exporting to json

Default

2
maxTextureSize?: number

Restricts the image maximum size (both width and height) to the given value. This option works only if embedImages is true. Default is Infinity.

name?: string
onlyVisible?: boolean

Export only visible objects. Default is false.

preserveUUIDs?: boolean
trs?: boolean

Export position, rotation and scale instead of matrix per node. Default is false

truncateDrawRange?: boolean

Export just the attributes within the drawRange, if defined, instead of exporting the whole array. Default is true.

viewerConfig?: boolean

Export and bundle the viewer config (scene settings). only works for rootSceneModelRoot and supported only in GLTFExporter2 GLTFExporter2Options.viewerConfig

Default

true

Generated using TypeDoc