浏览代码

Update bloomWeight

David Catuhe 8 年之前
父节点
当前提交
cae353e2be

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


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


+ 21 - 2
dist/preview release/babylon.max.js

@@ -50694,7 +50694,7 @@ var BABYLON;
             /**
              * Specifies the weight of the bloom in the final rendering
              */
-            _this.bloomWeight = 0.15;
+            _this._bloomWeight = 0.15;
             _this._cameras = cameras || [];
             // Initialize
             _this._hdr = hdr;
@@ -50706,6 +50706,22 @@ var BABYLON;
             _this._buildPipeline();
             return _this;
         }
+        Object.defineProperty(DefaultRenderingPipeline.prototype, "bloomWeight", {
+            get: function () {
+                return this._bloomWeight;
+            },
+            set: function (value) {
+                if (this._bloomWeight === value) {
+                    return;
+                }
+                this._bloomWeight = value;
+                if (this._hdr && this.copyBack) {
+                    this.copyBack.alphaConstants = new BABYLON.Color4(value, value, value, value);
+                }
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(DefaultRenderingPipeline.prototype, "bloomScale", {
             get: function () {
                 return this._bloomScale;
@@ -50884,12 +50900,15 @@ var BABYLON;
     ], DefaultRenderingPipeline.prototype, "bloomKernel", void 0);
     __decorate([
         BABYLON.serialize()
-    ], DefaultRenderingPipeline.prototype, "bloomWeight", void 0);
+    ], DefaultRenderingPipeline.prototype, "_bloomWeight", void 0);
     __decorate([
         BABYLON.serialize()
     ], DefaultRenderingPipeline.prototype, "_hdr", void 0);
     __decorate([
         BABYLON.serialize()
+    ], DefaultRenderingPipeline.prototype, "bloomWeight", null);
+    __decorate([
+        BABYLON.serialize()
     ], DefaultRenderingPipeline.prototype, "bloomScale", null);
     __decorate([
         BABYLON.serialize()

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


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


文件差异内容过多而无法显示
+ 513 - 512
dist/preview release/customConfigurations/minimalViewer/babylon.d.ts


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


+ 21 - 2
dist/preview release/customConfigurations/minimalViewer/babylon.max.js

@@ -42744,7 +42744,7 @@ var BABYLON;
             /**
              * Specifies the weight of the bloom in the final rendering
              */
-            _this.bloomWeight = 0.15;
+            _this._bloomWeight = 0.15;
             _this._cameras = cameras || [];
             // Initialize
             _this._hdr = hdr;
@@ -42756,6 +42756,22 @@ var BABYLON;
             _this._buildPipeline();
             return _this;
         }
+        Object.defineProperty(DefaultRenderingPipeline.prototype, "bloomWeight", {
+            get: function () {
+                return this._bloomWeight;
+            },
+            set: function (value) {
+                if (this._bloomWeight === value) {
+                    return;
+                }
+                this._bloomWeight = value;
+                if (this._hdr && this.copyBack) {
+                    this.copyBack.alphaConstants = new BABYLON.Color4(value, value, value, value);
+                }
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(DefaultRenderingPipeline.prototype, "bloomScale", {
             get: function () {
                 return this._bloomScale;
@@ -42934,12 +42950,15 @@ var BABYLON;
     ], DefaultRenderingPipeline.prototype, "bloomKernel", void 0);
     __decorate([
         BABYLON.serialize()
-    ], DefaultRenderingPipeline.prototype, "bloomWeight", void 0);
+    ], DefaultRenderingPipeline.prototype, "_bloomWeight", void 0);
     __decorate([
         BABYLON.serialize()
     ], DefaultRenderingPipeline.prototype, "_hdr", void 0);
     __decorate([
         BABYLON.serialize()
+    ], DefaultRenderingPipeline.prototype, "bloomWeight", null);
+    __decorate([
+        BABYLON.serialize()
     ], DefaultRenderingPipeline.prototype, "bloomScale", null);
     __decorate([
         BABYLON.serialize()

文件差异内容过多而无法显示
+ 513 - 512
dist/preview release/customConfigurations/minimalViewer/babylon.module.d.ts


+ 17 - 1
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts

@@ -41,11 +41,27 @@
 		 * Specifies the weight of the bloom in the final rendering
 		 */
         @serialize()
-		public bloomWeight: number = 0.15;        
+		private _bloomWeight: number = 0.15;        
 
         @serialize()
         private _hdr: boolean;
 
+        public set bloomWeight(value: number) {
+            if (this._bloomWeight === value) {
+                return;
+            }
+            this._bloomWeight = value;
+
+            if (this._hdr && this.copyBack) {
+                this.copyBack.alphaConstants = new BABYLON.Color4(value, value, value, value);	
+            }
+        }   
+        
+        @serialize()
+        public get bloomWeight(): number {
+            return this._bloomWeight;
+        }          
+
         public set bloomScale(value: number) {
             if (this._bloomScale === value) {
                 return;