浏览代码

Add BAck Typings changes.

sebastien 6 年之前
父节点
当前提交
4628de3268
共有 1 个文件被更改,包括 52 次插入2 次删除
  1. 52 2
      dist/preview release/glTF2Interface/babylon.glTF2Interface.d.ts

+ 52 - 2
dist/preview release/glTF2Interface/babylon.glTF2Interface.d.ts

@@ -7,6 +7,8 @@ declare module "babylonjs-gltf2interface" {
 }
 /**
  * Module for glTF 2.0 Interface
+ * @ignoreChildren
+ * @ignore
  */
 declare module BABYLON.GLTF2 {
     /**
@@ -852,6 +854,54 @@ declare module BABYLON.GLTF2 {
          */
         textures?: ITexture[];
     }
+
+    /**
+     * Interface for glTF validation results
+     */
+    interface IGLTFValidationResults {
+        info: {
+            generator: string;
+            hasAnimations: boolean;
+            hasDefaultScene: boolean;
+            hasMaterials: boolean;
+            hasMorphTargets: boolean;
+            hasSkins: boolean;
+            hasTextures: boolean;
+            maxAttributesUsed: number;
+            primitivesCount: number
+        };
+        issues: {
+            messages: Array<string>;
+            numErrors: number;
+            numHints: number;
+            numInfos: number;
+            numWarnings: number;
+            truncated: boolean
+        };
+        mimeType: string;
+        uri: string;
+        validatedAt: string;
+        validatorVersion: string;
+    }
+
+    /**
+     * Interface for glTF validation options
+     */
+    interface IGLTFValidationOptions {
+        uri?: string;
+        externalResourceFunction?: (uri: string) => Promise<Uint8Array>;
+        validateAccessorData?: boolean;
+        maxIssues?: number;
+        ignoredIssues?: Array<string>;
+        severityOverrides?: Object;
+    }
+
+    /**
+     * glTF validator object Tyyings
+     */
+    interface IGLTFValidatorTypings: {
+        validateString: (json: string, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
+    };
 }
 
 /**
@@ -896,8 +946,8 @@ interface IGLTFValidationOptions {
 }
 
 /**
- * glTF validator object
+ * glTF validator object Tyyings
  */
-declare var GLTFValidator: {
+interface IGLTFValidatorTypings: {
     validateString: (json: string, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
 };