David Catuhe 6 anos atrás
pai
commit
c5e53c8f89

Diferenças do arquivo suprimidas por serem muito extensas
+ 6147 - 6139
Playground/babylon.d.txt


Diferenças do arquivo suprimidas por serem muito extensas
+ 5830 - 5826
dist/preview release/babylon.d.ts


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/babylon.js


+ 10 - 0
dist/preview release/babylon.max.js

@@ -32223,6 +32223,16 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(Texture.prototype, "invertY", {
+            /**
+             * Gets a boolean indicating if the texture needs to be inverted on the y axis during loading
+             */
+            get: function () {
+                return this._invertY;
+            },
+            enumerable: true,
+            configurable: true
+        });
         /**
          * Update the url (and optional buffer) of this texture if url was null during construction.
          * @param url the url of the texture

+ 10 - 0
dist/preview release/babylon.no-module.max.js

@@ -32190,6 +32190,16 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(Texture.prototype, "invertY", {
+            /**
+             * Gets a boolean indicating if the texture needs to be inverted on the y axis during loading
+             */
+            get: function () {
+                return this._invertY;
+            },
+            enumerable: true,
+            configurable: true
+        });
         /**
          * Update the url (and optional buffer) of this texture if url was null during construction.
          * @param url the url of the texture

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/babylon.worker.js


+ 10 - 0
dist/preview release/es6.js

@@ -32190,6 +32190,16 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(Texture.prototype, "invertY", {
+            /**
+             * Gets a boolean indicating if the texture needs to be inverted on the y axis during loading
+             */
+            get: function () {
+                return this._invertY;
+            },
+            enumerable: true,
+            configurable: true
+        });
         /**
          * Update the url (and optional buffer) of this texture if url was null during construction.
          * @param url the url of the texture

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

@@ -916,8 +916,12 @@ declare module BABYLON.GUI {
              */
             onDirtyObservable: BABYLON.Observable<Control>;
             /**
-            * An event triggered after the control is drawn
-            */
+                * An event triggered before drawing the control
+                */
+            onBeforeDrawObservable: BABYLON.Observable<Control>;
+            /**
+                * An event triggered after the control was drawn
+                */
             onAfterDrawObservable: BABYLON.Observable<Control>;
             /** Gets or set information about font offsets (used to render and align text) */
             fontOffset: {

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/gui/babylon.gui.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js.map


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

@@ -1023,8 +1023,12 @@ declare module 'babylonjs-gui/2D/controls/control' {
              */
             onDirtyObservable: Observable<Control>;
             /**
-            * An event triggered after the control is drawn
-            */
+                * An event triggered before drawing the control
+                */
+            onBeforeDrawObservable: Observable<Control>;
+            /**
+                * An event triggered after the control was drawn
+                */
             onAfterDrawObservable: Observable<Control>;
             /** Gets or set information about font offsets (used to render and align text) */
             fontOffset: {
@@ -3864,8 +3868,12 @@ declare module BABYLON.GUI {
              */
             onDirtyObservable: BABYLON.Observable<Control>;
             /**
-            * An event triggered after the control is drawn
-            */
+                * An event triggered before drawing the control
+                */
+            onBeforeDrawObservable: BABYLON.Observable<Control>;
+            /**
+                * An event triggered after the control was drawn
+                */
             onAfterDrawObservable: BABYLON.Observable<Control>;
             /** Gets or set information about font offsets (used to render and align text) */
             fontOffset: {

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

@@ -1844,25 +1844,6 @@ declare module BabylonViewer {
     }
 }
 declare module BabylonViewer {
-    export interface IDefaultRenderingPipelineConfiguration {
-        sharpenEnabled?: boolean;
-        bloomEnabled?: boolean;
-        bloomThreshold?: number;
-        depthOfFieldEnabled?: boolean;
-        depthOfFieldBlurLevel?: BABYLON.DepthOfFieldEffectBlurLevel;
-        fxaaEnabled?: boolean;
-        imageProcessingEnabled?: boolean;
-        defaultPipelineTextureType?: number;
-        bloomScale?: number;
-        chromaticAberrationEnabled?: boolean;
-        grainEnabled?: boolean;
-        bloomKernel?: number;
-        hardwareScaleLevel?: number;
-        bloomWeight?: number;
-        hdr?: boolean;
-        samples?: number;
-        glowLayerEnabled?: boolean;
-    }
 }
 declare module BabylonViewer {
     export interface IGroundConfiguration {

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 20
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -1990,26 +1990,7 @@ declare module 'babylonjs-viewer/configuration/interfaces/colorGradingConfigurat
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/defaultRenderingPipelineConfiguration' {
-    import { DepthOfFieldEffectBlurLevel } from 'babylonjs';
-    export interface IDefaultRenderingPipelineConfiguration {
-        sharpenEnabled?: boolean;
-        bloomEnabled?: boolean;
-        bloomThreshold?: number;
-        depthOfFieldEnabled?: boolean;
-        depthOfFieldBlurLevel?: DepthOfFieldEffectBlurLevel;
-        fxaaEnabled?: boolean;
-        imageProcessingEnabled?: boolean;
-        defaultPipelineTextureType?: number;
-        bloomScale?: number;
-        chromaticAberrationEnabled?: boolean;
-        grainEnabled?: boolean;
-        bloomKernel?: number;
-        hardwareScaleLevel?: number;
-        bloomWeight?: number;
-        hdr?: boolean;
-        samples?: number;
-        glowLayerEnabled?: boolean;
-    }
+    
 }
 
 declare module 'babylonjs-viewer/configuration/interfaces/groundConfiguration' {

+ 6 - 0
gui/src/2D/controls/container.ts

@@ -264,6 +264,11 @@ export class Container extends Control {
         this._applyStates(context);
 
         if (this._processMeasures(parentMeasure, context)) {
+
+            if (this.onBeforeDrawObservable.hasObservers()) {
+                this.onBeforeDrawObservable.notifyObservers(this);
+            }
+
             this._localDraw(context);
 
             if (this.clipChildren) {
@@ -276,6 +281,7 @@ export class Container extends Control {
             for (var child of this._children) {
                 if (child.isVisible && !child.notRenderable) {
                     child._tempParentMeasure.copyFrom(this._measureForChildren);
+
                     child._draw(this._measureForChildren, context);
 
                     if (child.onAfterDrawObservable.hasObservers()) {

+ 12 - 2
gui/src/2D/controls/control.ts

@@ -156,8 +156,13 @@ export class Control {
     public onDirtyObservable = new Observable<Control>();
 
     /**
-   * An event triggered after the control is drawn
-   */
+     * An event triggered before drawing the control
+     */
+    public onBeforeDrawObservable = new Observable<Control>();
+
+    /**
+     * An event triggered after the control was drawn
+     */
     public onAfterDrawObservable = new Observable<Control>();
 
     /** Gets or set information about font offsets (used to render and align text) */
@@ -1055,6 +1060,10 @@ export class Control {
             context.clip();
         }
 
+        if (this.onBeforeDrawObservable.hasObservers()) {
+            this.onBeforeDrawObservable.notifyObservers(this);
+        }
+
         return true;
     }
 
@@ -1397,6 +1406,7 @@ export class Control {
     /** Releases associated resources */
     public dispose() {
         this.onDirtyObservable.clear();
+        this.onBeforeDrawObservable.clear();
         this.onAfterDrawObservable.clear();
         this.onPointerDownObservable.clear();
         this.onPointerEnterObservable.clear();

+ 6 - 2
src/Animations/babylon.animationGroup.ts

@@ -211,6 +211,10 @@ module BABYLON {
 
             this._speedRatio = speedRatio;
 
+            if (from !== undefined && to !== undefined && from > to && this._speedRatio > 0) {
+                this._speedRatio = -speedRatio;
+            }
+
             this._isStarted = true;
 
             return this;
@@ -404,12 +408,12 @@ module BABYLON {
                 var targetNode = scene.getNodeByID(id);
 
                 if (targetNode != null) {
-                    animationGroup.addTargetedAnimation(animation, targetNode);
+                    animationGroup.addTargetedAnimation(animation, targetNode);
                 }
             }
 
             if (parsedAnimationGroup.from !== null && parsedAnimationGroup.from !== null) {
-                animationGroup.normalize(parsedAnimationGroup.from, parsedAnimationGroup.to);
+                animationGroup.normalize(parsedAnimationGroup.from, parsedAnimationGroup.to);
             }
 
             return animationGroup;

+ 11 - 4
src/Materials/Textures/babylon.texture.ts

@@ -205,6 +205,13 @@ module BABYLON {
         }
 
         /**
+         * Gets a boolean indicating if the texture needs to be inverted on the y axis during loading
+         */
+        public get invertY(): boolean {
+            return this._invertY;
+        }
+
+        /**
          * Instantiates a new texture.
          * This represents a texture in babylon. It can be easily loaded from a network, base64 or html input.
          * @see http://doc.babylonjs.com/babylon101/materials#texture
@@ -434,7 +441,7 @@ module BABYLON {
                 this._t1.x, this._t1.y, this._t1.z, 0.0,
                 this._t2.x, this._t2.y, this._t2.z, 0.0,
                 this._t0.x, this._t0.y, this._t0.z, 0.0,
-                       0.0,        0.0,        0.0, 1.0,
+                0.0, 0.0, 0.0, 1.0,
                 this._cachedTextureMatrix
             );
 
@@ -501,10 +508,10 @@ module BABYLON {
                     break;
                 case Texture.PROJECTION_MODE:
                     Matrix.FromValuesToRef(
-                        0.5,  0.0, 0.0, 0.0,
+                        0.5, 0.0, 0.0, 0.0,
                         0.0, -0.5, 0.0, 0.0,
-                        0.0,  0.0, 0.0, 0.0,
-                        0.5,  0.5, 1.0, 1.0,
+                        0.0, 0.0, 0.0, 0.0,
+                        0.5, 0.5, 1.0, 1.0,
                         this._projectionModeMatrix
                     );