David Catuhe 9 anni fa
parent
commit
6efb1004b0

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.core.js


File diff suppressed because it is too large
+ 7288 - 7274
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 17 - 17
dist/preview release/babylon.js


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

@@ -37067,6 +37067,38 @@ var BABYLON;
             // Create Textures and post processes
             this.createTextureAndPostProcesses();
         }
+        Object.defineProperty(HighlightLayer.prototype, "blurHorizontalSize", {
+            /**
+             * Gets the horizontal size of the blur.
+             */
+            get: function () {
+                return this._horizontalBlurPostprocess.blurWidth;
+            },
+            /**
+             * Specifies the horizontal size of the blur.
+             */
+            set: function (value) {
+                this._horizontalBlurPostprocess.blurWidth = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(HighlightLayer.prototype, "blurVerticalSize", {
+            /**
+             * Gets the vertical size of the blur.
+             */
+            get: function () {
+                return this._verticalBlurPostprocess.blurWidth;
+            },
+            /**
+             * Specifies the vertical size of the blur.
+             */
+            set: function (value) {
+                this._verticalBlurPostprocess.blurWidth = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
         /**
          * Creates the render target textures and post processes used in the highlight layer.
          */
@@ -37179,6 +37211,9 @@ var BABYLON;
          * @return true if ready otherwise, false
          */
         HighlightLayer.prototype.isReady = function (subMesh, useInstances) {
+            if (!subMesh.getMaterial().isReady()) {
+                return false;
+            }
             var defines = [];
             var attribs = [BABYLON.VertexBuffer.PositionKind];
             var mesh = subMesh.getMesh();

File diff suppressed because it is too large
+ 17 - 17
dist/preview release/babylon.noworker.js


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

@@ -1,7 +1,7 @@
 # 2.5.0:
 
 ### Major updates
-- New `HighlightLayer` object to enable highlights rendering. [Demo]() - ([sebavan](https://github.com/sebavan))
+- New `HighlightLayer` object to enable highlights rendering. [Demo](http://www.babylonjs.com/Demos/Highlights/) - ([sebavan](https://github.com/sebavan))
 - Babylon.js now supports right handed system with ```scene.useRightHandedSystem = true``` ([deltakosh](https://github.com/deltakosh))
 - Babylon.js is now compiled with [optimize-js](https://github.com/nolanlawson/optimize-js) to get faster initial load ([deltakosh](https://github.com/deltakosh))
 

+ 35 - 0
src/Layer/babylon.highlightlayer.js

@@ -136,6 +136,38 @@ var BABYLON;
             // Create Textures and post processes
             this.createTextureAndPostProcesses();
         }
+        Object.defineProperty(HighlightLayer.prototype, "blurHorizontalSize", {
+            /**
+             * Gets the horizontal size of the blur.
+             */
+            get: function () {
+                return this._horizontalBlurPostprocess.blurWidth;
+            },
+            /**
+             * Specifies the horizontal size of the blur.
+             */
+            set: function (value) {
+                this._horizontalBlurPostprocess.blurWidth = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
+        Object.defineProperty(HighlightLayer.prototype, "blurVerticalSize", {
+            /**
+             * Gets the vertical size of the blur.
+             */
+            get: function () {
+                return this._verticalBlurPostprocess.blurWidth;
+            },
+            /**
+             * Specifies the vertical size of the blur.
+             */
+            set: function (value) {
+                this._verticalBlurPostprocess.blurWidth = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
         /**
          * Creates the render target textures and post processes used in the highlight layer.
          */
@@ -248,6 +280,9 @@ var BABYLON;
          * @return true if ready otherwise, false
          */
         HighlightLayer.prototype.isReady = function (subMesh, useInstances) {
+            if (!subMesh.getMaterial().isReady()) {
+                return false;
+            }
             var defines = [];
             var attribs = [BABYLON.VertexBuffer.PositionKind];
             var mesh = subMesh.getMesh();

+ 4 - 0
src/Layer/babylon.highlightlayer.ts

@@ -421,6 +421,10 @@
          * @return true if ready otherwise, false
          */
         private isReady(subMesh: SubMesh, useInstances: boolean): boolean {
+            if (!subMesh.getMaterial().isReady()) {
+                return false;
+            }
+
             var defines = [];
 
             var attribs = [VertexBuffer.PositionKind];