Ver código fonte

more individual materials

David Catuhe 6 anos atrás
pai
commit
62e826d3d6
58 arquivos alterados com 22301 adições e 645 exclusões
  1. 68 7
      Tools/Gulp/config.json
  2. 33 49
      Tools/Gulp/gulpfile.js
  3. 11475 2
      dist/preview release/gui/babylon.gui.js
  4. 1 0
      dist/preview release/gui/babylon.gui.js.map
  5. 0 564
      dist/preview release/materials/babylon.materials.module.d.ts
  6. 522 2
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  7. 1 0
      dist/preview release/materialsLibrary/babylon.cellMaterial.js.map
  8. 1 1
      dist/preview release/materialsLibrary/babylon.cellMaterial.min.js.map
  9. 392 0
      dist/preview release/materialsLibrary/babylon.customMaterial.js
  10. 1 0
      dist/preview release/materialsLibrary/babylon.customMaterial.js.map
  11. 2 0
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  12. 1 0
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js.map
  13. 559 0
      dist/preview release/materialsLibrary/babylon.fireMaterial.js
  14. 1 0
      dist/preview release/materialsLibrary/babylon.fireMaterial.js.map
  15. 2 0
      dist/preview release/materialsLibrary/babylon.fireMaterial.min.js
  16. 1 0
      dist/preview release/materialsLibrary/babylon.fireMaterial.min.js.map
  17. 531 0
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  18. 1 0
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js.map
  19. 2 0
      dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js
  20. 1 0
      dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js.map
  21. 609 0
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  22. 1 0
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js.map
  23. 2 0
      dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js
  24. 1 0
      dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js.map
  25. 6139 2
      dist/preview release/materialsLibrary/babylon.materials.js
  26. 1 0
      dist/preview release/materialsLibrary/babylon.materials.js.map
  27. 696 0
      dist/preview release/materialsLibrary/babylon.mixMaterial.js
  28. 1 0
      dist/preview release/materialsLibrary/babylon.mixMaterial.js.map
  29. 2 0
      dist/preview release/materialsLibrary/babylon.mixMaterial.min.js
  30. 1 0
      dist/preview release/materialsLibrary/babylon.mixMaterial.min.js.map
  31. 553 0
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  32. 1 0
      dist/preview release/materialsLibrary/babylon.normalMaterial.js.map
  33. 2 0
      dist/preview release/materialsLibrary/babylon.normalMaterial.min.js
  34. 1 0
      dist/preview release/materialsLibrary/babylon.normalMaterial.min.js.map
  35. 3 4
      materialsLibrary/legacy/legacy-cell.ts
  36. 14 0
      materialsLibrary/legacy/legacy-custom.ts
  37. 14 0
      materialsLibrary/legacy/legacy-fire.ts
  38. 14 0
      materialsLibrary/legacy/legacy-fur.ts
  39. 14 0
      materialsLibrary/legacy/legacy-gradient.ts
  40. 14 0
      materialsLibrary/legacy/legacy-grid.ts
  41. 14 0
      materialsLibrary/legacy/legacy-lava.ts
  42. 14 0
      materialsLibrary/legacy/legacy-mix.ts
  43. 14 0
      materialsLibrary/legacy/legacy-normal.ts
  44. 14 0
      materialsLibrary/legacy/legacy-shadowOnly.ts
  45. 0 4
      materialsLibrary/legacy/webpack.cell.config.js
  46. 63 0
      materialsLibrary/legacy/webpack.custom.config.js
  47. 63 0
      materialsLibrary/legacy/webpack.fire.config.js
  48. 63 0
      materialsLibrary/legacy/webpack.fur.js
  49. 63 0
      materialsLibrary/legacy/webpack.gradient.config.js
  50. 63 0
      materialsLibrary/legacy/webpack.grid.config.js
  51. 63 0
      materialsLibrary/legacy/webpack.lava.config.js
  52. 63 0
      materialsLibrary/legacy/webpack.mix.config.js
  53. 63 0
      materialsLibrary/legacy/webpack.normal.config.js
  54. 63 0
      materialsLibrary/legacy/webpack.shadowOnly.config.js
  55. 0 1
      postProcessLibrary/legacy/legacy-asciiArt.ts
  56. 0 1
      postProcessLibrary/legacy/legacy-digitalRain.ts
  57. 0 4
      postProcessLibrary/legacy/webpack.asciiArt.config.js
  58. 0 4
      postProcessLibrary/legacy/webpack.digitalRain.config.js

+ 68 - 7
Tools/Gulp/config.json

@@ -1481,16 +1481,72 @@
                 "bundle": "true",
                 "babylonIncluded": false,
                 "useOutputForDebugging": true,
-                "preventLoadLibrary": true
+                "preventLoadLibrary": true,
+                "isMain": true
             },
             {
-                "files": [],
                 "noBundleInName": true,
                 "output": "babylon.cellMaterial.min.js",
                 "webpack": "../../materialsLibrary/legacy/webpack.cell.config.js",
                 "bundle": "true",
                 "babylonIncluded": false,
                 "useOutputForDebugging": true
+            },
+            {
+                "noBundleInName": true,
+                "output": "babylon.customMaterial.min.js",
+                "webpack": "../../materialsLibrary/legacy/webpack.custom.config.js",
+                "bundle": "true",
+                "babylonIncluded": false,
+                "useOutputForDebugging": true
+            },
+            {
+                "noBundleInName": true,
+                "output": "babylon.fireMaterial.min.js",
+                "webpack": "../../materialsLibrary/legacy/webpack.fire.config.js",
+                "bundle": "true",
+                "babylonIncluded": false,
+                "useOutputForDebugging": true
+            },
+            {
+                "noBundleInName": true,
+                "output": "babylon.gradientMaterial.min.js",
+                "webpack": "../../materialsLibrary/legacy/webpack.gradient.config.js",
+                "bundle": "true",
+                "babylonIncluded": false,
+                "useOutputForDebugging": true
+            },
+            {
+                "noBundleInName": true,
+                "output": "babylon.lavaMaterial.min.js",
+                "webpack": "../../materialsLibrary/legacy/webpack.lava.config.js",
+                "bundle": "true",
+                "babylonIncluded": false,
+                "useOutputForDebugging": true
+            },
+            {
+                "noBundleInName": true,
+                "output": "babylon.mixMaterial.min.js",
+                "webpack": "../../materialsLibrary/legacy/webpack.mix.config.js",
+                "bundle": "true",
+                "babylonIncluded": false,
+                "useOutputForDebugging": true
+            },
+            {
+                "noBundleInName": true,
+                "output": "babylon.mixMaterial.normal.js",
+                "webpack": "../../materialsLibrary/legacy/webpack.normal.config.js",
+                "bundle": "true",
+                "babylonIncluded": false,
+                "useOutputForDebugging": true
+            },
+            {
+                "noBundleInName": true,
+                "output": "babylon.shadowOnlyMaterial.normal.js",
+                "webpack": "../../materialsLibrary/legacy/webpack.shadowOnly.config.js",
+                "bundle": "true",
+                "babylonIncluded": false,
+                "useOutputForDebugging": true
             }
         ],
         "build": {
@@ -1526,7 +1582,8 @@
                 "bundle": "true",
                 "babylonIncluded": false,
                 "useOutputForDebugging": true,
-                "preventLoadLibrary": true
+                "preventLoadLibrary": true,
+                "isMain": true
             },
             {
                 "files": [],
@@ -1579,7 +1636,8 @@
                 "webpack": "../../proceduralTexturesLibrary/webpack.config.js",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "isMain": true
             }
         ],
         "build": {
@@ -1751,7 +1809,8 @@
                 "webpack": "../../gui/webpack.config.js",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "isMain": true
             }
         ],
         "build": {
@@ -1786,7 +1845,8 @@
                 "webpack": "../../inspector/webpack.config.js",
                 "bundle": "true",
                 "extendsRoot": true,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "isMain": true
             }
         ],
         "build": {
@@ -1900,7 +1960,8 @@
                 },
                 "babylonIncluded": true,
                 "noWatch": true,
