Interface GLTFExporter2Options

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

Indexable

[key: string]: any

Properties

animations?: AnimationClip[]

List of animations to be included in the export.

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

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.

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 viewer config (scene settings)

Generated using TypeDoc