瀏覽代碼

Lint + doc
Associated with #6012

David Catuhe 6 年之前
父節點
當前提交
9e801eb367

+ 12 - 1
src/Materials/Node/Blocks/Fragment/fragmentOutputBlock.ts

@@ -1,14 +1,25 @@
 import { NodeMaterialBlock } from '../../nodeMaterialBlock';
 import { NodeMaterialBlockConnectionPointTypes } from '../../nodeMaterialBlockConnectionPointTypes';
-import { NodeMaterialCompilationState } from 'Materials/Node/nodeMaterialCompilationState';
+import { NodeMaterialCompilationState } from '../../nodeMaterialCompilationState';
 
+/**
+ * Block used to output the final color
+ */
 export class FragmentOutputBlock extends NodeMaterialBlock {
+    /**
+     * Create a new FragmentOutputBlock
+     * @param name defines the block name
+     */
     public constructor(name: string) {
         super(name);
 
         this.registerEntryPoint("color", NodeMaterialBlockConnectionPointTypes.Color4);
     }
 
+    /**
+     * Compile the block
+     * @param state defines the current compilation state
+     */
     public compile(state: NodeMaterialCompilationState) {
         super.compile(state);
 

+ 12 - 1
src/Materials/Node/Blocks/Fragment/textureBlock.ts

@@ -1,8 +1,15 @@
 import { NodeMaterialBlock } from '../../nodeMaterialBlock';
 import { NodeMaterialBlockConnectionPointTypes } from '../../nodeMaterialBlockConnectionPointTypes';
-import { NodeMaterialCompilationState } from 'Materials/Node/nodeMaterialCompilationState';
+import { NodeMaterialCompilationState } from '../../nodeMaterialCompilationState';
 
+/**
+ * Block used to read a texture from a sampler
+ */
 export class TextureBlock extends NodeMaterialBlock {
+    /**
+     * Create a new TextureBlock
+     * @param name defines the block name
+     */
     public constructor(name: string) {
         super(name);
 
@@ -12,6 +19,10 @@ export class TextureBlock extends NodeMaterialBlock {
         this.registerExitPoint("color", NodeMaterialBlockConnectionPointTypes.Color4);
     }
 
+    /**
+     * Compile the block
+     * @param state defines the current compilation state
+     */
     public compile(state: NodeMaterialCompilationState) {
         super.compile(state);
 

+ 11 - 0
src/Materials/Node/Blocks/Vertex/vector3TransformBlock.ts

@@ -2,12 +2,19 @@ import { NodeMaterialBlock } from '../../nodeMaterialBlock';
 import { NodeMaterialBlockConnectionPointTypes } from '../../nodeMaterialBlockConnectionPointTypes';
 import { NodeMaterialCompilationState } from '../../nodeMaterialCompilationState';
 
+/**
+ * Block used to transform a vector3 with a matrix
+ */
 export class Vector3TransformBlock extends NodeMaterialBlock {
     /**
      * Defines the value to use to complement Vector3 to transform it to a Vector4
      */
     public complement = 1;
 
+    /**
+     * Creates a new Vector4TransformBlock
+     * @param name defines the block name
+     */
     public constructor(name: string) {
         super(name);
 
@@ -16,6 +23,10 @@ export class Vector3TransformBlock extends NodeMaterialBlock {
         this.registerExitPoint("output", NodeMaterialBlockConnectionPointTypes.Vector4);
     }
 
+    /**
+     * Compile the block
+     * @param state defines the current compilation state
+     */
     public compile(state: NodeMaterialCompilationState) {
         super.compile(state);
 

+ 11 - 0
src/Materials/Node/Blocks/Vertex/vector4TransformBlock.ts

@@ -2,8 +2,15 @@ import { NodeMaterialBlock } from '../../nodeMaterialBlock';
 import { NodeMaterialBlockConnectionPointTypes } from '../../nodeMaterialBlockConnectionPointTypes';
 import { NodeMaterialCompilationState } from '../../nodeMaterialCompilationState';
 
+/**
+ * Block used to transform a vector4 with a matrix
+ */
 export class Vector4TransformBlock extends NodeMaterialBlock {
 
+    /**
+     * Creates a new Vector4TransformBlock
+     * @param name defines the block name
+     */
     public constructor(name: string) {
         super(name);
 
@@ -12,6 +19,10 @@ export class Vector4TransformBlock extends NodeMaterialBlock {
         this.registerExitPoint("output", NodeMaterialBlockConnectionPointTypes.Vector4);
     }
 
+    /**
+     * Compile the block
+     * @param state defines the current compilation state
+     */
     public compile(state: NodeMaterialCompilationState) {
         super.compile(state);
 

+ 13 - 1
src/Materials/Node/Blocks/Vertex/vertexOutputBlock.ts

@@ -1,14 +1,26 @@
 import { NodeMaterialBlock } from '../../nodeMaterialBlock';
 import { NodeMaterialBlockConnectionPointTypes } from '../../nodeMaterialBlockConnectionPointTypes';
-import { NodeMaterialCompilationState } from 'Materials/Node/nodeMaterialCompilationState';
+import { NodeMaterialCompilationState } from '../../nodeMaterialCompilationState';
 
+/**
+ * Block used to output the vertex position
+ */
 export class VertexOutputBlock extends NodeMaterialBlock {
+
+    /**
+     * Creates a new VertexOutputBlock
+     * @param name defines the block name
+     */
     public constructor(name: string) {
         super(name);
 
         this.registerEntryPoint("vector", NodeMaterialBlockConnectionPointTypes.Vector3);
     }
 
+    /**
+     * Compile the block
+     * @param state defines the current compilation state
+     */
     public compile(state: NodeMaterialCompilationState) {
         super.compile(state);
 

+ 60 - 23
src/Materials/Node/nodeMaterial.ts

@@ -11,11 +11,23 @@ import { BaseTexture } from '../../Materials/Textures/baseTexture';
 import { NodeMaterialConnectionPoint } from './nodeMaterialBlockConnectionPoint';
 import { NodeMaterialBlockConnectionPointTypes } from './nodeMaterialBlockConnectionPointTypes';
 
+/**
+ * Class used to configure NodeMaterial
+ */
 export interface INodeMaterialOptions {
-    needAlphaBlending: boolean,
-    needAlphaTesting: boolean
+    /**
+     * Defines if the material needs alpha blending
+     */
+    needAlphaBlending: boolean;
+    /**
+     * Defines if the material needs alpha testing
+     */
+    needAlphaTesting: boolean;
 }
 
+/**
+ * Class used to create a node based material built by assembling shader blocks
+ */
 export class NodeMaterial extends Material {
     private _options: INodeMaterialOptions;
     private _vertexCompilationState: NodeMaterialCompilationState;
@@ -25,17 +37,17 @@ export class NodeMaterial extends Material {
     private _effectCompileId: number = 0;
     private _cachedWorldViewMatrix = new Matrix();
     private _cachedWorldViewProjectionMatrix = new Matrix();
-    private _textureConnectionPoints = new Array<NodeMaterialConnectionPoint>()
+    private _textureConnectionPoints = new Array<NodeMaterialConnectionPoint>();
 
     /**
-     * Gets or sets the root node of the material vertex shader
+     * Gets or sets the root nodes of the material vertex shader
      */
-    public vertexRootNode: NodeMaterialBlock;
+    public vertexRootNodes = new Array<NodeMaterialBlock>();
 
     /**
-     * Gets or sets the root node of the material fragment (pixel) shader
+     * Gets or sets the root nodes of the material fragment (pixel) shader
      */
-    public fragmentRootNode: NodeMaterialBlock;
+    public fragmentRootNodes = new Array<NodeMaterialBlock>();
 
     /** Gets or sets options to control the node material overall behavior */
     public get options() {
@@ -46,6 +58,12 @@ export class NodeMaterial extends Material {
         this._options = options;
     }
 
+    /**
+     * Create a new node based material
+     * @param name defines the material name
+     * @param scene defines the hosting scene
+     * @param options defines creation option
+     */
     constructor(name: string, scene?: Scene, options: Partial<INodeMaterialOptions> = {}) {
         super(name, scene || Engine.LastCreatedScene!);
 
@@ -65,15 +83,31 @@ export class NodeMaterial extends Material {
     }
 
     /**
+     * Specifies if the material will require alpha blending
+     * @returns a boolean specifying if alpha blending is needed
+     */
+    public needAlphaBlending(): boolean {
+        return (this.alpha < 1.0) || this._options.needAlphaBlending;
+    }
+
+    /**
+     * Specifies if this material should be rendered in alpha test mode
+     * @returns a boolean specifying if an alpha test is needed.
+     */
+    public needAlphaTesting(): boolean {
+        return this._options.needAlphaTesting;
+    }
+
+    /**
      * Compile the material and generates the inner effect
      */
     public compile() {
-        if (!this.vertexRootNode) {
-            throw "You must define a vertexRootNode";
+        if (this.vertexRootNodes.length === 0) {
+            throw "You must define at least one vertexRootNode";
         }
 
-        if (!this.fragmentRootNode) {
-            throw "You must define a fragmentRootNode";
+        if (this.fragmentRootNodes.length === 0) {
+            throw "You must define at least one fragmentRootNode";
         }
 
         // Go through the nodes and do some magic :)
@@ -82,18 +116,22 @@ export class NodeMaterial extends Material {
         // Vertex
         this._vertexCompilationState = new NodeMaterialCompilationState();
 
-        this.vertexRootNode.compile(this._vertexCompilationState);
-        this.vertexRootNode.compileChildren(this._vertexCompilationState);
+        for (var vertexRootNode of this.vertexRootNodes) {
+            vertexRootNode.compile(this._vertexCompilationState);
+            vertexRootNode.compileChildren(this._vertexCompilationState);
+        }
 
         // Fragment
         this._fragmentCompilationState = new NodeMaterialCompilationState();
         this._fragmentCompilationState.isInFragmentMode = true;
-        this._fragmentCompilationState.vertexState = this._vertexCompilationState;
+        this._fragmentCompilationState._vertexState = this._vertexCompilationState;
         this._fragmentCompilationState.hints = this._vertexCompilationState.hints;
-        this._fragmentCompilationState.uniformConnectionPoints = this._vertexCompilationState.uniformConnectionPoints;
+        this._fragmentCompilationState._uniformConnectionPoints = this._vertexCompilationState._uniformConnectionPoints;
 
-        this.fragmentRootNode.compile(this._fragmentCompilationState);
-        this.fragmentRootNode.compileChildren(this._fragmentCompilationState);
+        for (var fragmentRootNode of this.fragmentRootNodes) {
+            fragmentRootNode.compile(this._fragmentCompilationState);
+            fragmentRootNode.compileChildren(this._fragmentCompilationState);
+        }
 
         // Finalize
         this._vertexCompilationState.varyings = this._fragmentCompilationState.varyings;
@@ -101,7 +139,7 @@ export class NodeMaterial extends Material {
         this._fragmentCompilationState.finalize();
 
         // Textures
-        this._textureConnectionPoints = this._fragmentCompilationState.uniformConnectionPoints.filter(u => u.type === NodeMaterialBlockConnectionPointTypes.Texture);
+        this._textureConnectionPoints = this._fragmentCompilationState._uniformConnectionPoints.filter((u) => u.type === NodeMaterialBlockConnectionPointTypes.Texture);
 
         this._compileId++;
     }
@@ -141,7 +179,7 @@ export class NodeMaterial extends Material {
         // Uniforms
         let mergedUniforms = this._vertexCompilationState.uniforms;
 
-        this._fragmentCompilationState.uniforms.forEach(u => {
+        this._fragmentCompilationState.uniforms.forEach((u) => {
             let index = mergedUniforms.indexOf(u);
 
             if (index === -1) {
@@ -153,7 +191,7 @@ export class NodeMaterial extends Material {
         // Samplers
         let mergedSamplers = this._vertexCompilationState.samplers;
 
-        this._fragmentCompilationState.samplers.forEach(s => {
+        this._fragmentCompilationState.samplers.forEach((s) => {
             let index = mergedSamplers.indexOf(s);
 
             if (index === -1) {
@@ -212,7 +250,7 @@ export class NodeMaterial extends Material {
         }
 
         if (hints.needWorldViewProjectionMatrix) {
-            world.multiplyToRef(scene.getTransformMatrix(), this._cachedWorldViewProjectionMatrix)
+            world.multiplyToRef(scene.getTransformMatrix(), this._cachedWorldViewProjectionMatrix);
             this._effect.setMatrix("worldViewProjection", this._cachedWorldViewProjectionMatrix);
         }
     }
@@ -241,7 +279,7 @@ export class NodeMaterial extends Material {
                 this._effect.setMatrix("viewProjection", this.getScene().getTransformMatrix());
             }
 
-            for (var connectionPoint of this._fragmentCompilationState.uniformConnectionPoints) {
+            for (var connectionPoint of this._fragmentCompilationState._uniformConnectionPoints) {
                 connectionPoint.transmit(this._effect);
             }
         }
@@ -249,7 +287,6 @@ export class NodeMaterial extends Material {
         this._afterBind(mesh);
     }
 
-
     /**
      * Gets the active textures from the material
      * @returns an array of textures

+ 35 - 7
src/Materials/Node/nodeMaterialBlock.ts

@@ -2,9 +2,14 @@ import { NodeMaterialConnectionPoint } from './nodeMaterialBlockConnectionPoint'
 import { NodeMaterialBlockConnectionPointTypes } from './nodeMaterialBlockConnectionPointTypes';
 import { NodeMaterialCompilationState } from './nodeMaterialCompilationState';
 
+/**
+ * Defines a block that can be used inside a node based material
+ */
 export class NodeMaterialBlock {
-    public _entryPoints = new Array<NodeMaterialConnectionPoint>();
-    public _exitPoints = new Array<NodeMaterialConnectionPoint>();
+    /** @hidden */
+    protected _entryPoints = new Array<NodeMaterialConnectionPoint>();
+    /** @hidden */
+    protected _exitPoints = new Array<NodeMaterialConnectionPoint>();
 
     /**
      * Gets or sets the name of the block
@@ -29,7 +34,7 @@ export class NodeMaterialBlock {
      * @returns the entry point or null if not found
      */
     public getEntryPointByName(name: string) {
-        let filter = this._entryPoints.filter(e => e.name === name);
+        let filter = this._entryPoints.filter((e) => e.name === name);
 
         if (filter.length) {
             return filter[0];
@@ -44,7 +49,7 @@ export class NodeMaterialBlock {
      * @returns the exit point or null if not found
      */
     public getExitPointByName(name: string) {
-        let filter = this._exitPoints.filter(e => e.name === name);
+        let filter = this._exitPoints.filter((e) => e.name === name);
 
         if (filter.length) {
             return filter[0];
@@ -53,14 +58,27 @@ export class NodeMaterialBlock {
         return null;
     }
 
+    /**
+     * Creates a new NodeMaterialBlock
+     * @param name defines the block name
+     */
     public constructor(name: string) {
         this.name = name;
     }
 
+    /**
+     * Gets the current class name e.g. "NodeMaterialBlock"
+     * @returns the class name
+     */
     public getClassName() {
         return "NodeMaterialBlock";
     }
 
+    /**
+     * Register a new entry point. Must be called inside a block constructor
+     * @param name defines the connection point name
+     * @param type defines the connection point type
+     */
     public registerEntryPoint(name: string, type: NodeMaterialBlockConnectionPointTypes) {
         let point = new NodeMaterialConnectionPoint(name, this);
         point.type = type;
@@ -68,6 +86,11 @@ export class NodeMaterialBlock {
         this._entryPoints.push(point);
     }
 
+    /**
+     * Register a new exit point. Must be called inside a block constructor
+     * @param name defines the connection point name
+     * @param type defines the connection point type
+     */
     public registerExitPoint(name: string, type: NodeMaterialBlockConnectionPointTypes) {
         let point = new NodeMaterialConnectionPoint(name, this);
         point.type = type;
@@ -77,6 +100,7 @@ export class NodeMaterialBlock {
 
     /**
      * Will return the first available entry point e.g. the first one which is not an uniform or an attribute
+     * @returns the first available entry point or null
      */
     public getFirstAvailableEntryPoint() {
         for (var entryPoint of this._entryPoints) {
@@ -113,15 +137,19 @@ export class NodeMaterialBlock {
      */
     public compile(state: NodeMaterialCompilationState) {
         for (var entryPoint of this._entryPoints) {
-            state.emitUniformOrAttributes(entryPoint);
+            state._emitUniformOrAttributes(entryPoint);
         }
 
         for (var exitPoint of this._exitPoints) {
-            exitPoint.associatedVariableName = state.getFreeVariableName(exitPoint.name);
-            state.emitVaryings(exitPoint);
+            exitPoint.associatedVariableName = state._getFreeVariableName(exitPoint.name);
+            state._emitVaryings(exitPoint);
         }
     }
 
+    /**
+     * Compile the block children
+     * @param state defines the current compilation state
+     */
     public compileChildren(state: NodeMaterialCompilationState) {
         // Compile blocks
         for (var exitPoint of this._exitPoints) {

+ 14 - 2
src/Materials/Node/nodeMaterialBlockConnectionPoint.ts

@@ -3,6 +3,9 @@ import { NodeMaterialBlock } from './nodeMaterialBlock';
 import { Nullable } from '../../types';
 import { Effect } from '../effect';
 
+/**
+ * Defines a connection point for a block
+ */
 export class NodeMaterialConnectionPoint {
     private _ownerBlock: NodeMaterialBlock;
     private _connectedPoint: Nullable<NodeMaterialConnectionPoint>;
@@ -46,14 +49,14 @@ export class NodeMaterialConnectionPoint {
         this._associatedVariableName = value;
     }
 
-    /** 
+    /**
      * Gets or sets a boolean indicating that this connection point is coming from an uniform.
      * In this case the connection point name must be the name of the uniform to use.
      * Can only be set on entry points
      */
     public isUniform: boolean;
 
-    /** 
+    /**
      * Gets or sets a boolean indicating that this connection point is coming from an attribute.
      * In this case the connection point name must be the name of the attribute to use
      * Can only be set on entry points
@@ -85,6 +88,11 @@ export class NodeMaterialConnectionPoint {
         return this._connectedPoint.ownerBlock;
     }
 
+    /**
+     * Creates a new connection point
+     * @param name defines the connection point name
+     * @param ownerBlock defines the block hosting this connection point
+     */
     public constructor(name: string, ownerBlock: NodeMaterialBlock) {
         this._ownerBlock = ownerBlock;
         this.name = name;
@@ -98,6 +106,10 @@ export class NodeMaterialConnectionPoint {
         return "NodeMaterialConnectionPoint";
     }
 
+    /**
+     * Connect this point to another connection point
+     * @param connectionPoint defines the other connection point
+     */
     public connectTo(connectionPoint: NodeMaterialConnectionPoint) {
         this._connectedPoint = connectionPoint;
         connectionPoint._connectedPoint = this;

+ 12 - 0
src/Materials/Node/nodeMaterialBlockConnectionPointTypes.ts

@@ -1,11 +1,23 @@
+/**
+ * Defines the kind of connection point for node based material
+ */
 export enum NodeMaterialBlockConnectionPointTypes {
+    /** Float */
     Float,
+    /** Int */
     Int,
+    /** Vector2 */
     Vector2,
+    /** Vector3 */
     Vector3,
+    /** Vector4 */
     Vector4,
+    /** Color3 */
     Color3,
+    /** Color4 */
     Color4,
+    /** Matrix */
     Matrix,
+    /** Texture */
     Texture
 }

+ 54 - 18
src/Materials/Node/nodeMaterialCompilationState.ts

@@ -1,17 +1,43 @@
 import { NodeMaterialConnectionPoint } from './nodeMaterialBlockConnectionPoint';
 import { NodeMaterialBlockConnectionPointTypes } from './nodeMaterialBlockConnectionPointTypes';
 
+/**
+ * Class used to store node based material compilation state
+ */
 export class NodeMaterialCompilationState {
+    /**
+     * Gets the list of emitted attributes
+     */
     public attributes = new Array<string>();
+    /**
+     * Gets the list of emitted uniforms
+     */
     public uniforms = new Array<string>();
+    /**
+     * Gets the list of emitted samplers
+     */
     public samplers = new Array<string>();
-    public variableNames: { [key: string]: number } = {};
-    public uniformConnectionPoints = new Array<NodeMaterialConnectionPoint>();
+    /**
+     * Gets the list of emitted varyings
+     */
     public varyings = new Array<string>();
+    /**
+     * Gets a boolean indicating if this state was emitted for a fragment shader
+     */
     public isInFragmentMode = false;
 
-    public vertexState: NodeMaterialCompilationState;
+    /** @hidden */
+    public _variableNames: { [key: string]: number } = {};
 
+    /** @hidden */
+    public _uniformConnectionPoints = new Array<NodeMaterialConnectionPoint>();
+
+    /** @hidden */
+    public _vertexState: NodeMaterialCompilationState;
+
+    /**
+     * Gets the compilation hints emitted at compilation time
+     */
     public hints = {
         needWorldMatrix: false,
         needViewMatrix: false,
@@ -19,7 +45,7 @@ export class NodeMaterialCompilationState {
         needViewProjectionMatrix: false,
         needWorldViewMatrix: false,
         needWorldViewProjectionMatrix: false
-    }
+    };
 
     private _attributeDeclaration = "";
     private _uniformDeclaration = "";
@@ -27,8 +53,14 @@ export class NodeMaterialCompilationState {
     private _varyingDeclaration = "";
     private _varyingTransfer = "";
 
+    /**
+     * Gets the emitted compilation strings
+     */
     public compilationString = "";
 
+    /**
+     * Finalize the compilation strings
+     */
     public finalize() {
         this.compilationString = `\r\n//Entry point\r\nvoid main(void) {\r\n${this.compilationString}`;
 
@@ -55,16 +87,18 @@ export class NodeMaterialCompilationState {
         }
     }
 
-    public getFreeVariableName(prefix: string): string {
-        if (this.variableNames[prefix] === undefined) {
-            this.variableNames[prefix] = 0;
+    /** @hidden */
+    public _getFreeVariableName(prefix: string): string {
+        if (this._variableNames[prefix] === undefined) {
+            this._variableNames[prefix] = 0;
         } else {
-            this.variableNames[prefix]++;
+            this._variableNames[prefix]++;
         }
 
-        return prefix + this.variableNames[prefix];
+        return prefix + this._variableNames[prefix];
     }
 
+    /** @hidden */
     private _getGLType(type: NodeMaterialBlockConnectionPointTypes): string {
         switch (type) {
             case NodeMaterialBlockConnectionPointTypes.Float:
@@ -86,7 +120,8 @@ export class NodeMaterialCompilationState {
         }
     }
 
-    public emitVaryings(point: NodeMaterialConnectionPoint, force = false) {
+    /** @hidden */
+    public _emitVaryings(point: NodeMaterialConnectionPoint, force = false) {
         if (point.isVarying || force) {
             if (this.varyings.indexOf(point.associatedVariableName) !== -1) {
                 return;
@@ -101,10 +136,11 @@ export class NodeMaterialCompilationState {
         }
     }
 
-    public emitUniformOrAttributes(point: NodeMaterialConnectionPoint) {
+    /** @hidden */
+    public _emitUniformOrAttributes(point: NodeMaterialConnectionPoint) {
         // Samplers
         if (point.type === NodeMaterialBlockConnectionPointTypes.Texture) {
-            point.name = this.getFreeVariableName(point.name);
+            point.name = this._getFreeVariableName(point.name);
             point.associatedVariableName = point.name;
 
             if (this.samplers.indexOf(point.name) !== -1) {
@@ -113,7 +149,7 @@ export class NodeMaterialCompilationState {
 
             this.samplers.push(point.name);
             this._samplerDeclaration += `uniform ${this._getGLType(point.type)} ${point.name};\r\n`;
-            this.uniformConnectionPoints.push(point);
+            this._uniformConnectionPoints.push(point);
             return;
         }
 
@@ -153,7 +189,7 @@ export class NodeMaterialCompilationState {
                     this.hints.needWorldViewProjectionMatrix = true;
                     break;
                 default:
-                    this.uniformConnectionPoints.push(point);
+                    this._uniformConnectionPoints.push(point);
                     break;
             }
 
@@ -162,10 +198,10 @@ export class NodeMaterialCompilationState {
 
         if (point.isAttribute) {
             if (this.isInFragmentMode) {
-                this.vertexState.emitUniformOrAttributes(point);
-                point.associatedVariableName = this.getFreeVariableName(point.name);
-                this.emitVaryings(point, true);
-                this.vertexState.emitVaryings(point, true);
+                this._vertexState._emitUniformOrAttributes(point);
+                point.associatedVariableName = this._getFreeVariableName(point.name);
+                this._emitVaryings(point, true);
+                this._vertexState._emitVaryings(point, true);
                 return;
             }
 

+ 1 - 1
src/Materials/index.ts

@@ -14,4 +14,4 @@ export * from "./standardMaterial";
 export * from "./Textures/index";
 export * from "./uniformBuffer";
 export * from "./materialFlags";
-export * from "./Node/index"
+export * from "./Node/index";

+ 1 - 1
src/Materials/shaderMaterial.ts

@@ -515,7 +515,7 @@ export class ShaderMaterial extends Material {
         }
 
         if (this._options.uniforms.indexOf("worldViewProjection") !== -1) {
-            world.multiplyToRef(scene.getTransformMatrix(), this._cachedWorldViewProjectionMatrix)
+            world.multiplyToRef(scene.getTransformMatrix(), this._cachedWorldViewProjectionMatrix);
             this._effect.setMatrix("worldViewProjection", this._cachedWorldViewProjectionMatrix);
 
         }