Browse Source

Add missing parameter documentation and What's New.

Brian Zinn 5 years ago
parent
commit
c93cccbe19
2 changed files with 7 additions and 1 deletions
  1. 1 0
      dist/preview release/what's new.md
  2. 6 1
      src/Materials/fresnelParameters.ts

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

@@ -42,6 +42,7 @@
 - Added the `roughness` and `albedoScaling` parameters to PBR sheen ([Popov72](https://github.com/Popov72))
 - Updated the energy conservation factor for the clear coat layer in PBR materials ([Popov72](https://github.com/Popov72))
 - Added the `transparencyMode` property to the `StandardMaterial` class ([Popov72](https://github.com/Popov72))
+- Added to `FresnelParameters` constructor options and equals method ([brianzinn](https://github.com/brianzinn))
 
 ### WebXR
 - Added optional ray and mesh selection predicates to `WebXRControllerPointerSelection` ([Exolun](https://github.com/Exolun))

+ 6 - 1
src/Materials/fresnelParameters.ts

@@ -57,7 +57,7 @@ export type IFresnelParametersSerialized = {
     /**
      * Defined the power exponent applied to fresnel term
      */
-    power: number;
+    power?: number;
 
     /**
      * Define if the fresnel effect is enable or not.
@@ -106,6 +106,11 @@ export class FresnelParameters {
      */
     public power: number;
 
+    /**
+     * Creates a new FresnelParameters object.
+     *
+     * @param options provide your own settings to optionally to override defaults
+     */
     public constructor(options: IFresnelParametersCreationOptions = {}) {
         this.bias = (options.bias === undefined) ? 0 : options.bias;
         this.power = (options.power === undefined) ? 1 : options.power;