Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IGLTFLoaderExtension

Interface for a glTF loader extension.

Hierarchy

Implemented by

Index

Properties

enabledSearch playground for enabled

enabled: boolean

Defines whether this extension is enabled.

Readonly nameSearch playground for name

name: string

The name of this extension.

Optional orderSearch playground for order

order: number

Defines the order of this extension. The loader sorts the extensions using these values when loading.

Methods

Optional createMaterialSearch playground for createMaterial

  • Define this method to modify the default behavior when creating materials.

    Parameters

    • context: string

      The context when loading the asset

    • material: IMaterial

      The glTF material property

    • babylonDrawMode: number

      The draw mode for the Babylon material

    Returns Nullable<Material>

    The Babylon material or null if not handled

disposeSearch playground for dispose

  • dispose(): void
  • Releases all held resources

    Returns void

Optional loadAnimationAsyncSearch playground for loadAnimationAsync

  • Define this method to modify the default behavior when loading animations.

    Parameters

    • context: string

      The context when loading the asset

    • animation: IAnimation

      The glTF animation property

    Returns Nullable<Promise<AnimationGroup>>

    A promise that resolves with the loaded Babylon animation group when the load is complete or null if not handled

Optional loadBufferAsyncSearch playground for loadBufferAsync

  • loadBufferAsync(context: string, buffer: IBuffer, byteOffset: number, byteLength: number): Nullable<Promise<ArrayBufferView>>
  • Define this method to modify the default behavior when loading buffers.

    Parameters

    • context: string

      The context when loading the asset

    • buffer: IBuffer

      The glTF buffer property

    • byteOffset: number

      The byte offset to load

    • byteLength: number

      The byte length to load

    Returns Nullable<Promise<ArrayBufferView>>

    A promise that resolves with the loaded data when the load is complete or null if not handled

Optional loadBufferViewAsyncSearch playground for loadBufferViewAsync

  • loadBufferViewAsync(context: string, bufferView: IBufferView): Nullable<Promise<ArrayBufferView>>
  • Define this method to modify the default behavior when loading buffer views.

    Parameters

    • context: string

      The context when loading the asset

    • bufferView: IBufferView

      The glTF buffer view property

    Returns Nullable<Promise<ArrayBufferView>>

    A promise that resolves with the loaded data when the load is complete or null if not handled

Optional loadCameraAsyncSearch playground for loadCameraAsync

  • Define this method to modify the default behavior when loading cameras.

    Parameters

    • context: string

      The context when loading the asset

    • camera: ICamera

      The glTF camera property

    • assign: (babylonCamera: Camera) => void

      A function called synchronously after parsing the glTF properties

        • (babylonCamera: Camera): void
        • Parameters

          Returns void

    Returns Nullable<Promise<Camera>>

    A promise that resolves with the loaded Babylon camera when the load is complete or null if not handled

Optional loadMaterialPropertiesAsyncSearch playground for loadMaterialPropertiesAsync

  • Define this method to modify the default behavior when loading material properties.

    Parameters

    • context: string

      The context when loading the asset

    • material: IMaterial

      The glTF material property

    • babylonMaterial: Material

      The Babylon material

    Returns Nullable<Promise<void>>

    A promise that resolves when the load is complete or null if not handled

Optional loadNodeAsyncSearch playground for loadNodeAsync

  • Define this method to modify the default behavior when loading nodes.

    Parameters

    • context: string

      The context when loading the asset

    • node: INode

      The glTF node property

    • assign: (babylonMesh: TransformNode) => void

      A function called synchronously after parsing the glTF properties

    Returns Nullable<Promise<TransformNode>>

    A promise that resolves with the loaded Babylon transform node when the load is complete or null if not handled

Optional loadSceneAsyncSearch playground for loadSceneAsync

  • loadSceneAsync(context: string, scene: IScene): Nullable<Promise<void>>
  • Define this method to modify the default behavior when loading scenes.

    Parameters

    • context: string

      The context when loading the asset

    • scene: IScene

      The glTF scene property

    Returns Nullable<Promise<void>>

    A promise that resolves when the load is complete or null if not handled

Optional loadTextureInfoAsyncSearch playground for loadTextureInfoAsync

  • Define this method to modify the default behavior when loading texture infos.

    Parameters

    • context: string

      The context when loading the asset

    • textureInfo: ITextureInfo

      The glTF texture info property

    • assign: (babylonTexture: BaseTexture) => void

      A function called synchronously after parsing the glTF properties

    Returns Nullable<Promise<BaseTexture>>

    A promise that resolves with the loaded Babylon texture when the load is complete or null if not handled

Optional onLoadingSearch playground for onLoading

  • onLoading(): void
  • Called after the loader state changes to LOADING.

    Returns void

Optional onReadySearch playground for onReady

  • onReady(): void
  • Called after the loader state changes to READY.

    Returns void

Legend

  • Property
  • Method
  • Constructor
  • Property
  • Static method