ThreePipe
    Preparing search index...

    Class GLTFExporter2

    Hierarchy

    Implements

    Index

    Constructors

    Properties

    processors: ((obj: any, options: GLTFExporter2Options) => Promise<any>)[] = []
    ExportExtensions: ((parser: GLTFWriter2) => GLTFExporterPlugin)[] = ...

    Methods

    • Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects)

      Parameters

      • input: Object3D<Object3DEventMap> | Object3D<Object3DEventMap>[]

        Scenes or objects to export. Valid options:

        • Export scenes
          exporter.parse( scene1, ... )
          exporter.parse( [ scene1, scene2 ], ... )
        • Export objects (It will create a new Scene to hold all the objects)
          exporter.parse( object1, ... )
          exporter.parse( [ object1, object2 ], ... )
        • Mix scenes and objects (It will export the scenes as usual but it will create a new scene to hold all the single objects).
          exporter.parse( [ scene1, object1, object2, scene2 ], ... )
          
      • onDone: (gltf: ArrayBuffer | { [key: string]: any }) => void

        Will be called when the export completes. The argument will be the generated glTF JSON or binary ArrayBuffer.

      • onError: (error: ErrorEvent) => void

        Will be called if there are any errors during the gltf generation.

      • options: GLTFExporter2Options = {}

        Export options

      Returns void