Engine API Reference - v2.6.1
    Preparing search index...

    Class GltfExporter

    Implementation of the GLTF 2.0 format exporter.

    Hierarchy

    • CoreExporter
      • GltfExporter
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Converts a hierarchy of entities to GLB format.

      Parameters

      • entity: Entity

        The root of the entity hierarchy to convert.

      • options: { maxTextureSize?: number; stripUnusedAttributes?: boolean } = {}

        Object for passing optional arguments.

        • OptionalmaxTextureSize?: number

          Maximum texture size. Texture is resized if over the size.

        • OptionalstripUnusedAttributes?: boolean

          If true, removes unused vertex attributes:

          • Texture coordinates not referenced by materials
          • Vertex colors if not used by materials
          • Tangents if no normal maps are used
          • Skinning data if no skinned meshes exist

          Defaults to false.

      Returns Promise<ArrayBuffer>

      • The GLB file content.