sebastien 6 年之前
父节点
当前提交
cd9bafb0e7
共有 30 个文件被更改,包括 6851 次插入3383 次删除
  1. 3222 740
      Playground/babylon.d.txt
  2. 二进制
      Playground/textures/gui/backgroundImage-vertical.png
  3. 二进制
      Playground/textures/gui/backgroundImage.png
  4. 二进制
      Playground/textures/gui/thumb.png
  5. 二进制
      Playground/textures/gui/valueImage-vertical.png
  6. 二进制
      Playground/textures/gui/valueImage.png
  7. 6 8
      Tools/Gulp/gulpfile.js
  8. 2 1
      Tools/Gulp/tasks/gulpTasks-tests.js
  9. 3356 2186
      dist/preview release/babylon.d.ts
  10. 15 0
      dist/preview release/gui/babylon.gui.d.ts
  11. 6 1
      dist/preview release/gui/babylon.gui.js
  12. 1 1
      dist/preview release/gui/babylon.gui.min.js
  13. 5 1
      dist/preview release/gui/babylon.gui.min.js.map
  14. 31 0
      dist/preview release/gui/babylon.gui.module.d.ts
  15. 5 1
      dist/preview release/inspector/babylon.inspector.bundle.js.map
  16. 5 1
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  17. 5 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  18. 5 1
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  19. 5 1
      dist/preview release/loaders/babylonjs.loaders.min.js
  20. 0 435
      dist/preview release/postProcessesLibrary/babylon.asciiArtpostProcess.min.js
  21. 5 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  22. 5 1
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js
  23. 5 1
      dist/preview release/serializers/babylon.glTF2Serializer.min.js
  24. 5 1
      dist/preview release/serializers/babylonjs.serializers.min.js
  25. 75 0
      dist/preview release/viewer/babylon.viewer.d.ts
  26. 18 0
      dist/preview release/viewer/babylon.viewer.max.js
  27. 36 0
      dist/preview release/viewer/babylon.viewer.module.d.ts
  28. 1 0
      dist/preview release/what's new.md
  29. 31 0
      gui/src/2D/controls/grid.ts
  30. 1 1
      src/Cameras/XR/babylon.webXRInput.ts

文件差异内容过多而无法显示
+ 3222 - 740
Playground/babylon.d.txt


二进制
Playground/textures/gui/backgroundImage-vertical.png


二进制
Playground/textures/gui/backgroundImage.png


二进制
Playground/textures/gui/thumb.png


二进制
Playground/textures/gui/valueImage-vertical.png


二进制
Playground/textures/gui/valueImage.png


+ 6 - 8
Tools/Gulp/gulpfile.js

@@ -247,15 +247,13 @@ gulp.task("typescript-compile", function() {
             summarizeFailureOutput: true
         }));
 
