Class GLTFValidation
Index
Constructors
constructor
-
Returns GLTFValidation
Properties
StaticConfiguration
The configuration. Defaults to { url: "https://cdn.babylonjs.com/gltf_validator.js" }.
Methods
StaticValidate Async
-
ValidateAsync(
data: string | Uint8Array<ArrayBufferLike>,
rootUrl: string,
fileName: string,
getExternalResource: (uri: string) => Promise<Uint8Array<ArrayBufferLike>>,
): Promise<IGLTFValidationResults>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
- data: string | Uint8Array<ArrayBufferLike>
glTF validation