API

Class GLTFValidation

glTF validation

Index
Configuration: IGLTFValidationConfiguration = ...

The configuration. Defaults to { url: "https://cdn.babylonjs.com/gltf_validator.js" }.

  • Validate a glTF asset using the glTF-Validator.

    Parameters

    • data: string | Uint8Array<ArrayBufferLike>

      The JSON of a glTF or the array buffer of a binary glTF

    • rootUrl: string

      The root url for the glTF

    • fileName: string

      The file name for the glTF

    • getExternalResource: (uri: string) => Promise<Uint8Array<ArrayBufferLike>>

      The callback to get external resources for the glTF validator

    Returns Promise<IGLTFValidationResults>

    A promise that resolves with the glTF validation results once complete