Browse Source

Added cameraColorCurves property to stdMaterial

David Catuhe 8 năm trước cách đây
mục cha
commit
6ad6e6895b

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 11708 - 11695
dist/preview release/babylon.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/babylon.js


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

@@ -30706,6 +30706,28 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(StandardMaterial.prototype, "cameraColorCurves", {
+            /**
+             * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
+             * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
+             * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
+             * corresponding to low luminance, medium luminance, and high luminance areas respectively.
+             */
+            get: function () {
+                return this._imageProcessingConfiguration.colorCurves;
+            },
+            /**
+             * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
+             * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
+             * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
+             * corresponding to low luminance, medium luminance, and high luminance areas respectively.
+             */
+            set: function (value) {
+                this._imageProcessingConfiguration.colorCurves = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
         StandardMaterial.prototype.getClassName = function () {
             return "StandardMaterial";
         };

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 11708 - 11695
dist/preview release/babylon.module.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/babylon.worker.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 5909 - 5896
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 22 - 0
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -30706,6 +30706,28 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(StandardMaterial.prototype, "cameraColorCurves", {
+            /**
+             * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
+             * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
+             * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
+             * corresponding to low luminance, medium luminance, and high luminance areas respectively.
+             */
+            get: function () {
+                return this._imageProcessingConfiguration.colorCurves;
+            },
+            /**
+             * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
+             * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
+             * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
+             * corresponding to low luminance, medium luminance, and high luminance areas respectively.
+             */
+            set: function (value) {
+                this._imageProcessingConfiguration.colorCurves = value;
+            },
+            enumerable: true,
+            configurable: true
+        });
         StandardMaterial.prototype.getClassName = function () {
             return "StandardMaterial";
         };

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 5909 - 5896
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


+ 3 - 3
dist/preview release/gui/babylon.gui.d.ts

@@ -636,7 +636,7 @@ declare module BABYLON.GUI {
 
 
 declare module BABYLON.GUI {
-    class KeyOptions {
+    class KeyPropertySet {
         width?: string;
         height?: string;
         paddingLeft?: string;
@@ -657,8 +657,8 @@ declare module BABYLON.GUI {
         defaultButtonColor: string;
         defaultButtonBackground: string;
         protected _getTypeName(): string;
-        private _createKey(key, options?);
-        addKeysRow(keys: Array<string>, options?: Array<KeyOptions>): void;
+        private _createKey(key, propertySet?);
+        addKeysRow(keys: Array<string>, propertySets?: Array<KeyPropertySet>): void;
         private _connectedInputText;
         private _onFocusObserver;
         private _onBlurObserver;

+ 18 - 18
dist/preview release/gui/babylon.gui.js

@@ -4106,12 +4106,12 @@ var BABYLON;
 (function (BABYLON) {
     var GUI;
     (function (GUI) {
-        var KeyOptions = (function () {
-            function KeyOptions() {
+        var KeyPropertySet = (function () {
+            function KeyPropertySet() {
             }
-            return KeyOptions;
+            return KeyPropertySet;
         }());
-        GUI.KeyOptions = KeyOptions;
+        GUI.KeyPropertySet = KeyPropertySet;
         var VirtualKeyboard = (function (_super) {
             __extends(VirtualKeyboard, _super);
             function VirtualKeyboard() {
@@ -4130,17 +4130,17 @@ var BABYLON;
             VirtualKeyboard.prototype._getTypeName = function () {
                 return "VirtualKeyboard";
             };
-            VirtualKeyboard.prototype._createKey = function (key, options) {
+            VirtualKeyboard.prototype._createKey = function (key, propertySet) {
                 var _this = this;
                 var button = GUI.Button.CreateSimpleButton(key, key);
-                button.width = options && options.width ? options.width : this.defaultButtonWidth;
-                button.height = options && options.height ? options.height : this.defaultButtonHeight;
-                button.color = options && options.color ? options.color : this.defaultButtonColor;
-                button.background = options && options.background ? options.background : this.defaultButtonBackground;
-                button.paddingLeft = options && options.paddingLeft ? options.paddingLeft : this.defaultButtonPaddingLeft;
-                button.paddingRight = options && options.paddingRight ? options.paddingRight : this.defaultButtonPaddingRight;
-                button.paddingTop = options && options.paddingTop ? options.paddingTop : this.defaultButtonPaddingTop;
-                button.paddingBottom = options && options.paddingBottom ? options.paddingBottom : this.defaultButtonPaddingBottom;
+                button.width = propertySet && propertySet.width ? propertySet.width : this.defaultButtonWidth;
+                button.height = propertySet && propertySet.height ? propertySet.height : this.defaultButtonHeight;
+                button.color = propertySet && propertySet.color ? propertySet.color : this.defaultButtonColor;
+                button.background = propertySet && propertySet.background ? propertySet.background : this.defaultButtonBackground;
+                button.paddingLeft = propertySet && propertySet.paddingLeft ? propertySet.paddingLeft : this.defaultButtonPaddingLeft;
+                button.paddingRight = propertySet && propertySet.paddingRight ? propertySet.paddingRight : this.defaultButtonPaddingRight;
+                button.paddingTop = propertySet && propertySet.paddingTop ? propertySet.paddingTop : this.defaultButtonPaddingTop;
+                button.paddingBottom = propertySet && propertySet.paddingBottom ? propertySet.paddingBottom : this.defaultButtonPaddingBottom;
                 button.thickness = 0;
                 button.isFocusInvisible = true;
                 button.onPointerUpObservable.add(function () {
@@ -4148,16 +4148,16 @@ var BABYLON;
                 });
                 return button;
             };
-            VirtualKeyboard.prototype.addKeysRow = function (keys, options) {
+            VirtualKeyboard.prototype.addKeysRow = function (keys, propertySets) {
                 var panel = new GUI.StackPanel();
                 panel.isVertical = false;
                 panel.isFocusInvisible = true;
                 for (var i = 0; i < keys.length; i++) {
-                    var keyOptions = null;
-                    if (options && options.length === keys.length) {
-                        keyOptions = options[i];
+                    var properties = null;
+                    if (propertySets && propertySets.length === keys.length) {
+                        properties = propertySets[i];
                     }
-                    panel.addControl(this._createKey(keys[i], keyOptions));
+                    panel.addControl(this._createKey(keys[i], properties));
                 }
                 this.addControl(panel);
             };

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


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

@@ -636,7 +636,7 @@ declare module BABYLON.GUI {
 
 /// <reference path="../../../dist/preview release/babylon.d.ts" />
 declare module BABYLON.GUI {
-    class KeyOptions {
+    class KeyPropertySet {
         width?: string;
         height?: string;
         paddingLeft?: string;
@@ -657,8 +657,8 @@ declare module BABYLON.GUI {
         defaultButtonColor: string;
         defaultButtonBackground: string;
         protected _getTypeName(): string;
-        private _createKey(key, options?);
-        addKeysRow(keys: Array<string>, options?: Array<KeyOptions>): void;
+        private _createKey(key, propertySet?);
+        addKeysRow(keys: Array<string>, propertySets?: Array<KeyPropertySet>): void;
         private _connectedInputText;
         private _onFocusObserver;
         private _onBlurObserver;

+ 19 - 0
src/Materials/babylon.standardMaterial.ts

@@ -429,6 +429,25 @@ module BABYLON {
             this._imageProcessingConfiguration.colorGradingTexture = value;
         }
 
+        /**
+         * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT). 
+         * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
+         * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image; 
+         * corresponding to low luminance, medium luminance, and high luminance areas respectively.
+         */
+        public get cameraColorCurves(): ColorCurves {
+            return this._imageProcessingConfiguration.colorCurves;
+        }
+        /**
+         * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT). 
+         * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
+         * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image; 
+         * corresponding to low luminance, medium luminance, and high luminance areas respectively.
+         */
+        public set cameraColorCurves(value: ColorCurves) {
+            this._imageProcessingConfiguration.colorCurves = value;
+        }        
+
         public customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: StandardMaterialDefines) => string;
 
         protected _renderTargets = new SmartArray<RenderTargetTexture>(16);