ThreePipe
    Preparing search index...

    Class GLTFLoader2

    Hierarchy

    Implements

    Index

    Constructors

    Properties

    importOptions?: ImportAddOptions
    isGLTFLoader2: boolean = true
    preparsers: GLTFPreparser[] = []

    Preparsers are run on the arraybuffer/string before parsing to read the glb/gltf data

    _EmbedResourcePath: boolean = false

    Saves the current resource path in the gltf document extras/userData, which is then exported along with the asset when its exported using GLTFExporter2. This value is then used the next time that file is imported to correctly resolve external assets from the original resource path. [wip]

    _UseResourcePath: boolean = true
    BundledResourcesKey: string = 'BundledResources'
    CreateUniqueNames: boolean | "auto" = 'auto'

    If true, the loader will create unique names for objects in the gltf file when multiple objects with the same name are found. This is useful when importing gltf files with multiple objects with the same name, and creating animations for them. If set to 'auto', it will only create unique names when loading a rootSceneModelRoot, i.e. the scene object exported with AssetExporter

    ImportExtensions: ((parser: GLTFParser) => GLTFLoaderPlugin)[] = ...
    UseMeshLines: boolean = true

    Use MeshLine(an extension of three.js Line2) instead of default Line for lines. This allows changing line width and other properties like dashed.

    This is the default value for the flag, it can also be controlled by using the useMeshLines in the import options.

    Methods

    • Parameters

      • data: string | ArrayBuffer
      • path: string
      • onLoad: (gltf: GLTF) => void
      • OptionalonError: (event: ErrorEvent) => void
      • Optionalurl: string

      Returns void

    • Parameters

      • data: string | ArrayBuffer
      • path: string

      Returns Promise<string | ArrayBuffer>