API

Interface IExportOptions

Holds a collection of exporter options and parameters

interface IExportOptions {
    animationSampleRate?: number;
    exportUnusedUVs?: boolean;
    exportWithoutWaitingForScene?: boolean;
    includeCoordinateSystemConversionNodes?: boolean;
    khrInteractivity?: IKHRInteractivityExportProvider;
    meshCompressionMethod?: MeshCompressionMethod;
    removeNoopRootNodes?: boolean;
    metadataSelector?(metadata: any): any;
    shouldExportAnimation?(animation: Animation): boolean;
    shouldExportNode?(node: Node): boolean;
}
Index
animationSampleRate?: number

The sample rate to bake animation curves. Defaults to 1 / 60.

exportUnusedUVs?: boolean

Indicates if unused vertex uv attributes should be included in export. Defaults to false.

exportWithoutWaitingForScene?: boolean

Begin serialization without waiting for the scene to be ready. Defaults to false.

includeCoordinateSystemConversionNodes?: boolean

Indicates if coordinate system swapping root nodes should be included in export. Defaults to false.

Please use removeNoopRootNodes instead

Canonical KHR_interactivity export provider. The provider is evaluated only after scene nodes and animations have their final glTF indices.

meshCompressionMethod?: MeshCompressionMethod

Indicates what compression method to apply to mesh data.

removeNoopRootNodes?: boolean

Remove no-op root nodes when possible. Defaults to true. No-op roots are preserved when khrInteractivity is provided because the graph may reference them.

  • Function to extract the part of the scene or node's metadata that will populate the corresponding glTF object's extras field. If not defined, node.metadata.gltf.extras will be used.

    Parameters

    • metadata: any

      source metadata to read from

    Returns any

    the data to store into the glTF extras field

  • Function which indicates whether an animation on the scene should be exported or not

    Parameters

    • animation: Animation

      source animation

    Returns boolean

    boolean, which indicates whether the animation should be exported (true) or not (false)

  • Function which indicates whether a babylon node should be exported or not

    Parameters

    • node: Node

      source Babylon node. It is used to check whether it should be exported to glTF or not

    Returns boolean

    boolean, which indicates whether the node should be exported (true) or not (false)