David Catuhe 6 年 前
コミット
66402bcc05

+ 50 - 2
Playground/babylon.d.txt

@@ -14258,7 +14258,7 @@ declare module BABYLON {
         /**
          * Internal, the default controller model for the controller
          */
-        protected _defaultModel: AbstractMesh;
+        protected _defaultModel: Nullable<AbstractMesh>;
         /**
          * Fired when the trigger state has changed
          */
@@ -14300,7 +14300,7 @@ declare module BABYLON {
         /**
          * The default controller model for the controller
          */
-        readonly defaultModel: AbstractMesh;
+        readonly defaultModel: Nullable<AbstractMesh>;
         /**
          * Creates a new WebVRController from a gamepad
          * @param vrGamepad the gamepad that the WebVRController should be created from
@@ -64974,6 +64974,54 @@ declare module BABYLON.GUI {
 }
 declare module BABYLON.GUI {
     /**
+    * Class used to load GUI via XML.
+    */
+    export class XmlLoader {
+        private _nodes;
+        private _nodeTypes;
+        private _isLoaded;
+        private _objectAttributes;
+        private _parentClass;
+        /**
+        * Create a new xml loader
+        * @param parentClass Sets the class context. Used when the loader is instanced inside a class and not in a global context
+        */
+        constructor(parentClass?: null);
+        private _getChainElement;
+        private _getClassAttribute;
+        private _createGuiElement;
+        private _parseGrid;
+        private _parseElement;
+        private _prepareSourceElement;
+        private _parseElementsFromSource;
+        private _parseXml;
+        /**
+         * Gets if the loading has finished.
+         * @returns whether the loading has finished or not
+        */
+        isLoaded(): boolean;
+        /**
+         * Gets a loaded node / control by id.
+         * @param id the Controls id set in the xml
+         * @returns element of type Control
+        */
+        getNodeById(id: string): any;
+        /**
+         * Gets all loaded nodes / controls
+         * @returns Array of controls
+        */
+        getNodes(): any;
+        /**
+         * Initiates the xml layout loading
+         * @param xmlFile defines the xml layout to load
+         * @param rootNode defines the node / control to use as a parent for the loaded layout controls.
+         * @param callback defines the callback called on layout load.
+         */
+        loadLayout(xmlFile: any, rootNode: any, callback: any): void;
+    }
+}
+declare module BABYLON.GUI {
+    /**
      * Class used to create containers for controls
      */
     export class Container3D extends Control3D {

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

@@ -14419,7 +14419,7 @@ declare module BABYLON {
         /**
          * Internal, the default controller model for the controller
          */
-        protected _defaultModel: AbstractMesh;
+        protected _defaultModel: Nullable<AbstractMesh>;
         /**
          * Fired when the trigger state has changed
          */
@@ -14461,7 +14461,7 @@ declare module BABYLON {
         /**
          * The default controller model for the controller
          */
-        readonly defaultModel: AbstractMesh;
+        readonly defaultModel: Nullable<AbstractMesh>;
         /**
          * Creates a new WebVRController from a gamepad
          * @param vrGamepad the gamepad that the WebVRController should be created from

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/babylon.js


ファイルの差分が大きいため隠しています
+ 47 - 46
dist/preview release/babylon.max.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 5 - 4
dist/preview release/babylon.module.d.ts

@@ -14709,6 +14709,7 @@ declare module "babylonjs/Gamepads/Controllers/webVRController" {
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { PoseEnabledController, ExtendedGamepadButton, MutableGamepadButton } from "babylonjs/Gamepads/Controllers/poseEnabledController";
     import { StickValues, GamepadButtonChanges } from "babylonjs/Gamepads/gamepad";
+    import { Nullable } from "babylonjs/types";
     /**
      * Defines the WebVRController object that represents controllers tracked in 3D space
      */
@@ -14716,7 +14717,7 @@ declare module "babylonjs/Gamepads/Controllers/webVRController" {
         /**
          * Internal, the default controller model for the controller
          */
-        protected _defaultModel: AbstractMesh;
+        protected _defaultModel: Nullable<AbstractMesh>;
         /**
          * Fired when the trigger state has changed
          */
@@ -14758,7 +14759,7 @@ declare module "babylonjs/Gamepads/Controllers/webVRController" {
         /**
          * The default controller model for the controller
          */
-        readonly defaultModel: AbstractMesh;
+        readonly defaultModel: Nullable<AbstractMesh>;
         /**
          * Creates a new WebVRController from a gamepad
          * @param vrGamepad the gamepad that the WebVRController should be created from
@@ -80311,7 +80312,7 @@ declare module BABYLON {
         /**
          * Internal, the default controller model for the controller
          */
-        protected _defaultModel: AbstractMesh;
+        protected _defaultModel: Nullable<AbstractMesh>;
         /**
          * Fired when the trigger state has changed
          */
@@ -80353,7 +80354,7 @@ declare module BABYLON {
         /**
          * The default controller model for the controller
          */
-        readonly defaultModel: AbstractMesh;
+        readonly defaultModel: Nullable<AbstractMesh>;
         /**
          * Creates a new WebVRController from a gamepad
          * @param vrGamepad the gamepad that the WebVRController should be created from

+ 50 - 2
dist/preview release/documentation.d.ts

@@ -14419,7 +14419,7 @@ declare module BABYLON {
         /**
          * Internal, the default controller model for the controller
          */
-        protected _defaultModel: AbstractMesh;
+        protected _defaultModel: Nullable<AbstractMesh>;
         /**
          * Fired when the trigger state has changed
          */
@@ -14461,7 +14461,7 @@ declare module BABYLON {
         /**
          * The default controller model for the controller
          */
-        readonly defaultModel: AbstractMesh;
+        readonly defaultModel: Nullable<AbstractMesh>;
         /**
          * Creates a new WebVRController from a gamepad
          * @param vrGamepad the gamepad that the WebVRController should be created from
@@ -65982,6 +65982,54 @@ declare module BABYLON.GUI {
 }
 declare module BABYLON.GUI {
     /**
+    * Class used to load GUI via XML.
+    */
+    export class XmlLoader {
+        private _nodes;
+        private _nodeTypes;
+        private _isLoaded;
+        private _objectAttributes;
+        private _parentClass;
+        /**
+        * Create a new xml loader
+        * @param parentClass Sets the class context. Used when the loader is instanced inside a class and not in a global context
+        */
+        constructor(parentClass?: null);
+        private _getChainElement;
+        private _getClassAttribute;
+        private _createGuiElement;
+        private _parseGrid;
+        private _parseElement;
+        private _prepareSourceElement;
+        private _parseElementsFromSource;
+        private _parseXml;
+        /**
+         * Gets if the loading has finished.
+         * @returns whether the loading has finished or not
+        */
+        isLoaded(): boolean;
+        /**
+         * Gets a loaded node / control by id.
+         * @param id the Controls id set in the xml
+         * @returns element of type Control
+        */
+        getNodeById(id: string): any;
+        /**
+         * Gets all loaded nodes / controls
+         * @returns Array of controls
+        */
+        getNodes(): any;
+        /**
+         * Initiates the xml layout loading
+         * @param xmlFile defines the xml layout to load
+         * @param rootNode defines the node / control to use as a parent for the loaded layout controls.
+         * @param callback defines the callback called on layout load.
+         */
+        loadLayout(xmlFile: any, rootNode: any, callback: any): void;
+    }
+}
+declare module BABYLON.GUI {
+    /**
      * Class used to create containers for controls
      */
     export class Container3D extends Control3D {

+ 48 - 0
dist/preview release/gui/babylon.gui.d.ts

@@ -2948,6 +2948,54 @@ declare module BABYLON.GUI {
 }
 declare module BABYLON.GUI {
     /**
+    * Class used to load GUI via XML.
+    */
+    export class XmlLoader {
+        private _nodes;
+        private _nodeTypes;
+        private _isLoaded;
+        private _objectAttributes;
+        private _parentClass;
+        /**
+        * Create a new xml loader
+        * @param parentClass Sets the class context. Used when the loader is instanced inside a class and not in a global context
+        */
+        constructor(parentClass?: null);
+        private _getChainElement;
+        private _getClassAttribute;
+        private _createGuiElement;
+        private _parseGrid;
+        private _parseElement;
+        private _prepareSourceElement;
+        private _parseElementsFromSource;
+        private _parseXml;
+        /**
+         * Gets if the loading has finished.
+         * @returns whether the loading has finished or not
+        */
+        isLoaded(): boolean;
+        /**
+         * Gets a loaded node / control by id.
+         * @param id the Controls id set in the xml
+         * @returns element of type Control
+        */
+        getNodeById(id: string): any;
+        /**
+         * Gets all loaded nodes / controls
+         * @returns Array of controls
+        */
+        getNodes(): any;
+        /**
+         * Initiates the xml layout loading
+         * @param xmlFile defines the xml layout to load
+         * @param rootNode defines the node / control to use as a parent for the loaded layout controls.
+         * @param callback defines the callback called on layout load.
+         */
+        loadLayout(xmlFile: any, rootNode: any, callback: any): void;
+    }
+}
+declare module BABYLON.GUI {
+    /**
      * Class used to create containers for controls
      */
     export class Container3D extends Control3D {

ファイルの差分が大きいため隠しています
+ 421 - 43
dist/preview release/gui/babylon.gui.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/gui/babylon.gui.js.map


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


+ 97 - 0
dist/preview release/gui/babylon.gui.module.d.ts

@@ -3094,6 +3094,54 @@ declare module "babylonjs-gui/2D/adtInstrumentation" {
         dispose(): void;
     }
 }
+declare module "babylonjs-gui/2D/xmlLoader" {
+    /**
+    * Class used to load GUI via XML.
+    */
+    export class XmlLoader {
+        private _nodes;
+        private _nodeTypes;
+        private _isLoaded;
+        private _objectAttributes;
+        private _parentClass;
+        /**
+        * Create a new xml loader
+        * @param parentClass Sets the class context. Used when the loader is instanced inside a class and not in a global context
+        */
+        constructor(parentClass?: null);
+        private _getChainElement;
+        private _getClassAttribute;
+        private _createGuiElement;
+        private _parseGrid;
+        private _parseElement;
+        private _prepareSourceElement;
+        private _parseElementsFromSource;
+        private _parseXml;
+        /**
+         * Gets if the loading has finished.
+         * @returns whether the loading has finished or not
+        */
+        isLoaded(): boolean;
+        /**
+         * Gets a loaded node / control by id.
+         * @param id the Controls id set in the xml
+         * @returns element of type Control
+        */
+        getNodeById(id: string): any;
+        /**
+         * Gets all loaded nodes / controls
+         * @returns Array of controls
+        */
+        getNodes(): any;
+        /**
+         * Initiates the xml layout loading
+         * @param xmlFile defines the xml layout to load
+         * @param rootNode defines the node / control to use as a parent for the loaded layout controls.
+         * @param callback defines the callback called on layout load.
+         */
+        loadLayout(xmlFile: any, rootNode: any, callback: any): void;
+    }
+}
 declare module "babylonjs-gui/2D/index" {
     export * from "babylonjs-gui/2D/controls/index";
     export * from "babylonjs-gui/2D/advancedDynamicTexture";
@@ -3103,6 +3151,7 @@ declare module "babylonjs-gui/2D/index" {
     export * from "babylonjs-gui/2D/multiLinePoint";
     export * from "babylonjs-gui/2D/style";
     export * from "babylonjs-gui/2D/valueAndUnit";
+    export * from "babylonjs-gui/2D/xmlLoader";
 }
 declare module "babylonjs-gui/3D/controls/container3D" {
     import { Nullable } from "babylonjs/types";
@@ -6834,6 +6883,54 @@ declare module BABYLON.GUI {
 }
 declare module BABYLON.GUI {
     /**
+    * Class used to load GUI via XML.
+    */
+    export class XmlLoader {
+        private _nodes;
+        private _nodeTypes;
+        private _isLoaded;
+        private _objectAttributes;
+        private _parentClass;
+        /**
+        * Create a new xml loader
+        * @param parentClass Sets the class context. Used when the loader is instanced inside a class and not in a global context
+        */
+        constructor(parentClass?: null);
+        private _getChainElement;
+        private _getClassAttribute;
+        private _createGuiElement;
+        private _parseGrid;
+        private _parseElement;
+        private _prepareSourceElement;
+        private _parseElementsFromSource;
+        private _parseXml;
+        /**
+         * Gets if the loading has finished.
+         * @returns whether the loading has finished or not
+        */
+        isLoaded(): boolean;
+        /**
+         * Gets a loaded node / control by id.
+         * @param id the Controls id set in the xml
+         * @returns element of type Control
+        */
+        getNodeById(id: string): any;
+        /**
+         * Gets all loaded nodes / controls
+         * @returns Array of controls
+        */
+        getNodes(): any;
+        /**
+         * Initiates the xml layout loading
+         * @param xmlFile defines the xml layout to load
+         * @param rootNode defines the node / control to use as a parent for the loaded layout controls.
+         * @param callback defines the callback called on layout load.
+         */
+        loadLayout(xmlFile: any, rootNode: any, callback: any): void;
+    }
+}
+declare module BABYLON.GUI {
+    /**
      * Class used to create containers for controls
      */
     export class Container3D extends Control3D {

+ 5 - 4
dist/preview release/viewer/babylon.module.d.ts

@@ -14709,6 +14709,7 @@ declare module "babylonjs/Gamepads/Controllers/webVRController" {
     import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
     import { PoseEnabledController, ExtendedGamepadButton, MutableGamepadButton } from "babylonjs/Gamepads/Controllers/poseEnabledController";
     import { StickValues, GamepadButtonChanges } from "babylonjs/Gamepads/gamepad";
+    import { Nullable } from "babylonjs/types";
     /**
      * Defines the WebVRController object that represents controllers tracked in 3D space
      */
@@ -14716,7 +14717,7 @@ declare module "babylonjs/Gamepads/Controllers/webVRController" {
         /**
          * Internal, the default controller model for the controller
          */
-        protected _defaultModel: AbstractMesh;
+        protected _defaultModel: Nullable<AbstractMesh>;
         /**
          * Fired when the trigger state has changed
          */
@@ -14758,7 +14759,7 @@ declare module "babylonjs/Gamepads/Controllers/webVRController" {
         /**
          * The default controller model for the controller
          */
-        readonly defaultModel: AbstractMesh;
+        readonly defaultModel: Nullable<AbstractMesh>;
         /**
          * Creates a new WebVRController from a gamepad
          * @param vrGamepad the gamepad that the WebVRController should be created from
@@ -80311,7 +80312,7 @@ declare module BABYLON {
         /**
          * Internal, the default controller model for the controller
          */
-        protected _defaultModel: AbstractMesh;
+        protected _defaultModel: Nullable<AbstractMesh>;
         /**
          * Fired when the trigger state has changed
          */
@@ -80353,7 +80354,7 @@ declare module BABYLON {
         /**
          * The default controller model for the controller
          */
-        readonly defaultModel: AbstractMesh;
+        readonly defaultModel: Nullable<AbstractMesh>;
         /**
          * Creates a new WebVRController from a gamepad
          * @param vrGamepad the gamepad that the WebVRController should be created from

ファイルの差分が大きいため隠しています
+ 5 - 5
dist/preview release/viewer/babylon.viewer.js


ファイルの差分が大きいため隠しています
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js