-    //If this gulp task is running on travis, file the build!
-    if (process.env.TRAVIS) {
-        tsResult.once("error", function() {
-            tsResult.once("finish", function() {
-                console.log("Typescript compile failed");
-                process.exit(1);
-            });
+    tsResult.once("error", function(err) {
+        tsResult.once("finish", function() {
+            console.log("Typescript compile failed");
+            console.error(err);
+            process.exit(1);
         });
-    }
+    });
 
     return merge2([
         tsResult.dts

+ 2 - 1
Tools/Gulp/tasks/gulpTasks-tests.js

@@ -69,9 +69,10 @@ gulp.task("tests-unit-transpile", function(done) {
     var tsResult = gulp.src(rootDir + "tests/unit/**/*.ts", { base: relativeRootDir })
         .pipe(tsProject());
 
-    tsResult.once("error", function() {
+    tsResult.once("error", function(err) {
         tsResult.once("finish", function() {
             console.log("Typescript compile failed");
+            console.error(err);
             process.exit(1);
         });
     });

文件差异内容过多而无法显示
+ 3356 - 2186
dist/preview release/babylon.d.ts


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

@@ -1242,6 +1242,14 @@ declare module BABYLON.GUI {
         */
     export class Grid extends Container {
             name?: string | undefined;
+            /**
+                * Gets the number of columns
+                */
+            readonly columnCount: number;
+            /**
+                * Gets the number of rows
+                */
+            readonly rowCount: number;
             /** Gets the list of children */
             readonly children: Control[];
             /**
@@ -1275,6 +1283,13 @@ declare module BABYLON.GUI {
                 */
             setColumnDefinition(index: number, width: number, isPixel?: boolean): Grid;
             /**
+                * Gets the list of children stored in a specific cell
+                * @param row defines the row to check
+                * @param column defines the column to check
+                * @returns the list of controls
+                */
+            getChildrenAt(row: number, column: number): BABYLON.Nullable<Array<Control>>;
+            /**
                 * Remove a column definition at specified index
                 * @param index defines the index of the column to remove
                 * @returns the current grid

文件差异内容过多而无法显示
+ 6 - 1
dist/preview release/gui/babylon.gui.js


文件差异内容过多而无法显示
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


文件差异内容过多而无法显示
+ 5 - 1
dist/preview release/gui/babylon.gui.min.js.map


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

@@ -1363,11 +1363,20 @@ declare module 'babylonjs-gui/2D/controls/grid' {
     import { Container } from "babylonjs-gui/2D/controls/container";
     import { Control } from "babylonjs-gui/2D/controls/control";
     import { Measure } from "babylonjs-gui/2D/measure";
+    import { Nullable } from "babylonjs";
     /**
         * Class used to create a 2D grid container
         */
     export class Grid extends Container {
             name?: string | undefined;
+            /**
+                * Gets the number of columns
+                */
+            readonly columnCount: number;
+            /**
+                * Gets the number of rows
+                */
+            readonly rowCount: number;
             /** Gets the list of children */
             readonly children: Control[];
             /**
@@ -1401,6 +1410,13 @@ declare module 'babylonjs-gui/2D/controls/grid' {
                 */
             setColumnDefinition(index: number, width: number, isPixel?: boolean): Grid;
             /**
+                * Gets the list of children stored in a specific cell
+                * @param row defines the row to check
+                * @param column defines the column to check
+                * @returns the list of controls
+                */
+            getChildrenAt(row: number, column: number): Nullable<Array<Control>>;
+            /**
                 * Remove a column definition at specified index
                 * @param index defines the index of the column to remove
                 * @returns the current grid
@@ -4170,6 +4186,14 @@ declare module BABYLON.GUI {
         */
     export class Grid extends Container {
             name?: string | undefined;
+            /**
+                * Gets the number of columns
+                */
+            readonly columnCount: number;
+            /**
+                * Gets the number of rows
+                */
+            readonly rowCount: number;
             /** Gets the list of children */
             readonly children: Control[];
             /**
@@ -4203,6 +4227,13 @@ declare module BABYLON.GUI {
                 */
             setColumnDefinition(index: number, width: number, isPixel?: boolean): Grid;
             /**
+                * Gets the list of children stored in a specific cell
+                * @param row defines the row to check
+                * @param column defines the column to check
+                * @returns the list of controls
+                */
+            getChildrenAt(row: number, column: number): BABYLON.Nullable<Array<Control>>;
+            /**
                 * Remove a column definition at specified index
                 * @param index defines the index of the column to remove
                 * @returns the current grid

文件差异内容过多而无法显示
+ 5 - 1
dist/preview release/inspector/babylon.inspector.bundle.js.map


文件差异内容过多而无法显示
+ 5 - 1
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


文件差异内容过多而无法显示
+ 5 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


文件差异内容过多而无法显示
+ 5 - 1
dist/preview release/loaders/babylon.glTFFileLoader.min.js


文件差异内容过多而无法显示
+ 5 - 1
dist/preview release/loaders/babylonjs.loaders.min.js


文件差异内容过多而无法显示
+ 0 - 435
dist/preview release/postProcessesLibrary/babylon.asciiArtpostProcess.min.js


文件差异内容过多而无法显示
+ 5 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


文件差异内容过多而无法显示
+ 5 - 1
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


文件差异内容过多而无法显示
+ 5 - 1
dist/preview release/serializers/babylon.glTF2Serializer.min.js


文件差异内容过多而无法显示
+ 5 - 1
dist/preview release/serializers/babylonjs.serializers.min.js


+ 75 - 0
dist/preview release/viewer/babylon.viewer.d.ts

@@ -1478,6 +1478,7 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+<<<<<<< HEAD
     export interface IModelConfiguration {
             id?: string;
             url?: string;
@@ -1542,6 +1543,8 @@ declare module BabylonViewer {
                     progressiveLoading?: boolean;
             };
     }
+=======
+>>>>>>> upstream/master
 }
 declare module BabylonViewer {
     /**
@@ -1557,6 +1560,11 @@ declare module BabylonViewer {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 declare module BabylonViewer {
+<<<<<<< HEAD
+=======
+}
+declare module BabylonViewer {
+>>>>>>> upstream/master
     export interface IEnvironmentMapConfiguration {
             /**
                 * Environment map texture path in relative to the asset folder.
@@ -1581,6 +1589,42 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+<<<<<<< HEAD
+=======
+    /**
+        * The EventManager is in charge of registering user interctions with the viewer.
+        * It is used in the TemplateManager
+        */
+    export class EventManager {
+            constructor(_templateManager: TemplateManager);
+            /**
+                * Register a new callback to a specific template.
+                * The best example for the usage can be found in the DefaultViewer
+                *
+                * @param templateName the templateName to register the event to
+                * @param callback The callback to be executed
+                * @param eventType the type of event to register
+                * @param selector an optional selector. if not defined the parent object in the template will be selected
+                */
+            registerCallback(templateName: string, callback: (eventData: EventCallback) => void, eventType?: string, selector?: string): void;
+            /**
+                * This will remove a registered event from the defined template.
+                * Each one of the variables apart from the template name are optional, but one must be provided.
+                *
+                * @param templateName the templateName
+                * @param callback the callback to remove (optional)
+                * @param eventType the event type to remove (optional)
+                * @param selector the selector from which to remove the event (optional)
+                */
+            unregisterCallback(templateName: string, callback: (eventData: EventCallback) => void, eventType?: string, selector?: string): void;
+            /**
+                * Dispose the event manager
+                */
+            dispose(): void;
+    }
+}
+declare module BabylonViewer {
+>>>>>>> upstream/master
     /**
         * The EventManager is in charge of registering user interctions with the viewer.
         * It is used in the TemplateManager
@@ -1662,6 +1706,7 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+<<<<<<< HEAD
     /**
         * Defines an animation to be applied to a model (translation, scale or rotation).
         */
@@ -1690,6 +1735,8 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+=======
+>>>>>>> upstream/master
     export class TelemetryLoaderPlugin implements ILoaderPlugin {
         onInit(loader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync, model: ViewerModel): void;
         onLoaded(model: ViewerModel): void;
@@ -1995,6 +2042,34 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
+    /**
+        * Defines an animation to be applied to a model (translation, scale or rotation).
+        */
+    export interface IModelAnimationConfiguration {
+            /**
+                * Time of animation, in seconds
+                */
+            time?: number;
+            /**
+                * Scale to apply
+                */
+            scaling?: {
+                    x: number;
+                    y: number;
+                    z: number;
+            };
+            /**
+                * Easing function to apply
+                */
+            easingFunction?: number;
+            /**
+                * An Easing mode to apply to the easing function
+                * See BABYLON.EasingFunction
+                */
+            easingMode?: number;
+    }
+}
+declare module BabylonViewer {
     export interface IObserversConfiguration {
         onEngineInit?: string;
         onSceneInit?: string;

文件差异内容过多而无法显示
+ 18 - 0
dist/preview release/viewer/babylon.viewer.max.js


+ 36 - 0
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -1576,6 +1576,7 @@ declare module 'babylonjs-viewer/managers/sceneManager' {
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/modelConfiguration' {
+<<<<<<< HEAD
     import { IModelAnimationConfiguration } from "babylonjs-viewer/configuration/interfaces/modelAnimationConfiguration";
     export interface IModelConfiguration {
             id?: string;
@@ -1641,6 +1642,9 @@ declare module 'babylonjs-viewer/configuration/interfaces/modelConfiguration' {
                     progressiveLoading?: boolean;
             };
     }
+=======
+    
+>>>>>>> upstream/master
 }
 
 declare module 'babylonjs-viewer/loader/plugins' {
@@ -1792,6 +1796,7 @@ declare module 'babylonjs-viewer/labs/viewerLabs' {
     }
 }
 
+<<<<<<< HEAD
 declare module 'babylonjs-viewer/configuration/interfaces/modelAnimationConfiguration' {
     /**
         * Defines an animation to be applied to a model (translation, scale or rotation).
@@ -1821,6 +1826,8 @@ declare module 'babylonjs-viewer/configuration/interfaces/modelAnimationConfigur
     }
 }
 
+=======
+>>>>>>> upstream/master
 declare module 'babylonjs-viewer/loader/plugins/telemetryLoaderPlugin' {
     import { ILoaderPlugin } from "babylonjs-viewer/loader/plugins/loaderPlugin";
     import { ViewerModel } from "babylonjs-viewer/model/viewerModel";
@@ -2149,6 +2156,35 @@ declare module 'babylonjs-viewer/configuration/interfaces/lightConfiguration' {
     }
 }
 
+declare module 'babylonjs-viewer/configuration/interfaces/modelAnimationConfiguration' {
+    /**
+        * Defines an animation to be applied to a model (translation, scale or rotation).
+        */
+    export interface IModelAnimationConfiguration {
+            /**
+                * Time of animation, in seconds
+                */
+            time?: number;
+            /**
+                * Scale to apply
+                */
+            scaling?: {
+                    x: number;
+                    y: number;
+                    z: number;
+            };
+            /**
+                * Easing function to apply
+                */
+            easingFunction?: number;
+            /**
+                * An Easing mode to apply to the easing function
+                * See BABYLON.EasingFunction
+                */
+            easingMode?: number;
+    }
+}
+
 declare module 'babylonjs-viewer/configuration/interfaces/observersConfiguration' {
     export interface IObserversConfiguration {
         onEngineInit?: string;

+ 1 - 0
dist/preview release/what's new.md

@@ -22,6 +22,7 @@
 
 - Added `button.image` and `button.textBlock` to simplify access to button internal parts ([Deltakosh](https://github.com/deltakosh))
 - Added `sldier.displayThumb` to show/hide slider's thumb ([Deltakosh](https://github.com/deltakosh))
+- Added `grid.rowCount`, `grid.columnCount` and `grid.getChildrenAt()` ([Deltakosh](https://github.com/deltakosh))
 
 ### Core Engine
 

+ 31 - 0
gui/src/2D/controls/grid.ts

@@ -2,6 +2,7 @@ import { Container } from "./container";
 import { ValueAndUnit } from "../valueAndUnit";
 import { Control } from "./control";
 import { Measure } from "../measure";
+import { Nullable } from "babylonjs";
 
 /**
  * Class used to create a 2D grid container
@@ -12,6 +13,20 @@ export class Grid extends Container {
     private _cells: { [key: string]: Container } = {};
     private _childControls = new Array<Control>();
 
+    /**
+     * Gets the number of columns
+     */
+    public get columnCount(): number {
+        return this._columnDefinitions.length;
+    }
+
+    /**
+     * Gets the number of rows
+     */
+    public get rowCount(): number {
+        return this._rowDefinitions.length;
+    }
+
     /** Gets the list of children */
     public get children(): Control[] {
         return this._childControls;
@@ -83,6 +98,22 @@ export class Grid extends Container {
         return this;
     }
 
+    /**
+     * Gets the list of children stored in a specific cell
+     * @param row defines the row to check
+     * @param column defines the column to check
+     * @returns the list of controls
+     */
+    public getChildrenAt(row: number, column: number): Nullable<Array<Control>> {
+        const cell = this._cells[`${row}:${column}`];
+
+        if (!cell) {
+            return null;
+        }
+
+        return cell.children;
+    }
+
     private _removeCell(cell: Container, key: string) {
         if (!cell) {
             return;

+ 1 - 1
src/Cameras/XR/babylon.webXRInput.ts

@@ -49,7 +49,7 @@ module BABYLON {
         public constructor(private helper: WebXRExperienceHelper) {
             this._frameObserver = helper._sessionManager.onXRFrameObservable.add(() => {
                 if (!helper._sessionManager._currentXRFrame || !helper._sessionManager._currentXRFrame.getDevicePose) {
-                    return false;
+                    return;
                 }
 
                 var xrFrame = helper._sessionManager._currentXRFrame;