Explorar o código

linting and PR fix

Pamela Wolf %!s(int64=5) %!d(string=hai) anos
pai
achega
d67d9cfb08

+ 0 - 2
inspector/src/components/actionTabs/tabs/gradientNodePropertyComponent.tsx

@@ -6,8 +6,6 @@ import { Color3 } from 'babylonjs/Maths/math.color';
 import { ButtonLineComponent } from '../lines/buttonLineComponent';
 import { IPropertyComponentProps } from './propertyComponentProps';
 
-
-
 export class GradientPropertyTabComponent extends React.Component<IPropertyComponentProps> {
 
     constructor(props: IPropertyComponentProps) {

+ 1 - 2
src/Materials/Node/Blocks/Input/inputBlock.ts

@@ -62,7 +62,7 @@ export class InputBlock extends NodeMaterialBlock {
 
     /** Gets or sets a boolean indicating that the value of this input will not change after a build */
     public isConstant = false;
-    
+
     /** Gets or sets the group to use to display this block in the Inspector */
     public groupInInspector = "";
 
@@ -673,7 +673,6 @@ export class InputBlock extends NodeMaterialBlock {
             // Common Property "Type"
             codes.push(
                 `${variableName}.isConstant = ${this.isConstant}`,
-                `${variableName}.visibleInInspector = ${this.visibleInInspector}`
             );
 
             codes.push('');

+ 5 - 1
src/Materials/Node/Blocks/gradientBlock.ts

@@ -16,12 +16,15 @@ export class GradientBlockColorStep {
 
     private _step: number;
     /**
-     * Gets or sets a value indicating which step this color is associated with (between 0 and 1)
+     * Gets value indicating which step this color is associated with (between 0 and 1)
      */
     public get step(): number {
         return this._step;
     }
 
+    /**
+     * Sets a value indicating which step this color is associated with (between 0 and 1)
+    */
     public set step(val: number) {
         this._step = val;
         this._parent.onValueChangedObservable?.notifyObservers(this._parent);
@@ -68,6 +71,7 @@ export class GradientBlock extends NodeMaterialBlock {
     /** Gets an observable raised when the value is changed */
     public onValueChangedObservable = new Observable<GradientBlock>();
 
+    /** calls observable when the value is changed*/
     public colorStepsUpdated() {
         this.onValueChangedObservable.notifyObservers(this);
     }

+ 3 - 2
src/Materials/Node/nodeMaterialBlock.ts

@@ -158,7 +158,7 @@ export class NodeMaterialBlock {
 
      /** Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default) */
      public visibleInInspector = false;
-     
+    
     /**
      * Creates a new NodeMaterialBlock
      * @param name defines the block name
@@ -586,7 +586,8 @@ export class NodeMaterialBlock {
     }
 
     protected _dumpPropertiesCode() {
-        return "";
+        let variableName = this._codeVariableName;
+        return `${variableName}.visibleInInspector = ${this.visibleInInspector}`
     }
 
     /** @hidden */