UNPKG

@babylonjs/loaders

Version:

For usage documentation please visit https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes/.

36 lines (35 loc) 1.36 kB
import type * as GLTF2 from "babylonjs-gltf2interface"; import { type Nullable } from "@babylonjs/core/types.js"; /** * Configuration for glTF validation */ export interface IGLTFValidationConfiguration { /** * The url of the glTF validator. */ url: string; } /** * glTF validation */ export declare class GLTFValidation { /** * The configuration. Defaults to `{ url: "https://cdn.babylonjs.com/gltf_validator.js" }`. */ static Configuration: IGLTFValidationConfiguration; private static _LoadScriptPromise; /** * The most recent validation results. * @internal - Used for back-compat in Sandbox with Inspector V2. */ static _LastResults: Nullable<GLTF2.IGLTFValidationResults>; /** * Validate a glTF asset using the glTF-Validator. * @param data The JSON of a glTF or the array buffer of a binary glTF * @param rootUrl The root url for the glTF * @param fileName The file name for the glTF * @param getExternalResource The callback to get external resources for the glTF validator * @returns A promise that resolves with the glTF validation results once complete */ static ValidateAsync(data: string | Uint8Array, rootUrl: string, fileName: string, getExternalResource: (uri: string) => Promise<Uint8Array>): Promise<GLTF2.IGLTFValidationResults>; }