-                "preventLoadLibrary": true
+                "preventLoadLibrary": true,
+                "isMain": true
             }
         ],
         "build": {

+ 33 - 49
Tools/Gulp/gulpfile.js

@@ -674,59 +674,43 @@ var buildExternalLibrary = function(library, settings, watch) {
 
                 let wpBuild = webpackStream(wpConfig, webpack);
 
-                let buildEvent = wpBuild
-                    .pipe(gulp.dest(outputDirectory))
-                    //back-compat
-                    .pipe(through.obj(function(file, enc, cb) {
-                        // only js files
-                        const isjs = /\.js$/.test(file.path);
-                        if (isjs) this.push(file);
-                        cb();
-                    }))
-                    .pipe(rename(function(path) {
-                        console.log(path.basename);
-                        //path.extname === ".js"
-                        path.basename = path.basename.replace(".min", "")
-                    })).pipe(gulp.dest(outputDirectory));
-                sequence.push(
-                    buildEvent
-                );
-                if (settings.build.dtsBundle || settings.build.processDeclaration) {
-                    buildEvent.on("end", function() {
-                        if (settings.build.dtsBundle) {
-                            dtsBundle.bundle(settings.build.dtsBundle);
-                        }
+                let buildEvent = wpBuild.pipe(gulp.dest(outputDirectory));
+                sequence.push(buildEvent);
 
-                        if (settings.build.processDeclaration) {
-                            let fileLocation = path.join(outputDirectory, settings.build.processDeclaration.filename);
-                            fs.readFile(fileLocation, function(err, data) {
-                                if (err) throw err;
+                // Generate unminified
+                wpConfig.mode = "development";
+                wpConfig.output.filename = wpConfig.output.filename.replace(".min", "");
 
-                                // For Raanan, litteral import hack TO BETTER INTEGRATE
-                                data = data + "";
-                                data = data.replace('import "../sass/main.scss";', "");
+                wpBuild = webpackStream(wpConfig, webpack);
 
-                                var newData = processDeclaration(data, settings.build.processDeclaration);
-                                fs.writeFileSync(fileLocation.replace('.module', ''), newData);
-                                //legacy module support
-                                fs.writeFileSync(fileLocation, data + "\n" + newData);
-                            });
-                        }
-                    });
+                let buildEvent2 = wpBuild.pipe(gulp.dest(outputDirectory));
+                sequence.push(buildEvent2);
+
+                if (library.isMain) {
+                    if (settings.build.dtsBundle || settings.build.processDeclaration) {
+                        buildEvent.on("end", function() {
+                            if (settings.build.dtsBundle) {
+                                dtsBundle.bundle(settings.build.dtsBundle);
+                            }
+
+                            if (settings.build.processDeclaration) {
+                                let fileLocation = path.join(outputDirectory, settings.build.processDeclaration.filename);
+                                fs.readFile(fileLocation, function(err, data) {
+                                    if (err) throw err;
+
+                                    // For Raanan, litteral import hack TO BETTER INTEGRATE
+                                    data = data + "";
+                                    data = data.replace('import "../sass/main.scss";', "");
+
+                                    var newData = processDeclaration(data, settings.build.processDeclaration);
+                                    fs.writeFileSync(fileLocation.replace('.module', ''), newData);
+                                    //legacy module support
+                                    fs.writeFileSync(fileLocation, data + "\n" + newData);
+                                });
+                            }
+                        });
+                    }
                 }
-                /*if (settings.build.processDeclaration) {
-                    sequence.push(
-                        wpBuild
-                            .pipe(through.obj(function (file, enc, cb) {
-                                // only js files
-                                const isDts = /\.d.ts$/.test(file.path);
-                                file.contents = new Buffer(processDeclaration(file.contents, settings.build.processDeclaration));
-                                if (isDts) this.push(file);
-                                cb();
-                            }))
-                            .pipe(gulp.dest(outputDirectory))
-                    )
-                }*/
             }
 
             return merge2(sequence);

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


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


+ 0 - 564
dist/preview release/materials/babylon.materials.module.d.ts

@@ -1,564 +0,0 @@
-/*BabylonJS Materials*/
-// Dependencies for this module:
-//   ../../../../Tools/Gulp/babylonjs
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/cell";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/custom";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/fire";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/fur";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/gradient";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/grid";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/lava";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/mix";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/normal";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/shadowOnly";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/simple";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/sky";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/terrain";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/triPlanar";
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/water";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/cell/cellMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/custom/customMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/fire/fireMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/fur/furMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/gradient/gradientMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/grid/gridMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/lava/lavaMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/mix/mixMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/normal/normalMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/shadowOnly/shadowOnlyMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/simple/simpleMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/sky/skyMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/terrain/terrainMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/triPlanar/triPlanarMaterial";
-
-export * from "babylonjs-materials/--/--/materialsLibrary/build/src/water/waterMaterial";
-
-import { PushMaterial, BaseTexture, Scene, Color3, AbstractMesh, Nullable, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
-export declare class CellMaterial extends PushMaterial {
-    diffuseTexture: BaseTexture;
-    diffuseColor: Color3;
-    _computeHighLevel: boolean;
-    computeHighLevel: boolean;
-    disableLighting: boolean;
-    maxSimultaneousLights: number;
-    constructor(name: string, scene: Scene);
-    needAlphaBlending(): boolean;
-    needAlphaTesting(): boolean;
-    getAlphaTestTexture(): Nullable<BaseTexture>;
-    isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-    bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-    getAnimatables(): IAnimatable[];
-    getActiveTextures(): BaseTexture[];
-    hasTexture(texture: BaseTexture): boolean;
-    dispose(forceDisposeEffect?: boolean): void;
-    getClassName(): string;
-    clone(name: string): CellMaterial;
-    serialize(): any;
-    static Parse(source: any, scene: Scene, rootUrl: string): CellMaterial;
-}
-
-import { StandardMaterial, Texture, Mesh, Effect, StandardMaterialDefines, Scene } from "babylonjs";
-export declare class CustomShaderStructure {
-    FragmentStore: string;
-    VertexStore: string;
-    constructor();
-}
-export declare class ShaderSpecialParts {
-    constructor();
-    Fragment_Begin: string;
-    Fragment_Definitions: string;
-    Fragment_MainBegin: string;
-    Fragment_Custom_Diffuse: string;
-    Fragment_Custom_Alpha: string;
-    Fragment_Before_FragColor: string;
-    Vertex_Begin: string;
-    Vertex_Definitions: string;
-    Vertex_MainBegin: string;
-    Vertex_Before_PositionUpdated: string;
-    Vertex_Before_NormalUpdated: string;
-}
-export declare class CustomMaterial extends StandardMaterial {
-    static ShaderIndexer: number;
-    CustomParts: ShaderSpecialParts;
-    _isCreatedShader: boolean;
-    _createdShaderName: string;
-    _customUniform: string[];
-    _newUniforms: string[];
-    _newUniformInstances: any[];
-    _newSamplerInstances: Texture[];
-    FragmentShader: string;
-    VertexShader: string;
-    AttachAfterBind(mesh: Mesh, effect: Effect): void;
-    ReviewUniform(name: string, arr: string[]): string[];
-    Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: StandardMaterialDefines): string;
-    constructor(name: string, scene: Scene);
-    AddUniform(name: string, kind: string, param: any): CustomMaterial;
-    Fragment_Begin(shaderPart: string): CustomMaterial;
-    Fragment_Definitions(shaderPart: string): CustomMaterial;
-    Fragment_MainBegin(shaderPart: string): CustomMaterial;
-    Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
-    Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
-    Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
-    Vertex_Begin(shaderPart: string): CustomMaterial;
-    Vertex_Definitions(shaderPart: string): CustomMaterial;
-    Vertex_MainBegin(shaderPart: string): CustomMaterial;
-    Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
-    Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
-}
-
-import { PushMaterial, Nullable, BaseTexture, Color3, Scene, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
-export declare class FireMaterial extends PushMaterial {
-    diffuseTexture: Nullable<BaseTexture>;
-    distortionTexture: Nullable<BaseTexture>;
-    opacityTexture: Nullable<BaseTexture>;
-    diffuseColor: Color3;
-    speed: number;
-    constructor(name: string, scene: Scene);
-    needAlphaBlending(): boolean;
-    needAlphaTesting(): boolean;
-    getAlphaTestTexture(): Nullable<BaseTexture>;
-    isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-    bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-    getAnimatables(): IAnimatable[];
-    getActiveTextures(): BaseTexture[];
-    hasTexture(texture: BaseTexture): boolean;
-    getClassName(): string;
-    dispose(forceDisposeEffect?: boolean): void;
-    clone(name: string): FireMaterial;
-    serialize(): any;
-    static Parse(source: any, scene: Scene, rootUrl: string): FireMaterial;
-}
-
-import { PushMaterial, BaseTexture, Color3, Vector3, DynamicTexture, AbstractMesh, Scene, Nullable, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
-export declare class FurMaterial extends PushMaterial {
-    diffuseTexture: BaseTexture;
-    heightTexture: BaseTexture;
-    diffuseColor: Color3;
-    furLength: number;
-    furAngle: number;
-    furColor: Color3;
-    furOffset: number;
-    furSpacing: number;
-    furGravity: Vector3;
-    furSpeed: number;
-    furDensity: number;
-    furOcclusion: number;
-    furTexture: DynamicTexture;
-    disableLighting: boolean;
-    maxSimultaneousLights: number;
-    highLevelFur: boolean;
-    _meshes: AbstractMesh[];
-    constructor(name: string, scene: Scene);
-    furTime: number;
-    needAlphaBlending(): boolean;
-    needAlphaTesting(): boolean;
-    getAlphaTestTexture(): Nullable<BaseTexture>;
-    updateFur(): void;
-    isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-    bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-    getAnimatables(): IAnimatable[];
-    getActiveTextures(): BaseTexture[];
-    hasTexture(texture: BaseTexture): boolean;
-    dispose(forceDisposeEffect?: boolean): void;
-    clone(name: string): FurMaterial;
-    serialize(): any;
-    getClassName(): string;
-    static Parse(source: any, scene: Scene, rootUrl: string): FurMaterial;
-    static GenerateTexture(name: string, scene: Scene): DynamicTexture;
-    static FurifyMesh(sourceMesh: Mesh, quality: number): Mesh[];
-}
-
-import { PushMaterial, Color3, Scene, Nullable, BaseTexture, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
-export declare class GradientMaterial extends PushMaterial {
-    maxSimultaneousLights: number;
-    topColor: Color3;
-    topColorAlpha: number;
-    bottomColor: Color3;
-    bottomColorAlpha: number;
-    offset: number;
-    scale: number;
-    smoothness: number;
-    disableLighting: boolean;
-    constructor(name: string, scene: Scene);
-    needAlphaBlending(): boolean;
-    needAlphaTesting(): boolean;
-    getAlphaTestTexture(): Nullable<BaseTexture>;
-    isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-    bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-    getAnimatables(): IAnimatable[];
-    dispose(forceDisposeEffect?: boolean): void;
-    clone(name: string): GradientMaterial;
-    serialize(): any;
-    getClassName(): string;
-    static Parse(source: any, scene: Scene, rootUrl: string): GradientMaterial;
-}
-
-import { Color3, Vector3, Scene, AbstractMesh, SubMesh, Matrix, Mesh } from "babylonjs";
-/**
-    * The grid materials allows you to wrap any shape with a grid.
-    * Colors are customizable.
-    */
-export declare class GridMaterial extends BABYLON.PushMaterial {
-        /**
-            * Main color of the grid (e.g. between lines)
-            */
-        mainColor: Color3;
-        /**
-            * Color of the grid lines.
-            */
-        lineColor: Color3;
-        /**
-            * The scale of the grid compared to unit.
-            */
-        gridRatio: number;
-        /**
-            * Allows setting an offset for the grid lines.
-            */
-        gridOffset: Vector3;
-        /**
-            * The frequency of thicker lines.
-            */
-        majorUnitFrequency: number;
-        /**
-            * The visibility of minor units in the grid.
-            */
-        minorUnitVisibility: number;
-        /**
-            * The grid opacity outside of the lines.
-            */
-        opacity: number;
-        /**
-            * Determine RBG output is premultiplied by alpha value.
-            */
-        preMultiplyAlpha: boolean;
-        /**
-            * constructor
-            * @param name The name given to the material in order to identify it afterwards.
-            * @param scene The scene the material is used in.
-            */
-        constructor(name: string, scene: Scene);
-        /**
-            * Returns wehter or not the grid requires alpha blending.
-            */
-        needAlphaBlending(): boolean;
-        needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
-        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-        dispose(forceDisposeEffect?: boolean): void;
-        clone(name: string): GridMaterial;
-        serialize(): any;
-        getClassName(): string;
-        static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
-}
-
-import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
-export declare class LavaMaterial extends PushMaterial {
-    diffuseTexture: BaseTexture;
-    noiseTexture: BaseTexture;
-    fogColor: Color3;
-    speed: number;
-    movingSpeed: number;
-    lowFrequencySpeed: number;
-    fogDensity: number;
-    diffuseColor: Color3;
-    disableLighting: boolean;
-    unlit: boolean;
-    maxSimultaneousLights: number;
-    constructor(name: string, scene: Scene);
-    needAlphaBlending(): boolean;
-    needAlphaTesting(): boolean;
-    getAlphaTestTexture(): Nullable<BaseTexture>;
-    isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-    bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-    getAnimatables(): IAnimatable[];
-    getActiveTextures(): BaseTexture[];
-    hasTexture(texture: BaseTexture): boolean;
-    dispose(forceDisposeEffect?: boolean): void;
-    clone(name: string): LavaMaterial;
-    serialize(): any;
-    getClassName(): string;
-    static Parse(source: any, scene: Scene, rootUrl: string): LavaMaterial;
-}
-
-import { PushMaterial, BaseTexture, Texture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
-export declare class MixMaterial extends PushMaterial {
-        mixTexture1: BaseTexture;
-        mixTexture2: BaseTexture;
-        diffuseTexture1: Texture;
-        diffuseTexture2: Texture;
-        diffuseTexture3: Texture;
-        diffuseTexture4: Texture;
-        diffuseTexture5: Texture;
-        diffuseTexture6: Texture;
-        diffuseTexture7: Texture;
-        diffuseTexture8: Texture;
-        /**
-            * Uniforms
-            */
-        diffuseColor: Color3;
-        specularColor: Color3;
-        specularPower: number;
-        disableLighting: boolean;
-        maxSimultaneousLights: number;
-        constructor(name: string, scene: Scene);
-        needAlphaBlending(): boolean;
-        needAlphaTesting(): boolean;
-        getAlphaTestTexture(): Nullable<BaseTexture>;
-        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-        getAnimatables(): IAnimatable[];
-        getActiveTextures(): BaseTexture[];
-        hasTexture(texture: BaseTexture): boolean;
-        dispose(forceDisposeEffect?: boolean): void;
-        clone(name: string): MixMaterial;
-        serialize(): any;
-        getClassName(): string;
-        static Parse(source: any, scene: Scene, rootUrl: string): MixMaterial;
-}
-
-import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
-export declare class NormalMaterial extends PushMaterial {
-    diffuseTexture: BaseTexture;
-    diffuseColor: Color3;
-    disableLighting: boolean;
-    maxSimultaneousLights: number;
-    constructor(name: string, scene: Scene);
-    needAlphaBlending(): boolean;
-    needAlphaTesting(): boolean;
-    getAlphaTestTexture(): Nullable<BaseTexture>;
-    isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-    bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-    getAnimatables(): IAnimatable[];
-    getActiveTextures(): BaseTexture[];
-    hasTexture(texture: BaseTexture): boolean;
-    dispose(forceDisposeEffect?: boolean): void;
-    clone(name: string): NormalMaterial;
-    serialize(): any;
-    getClassName(): string;
-    static Parse(source: any, scene: Scene, rootUrl: string): NormalMaterial;
-}
-
-import { PushMaterial, IShadowLight, Scene, Nullable, BaseTexture, AbstractMesh, SubMesh, Matrix, Mesh } from "babylonjs";
-export declare class ShadowOnlyMaterial extends PushMaterial {
-    constructor(name: string, scene: Scene);
-    shadowColor: BABYLON.Color3;
-    needAlphaBlending(): boolean;
-    needAlphaTesting(): boolean;
-    getAlphaTestTexture(): Nullable<BaseTexture>;
-    activeLight: IShadowLight;
-    isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-    bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-    clone(name: string): ShadowOnlyMaterial;
-    serialize(): any;
-    getClassName(): string;
-    static Parse(source: any, scene: Scene, rootUrl: string): ShadowOnlyMaterial;
-}
-
-import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
-export declare class SimpleMaterial extends PushMaterial {
-    diffuseTexture: BaseTexture;
-    diffuseColor: Color3;
-    disableLighting: boolean;
-    maxSimultaneousLights: number;
-    constructor(name: string, scene: Scene);
-    needAlphaBlending(): boolean;
-    needAlphaTesting(): boolean;
-    getAlphaTestTexture(): Nullable<BaseTexture>;
-    isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-    bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-    getAnimatables(): IAnimatable[];
-    getActiveTextures(): BaseTexture[];
-    hasTexture(texture: BaseTexture): boolean;
-    dispose(forceDisposeEffect?: boolean): void;
-    clone(name: string): SimpleMaterial;
-    serialize(): any;
-    getClassName(): string;
-    static Parse(source: any, scene: Scene, rootUrl: string): SimpleMaterial;
-}
-
-import { PushMaterial, Vector3, Scene, Nullable, BaseTexture, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
-export declare class SkyMaterial extends PushMaterial {
-    luminance: number;
-    turbidity: number;
-    rayleigh: number;
-    mieCoefficient: number;
-    mieDirectionalG: number;
-    distance: number;
-    inclination: number;
-    azimuth: number;
-    sunPosition: Vector3;
-    useSunPosition: boolean;
-    constructor(name: string, scene: Scene);
-    needAlphaBlending(): boolean;
-    needAlphaTesting(): boolean;
-    getAlphaTestTexture(): Nullable<BaseTexture>;
-    isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-    bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-    getAnimatables(): IAnimatable[];
-    dispose(forceDisposeEffect?: boolean): void;
-    clone(name: string): SkyMaterial;
-    serialize(): any;
-    getClassName(): string;
-    static Parse(source: any, scene: Scene, rootUrl: string): SkyMaterial;
-}
-
-import { PushMaterial, BaseTexture, Texture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
-export declare class TerrainMaterial extends PushMaterial {
-    mixTexture: BaseTexture;
-    diffuseTexture1: Texture;
-    diffuseTexture2: Texture;
-    diffuseTexture3: Texture;
-    bumpTexture1: Texture;
-    bumpTexture2: Texture;
-    bumpTexture3: Texture;
-    diffuseColor: Color3;
-    specularColor: Color3;
-    specularPower: number;
-    disableLighting: boolean;
-    maxSimultaneousLights: number;
-    constructor(name: string, scene: Scene);
-    needAlphaBlending(): boolean;
-    needAlphaTesting(): boolean;
-    getAlphaTestTexture(): Nullable<BaseTexture>;
-    isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-    bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-    getAnimatables(): IAnimatable[];
-    getActiveTextures(): BaseTexture[];
-    hasTexture(texture: BaseTexture): boolean;
-    dispose(forceDisposeEffect?: boolean): void;
-    clone(name: string): TerrainMaterial;
-    serialize(): any;
-    getClassName(): string;
-    static Parse(source: any, scene: Scene, rootUrl: string): TerrainMaterial;
-}
-
-import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
-export declare class TriPlanarMaterial extends PushMaterial {
-    mixTexture: BaseTexture;
-    diffuseTextureX: BaseTexture;
-    diffuseTextureY: BaseTexture;
-    diffuseTextureZ: BaseTexture;
-    normalTextureX: BaseTexture;
-    normalTextureY: BaseTexture;
-    normalTextureZ: BaseTexture;
-    tileSize: number;
-    diffuseColor: Color3;
-    specularColor: Color3;
-    specularPower: number;
-    disableLighting: boolean;
-    maxSimultaneousLights: number;
-    constructor(name: string, scene: Scene);
-    needAlphaBlending(): boolean;
-    needAlphaTesting(): boolean;
-    getAlphaTestTexture(): Nullable<BaseTexture>;
-    isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-    bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-    getAnimatables(): IAnimatable[];
-    getActiveTextures(): BaseTexture[];
-    hasTexture(texture: BaseTexture): boolean;
-    dispose(forceDisposeEffect?: boolean): void;
-    clone(name: string): TriPlanarMaterial;
-    serialize(): any;
-    getClassName(): string;
-    static Parse(source: any, scene: Scene, rootUrl: string): TriPlanarMaterial;
-}
-
-import { PushMaterial, BaseTexture, Color3, Vector2, SmartArray, RenderTargetTexture, Nullable, AbstractMesh, Matrix, Scene, SubMesh, Mesh, IAnimatable } from "babylonjs";
-export declare class WaterMaterial extends PushMaterial {
-        renderTargetSize: Vector2;
-        bumpTexture: BaseTexture;
-        diffuseColor: Color3;
-        specularColor: Color3;
-        specularPower: number;
-        disableLighting: boolean;
-        maxSimultaneousLights: number;
-        /**
-         * @param {number}: Represents the wind force
-         */
-        windForce: number;
-        /**
-         * @param {Vector2}: The direction of the wind in the plane (X, Z)
-         */
-        windDirection: Vector2;
-        /**
-         * @param {number}: Wave height, represents the height of the waves
-         */
-        waveHeight: number;
-        /**
-         * @param {number}: Bump height, represents the bump height related to the bump map
-         */
-        bumpHeight: number;
-        bumpSuperimpose: boolean;
-        fresnelSeparate: boolean;
-        bumpAffectsReflection: boolean;
-        /**
-         * @param {number}: The water color blended with the refraction (near)
-         */
-        waterColor: Color3;
-        /**
-         * @param {number}: The blend factor related to the water color
-         */
-        colorBlendFactor: number;
-        /**
-            * @param {number}: The water color blended with the reflection (far)
-            */
-        waterColor2: Color3;
-        /**
-            * @param {number}: The blend factor related to the water color (reflection, far)
-            */
-        colorBlendFactor2: number;
-        /**
-         * @param {number}: Represents the maximum length of a wave
-         */
-        waveLength: number;
-        /**
-         * @param {number}: Defines the waves speed
-         */
-        waveSpeed: number;
-        protected _renderTargets: SmartArray<RenderTargetTexture>;
-        /**
-            * Gets a boolean indicating that current material needs to register RTT
-            */
-        readonly hasRenderTargetTextures: boolean;
-        /**
-         * Constructor
-         */
-        constructor(name: string, scene: Scene, renderTargetSize?: Vector2);
-        useLogarithmicDepth: boolean;
-        readonly refractionTexture: Nullable<RenderTargetTexture>;
-        readonly reflectionTexture: Nullable<RenderTargetTexture>;
-        addToRenderList(node: any): void;
-        enableRenderTargets(enable: boolean): void;
-        getRenderList(): Nullable<AbstractMesh[]>;
-        readonly renderTargetsEnabled: boolean;
-        needAlphaBlending(): boolean;
-        needAlphaTesting(): boolean;
-        getAlphaTestTexture(): Nullable<BaseTexture>;
-        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
-        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
-        getAnimatables(): IAnimatable[];
-        getActiveTextures(): BaseTexture[];
-        hasTexture(texture: BaseTexture): boolean;
-        dispose(forceDisposeEffect?: boolean): void;
-        clone(name: string): WaterMaterial;
-        serialize(): any;
-        getClassName(): string;
-        static Parse(source: any, scene: Scene, rootUrl: string): WaterMaterial;
-        static CreateDefaultMesh(name: string, scene: Scene): Mesh;
-}
-

Diferenças do arquivo suprimidas por serem muito extensas
+ 522 - 2
dist/preview release/materialsLibrary/babylon.cellMaterial.js


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


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


+ 392 - 0
dist/preview release/materialsLibrary/babylon.customMaterial.js

@@ -0,0 +1,392 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+	if(typeof exports === 'object' && typeof module === 'object')
+		module.exports = factory(require("babylonjs"));
+	else if(typeof define === 'function' && define.amd)
+		define("babylonjs-materials", ["babylonjs"], factory);
+	else if(typeof exports === 'object')
+		exports["babylonjs-materials"] = factory(require("babylonjs"));
+	else
+		root["MATLIB"] = factory(root["BABYLON"]);
+})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs__) {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ 	// The module cache
+/******/ 	var installedModules = {};
+/******/
+/******/ 	// The require function
+/******/ 	function __webpack_require__(moduleId) {
+/******/
+/******/ 		// Check if module is in cache
+/******/ 		if(installedModules[moduleId]) {
+/******/ 			return installedModules[moduleId].exports;
+/******/ 		}
+/******/ 		// Create a new module (and put it into the cache)
+/******/ 		var module = installedModules[moduleId] = {
+/******/ 			i: moduleId,
+/******/ 			l: false,
+/******/ 			exports: {}
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.l = true;
+/******/
+/******/ 		// Return the exports of the module
+/******/ 		return module.exports;
+/******/ 	}
+/******/
+/******/
+/******/ 	// expose the modules object (__webpack_modules__)
+/******/ 	__webpack_require__.m = modules;
+/******/
+/******/ 	// expose the module cache
+/******/ 	__webpack_require__.c = installedModules;
+/******/
+/******/ 	// define getter function for harmony exports
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
+/******/ 		if(!__webpack_require__.o(exports, name)) {
+/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ 		}
+/******/ 	};
+/******/
+/******/ 	// define __esModule on exports
+/******/ 	__webpack_require__.r = function(exports) {
+/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ 		}
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
+/******/ 	};
+/******/
+/******/ 	// create a fake namespace object
+/******/ 	// mode & 1: value is a module id, require it
+/******/ 	// mode & 2: merge all properties of value into the ns
+/******/ 	// mode & 4: return value when already ns object
+/******/ 	// mode & 8|1: behave like require
+/******/ 	__webpack_require__.t = function(value, mode) {
+/******/ 		if(mode & 1) value = __webpack_require__(value);
+/******/ 		if(mode & 8) return value;
+/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ 		var ns = Object.create(null);
+/******/ 		__webpack_require__.r(ns);
+/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ 		return ns;
+/******/ 	};
+/******/
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
+/******/ 	__webpack_require__.n = function(module) {
+/******/ 		var getter = module && module.__esModule ?
+/******/ 			function getDefault() { return module['default']; } :
+/******/ 			function getModuleExports() { return module; };
+/******/ 		__webpack_require__.d(getter, 'a', getter);
+/******/ 		return getter;
+/******/ 	};
+/******/
+/******/ 	// Object.prototype.hasOwnProperty.call
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(__webpack_require__.s = "./legacy-custom.ts");
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ "../../Tools/Gulp/node_modules/webpack/buildin/global.js":
+/*!***********************************!*\
+  !*** (webpack)/buildin/global.js ***!
+  \***********************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+var g;
+
+// This works in non-strict mode
+g = (function() {
+	return this;
+})();
+
+try {
+	// This works if eval is allowed (see CSP)
+	g = g || Function("return this")() || (1, eval)("this");
+} catch (e) {
+	// This works if the window reference is available
+	if (typeof window === "object") g = window;
+}
+
+// g can still be undefined, but nothing to do about it...
+// We return undefined, instead of nothing here, so it's
+// easier to handle this case. if(!global) { ...}
+
+module.exports = g;
+
+
+/***/ }),
+
+/***/ "../src/custom/customMaterial.ts":
+/*!***************************************!*\
+  !*** ../src/custom/customMaterial.ts ***!
+  \***************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var __extends = (this && this.__extends) || (function () {
+    var extendStatics = function (d, b) {
+        extendStatics = Object.setPrototypeOf ||
+            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+        return extendStatics(d, b);
+    }
+    return function (d, b) {
+        extendStatics(d, b);
+        function __() { this.constructor = d; }
+        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+    };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
+var CustomShaderStructure = /** @class */ (function () {
+    function CustomShaderStructure() {
+    }
+    return CustomShaderStructure;
+}());
+exports.CustomShaderStructure = CustomShaderStructure;
+var ShaderSpecialParts = /** @class */ (function () {
+    function ShaderSpecialParts() {
+    }
+    return ShaderSpecialParts;
+}());
+exports.ShaderSpecialParts = ShaderSpecialParts;
+var CustomMaterial = /** @class */ (function (_super) {
+    __extends(CustomMaterial, _super);
+    function CustomMaterial(name, scene) {
+        var _this = _super.call(this, name, scene) || this;
+        _this.CustomParts = new ShaderSpecialParts();
+        _this.customShaderNameResolve = _this.Builder;
+        _this.FragmentShader = BABYLON.Effect.ShadersStore["defaultPixelShader"];
+        _this.VertexShader = BABYLON.Effect.ShadersStore["defaultVertexShader"];
+        return _this;
+    }
+    CustomMaterial.prototype.AttachAfterBind = function (mesh, effect) {
+        for (var el in this._newUniformInstances) {
+            var ea = el.toString().split('-');
+            if (ea[0] == 'vec2') {
+                effect.setVector2(ea[1], this._newUniformInstances[el]);
+            }
+            else if (ea[0] == 'vec3') {
+                effect.setVector3(ea[1], this._newUniformInstances[el]);
+            }
+            else if (ea[0] == 'vec4') {
+                effect.setVector4(ea[1], this._newUniformInstances[el]);
+            }
+            else if (ea[0] == 'mat4') {
+                effect.setMatrix(ea[1], this._newUniformInstances[el]);
+            }
+            else if (ea[0] == 'float') {
+                effect.setFloat(ea[1], this._newUniformInstances[el]);
+            }
+        }
+        for (var el in this._newSamplerInstances) {
+            var ea = el.toString().split('-');
+            if (ea[0] == 'sampler2D' && this._newSamplerInstances[el].isReady && this._newSamplerInstances[el].isReady()) {
+                effect.setTexture(ea[1], this._newSamplerInstances[el]);
+            }
+        }
+    };
+    CustomMaterial.prototype.ReviewUniform = function (name, arr) {
+        if (name == "uniform") {
+            for (var ind in this._newUniforms) {
+                if (this._customUniform[ind].indexOf('sampler') == -1) {
+                    arr.push(this._newUniforms[ind]);
+                }
+            }
+        }
+        if (name == "sampler") {
+            for (var ind in this._newUniforms) {
+                if (this._customUniform[ind].indexOf('sampler') != -1) {
+                    arr.push(this._newUniforms[ind]);
+                }
+            }
+        }
+        return arr;
+    };
+    CustomMaterial.prototype.Builder = function (shaderName, uniforms, uniformBuffers, samplers, defines) {
+        var _this = this;
+        if (this._isCreatedShader) {
+            return this._createdShaderName;
+        }
+        this._isCreatedShader = false;
+        CustomMaterial.ShaderIndexer++;
+        var name = "custom_" + CustomMaterial.ShaderIndexer;
+        this.ReviewUniform("uniform", uniforms);
+        this.ReviewUniform("sampler", samplers);
+        var fn_afterBind = this._afterBind.bind(this);
+        this._afterBind = function (m, e) {
+            if (!e) {
+                return;
+            }
+            _this.AttachAfterBind(m, e);
+            try {
+                fn_afterBind(m, e);
+            }
+            catch (e) { }
+        };
+        BABYLON.Effect.ShadersStore[name + "VertexShader"] = this.VertexShader
+            .replace('#define CUSTOM_VERTEX_BEGIN', (this.CustomParts.Vertex_Begin ? this.CustomParts.Vertex_Begin : ""))
+            .replace('#define CUSTOM_VERTEX_DEFINITIONS', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Vertex_Definitions ? this.CustomParts.Vertex_Definitions : ""))
+            .replace('#define CUSTOM_VERTEX_MAIN_BEGIN', (this.CustomParts.Vertex_MainBegin ? this.CustomParts.Vertex_MainBegin : ""))
+            .replace('#define CUSTOM_VERTEX_UPDATE_POSITION', (this.CustomParts.Vertex_Before_PositionUpdated ? this.CustomParts.Vertex_Before_PositionUpdated : ""))
+            .replace('#define CUSTOM_VERTEX_UPDATE_NORMAL', (this.CustomParts.Vertex_Before_NormalUpdated ? this.CustomParts.Vertex_Before_NormalUpdated : ""));
+        // #define CUSTOM_VERTEX_MAIN_END
+        BABYLON.Effect.ShadersStore[name + "PixelShader"] = this.FragmentShader
+            .replace('#define CUSTOM_FRAGMENT_BEGIN', (this.CustomParts.Fragment_Begin ? this.CustomParts.Fragment_Begin : ""))
+            .replace('#define CUSTOM_FRAGMENT_MAIN_BEGIN', (this.CustomParts.Fragment_MainBegin ? this.CustomParts.Fragment_MainBegin : ""))
+            .replace('#define CUSTOM_FRAGMENT_DEFINITIONS', (this._customUniform ? this._customUniform.join("\n") : "") + (this.CustomParts.Fragment_Definitions ? this.CustomParts.Fragment_Definitions : ""))
+            .replace('#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE', (this.CustomParts.Fragment_Custom_Diffuse ? this.CustomParts.Fragment_Custom_Diffuse : ""))
+            .replace('#define CUSTOM_FRAGMENT_UPDATE_ALPHA', (this.CustomParts.Fragment_Custom_Alpha ? this.CustomParts.Fragment_Custom_Alpha : ""))
+            .replace('#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR', (this.CustomParts.Fragment_Before_FragColor ? this.CustomParts.Fragment_Before_FragColor : ""));
+        // #define CUSTOM_FRAGMENT_BEFORE_LIGHTS
+        // #define CUSTOM_FRAGMENT_BEFORE_FOG
+        this._isCreatedShader = true;
+        this._createdShaderName = name;
+        return name;
+    };
+    CustomMaterial.prototype.AddUniform = function (name, kind, param) {
+        if (!this._customUniform) {
+            this._customUniform = new Array();
+            this._newUniforms = new Array();
+            this._newSamplerInstances = new Array();
+            this._newUniformInstances = new Array();
+        }
+        if (param) {
+            if (kind.indexOf("sampler") == -1) {
+                this._newUniformInstances[kind + "-" + name] = param;
+            }
+            else {
+                this._newUniformInstances[kind + "-" + name] = param;
+            }
+        }
+        this._customUniform.push("uniform " + kind + " " + name + ";");
+        this._newUniforms.push(name);
+        return this;
+    };
+    CustomMaterial.prototype.Fragment_Begin = function (shaderPart) {
+        this.CustomParts.Fragment_Begin = shaderPart;
+        return this;
+    };
+    CustomMaterial.prototype.Fragment_Definitions = function (shaderPart) {
+        this.CustomParts.Fragment_Definitions = shaderPart;
+        return this;
+    };
+    CustomMaterial.prototype.Fragment_MainBegin = function (shaderPart) {
+        this.CustomParts.Fragment_MainBegin = shaderPart;
+        return this;
+    };
+    CustomMaterial.prototype.Fragment_Custom_Diffuse = function (shaderPart) {
+        this.CustomParts.Fragment_Custom_Diffuse = shaderPart.replace("result", "diffuseColor");
+        return this;
+    };
+    CustomMaterial.prototype.Fragment_Custom_Alpha = function (shaderPart) {
+        this.CustomParts.Fragment_Custom_Alpha = shaderPart.replace("result", "alpha");
+        return this;
+    };
+    CustomMaterial.prototype.Fragment_Before_FragColor = function (shaderPart) {
+        this.CustomParts.Fragment_Before_FragColor = shaderPart.replace("result", "color");
+        return this;
+    };
+    CustomMaterial.prototype.Vertex_Begin = function (shaderPart) {
+        this.CustomParts.Vertex_Begin = shaderPart;
+        return this;
+    };
+    CustomMaterial.prototype.Vertex_Definitions = function (shaderPart) {
+        this.CustomParts.Vertex_Definitions = shaderPart;
+        return this;
+    };
+    CustomMaterial.prototype.Vertex_MainBegin = function (shaderPart) {
+        this.CustomParts.Vertex_MainBegin = shaderPart;
+        return this;
+    };
+    CustomMaterial.prototype.Vertex_Before_PositionUpdated = function (shaderPart) {
+        this.CustomParts.Vertex_Before_PositionUpdated = shaderPart.replace("result", "positionUpdated");
+        return this;
+    };
+    CustomMaterial.prototype.Vertex_Before_NormalUpdated = function (shaderPart) {
+        this.CustomParts.Vertex_Before_NormalUpdated = shaderPart.replace("result", "normalUpdated");
+        return this;
+    };
+    CustomMaterial.ShaderIndexer = 1;
+    return CustomMaterial;
+}(babylonjs_1.StandardMaterial));
+exports.CustomMaterial = CustomMaterial;
+
+
+/***/ }),
+
+/***/ "../src/custom/index.ts":
+/*!******************************!*\
+  !*** ../src/custom/index.ts ***!
+  \******************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+function __export(m) {
+    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+__export(__webpack_require__(/*! ./customMaterial */ "../src/custom/customMaterial.ts"));
+
+
+/***/ }),
+
+/***/ "./legacy-custom.ts":
+/*!**************************!*\
+  !*** ./legacy-custom.ts ***!
+  \**************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global) {
+function __export(m) {
+    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+var MatLib = __webpack_require__(/*! ../src/custom/index */ "../src/custom/index.ts");
+/**
+ * This is the entry point for the UMD module.
+ * The entry point for a future ESM package should be index.ts
+ */
+var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
+if (typeof globalObject !== "undefined") {
+    for (var key in MatLib) {
+        globalObject.BABYLON[key] = MatLib[key];
+    }
+}
+__export(__webpack_require__(/*! ../src/custom/index */ "../src/custom/index.ts"));
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../Tools/Gulp/node_modules/webpack/buildin/global.js */ "../../Tools/Gulp/node_modules/webpack/buildin/global.js")))
+
+/***/ }),
+
+/***/ "babylonjs":
+/*!****************************************************************************************************!*\
+  !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
+  \****************************************************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
+
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs__;
+
+/***/ })
+
+/******/ });
+});
+//# sourceMappingURL=babylon.customMaterial.js.map

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


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 0
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 559 - 0
dist/preview release/materialsLibrary/babylon.fireMaterial.js


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 0
dist/preview release/materialsLibrary/babylon.fireMaterial.min.js


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 531 - 0
dist/preview release/materialsLibrary/babylon.gradientMaterial.js


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 0
dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 609 - 0
dist/preview release/materialsLibrary/babylon.lavaMaterial.js


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 0
dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 6139 - 2
dist/preview release/materialsLibrary/babylon.materials.js


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 696 - 0
dist/preview release/materialsLibrary/babylon.mixMaterial.js


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 0
dist/preview release/materialsLibrary/babylon.mixMaterial.min.js


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 553 - 0
dist/preview release/materialsLibrary/babylon.normalMaterial.js


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


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 0
dist/preview release/materialsLibrary/babylon.normalMaterial.min.js


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


