David Catuhe 6 anos atrás
pai
commit
b1a541bb15

+ 51 - 0
Playground/babylon.d.txt

@@ -51905,6 +51905,12 @@ declare module BABYLON {
             [key: string]: string;
             [key: string]: string;
         };
         };
         /**
         /**
+         * Gets the list of emitted extensions
+         */
+        extensions: {
+            [key: string]: string;
+        };
+        /**
          * Gets the target of the compilation state
          * Gets the target of the compilation state
          */
          */
         target: NodeMaterialBlockTargets;
         target: NodeMaterialBlockTargets;
@@ -51939,6 +51945,7 @@ declare module BABYLON {
         /** @hidden */
private _getFreeDefineName(prefix: string): string;
         /** @hidden */
private _getFreeDefineName(prefix: string): string;
         /** @hidden */
private _excludeVariableName(name: string): void;
         /** @hidden */
private _excludeVariableName(name: string): void;
         /** @hidden */
private _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         /** @hidden */
private _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
+        /** @hidden */
private _emitExtension(name: string, extension: string): void;
         /** @hidden */
private _emitFunction(name: string, code: string, comments: string): void;
         /** @hidden */
private _emitFunction(name: string, code: string, comments: string): void;
         /** @hidden */
private _emitCodeFromInclude(includeName: string, comments: string, options?: {
         /** @hidden */
private _emitCodeFromInclude(includeName: string, comments: string, options?: {
             replaceStrings?: {
             replaceStrings?: {
@@ -52667,6 +52674,50 @@ declare module BABYLON {
 }
 }
 declare module BABYLON {
 declare module BABYLON {
     /**
     /**
+     * Block used to pertub normals based on a normal map
+     */
+    export class PertubNormalBlock extends NodeMaterialBlock {
+        /**
+         * Create a new PertubNormalBlock
+         * @param name defines the block name
+         */
+        constructor(name: string);
+        /**
+         * Gets the current class name
+         * @returns the class name
+         */
+        getClassName(): string;
+        /**
+         * Gets the world position input component
+         */
+        readonly worldPosition: NodeMaterialConnectionPoint;
+        /**
+         * Gets the world normal input component
+         */
+        readonly worldNormal: NodeMaterialConnectionPoint;
+        /**
+         * Gets the uv input component
+         */
+        readonly uv: NodeMaterialConnectionPoint;
+        /**
+        * Gets the normal map color input component
+        */
+        readonly normalMapColor: NodeMaterialConnectionPoint;
+        /**
+        * Gets the strength input component
+        */
+        readonly strength: NodeMaterialConnectionPoint;
+        /**
+         * Gets the output component
+         */
+        readonly output: NodeMaterialConnectionPoint;
+        prepareDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines): void;
+        autoConfigure(material: NodeMaterial): void;
+        protected _buildBlock(state: NodeMaterialBuildState): this;
+    }
+}
+declare module BABYLON {
+    /**
      * Block used to add support for scene fog
      * Block used to add support for scene fog
      */
      */
     export class FogBlock extends NodeMaterialBlock {
     export class FogBlock extends NodeMaterialBlock {

+ 1 - 2
dist/gui/readme.md

@@ -26,8 +26,7 @@ If using TypeScript, the typing needs to be added to tsconfig.json:
     ....
     ....
     "types": [
     "types": [
         "babylonjs",
         "babylonjs",
-        "babylonjs-gui",
-        "angularFTW"
+        "babylonjs-gui"
     ],
     ],
     ....
     ....
 ```
 ```

+ 52 - 22
dist/preview release/babylon.d.ts

@@ -52700,6 +52700,12 @@ declare module BABYLON {
             [key: string]: string;
             [key: string]: string;
         };
         };
         /**
         /**
+         * Gets the list of emitted extensions
+         */
+        extensions: {
+            [key: string]: string;
+        };
+        /**
          * Gets the target of the compilation state
          * Gets the target of the compilation state
          */
          */
         target: NodeMaterialBlockTargets;
         target: NodeMaterialBlockTargets;
@@ -52746,6 +52752,8 @@ declare module BABYLON {
         /** @hidden */
         /** @hidden */
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         /** @hidden */
         /** @hidden */
+        _emitExtension(name: string, extension: string): void;
+        /** @hidden */
         _emitFunction(name: string, code: string, comments: string): void;
         _emitFunction(name: string, code: string, comments: string): void;
         /** @hidden */
         /** @hidden */
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
@@ -53496,6 +53504,50 @@ declare module BABYLON {
 }
 }
 declare module BABYLON {
 declare module BABYLON {
     /**
     /**
+     * Block used to pertub normals based on a normal map
+     */
+    export class PertubNormalBlock extends NodeMaterialBlock {
+        /**
+         * Create a new PertubNormalBlock
+         * @param name defines the block name
+         */
+        constructor(name: string);
+        /**
+         * Gets the current class name
+         * @returns the class name
+         */
+        getClassName(): string;
+        /**
+         * Gets the world position input component
+         */
+        readonly worldPosition: NodeMaterialConnectionPoint;
+        /**
+         * Gets the world normal input component
+         */
+        readonly worldNormal: NodeMaterialConnectionPoint;
+        /**
+         * Gets the uv input component
+         */
+        readonly uv: NodeMaterialConnectionPoint;
+        /**
+        * Gets the normal map color input component
+        */
+        readonly normalMapColor: NodeMaterialConnectionPoint;
+        /**
+        * Gets the strength input component
+        */
+        readonly strength: NodeMaterialConnectionPoint;
+        /**
+         * Gets the output component
+         */
+        readonly output: NodeMaterialConnectionPoint;
+        prepareDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines): void;
+        autoConfigure(material: NodeMaterial): void;
+        protected _buildBlock(state: NodeMaterialBuildState): this;
+    }
+}
+declare module BABYLON {
+    /**
      * Block used to add support for scene fog
      * Block used to add support for scene fog
      */
      */
     export class FogBlock extends NodeMaterialBlock {
     export class FogBlock extends NodeMaterialBlock {
@@ -53589,28 +53641,6 @@ declare module BABYLON {
 }
 }
 declare module BABYLON {
 declare module BABYLON {
     /**
     /**
-     * Block used to pertub normals based on a normal map
-     */
-    export class PertubNormalBlock extends NodeMaterialBlock {
-        /**
-         * Create a new PertubNormalBlock
-         * @param name defines the block name
-         */
-        constructor(name: string);
-        /**
-         * Gets the current class name
-         * @returns the class name
-         */
-        getClassName(): string;
-        /**
-         * Gets the output component
-         */
-        readonly output: NodeMaterialConnectionPoint;
-        protected _buildBlock(state: NodeMaterialBuildState): this;
-    }
-}
-declare module BABYLON {
-    /**
      * Block used to multiply 2 values
      * Block used to multiply 2 values
      */
      */
     export class MultiplyBlock extends NodeMaterialBlock {
     export class MultiplyBlock extends NodeMaterialBlock {

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/babylon.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 209 - 104
dist/preview release/babylon.max.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/babylon.max.js.map


+ 110 - 48
dist/preview release/babylon.module.d.ts

@@ -55161,6 +55161,12 @@ declare module "babylonjs/Materials/Node/nodeMaterialBuildState" {
             [key: string]: string;
             [key: string]: string;
         };
         };
         /**
         /**
+         * Gets the list of emitted extensions
+         */
+        extensions: {
+            [key: string]: string;
+        };
+        /**
          * Gets the target of the compilation state
          * Gets the target of the compilation state
          */
          */
         target: NodeMaterialBlockTargets;
         target: NodeMaterialBlockTargets;
@@ -55207,6 +55213,8 @@ declare module "babylonjs/Materials/Node/nodeMaterialBuildState" {
         /** @hidden */
         /** @hidden */
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         /** @hidden */
         /** @hidden */
+        _emitExtension(name: string, extension: string): void;
+        /** @hidden */
         _emitFunction(name: string, code: string, comments: string): void;
         _emitFunction(name: string, code: string, comments: string): void;
         /** @hidden */
         /** @hidden */
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
@@ -56027,10 +56035,60 @@ declare module "babylonjs/Materials/Node/Blocks/Fragment/imageProcessingBlock" {
         protected _buildBlock(state: NodeMaterialBuildState): this;
         protected _buildBlock(state: NodeMaterialBuildState): this;
     }
     }
 }
 }
+declare module "babylonjs/Materials/Node/Blocks/Fragment/pertubNormalBlock" {
+    import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
+    import { NodeMaterialBuildState } from "babylonjs/Materials/Node/nodeMaterialBuildState";
+    import { NodeMaterialConnectionPoint } from "babylonjs/Materials/Node/nodeMaterialBlockConnectionPoint";
+    import { NodeMaterial, NodeMaterialDefines } from "babylonjs/Materials/Node/nodeMaterial";
+    import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
+    /**
+     * Block used to pertub normals based on a normal map
+     */
+    export class PertubNormalBlock extends NodeMaterialBlock {
+        /**
+         * Create a new PertubNormalBlock
+         * @param name defines the block name
+         */
+        constructor(name: string);
+        /**
+         * Gets the current class name
+         * @returns the class name
+         */
+        getClassName(): string;
+        /**
+         * Gets the world position input component
+         */
+        readonly worldPosition: NodeMaterialConnectionPoint;
+        /**
+         * Gets the world normal input component
+         */
+        readonly worldNormal: NodeMaterialConnectionPoint;
+        /**
+         * Gets the uv input component
+         */
+        readonly uv: NodeMaterialConnectionPoint;
+        /**
+        * Gets the normal map color input component
+        */
+        readonly normalMapColor: NodeMaterialConnectionPoint;
+        /**
+        * Gets the strength input component
+        */
+        readonly strength: NodeMaterialConnectionPoint;
+        /**
+         * Gets the output component
+         */
+        readonly output: NodeMaterialConnectionPoint;
+        prepareDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines): void;
+        autoConfigure(material: NodeMaterial): void;
+        protected _buildBlock(state: NodeMaterialBuildState): this;
+    }
+}
 declare module "babylonjs/Materials/Node/Blocks/Fragment/index" {
 declare module "babylonjs/Materials/Node/Blocks/Fragment/index" {
     export * from "babylonjs/Materials/Node/Blocks/Fragment/fragmentOutputBlock";
     export * from "babylonjs/Materials/Node/Blocks/Fragment/fragmentOutputBlock";
     export * from "babylonjs/Materials/Node/Blocks/Fragment/alphaTestBlock";
     export * from "babylonjs/Materials/Node/Blocks/Fragment/alphaTestBlock";
     export * from "babylonjs/Materials/Node/Blocks/Fragment/imageProcessingBlock";
     export * from "babylonjs/Materials/Node/Blocks/Fragment/imageProcessingBlock";
+    export * from "babylonjs/Materials/Node/Blocks/Fragment/pertubNormalBlock";
 }
 }
 declare module "babylonjs/Materials/Node/Blocks/Dual/fogBlock" {
 declare module "babylonjs/Materials/Node/Blocks/Dual/fogBlock" {
     import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
     import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
@@ -56142,37 +56200,11 @@ declare module "babylonjs/Materials/Node/Blocks/Dual/lightBlock" {
         _deserialize(serializationObject: any, scene: Scene, rootUrl: string): void;
         _deserialize(serializationObject: any, scene: Scene, rootUrl: string): void;
     }
     }
 }
 }
-declare module "babylonjs/Materials/Node/Blocks/Dual/pertubNormalBlock" {
-    import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
-    import { NodeMaterialBuildState } from "babylonjs/Materials/Node/nodeMaterialBuildState";
-    import { NodeMaterialConnectionPoint } from "babylonjs/Materials/Node/nodeMaterialBlockConnectionPoint";
-    /**
-     * Block used to pertub normals based on a normal map
-     */
-    export class PertubNormalBlock extends NodeMaterialBlock {
-        /**
-         * Create a new PertubNormalBlock
-         * @param name defines the block name
-         */
-        constructor(name: string);
-        /**
-         * Gets the current class name
-         * @returns the class name
-         */
-        getClassName(): string;
-        /**
-         * Gets the output component
-         */
-        readonly output: NodeMaterialConnectionPoint;
-        protected _buildBlock(state: NodeMaterialBuildState): this;
-    }
-}
 declare module "babylonjs/Materials/Node/Blocks/Dual/index" {
 declare module "babylonjs/Materials/Node/Blocks/Dual/index" {
     export * from "babylonjs/Materials/Node/Blocks/Dual/fogBlock";
     export * from "babylonjs/Materials/Node/Blocks/Dual/fogBlock";
     export * from "babylonjs/Materials/Node/Blocks/Dual/lightBlock";
     export * from "babylonjs/Materials/Node/Blocks/Dual/lightBlock";
     export * from "babylonjs/Materials/Node/Blocks/Dual/textureBlock";
     export * from "babylonjs/Materials/Node/Blocks/Dual/textureBlock";
     export * from "babylonjs/Materials/Node/Blocks/Dual/reflectionTextureBlock";
     export * from "babylonjs/Materials/Node/Blocks/Dual/reflectionTextureBlock";
-    export * from "babylonjs/Materials/Node/Blocks/Dual/pertubNormalBlock";
 }
 }
 declare module "babylonjs/Materials/Node/Blocks/Input/index" {
 declare module "babylonjs/Materials/Node/Blocks/Input/index" {
     export * from "babylonjs/Materials/Node/Blocks/Input/inputBlock";
     export * from "babylonjs/Materials/Node/Blocks/Input/inputBlock";
@@ -118227,6 +118259,12 @@ declare module BABYLON {
             [key: string]: string;
             [key: string]: string;
         };
         };
         /**
         /**
+         * Gets the list of emitted extensions
+         */
+        extensions: {
+            [key: string]: string;
+        };
+        /**
          * Gets the target of the compilation state
          * Gets the target of the compilation state
          */
          */
         target: NodeMaterialBlockTargets;
         target: NodeMaterialBlockTargets;
@@ -118273,6 +118311,8 @@ declare module BABYLON {
         /** @hidden */
         /** @hidden */
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         /** @hidden */
         /** @hidden */
+        _emitExtension(name: string, extension: string): void;
+        /** @hidden */
         _emitFunction(name: string, code: string, comments: string): void;
         _emitFunction(name: string, code: string, comments: string): void;
         /** @hidden */
         /** @hidden */
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
@@ -119023,6 +119063,50 @@ declare module BABYLON {
 }
 }
 declare module BABYLON {
 declare module BABYLON {
     /**
     /**
+     * Block used to pertub normals based on a normal map
+     */
+    export class PertubNormalBlock extends NodeMaterialBlock {
+        /**
+         * Create a new PertubNormalBlock
+         * @param name defines the block name
+         */
+        constructor(name: string);
+        /**
+         * Gets the current class name
+         * @returns the class name
+         */
+        getClassName(): string;
+        /**
+         * Gets the world position input component
+         */
+        readonly worldPosition: NodeMaterialConnectionPoint;
+        /**
+         * Gets the world normal input component
+         */
+        readonly worldNormal: NodeMaterialConnectionPoint;
+        /**
+         * Gets the uv input component
+         */
+        readonly uv: NodeMaterialConnectionPoint;
+        /**
+        * Gets the normal map color input component
+        */
+        readonly normalMapColor: NodeMaterialConnectionPoint;
+        /**
+        * Gets the strength input component
+        */
+        readonly strength: NodeMaterialConnectionPoint;
+        /**
+         * Gets the output component
+         */
+        readonly output: NodeMaterialConnectionPoint;
+        prepareDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines): void;
+        autoConfigure(material: NodeMaterial): void;
+        protected _buildBlock(state: NodeMaterialBuildState): this;
+    }
+}
+declare module BABYLON {
+    /**
      * Block used to add support for scene fog
      * Block used to add support for scene fog
      */
      */
     export class FogBlock extends NodeMaterialBlock {
     export class FogBlock extends NodeMaterialBlock {
@@ -119116,28 +119200,6 @@ declare module BABYLON {
 }
 }
 declare module BABYLON {
 declare module BABYLON {
     /**
     /**
-     * Block used to pertub normals based on a normal map
-     */
-    export class PertubNormalBlock extends NodeMaterialBlock {
-        /**
-         * Create a new PertubNormalBlock
-         * @param name defines the block name
-         */
-        constructor(name: string);
-        /**
-         * Gets the current class name
-         * @returns the class name
-         */
-        getClassName(): string;
-        /**
-         * Gets the output component
-         */
-        readonly output: NodeMaterialConnectionPoint;
-        protected _buildBlock(state: NodeMaterialBuildState): this;
-    }
-}
-declare module BABYLON {
-    /**
      * Block used to multiply 2 values
      * Block used to multiply 2 values
      */
      */
     export class MultiplyBlock extends NodeMaterialBlock {
     export class MultiplyBlock extends NodeMaterialBlock {

+ 52 - 0
dist/preview release/documentation.d.ts

@@ -52700,6 +52700,12 @@ declare module BABYLON {
             [key: string]: string;
             [key: string]: string;
         };
         };
         /**
         /**
+         * Gets the list of emitted extensions
+         */
+        extensions: {
+            [key: string]: string;
+        };
+        /**
          * Gets the target of the compilation state
          * Gets the target of the compilation state
          */
          */
         target: NodeMaterialBlockTargets;
         target: NodeMaterialBlockTargets;
@@ -52746,6 +52752,8 @@ declare module BABYLON {
         /** @hidden */
         /** @hidden */
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         /** @hidden */
         /** @hidden */
+        _emitExtension(name: string, extension: string): void;
+        /** @hidden */
         _emitFunction(name: string, code: string, comments: string): void;
         _emitFunction(name: string, code: string, comments: string): void;
         /** @hidden */
         /** @hidden */
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
@@ -53496,6 +53504,50 @@ declare module BABYLON {
 }
 }
 declare module BABYLON {
 declare module BABYLON {
     /**
     /**
+     * Block used to pertub normals based on a normal map
+     */
+    export class PertubNormalBlock extends NodeMaterialBlock {
+        /**
+         * Create a new PertubNormalBlock
+         * @param name defines the block name
+         */
+        constructor(name: string);
+        /**
+         * Gets the current class name
+         * @returns the class name
+         */
+        getClassName(): string;
+        /**
+         * Gets the world position input component
+         */
+        readonly worldPosition: NodeMaterialConnectionPoint;
+        /**
+         * Gets the world normal input component
+         */
+        readonly worldNormal: NodeMaterialConnectionPoint;
+        /**
+         * Gets the uv input component
+         */
+        readonly uv: NodeMaterialConnectionPoint;
+        /**
+        * Gets the normal map color input component
+        */
+        readonly normalMapColor: NodeMaterialConnectionPoint;
+        /**
+        * Gets the strength input component
+        */
+        readonly strength: NodeMaterialConnectionPoint;
+        /**
+         * Gets the output component
+         */
+        readonly output: NodeMaterialConnectionPoint;
+        prepareDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines): void;
+        autoConfigure(material: NodeMaterial): void;
+        protected _buildBlock(state: NodeMaterialBuildState): this;
+    }
+}
+declare module BABYLON {
+    /**
      * Block used to add support for scene fog
      * Block used to add support for scene fog
      */
      */
     export class FogBlock extends NodeMaterialBlock {
     export class FogBlock extends NodeMaterialBlock {

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/nodeEditor/babylon.nodeEditor.d.ts


Diferenças do arquivo suprimidas por serem muito extensas
+ 7 - 7
dist/preview release/nodeEditor/babylon.nodeEditor.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 5 - 2
dist/preview release/nodeEditor/babylon.nodeEditor.max.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/nodeEditor/babylon.nodeEditor.max.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 3 - 2
dist/preview release/nodeEditor/babylon.nodeEditor.module.d.ts


+ 1 - 1
dist/preview release/packagesSizeBaseLine.json

@@ -1 +1 @@
-{"engineOnly":167802,"sceneOnly":508293,"minGridMaterial":638479,"minStandardMaterial":767493}
+{"engineOnly":167802,"sceneOnly":508293,"minGridMaterial":638479,"minStandardMaterial":767609}

+ 110 - 0
dist/preview release/viewer/babylon.module.d.ts

@@ -55161,6 +55161,12 @@ declare module "babylonjs/Materials/Node/nodeMaterialBuildState" {
             [key: string]: string;
             [key: string]: string;
         };
         };
         /**
         /**
+         * Gets the list of emitted extensions
+         */
+        extensions: {
+            [key: string]: string;
+        };
+        /**
          * Gets the target of the compilation state
          * Gets the target of the compilation state
          */
          */
         target: NodeMaterialBlockTargets;
         target: NodeMaterialBlockTargets;
@@ -55207,6 +55213,8 @@ declare module "babylonjs/Materials/Node/nodeMaterialBuildState" {
         /** @hidden */
         /** @hidden */
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         /** @hidden */
         /** @hidden */
+        _emitExtension(name: string, extension: string): void;
+        /** @hidden */
         _emitFunction(name: string, code: string, comments: string): void;
         _emitFunction(name: string, code: string, comments: string): void;
         /** @hidden */
         /** @hidden */
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
@@ -56027,10 +56035,60 @@ declare module "babylonjs/Materials/Node/Blocks/Fragment/imageProcessingBlock" {
         protected _buildBlock(state: NodeMaterialBuildState): this;
         protected _buildBlock(state: NodeMaterialBuildState): this;
     }
     }
 }
 }
+declare module "babylonjs/Materials/Node/Blocks/Fragment/pertubNormalBlock" {
+    import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
+    import { NodeMaterialBuildState } from "babylonjs/Materials/Node/nodeMaterialBuildState";
+    import { NodeMaterialConnectionPoint } from "babylonjs/Materials/Node/nodeMaterialBlockConnectionPoint";
+    import { NodeMaterial, NodeMaterialDefines } from "babylonjs/Materials/Node/nodeMaterial";
+    import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
+    /**
+     * Block used to pertub normals based on a normal map
+     */
+    export class PertubNormalBlock extends NodeMaterialBlock {
+        /**
+         * Create a new PertubNormalBlock
+         * @param name defines the block name
+         */
+        constructor(name: string);
+        /**
+         * Gets the current class name
+         * @returns the class name
+         */
+        getClassName(): string;
+        /**
+         * Gets the world position input component
+         */
+        readonly worldPosition: NodeMaterialConnectionPoint;
+        /**
+         * Gets the world normal input component
+         */
+        readonly worldNormal: NodeMaterialConnectionPoint;
+        /**
+         * Gets the uv input component
+         */
+        readonly uv: NodeMaterialConnectionPoint;
+        /**
+        * Gets the normal map color input component
+        */
+        readonly normalMapColor: NodeMaterialConnectionPoint;
+        /**
+        * Gets the strength input component
+        */
+        readonly strength: NodeMaterialConnectionPoint;
+        /**
+         * Gets the output component
+         */
+        readonly output: NodeMaterialConnectionPoint;
+        prepareDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines): void;
+        autoConfigure(material: NodeMaterial): void;
+        protected _buildBlock(state: NodeMaterialBuildState): this;
+    }
+}
 declare module "babylonjs/Materials/Node/Blocks/Fragment/index" {
 declare module "babylonjs/Materials/Node/Blocks/Fragment/index" {
     export * from "babylonjs/Materials/Node/Blocks/Fragment/fragmentOutputBlock";
     export * from "babylonjs/Materials/Node/Blocks/Fragment/fragmentOutputBlock";
     export * from "babylonjs/Materials/Node/Blocks/Fragment/alphaTestBlock";
     export * from "babylonjs/Materials/Node/Blocks/Fragment/alphaTestBlock";
     export * from "babylonjs/Materials/Node/Blocks/Fragment/imageProcessingBlock";
     export * from "babylonjs/Materials/Node/Blocks/Fragment/imageProcessingBlock";
+    export * from "babylonjs/Materials/Node/Blocks/Fragment/pertubNormalBlock";
 }
 }
 declare module "babylonjs/Materials/Node/Blocks/Dual/fogBlock" {
 declare module "babylonjs/Materials/Node/Blocks/Dual/fogBlock" {
     import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
     import { NodeMaterialBlock } from "babylonjs/Materials/Node/nodeMaterialBlock";
@@ -118201,6 +118259,12 @@ declare module BABYLON {
             [key: string]: string;
             [key: string]: string;
         };
         };
         /**
         /**
+         * Gets the list of emitted extensions
+         */
+        extensions: {
+            [key: string]: string;
+        };
+        /**
          * Gets the target of the compilation state
          * Gets the target of the compilation state
          */
          */
         target: NodeMaterialBlockTargets;
         target: NodeMaterialBlockTargets;
@@ -118247,6 +118311,8 @@ declare module BABYLON {
         /** @hidden */
         /** @hidden */
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
         /** @hidden */
         /** @hidden */
+        _emitExtension(name: string, extension: string): void;
+        /** @hidden */
         _emitFunction(name: string, code: string, comments: string): void;
         _emitFunction(name: string, code: string, comments: string): void;
         /** @hidden */
         /** @hidden */
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
         _emitCodeFromInclude(includeName: string, comments: string, options?: {
@@ -118997,6 +119063,50 @@ declare module BABYLON {
 }
 }
 declare module BABYLON {
 declare module BABYLON {
     /**
     /**
+     * Block used to pertub normals based on a normal map
+     */
+    export class PertubNormalBlock extends NodeMaterialBlock {
+        /**
+         * Create a new PertubNormalBlock
+         * @param name defines the block name
+         */
+        constructor(name: string);
+        /**
+         * Gets the current class name
+         * @returns the class name
+         */
+        getClassName(): string;
+        /**
+         * Gets the world position input component
+         */
+        readonly worldPosition: NodeMaterialConnectionPoint;
+        /**
+         * Gets the world normal input component
+         */
+        readonly worldNormal: NodeMaterialConnectionPoint;
+        /**
+         * Gets the uv input component
+         */
+        readonly uv: NodeMaterialConnectionPoint;
+        /**
+        * Gets the normal map color input component
+        */
+        readonly normalMapColor: NodeMaterialConnectionPoint;
+        /**
+        * Gets the strength input component
+        */
+        readonly strength: NodeMaterialConnectionPoint;
+        /**
+         * Gets the output component
+         */
+        readonly output: NodeMaterialConnectionPoint;
+        prepareDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines): void;
+        autoConfigure(material: NodeMaterial): void;
+        protected _buildBlock(state: NodeMaterialBuildState): this;
+    }
+}
+declare module BABYLON {
+    /**
      * Block used to add support for scene fog
      * Block used to add support for scene fog
      */
      */
     export class FogBlock extends NodeMaterialBlock {
     export class FogBlock extends NodeMaterialBlock {

Diferenças do arquivo suprimidas por serem muito extensas
+ 18 - 14
dist/preview release/viewer/babylon.viewer.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 0 - 1
src/Materials/Node/Blocks/Dual/fogBlock.ts

@@ -121,7 +121,6 @@ export class FogBlock extends NodeMaterialBlock {
     protected _buildBlock(state: NodeMaterialBuildState) {
     protected _buildBlock(state: NodeMaterialBuildState) {
         super._buildBlock(state);
         super._buildBlock(state);
 
 
-
         if (state.target === NodeMaterialBlockTargets.Fragment) {
         if (state.target === NodeMaterialBlockTargets.Fragment) {
             state.sharedData.blocksWithDefines.push(this);
             state.sharedData.blocksWithDefines.push(this);
             state.sharedData.bindableBlocks.push(this);
             state.sharedData.bindableBlocks.push(this);

+ 1 - 1
src/Materials/Node/Blocks/Fragment/index.ts

@@ -2,4 +2,4 @@
 export * from "./fragmentOutputBlock";
 export * from "./fragmentOutputBlock";
 export * from "./alphaTestBlock";
 export * from "./alphaTestBlock";
 export * from "./imageProcessingBlock";
 export * from "./imageProcessingBlock";
-export * from "./pertubNormalBlock"
+export * from "./pertubNormalBlock";

+ 9 - 9
src/Materials/Node/Blocks/Fragment/pertubNormalBlock.ts

@@ -20,8 +20,8 @@ export class PertubNormalBlock extends NodeMaterialBlock {
         super(name, NodeMaterialBlockTargets.Fragment);
         super(name, NodeMaterialBlockTargets.Fragment);
 
 
         // Vertex
         // Vertex
-        this.registerInput("worldPosition", NodeMaterialBlockConnectionPointTypes.Vector4, false, NodeMaterialBlockTargets.Fragment);        
-        this.registerInput("worldNormal", NodeMaterialBlockConnectionPointTypes.Vector4, false, NodeMaterialBlockTargets.Fragment);        
+        this.registerInput("worldPosition", NodeMaterialBlockConnectionPointTypes.Vector4, false, NodeMaterialBlockTargets.Fragment);
+        this.registerInput("worldNormal", NodeMaterialBlockConnectionPointTypes.Vector4, false, NodeMaterialBlockTargets.Fragment);
         this.registerInput("uv", NodeMaterialBlockConnectionPointTypes.Vector2, false, NodeMaterialBlockTargets.Fragment);
         this.registerInput("uv", NodeMaterialBlockConnectionPointTypes.Vector2, false, NodeMaterialBlockTargets.Fragment);
         this.registerInput("normalMapColor", NodeMaterialBlockConnectionPointTypes.Color3, false, NodeMaterialBlockTargets.Fragment);
         this.registerInput("normalMapColor", NodeMaterialBlockConnectionPointTypes.Color3, false, NodeMaterialBlockTargets.Fragment);
         this.registerInput("strength", NodeMaterialBlockConnectionPointTypes.Float, false, NodeMaterialBlockTargets.Fragment);
         this.registerInput("strength", NodeMaterialBlockConnectionPointTypes.Float, false, NodeMaterialBlockTargets.Fragment);
@@ -43,7 +43,7 @@ export class PertubNormalBlock extends NodeMaterialBlock {
      */
      */
     public get worldPosition(): NodeMaterialConnectionPoint {
     public get worldPosition(): NodeMaterialConnectionPoint {
         return this._inputs[0];
         return this._inputs[0];
-    }    
+    }
 
 
     /**
     /**
      * Gets the world normal input component
      * Gets the world normal input component
@@ -57,8 +57,8 @@ export class PertubNormalBlock extends NodeMaterialBlock {
      */
      */
     public get uv(): NodeMaterialConnectionPoint {
     public get uv(): NodeMaterialConnectionPoint {
         return this._inputs[2];
         return this._inputs[2];
-    }    
-    
+    }
+
     /**
     /**
     * Gets the normal map color input component
     * Gets the normal map color input component
     */
     */
@@ -100,12 +100,12 @@ export class PertubNormalBlock extends NodeMaterialBlock {
             strengthInput.value = 1.0;
             strengthInput.value = 1.0;
             strengthInput.output.connectTo(this.strength);
             strengthInput.output.connectTo(this.strength);
         }
         }
-    }    
+    }
 
 
     protected _buildBlock(state: NodeMaterialBuildState) {
     protected _buildBlock(state: NodeMaterialBuildState) {
         super._buildBlock(state);
         super._buildBlock(state);
 
 
-        let comments = `//${this.name}`;        
+        let comments = `//${this.name}`;
         let uv = this.uv;
         let uv = this.uv;
         let worldPosition = this.worldPosition;
         let worldPosition = this.worldPosition;
         let worldNormal = this.worldNormal;
         let worldNormal = this.worldNormal;
@@ -119,8 +119,8 @@ export class PertubNormalBlock extends NodeMaterialBlock {
                 { search: /vTangentSpaceParams/g, replace: "vec2(1.0, 1.0)"},
                 { search: /vTangentSpaceParams/g, replace: "vec2(1.0, 1.0)"},
                 { search: /vPositionW/g, replace: worldPosition.associatedVariableName + ".xyz"}
                 { search: /vPositionW/g, replace: worldPosition.associatedVariableName + ".xyz"}
             ]
             ]
-        });      
-        state.compilationString += this._declareOutput(this.output, state) + " = vec4(0.);\r\n";    
+        });
+        state.compilationString += this._declareOutput(this.output, state) + " = vec4(0.);\r\n";
         state.compilationString += state._emitCodeFromInclude("bumpFragment", comments, {
         state.compilationString += state._emitCodeFromInclude("bumpFragment", comments, {
             replaceStrings: [
             replaceStrings: [
                 { search: /perturbNormal\(TBN,vBumpUV\+uvOffset\)/g, replace: `perturbNormal(TBN, ${this.normalMapColor.associatedVariableName})` },
                 { search: /perturbNormal\(TBN,vBumpUV\+uvOffset\)/g, replace: `perturbNormal(TBN, ${this.normalMapColor.associatedVariableName})` },

+ 1 - 1
src/Materials/Node/nodeMaterialBuildState.ts

@@ -186,7 +186,7 @@ export class NodeMaterialBuildState {
         }
         }
 
 
         this.extensions[name] = extension;
         this.extensions[name] = extension;
-    }    
+    }
 
 
     /** @hidden */
     /** @hidden */
     public _emitFunction(name: string, code: string, comments: string) {
     public _emitFunction(name: string, code: string, comments: string) {