+ 3 - 4
materialsLibrary/legacy/legacy-cell.ts

@@ -1,14 +1,13 @@
-import * as postProcessLibrary from "../src/cell/index";
+import * as MatLib from "../src/cell/index";
 
 /**
- *
  * This is the entry point for the UMD module.
  * The entry point for a future ESM package should be index.ts
  */
 var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
 if (typeof globalObject !== "undefined") {
-    for (var key in postProcessLibrary) {
-        (<any>globalObject).BABYLON[key] = (<any>postProcessLibrary)[key];
+    for (var key in MatLib) {
+        (<any>globalObject).BABYLON[key] = (<any>MatLib)[key];
     }
 }
 

+ 14 - 0
materialsLibrary/legacy/legacy-custom.ts

@@ -0,0 +1,14 @@
+import * as MatLib from "../src/custom/index";
+
+/**
+ * This is the entry point for the UMD module.
+ * The entry point for a future ESM package should be index.ts
+ */
+var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
+if (typeof globalObject !== "undefined") {
+    for (var key in MatLib) {
+        (<any>globalObject).BABYLON[key] = (<any>MatLib)[key];
+    }
+}
+
+export * from "../src/custom/index";

+ 14 - 0
materialsLibrary/legacy/legacy-fire.ts

@@ -0,0 +1,14 @@
+import * as MatLib from "../src/fire/index";
+
+/**
+ * This is the entry point for the UMD module.
+ * The entry point for a future ESM package should be index.ts
+ */
+var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
+if (typeof globalObject !== "undefined") {
+    for (var key in MatLib) {
+        (<any>globalObject).BABYLON[key] = (<any>MatLib)[key];
+    }
+}
+
+export * from "../src/fire/index";

+ 14 - 0
materialsLibrary/legacy/legacy-fur.ts

@@ -0,0 +1,14 @@
+import * as MatLib from "../src/fur/index";
+
+/**
+ * This is the entry point for the UMD module.
+ * The entry point for a future ESM package should be index.ts
+ */
+var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
+if (typeof globalObject !== "undefined") {
+    for (var key in MatLib) {
+        (<any>globalObject).BABYLON[key] = (<any>MatLib)[key];
+    }
+}
+
+export * from "../src/fur/index";

+ 14 - 0
materialsLibrary/legacy/legacy-gradient.ts

@@ -0,0 +1,14 @@
+import * as MatLib from "../src/gradient/index";
+
+/**
+ * This is the entry point for the UMD module.
+ * The entry point for a future ESM package should be index.ts
+ */
+var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
+if (typeof globalObject !== "undefined") {
+    for (var key in MatLib) {
+        (<any>globalObject).BABYLON[key] = (<any>MatLib)[key];
+    }
+}
+
+export * from "../src/gradient/index";

+ 14 - 0
materialsLibrary/legacy/legacy-grid.ts

@@ -0,0 +1,14 @@
+import * as MatLib from "../src/grid/index";
+
+/**
+ * This is the entry point for the UMD module.
+ * The entry point for a future ESM package should be index.ts
+ */
+var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
+if (typeof globalObject !== "undefined") {
+    for (var key in MatLib) {
+        (<any>globalObject).BABYLON[key] = (<any>MatLib)[key];
+    }
+}
+
+export * from "../src/grid/index";

+ 14 - 0
materialsLibrary/legacy/legacy-lava.ts

@@ -0,0 +1,14 @@
+import * as MatLib from "../src/lava/index";
+
+/**
+ * This is the entry point for the UMD module.
+ * The entry point for a future ESM package should be index.ts
+ */
+var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
+if (typeof globalObject !== "undefined") {
+    for (var key in MatLib) {
+        (<any>globalObject).BABYLON[key] = (<any>MatLib)[key];
+    }
+}
+
+export * from "../src/lava/index";

+ 14 - 0
materialsLibrary/legacy/legacy-mix.ts

@@ -0,0 +1,14 @@
+import * as MatLib from "../src/mix/index";
+
+/**
+ * This is the entry point for the UMD module.
+ * The entry point for a future ESM package should be index.ts
+ */
+var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
+if (typeof globalObject !== "undefined") {
+    for (var key in MatLib) {
+        (<any>globalObject).BABYLON[key] = (<any>MatLib)[key];
+    }
+}
+
+export * from "../src/mix/index";

+ 14 - 0
materialsLibrary/legacy/legacy-normal.ts

@@ -0,0 +1,14 @@
+import * as MatLib from "../src/normal/index";
+
+/**
+ * This is the entry point for the UMD module.
+ * The entry point for a future ESM package should be index.ts
+ */
+var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
+if (typeof globalObject !== "undefined") {
+    for (var key in MatLib) {
+        (<any>globalObject).BABYLON[key] = (<any>MatLib)[key];
+    }
+}
+
+export * from "../src/normal/index";

+ 14 - 0
materialsLibrary/legacy/legacy-shadowOnly.ts

@@ -0,0 +1,14 @@
+import * as MatLib from "../src/shadowOnly/index";
+
+/**
+ * This is the entry point for the UMD module.
+ * The entry point for a future ESM package should be index.ts
+ */
+var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
+if (typeof globalObject !== "undefined") {
+    for (var key in MatLib) {
+        (<any>globalObject).BABYLON[key] = (<any>MatLib)[key];
+    }
+}
+
+export * from "../src/shadowOnly/index";

+ 0 - 4
materialsLibrary/legacy/webpack.cell.config.js

@@ -52,10 +52,6 @@ module.exports = {
         port: 9000
     },
     plugins: [
-        new CleanWebpackPlugin([
-            path.resolve(__dirname, './src/**/*.js'),
-            path.resolve(__dirname, './src/**/*.map')
-        ]),
         new webpack.WatchIgnorePlugin([
             /\.js$/,
             /\.d\.ts$/

+ 63 - 0
materialsLibrary/legacy/webpack.custom.config.js

@@ -0,0 +1,63 @@
+const path = require('path');
+const webpack = require('webpack');
+const DtsBundleWebpack = require('dts-bundle-webpack');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+
+module.exports = {
+    context: __dirname,
+    entry: {
+        'babylonjs-materials': path.resolve(__dirname, './legacy-custom.ts'),
+    },
+    output: {
+        path: path.resolve(__dirname, '../dist/preview release/materialsLibrary'),
+        filename: 'babylon.customMaterial.min.js',
+        libraryTarget: 'umd',
+        library: {
+            root: ["MATLIB"],
+            amd: "babylonjs-materials",
+            commonjs: "babylonjs-materials"
+        },
+        umdNamedDefine: true
+    },
+    resolve: {
+        extensions: [".js", '.ts']
+    },
+    externals: {
+        babylonjs: {
+            root: "BABYLON",
+            commonjs: "babylonjs",
+            commonjs2: "babylonjs",
+            amd: "babylonjs"
+        }
+    },
+    devtool: "source-map",
+    module: {
+        rules: [{
+            test: /\.tsx?$/,
+            loader: "ts-loader",
+            exclude: /node_modules/
+        },
+        {
+            test: /\.fx$/,
+            use: [{
+                loader: path.resolve(__dirname, '../../Tools/WebpackShaderLoader/index.js')
+            }]
+        }]
+    },
+    mode: "production",
+    devServer: {
+        contentBase: path.join(__dirname, "dist"),
+        compress: false,
+        //open: true,
+        port: 9000
+    },
+    plugins: [
+        new webpack.WatchIgnorePlugin([
+            /\.js$/,
+            /\.d\.ts$/
+        ])
+    ],
+    watchOptions: {
+        ignored: [path.resolve(__dirname, './dist/**/*.*'), 'node_modules']
+    }
+}

+ 63 - 0
materialsLibrary/legacy/webpack.fire.config.js

@@ -0,0 +1,63 @@
+const path = require('path');
+const webpack = require('webpack');
+const DtsBundleWebpack = require('dts-bundle-webpack');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+
+module.exports = {
+    context: __dirname,
+    entry: {
+        'babylonjs-materials': path.resolve(__dirname, './legacy-fire.ts'),
+    },
+    output: {
+        path: path.resolve(__dirname, '../dist/preview release/materialsLibrary'),
+        filename: 'babylon.fireMaterial.min.js',
+        libraryTarget: 'umd',
+        library: {
+            root: ["MATLIB"],
+            amd: "babylonjs-materials",
+            commonjs: "babylonjs-materials"
+        },
+        umdNamedDefine: true
+    },
+    resolve: {
+        extensions: [".js", '.ts']
+    },
+    externals: {
+        babylonjs: {
+            root: "BABYLON",
+            commonjs: "babylonjs",
+            commonjs2: "babylonjs",
+            amd: "babylonjs"
+        }
+    },
+    devtool: "source-map",
+    module: {
+        rules: [{
+            test: /\.tsx?$/,
+            loader: "ts-loader",
+            exclude: /node_modules/
+        },
+        {
+            test: /\.fx$/,
+            use: [{
+                loader: path.resolve(__dirname, '../../Tools/WebpackShaderLoader/index.js')
+            }]
+        }]
+    },
+    mode: "production",
+    devServer: {
+        contentBase: path.join(__dirname, "dist"),
+        compress: false,
+        //open: true,
+        port: 9000
+    },
+    plugins: [
+        new webpack.WatchIgnorePlugin([
+            /\.js$/,
+            /\.d\.ts$/
+        ])
+    ],
+    watchOptions: {
+        ignored: [path.resolve(__dirname, './dist/**/*.*'), 'node_modules']
+    }
+}

+ 63 - 0
materialsLibrary/legacy/webpack.fur.js

@@ -0,0 +1,63 @@
+const path = require('path');
+const webpack = require('webpack');
+const DtsBundleWebpack = require('dts-bundle-webpack');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+
+module.exports = {
+    context: __dirname,
+    entry: {
+        'babylonjs-materials': path.resolve(__dirname, './legacy-fur.ts'),
+    },
+    output: {
+        path: path.resolve(__dirname, '../dist/preview release/materialsLibrary'),
+        filename: 'babylon.furMaterial.min.js',
+        libraryTarget: 'umd',
+        library: {
+            root: ["MATLIB"],
+            amd: "babylonjs-materials",
+            commonjs: "babylonjs-materials"
+        },
+        umdNamedDefine: true
+    },
+    resolve: {
+        extensions: [".js", '.ts']
+    },
+    externals: {
+        babylonjs: {
+            root: "BABYLON",
+            commonjs: "babylonjs",
+            commonjs2: "babylonjs",
+            amd: "babylonjs"
+        }
+    },
+    devtool: "source-map",
+    module: {
+        rules: [{
+            test: /\.tsx?$/,
+            loader: "ts-loader",
+            exclude: /node_modules/
+        },
+        {
+            test: /\.fx$/,
+            use: [{
+                loader: path.resolve(__dirname, '../../Tools/WebpackShaderLoader/index.js')
+            }]
+        }]
+    },
+    mode: "production",
+    devServer: {
+        contentBase: path.join(__dirname, "dist"),
+        compress: false,
+        //open: true,
+        port: 9000
+    },
+    plugins: [
+        new webpack.WatchIgnorePlugin([
+            /\.js$/,
+            /\.d\.ts$/
+        ])
+    ],
+    watchOptions: {
+        ignored: [path.resolve(__dirname, './dist/**/*.*'), 'node_modules']
+    }
+}

+ 63 - 0
materialsLibrary/legacy/webpack.gradient.config.js

@@ -0,0 +1,63 @@
+const path = require('path');
+const webpack = require('webpack');
+const DtsBundleWebpack = require('dts-bundle-webpack');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+
+module.exports = {
+    context: __dirname,
+    entry: {
+        'babylonjs-materials': path.resolve(__dirname, './legacy-gradient.ts'),
+    },
+    output: {
+        path: path.resolve(__dirname, '../dist/preview release/materialsLibrary'),
+        filename: 'babylon.gradientMaterial.min.js',
+        libraryTarget: 'umd',
+        library: {
+            root: ["MATLIB"],
+            amd: "babylonjs-materials",
+            commonjs: "babylonjs-materials"
+        },
+        umdNamedDefine: true
+    },
+    resolve: {
+        extensions: [".js", '.ts']
+    },
+    externals: {
+        babylonjs: {
+            root: "BABYLON",
+            commonjs: "babylonjs",
+            commonjs2: "babylonjs",
+            amd: "babylonjs"
+        }
+    },
+    devtool: "source-map",
+    module: {
+        rules: [{
+            test: /\.tsx?$/,
+            loader: "ts-loader",
+            exclude: /node_modules/
+        },
+        {
+            test: /\.fx$/,
+            use: [{
+                loader: path.resolve(__dirname, '../../Tools/WebpackShaderLoader/index.js')
+            }]
+        }]
+    },
+    mode: "production",
+    devServer: {
+        contentBase: path.join(__dirname, "dist"),
+        compress: false,
+        //open: true,
+        port: 9000
+    },
+    plugins: [
+        new webpack.WatchIgnorePlugin([
+            /\.js$/,
+            /\.d\.ts$/
+        ])
+    ],
+    watchOptions: {
+        ignored: [path.resolve(__dirname, './dist/**/*.*'), 'node_modules']
+    }
+}

+ 63 - 0
materialsLibrary/legacy/webpack.grid.config.js

@@ -0,0 +1,63 @@
+const path = require('path');
+const webpack = require('webpack');
+const DtsBundleWebpack = require('dts-bundle-webpack');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+
+module.exports = {
+    context: __dirname,
+    entry: {
+        'babylonjs-materials': path.resolve(__dirname, './legacy-grid.ts'),
+    },
+    output: {
+        path: path.resolve(__dirname, '../dist/preview release/materialsLibrary'),
+        filename: 'babylon.gridMaterial.min.js',
+        libraryTarget: 'umd',
+        library: {
+            root: ["MATLIB"],
+            amd: "babylonjs-materials",
+            commonjs: "babylonjs-materials"
+        },
+        umdNamedDefine: true
+    },
+    resolve: {
+        extensions: [".js", '.ts']
+    },
+    externals: {
+        babylonjs: {
+            root: "BABYLON",
+            commonjs: "babylonjs",
+            commonjs2: "babylonjs",
+            amd: "babylonjs"
+        }
+    },
+    devtool: "source-map",
+    module: {
+        rules: [{
+            test: /\.tsx?$/,
+            loader: "ts-loader",
+            exclude: /node_modules/
+        },
+        {
+            test: /\.fx$/,
+            use: [{
+                loader: path.resolve(__dirname, '../../Tools/WebpackShaderLoader/index.js')
+            }]
+        }]
+    },
+    mode: "production",
+    devServer: {
+        contentBase: path.join(__dirname, "dist"),
+        compress: false,
+        //open: true,
+        port: 9000
+    },
+    plugins: [
+        new webpack.WatchIgnorePlugin([
+            /\.js$/,
+            /\.d\.ts$/
+        ])
+    ],
+    watchOptions: {
+        ignored: [path.resolve(__dirname, './dist/**/*.*'), 'node_modules']
+    }
+}

+ 63 - 0
materialsLibrary/legacy/webpack.lava.config.js

@@ -0,0 +1,63 @@
+const path = require('path');
+const webpack = require('webpack');
+const DtsBundleWebpack = require('dts-bundle-webpack');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+
+module.exports = {
+    context: __dirname,
+    entry: {
+        'babylonjs-materials': path.resolve(__dirname, './legacy-lava.ts'),
+    },
+    output: {
+        path: path.resolve(__dirname, '../dist/preview release/materialsLibrary'),
+        filename: 'babylon.lavaMaterial.min.js',
+        libraryTarget: 'umd',
+        library: {
+            root: ["MATLIB"],
+            amd: "babylonjs-materials",
+            commonjs: "babylonjs-materials"
+        },
+        umdNamedDefine: true
+    },
+    resolve: {
+        extensions: [".js", '.ts']
+    },
+    externals: {
+        babylonjs: {
+            root: "BABYLON",
+            commonjs: "babylonjs",
+            commonjs2: "babylonjs",
+            amd: "babylonjs"
+        }
+    },
+    devtool: "source-map",
+    module: {
+        rules: [{
+            test: /\.tsx?$/,
+            loader: "ts-loader",
+            exclude: /node_modules/
+        },
+        {
+            test: /\.fx$/,
+            use: [{
+                loader: path.resolve(__dirname, '../../Tools/WebpackShaderLoader/index.js')
+            }]
+        }]
+    },
+    mode: "production",
+    devServer: {
+        contentBase: path.join(__dirname, "dist"),
+        compress: false,
+        //open: true,
+        port: 9000
+    },
+    plugins: [
+        new webpack.WatchIgnorePlugin([
+            /\.js$/,
+            /\.d\.ts$/
+        ])
+    ],
+    watchOptions: {
+        ignored: [path.resolve(__dirname, './dist/**/*.*'), 'node_modules']
+    }
+}

+ 63 - 0
materialsLibrary/legacy/webpack.mix.config.js

@@ -0,0 +1,63 @@
+const path = require('path');
+const webpack = require('webpack');
+const DtsBundleWebpack = require('dts-bundle-webpack');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+
+module.exports = {
+    context: __dirname,
+    entry: {
+        'babylonjs-materials': path.resolve(__dirname, './legacy-mix.ts'),
+    },
+    output: {
+        path: path.resolve(__dirname, '../dist/preview release/materialsLibrary'),
+        filename: 'babylon.mixMaterial.min.js',
+        libraryTarget: 'umd',
+        library: {
+            root: ["MATLIB"],
+            amd: "babylonjs-materials",
+            commonjs: "babylonjs-materials"
+        },
+        umdNamedDefine: true
+    },
+    resolve: {
+        extensions: [".js", '.ts']
+    },
+    externals: {
+        babylonjs: {
+            root: "BABYLON",
+            commonjs: "babylonjs",
+            commonjs2: "babylonjs",
+            amd: "babylonjs"
+        }
+    },
+    devtool: "source-map",
+    module: {
+        rules: [{
+            test: /\.tsx?$/,
+            loader: "ts-loader",
+            exclude: /node_modules/
+        },
+        {
+            test: /\.fx$/,
+            use: [{
+                loader: path.resolve(__dirname, '../../Tools/WebpackShaderLoader/index.js')
+            }]
+        }]
+    },
+    mode: "production",
+    devServer: {
+        contentBase: path.join(__dirname, "dist"),
+        compress: false,
+        //open: true,
+        port: 9000
+    },
+    plugins: [
+        new webpack.WatchIgnorePlugin([
+            /\.js$/,
+            /\.d\.ts$/
+        ])
+    ],
+    watchOptions: {
+        ignored: [path.resolve(__dirname, './dist/**/*.*'), 'node_modules']
+    }
+}

+ 63 - 0
materialsLibrary/legacy/webpack.normal.config.js

@@ -0,0 +1,63 @@
+const path = require('path');
+const webpack = require('webpack');
+const DtsBundleWebpack = require('dts-bundle-webpack');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+
+module.exports = {
+    context: __dirname,
+    entry: {
+        'babylonjs-materials': path.resolve(__dirname, './legacy-normal.ts'),
+    },
+    output: {
+        path: path.resolve(__dirname, '../dist/preview release/materialsLibrary'),
+        filename: 'babylon.normalMaterial.min.js',
+        libraryTarget: 'umd',
+        library: {
+            root: ["MATLIB"],
+            amd: "babylonjs-materials",
+            commonjs: "babylonjs-materials"
+        },
+        umdNamedDefine: true
+    },
+    resolve: {
+        extensions: [".js", '.ts']
+    },
+    externals: {
+        babylonjs: {
+            root: "BABYLON",
+            commonjs: "babylonjs",
+            commonjs2: "babylonjs",
+            amd: "babylonjs"
+        }
+    },
+    devtool: "source-map",
+    module: {
+        rules: [{
+            test: /\.tsx?$/,
+            loader: "ts-loader",
+            exclude: /node_modules/
+        },
+        {
+            test: /\.fx$/,
+            use: [{
+                loader: path.resolve(__dirname, '../../Tools/WebpackShaderLoader/index.js')
+            }]
+        }]
+    },
+    mode: "production",
+    devServer: {
+        contentBase: path.join(__dirname, "dist"),
+        compress: false,
+        //open: true,
+        port: 9000
+    },
+    plugins: [
+        new webpack.WatchIgnorePlugin([
+            /\.js$/,
+            /\.d\.ts$/
+        ])
+    ],
+    watchOptions: {
+        ignored: [path.resolve(__dirname, './dist/**/*.*'), 'node_modules']
+    }
+}

+ 63 - 0
materialsLibrary/legacy/webpack.shadowOnly.config.js

@@ -0,0 +1,63 @@
+const path = require('path');
+const webpack = require('webpack');
+const DtsBundleWebpack = require('dts-bundle-webpack');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+
+module.exports = {
+    context: __dirname,
+    entry: {
+        'babylonjs-materials': path.resolve(__dirname, './legacy-shadowOnly.ts'),
+    },
+    output: {
+        path: path.resolve(__dirname, '../dist/preview release/materialsLibrary'),
+        filename: 'babylon.shadowOnlyMaterial.min.js',
+        libraryTarget: 'umd',
+        library: {
+            root: ["MATLIB"],
+            amd: "babylonjs-materials",
+            commonjs: "babylonjs-materials"
+        },
+        umdNamedDefine: true
+    },
+    resolve: {
+        extensions: [".js", '.ts']
+    },
+    externals: {
+        babylonjs: {
+            root: "BABYLON",
+            commonjs: "babylonjs",
+            commonjs2: "babylonjs",
+            amd: "babylonjs"
+        }
+    },
+    devtool: "source-map",
+    module: {
+        rules: [{
+            test: /\.tsx?$/,
+            loader: "ts-loader",
+            exclude: /node_modules/
+        },
+        {
+            test: /\.fx$/,
+            use: [{
+                loader: path.resolve(__dirname, '../../Tools/WebpackShaderLoader/index.js')
+            }]
+        }]
+    },
+    mode: "production",
+    devServer: {
+        contentBase: path.join(__dirname, "dist"),
+        compress: false,
+        //open: true,
+        port: 9000
+    },
+    plugins: [
+        new webpack.WatchIgnorePlugin([
+            /\.js$/,
+            /\.d\.ts$/
+        ])
+    ],
+    watchOptions: {
+        ignored: [path.resolve(__dirname, './dist/**/*.*'), 'node_modules']
+    }
+}

+ 0 - 1
postProcessLibrary/legacy/legacy-asciiArt.ts

@@ -1,7 +1,6 @@
 import * as postProcessLibrary from "../src/asciiArt/index";
 
 /**
- *
  * This is the entry point for the UMD module.
  * The entry point for a future ESM package should be index.ts
  */

+ 0 - 1
postProcessLibrary/legacy/legacy-digitalRain.ts

@@ -1,7 +1,6 @@
 import * as postProcessLibrary from "../src/digitalRain/index"
 
 /**
- *
  * This is the entry point for the UMD module.
  * The entry point for a future ESM package should be index.ts
  */

+ 0 - 4
postProcessLibrary/legacy/webpack.asciiArt.config.js

@@ -46,10 +46,6 @@ module.exports = {
     },
     mode: "production",
     plugins: [
-        new CleanWebpackPlugin([
-            path.resolve(__dirname, './src/**/*.js'),
-            path.resolve(__dirname, './src/**/*.map')
-        ]),
         new webpack.WatchIgnorePlugin([
             /\.js$/,
             /\.d\.ts$/

+ 0 - 4
postProcessLibrary/legacy/webpack.digitalRain.config.js

@@ -46,10 +46,6 @@ module.exports = {
     },
     mode: "production",
     plugins: [
-        new CleanWebpackPlugin([
-            path.resolve(__dirname, './src/**/*.js'),
-            path.resolve(__dirname, './src/**/*.map')
-        ]),
         new webpack.WatchIgnorePlugin([
             /\.js$/,
             /\.d\.ts$/