Browse Source

All External Libraries

sevan 8 years ago
parent
commit
1b0f0ed1b3
100 changed files with 6262 additions and 68538 deletions
  1. 18 0
      .vscode/launch.json
  2. 180 95
      Tools/Gulp/config.json
  3. 95 38
      Tools/Gulp/gulpfile.js
  4. 1 0
      dist/materialsLibrary/babylon.fireMaterial.min.js
  5. 1 0
      dist/materialsLibrary/babylon.furMaterial.min.js
  6. 1 0
      dist/materialsLibrary/babylon.gradientMaterial.min.js
  7. 1 0
      dist/materialsLibrary/babylon.gridMaterial.min.js
  8. 1 0
      dist/materialsLibrary/babylon.lavaMaterial.min.js
  9. 1 0
      dist/materialsLibrary/babylon.normalMaterial.min.js
  10. 1 0
      dist/materialsLibrary/babylon.simpleMaterial.min.js
  11. 1 0
      dist/materialsLibrary/babylon.skyMaterial.min.js
  12. 1 0
      dist/materialsLibrary/babylon.terrainMaterial.min.js
  13. 1 0
      dist/materialsLibrary/babylon.triPlanarMaterial.min.js
  14. 1 0
      dist/materialsLibrary/babylon.waterMaterial.min.js
  15. 1 0
      dist/postProcessesLibrary/babylon.asciiArtPostProcess.js
  16. 1 0
      dist/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  17. 1 0
      dist/postProcessesLibrary/babylon.digitalRainPostProcess.js
  18. 1 0
      dist/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  19. 5475 5475
      dist/preview release/babylon.d.ts
  20. 362 179
      dist/preview release/babylon.max.js
  21. 1 0
      dist/proceduralTexturesLibrary/babylon.brickProceduralTexture.min.js
  22. 1 1
      proceduralTexturesLibrary/dist/babylon.cloudProceduralTexture.min.js
  23. 1 1
      proceduralTexturesLibrary/dist/babylon.fireProceduralTexture.min.js
  24. 1 1
      proceduralTexturesLibrary/dist/babylon.grassProceduralTexture.min.js
  25. 1 0
      dist/proceduralTexturesLibrary/babylon.marbleProceduralTexture.min.js
  26. 1 0
      dist/proceduralTexturesLibrary/babylon.roadProceduralTexture.min.js
  27. 1 1
      proceduralTexturesLibrary/dist/babylon.starfieldProceduralTexture.min.js
  28. 1 0
      dist/proceduralTexturesLibrary/babylon.woodProceduralTexture.min.js
  29. 0 21
      postProcessLibrary/config.json
  30. 0 207
      postProcessLibrary/dist/babylon.asciiArtPostProcess.js
  31. 0 1
      postProcessLibrary/dist/babylon.asciiArtPostProcess.min.js
  32. 0 216
      postProcessLibrary/dist/babylon.digitalRainPostProcess.js
  33. 0 1
      postProcessLibrary/dist/babylon.digitalRainPostProcess.min.js
  34. 0 68
      postProcessLibrary/gulp-srcToVariable.js
  35. 0 53
      postProcessLibrary/gulpfile.js
  36. 103 0
      postProcessLibrary/index.html
  37. 0 23
      postProcessLibrary/package.json
  38. 0 0
      postProcessLibrary/src/asciiArt/asciiart.fragment.fx
  39. 3 1
      postProcessLibrary/postProcesses/asciiArt/babylon.asciiArtPostProcess.ts
  40. 3 1
      postProcessLibrary/postProcesses/digitalRain/babylon.digitalRainPostProcess.ts
  41. 0 0
      postProcessLibrary/src/digitalRain/digitalrain.fragment.fx
  42. 0 7
      postProcessLibrary/tsconfig.json
  43. 0 63
      proceduralTexturesLibrary/config.json
  44. 0 70
      proceduralTexturesLibrary/dist/babylon.brickProceduralTexture.js
  45. 0 1
      proceduralTexturesLibrary/dist/babylon.brickProceduralTexture.min.js
  46. 0 44
      proceduralTexturesLibrary/dist/babylon.cloudProceduralTexture.js
  47. 0 139
      proceduralTexturesLibrary/dist/babylon.fireProceduralTexture.js
  48. 0 53
      proceduralTexturesLibrary/dist/babylon.grassProceduralTexture.js
  49. 0 70
      proceduralTexturesLibrary/dist/babylon.marbleProceduralTexture.js
  50. 0 1
      proceduralTexturesLibrary/dist/babylon.marbleProceduralTexture.min.js
  51. 0 31
      proceduralTexturesLibrary/dist/babylon.roadProceduralTexture.js
  52. 0 1
      proceduralTexturesLibrary/dist/babylon.roadProceduralTexture.min.js
  53. 0 161
      proceduralTexturesLibrary/dist/babylon.starfieldProceduralTexture.js
  54. 0 44
      proceduralTexturesLibrary/dist/babylon.woodProceduralTexture.js
  55. 0 1
      proceduralTexturesLibrary/dist/babylon.woodProceduralTexture.min.js
  56. 0 68
      proceduralTexturesLibrary/gulp-srcToVariable.js
  57. 0 67
      proceduralTexturesLibrary/gulpfile.js
  58. 0 0
      proceduralTexturesLibrary/index.html
  59. 0 23
      proceduralTexturesLibrary/package.json
  60. 0 0
      proceduralTexturesLibrary/src/brick/babylon.brickProceduralTexture.ts
  61. 0 0
      proceduralTexturesLibrary/src/brick/brickProceduralTexture.fragment.fx
  62. 0 0
      proceduralTexturesLibrary/src/cloud/babylon.cloudProceduralTexture.ts
  63. 0 0
      proceduralTexturesLibrary/src/cloud/cloudProceduralTexture.fragment.fx
  64. 0 0
      proceduralTexturesLibrary/src/fire/babylon.fireProceduralTexture.ts
  65. 0 0
      proceduralTexturesLibrary/src/fire/fireProceduralTexture.fragment.fx
  66. 0 0
      proceduralTexturesLibrary/src/grass/babylon.grassProceduralTexture.ts
  67. 0 0
      proceduralTexturesLibrary/src/grass/grassProceduralTexture.fragment.fx
  68. 0 0
      proceduralTexturesLibrary/src/marble/babylon.marbleProceduralTexture.ts
  69. 0 0
      proceduralTexturesLibrary/src/marble/marbleProceduralTexture.fragment.fx
  70. 0 0
      proceduralTexturesLibrary/src/road/babylon.roadProceduralTexture.ts
  71. 0 0
      proceduralTexturesLibrary/src/road/roadProceduralTexture.fragment.fx
  72. 0 0
      proceduralTexturesLibrary/src/starfield/babylon.starfieldProceduralTexture.ts
  73. 0 0
      proceduralTexturesLibrary/src/starfield/starfieldProceduralTexture.fragment.fx
  74. 0 0
      proceduralTexturesLibrary/src/wood/babylon.woodProceduralTexture.ts
  75. 0 0
      proceduralTexturesLibrary/src/wood/woodProceduralTexture.fragment.fx
  76. 0 0
      proceduralTexturesLibrary/test/addAsciiArtPP.js
  77. 0 0
      proceduralTexturesLibrary/test/addBrickPT.js
  78. 0 0
      proceduralTexturesLibrary/test/addCloudPT.js
  79. 0 0
      proceduralTexturesLibrary/test/addDigitalRainPP.js
  80. 0 0
      proceduralTexturesLibrary/test/addFirePT.js
  81. 0 0
      proceduralTexturesLibrary/test/addGrassPT.js
  82. 0 0
      proceduralTexturesLibrary/test/addMarblePT.js
  83. 0 0
      proceduralTexturesLibrary/test/addRoadPT.js
  84. 0 0
      proceduralTexturesLibrary/test/addStarfieldPT.js
  85. 0 0
      proceduralTexturesLibrary/test/addWoodPT.js
  86. 0 1
      proceduralTexturesLibrary/test/meshes/Rabbit.babylon
  87. 0 61215
      proceduralTexturesLibrary/test/refs/babylon.max.js
  88. 0 95
      proceduralTexturesLibrary/test/refs/dat.gui.min.js
  89. BIN
      proceduralTexturesLibrary/test/textures/amiga.jpg
  90. BIN
      proceduralTexturesLibrary/test/textures/fire/diffuse.png
  91. BIN
      proceduralTexturesLibrary/test/textures/fire/distortion.png
  92. BIN
      proceduralTexturesLibrary/test/textures/fire/opacity.png
  93. BIN
      proceduralTexturesLibrary/test/textures/floor.png
  94. BIN
      proceduralTexturesLibrary/test/textures/floor_bump.PNG
  95. BIN
      proceduralTexturesLibrary/test/textures/grass.png
  96. BIN
      proceduralTexturesLibrary/test/textures/grassn.png
  97. BIN
      proceduralTexturesLibrary/test/textures/lava/cloud.png
  98. BIN
      proceduralTexturesLibrary/test/textures/lava/lavatile.jpg
  99. BIN
      proceduralTexturesLibrary/test/textures/mixMap.png
  100. 0 0
      proceduralTexturesLibrary/test/textures/rock.png

+ 18 - 0
.vscode/launch.json

@@ -18,6 +18,24 @@
             "webRoot": "${workspaceRoot}/",
             "webRoot": "${workspaceRoot}/",
             "sourceMaps": true,
             "sourceMaps": true,
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug"
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug"
+        },
+        {
+            "name": "Launch Post Processes Library (Chrome)",
+            "type": "chrome",
+            "request": "launch",
+            "url": "http://localhost:1338/postProcessesLibrary/index.html",
+            "webRoot": "${workspaceRoot}/",
+            "sourceMaps": true,
+            "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug"
+        },
+        {
+            "name": "Launch Procedural Textures Library (Chrome)",
+            "type": "chrome",
+            "request": "launch",
+            "url": "http://localhost:1338/proceduralTexturesLibrary/index.html",
+            "webRoot": "${workspaceRoot}/",
+            "sourceMaps": true,
+            "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug"
         }
         }
     ]
     ]
 }
 }

+ 180 - 95
Tools/Gulp/config.json

@@ -228,102 +228,187 @@
     ]
     ]
   },
   },
 
 
-  "materials": [
+  "materialsLibrary": {
+    "libraries": [
+      {
+        "file": "../../materialsLibrary/src/gradient/babylon.gradientMaterial.ts",
+        "shaderFiles": [
+          "../../materialsLibrary/src/gradient/gradient.vertex.fx",
+          "../../materialsLibrary/src/gradient/gradient.fragment.fx"
+        ],
+        "output": "babylon.gradientMaterial.js"
+      },
+      {
+        "file": "../../materialsLibrary/src/normal/babylon.normalMaterial.ts",
+        "shaderFiles": [
+          "../../materialsLibrary/src/normal/normal.vertex.fx",
+          "../../materialsLibrary/src/normal/normal.fragment.fx"
+        ],
+        "output": "babylon.normalMaterial.js"
+      },
+      {
+        "file": "../../materialsLibrary/src/lava/babylon.lavaMaterial.ts",
+        "shaderFiles": [
+          "../../materialsLibrary/src/lava/lava.vertex.fx",
+          "../../materialsLibrary/src/lava/lava.fragment.fx"
+        ],
+        "output": "babylon.lavaMaterial.js"
+      },
+      {
+        "file": "../../materialsLibrary/src/simple/babylon.simpleMaterial.ts",
+        "shaderFiles": [
+          "../../materialsLibrary/src/simple/simple.vertex.fx",
+          "../../materialsLibrary/src/simple/simple.fragment.fx"
+        ],
+        "output": "babylon.simpleMaterial.js"
+      },
+      {
+        "file": "../../materialsLibrary/src/water/babylon.waterMaterial.ts",
+        "shaderFiles": [
+          "../../materialsLibrary/src/water/water.vertex.fx",
+          "../../materialsLibrary/src/water/water.fragment.fx"
+        ],
+        "output": "babylon.waterMaterial.js"
+      },
+      {
+        "file": "../../materialsLibrary/src/fire/babylon.fireMaterial.ts",
+        "shaderFiles": [
+          "../../materialsLibrary/src/fire/fire.vertex.fx",
+          "../../materialsLibrary/src/fire/fire.fragment.fx"
+        ],
+        "output": "babylon.fireMaterial.js"
+      },
+      {
+        "file": "../../materialsLibrary/src/fur/babylon.furMaterial.ts",
+        "shaderFiles": [
+          "../../materialsLibrary/src/fur/fur.vertex.fx",
+          "../../materialsLibrary/src/fur/fur.fragment.fx"
+        ],
+        "output": "babylon.furMaterial.js"
+      },
+      {
+        "file": "../../materialsLibrary/src/terrain/babylon.terrainMaterial.ts",
+        "shaderFiles": [
+          "../../materialsLibrary/src/terrain/terrain.vertex.fx",
+          "../../materialsLibrary/src/terrain/terrain.fragment.fx"
+        ],
+        "output": "babylon.terrainMaterial.js"
+      },
+      {
+        "file": "../../materialsLibrary/src/triPlanar/babylon.triPlanarMaterial.ts",
+        "shaderFiles": [
+          "../../materialsLibrary/src/triPlanar/triplanar.vertex.fx",
+          "../../materialsLibrary/src/triPlanar/triplanar.fragment.fx"
+        ],
+        "output": "babylon.triPlanarMaterial.js"
+      },
+      {
+        "file": "../../materialsLibrary/src/sky/babylon.skyMaterial.ts",
+        "shaderFiles": [
+          "../../materialsLibrary/src/sky/sky.vertex.fx",
+          "../../materialsLibrary/src/sky/sky.fragment.fx"
+        ],
+        "output": "babylon.skyMaterial.js"
+      },
+      {
+        "file": "../../materialsLibrary/src/grid/babylon.gridMaterial.ts",
+        "shaderFiles": [
+          "../../materialsLibrary/src/grid/grid.vertex.fx",
+          "../../materialsLibrary/src/grid/grid.fragment.fx",
+          "../../materialsLibrary/src/grid/legacygrid.vertex.fx",
+          "../../materialsLibrary/src/grid/legacygrid.fragment.fx"
+        ],
+        "output": "babylon.gridMaterial.js"
+      }
+    ],
+    "build": {
+      "distOutputDirectory": "../../dist/materialsLibrary/"
+    }
+  },
 
 
-     {
-      "file": "../../materialsLibrary/src/gradient/babylon.gradientMaterial.ts",
-      "shaderFiles": [
-        "../../materialsLibrary/src/gradient/gradient.vertex.fx",
-        "../../materialsLibrary/src/gradient/gradient.fragment.fx"
-      ],
-      "output": "babylon.gradientMaterial.js"
-    },
-    {
-      "file": "../../materialsLibrary/src/normal/babylon.normalMaterial.ts",
-      "shaderFiles": [
-        "../../materialsLibrary/src/normal/normal.vertex.fx",
-        "../../materialsLibrary/src/normal/normal.fragment.fx"
-      ],
-      "output": "babylon.normalMaterial.js"
-    },
-    {
-      "file": "../../materialsLibrary/src/lava/babylon.lavaMaterial.ts",
-      "shaderFiles": [
-        "../../materialsLibrary/src/lava/lava.vertex.fx",
-        "../../materialsLibrary/src/lava/lava.fragment.fx"
-      ],
-      "output": "babylon.lavaMaterial.js"
-    },
-    {
-      "file": "../../materialsLibrary/src/simple/babylon.simpleMaterial.ts",
-      "shaderFiles": [
-        "../../materialsLibrary/src/simple/simple.vertex.fx",
-        "../../materialsLibrary/src/simple/simple.fragment.fx"
-      ],
-      "output": "babylon.simpleMaterial.js"
-    },
-    {
-      "file": "../../materialsLibrary/src/water/babylon.waterMaterial.ts",
-      "shaderFiles": [
-        "../../materialsLibrary/src/water/water.vertex.fx",
-        "../../materialsLibrary/src/water/water.fragment.fx"
-      ],
-      "output": "babylon.waterMaterial.js"
-    },
-    {
-      "file": "../../materialsLibrary/src/fire/babylon.fireMaterial.ts",
-      "shaderFiles": [
-        "../../materialsLibrary/src/fire/fire.vertex.fx",
-        "../../materialsLibrary/src/fire/fire.fragment.fx"
-      ],
-      "output": "babylon.fireMaterial.js"
-    },
-    {
-      "file": "../../materialsLibrary/src/fur/babylon.furMaterial.ts",
-      "shaderFiles": [
-        "../../materialsLibrary/src/fur/fur.vertex.fx",
-        "../../materialsLibrary/src/fur/fur.fragment.fx"
-      ],
-      "output": "babylon.furMaterial.js"
-    },
-    {
-      "file": "../../materialsLibrary/src/terrain/babylon.terrainMaterial.ts",
-      "shaderFiles": [
-        "../../materialsLibrary/src/terrain/terrain.vertex.fx",
-        "../../materialsLibrary/src/terrain/terrain.fragment.fx"
-      ],
-      "output": "babylon.terrainMaterial.js"
-    },
-    {
-      "file": "../../materialsLibrary/src/triPlanar/babylon.triPlanarMaterial.ts",
-      "shaderFiles": [
-        "../../materialsLibrary/src/triPlanar/triplanar.vertex.fx",
-        "../../materialsLibrary/src/triPlanar/triplanar.fragment.fx"
-      ],
-      "output": "babylon.triPlanarMaterial.js"
-    },
-    {
-      "file": "../../materialsLibrary/src/sky/babylon.skyMaterial.ts",
-      "shaderFiles": [
-        "../../materialsLibrary/src/sky/sky.vertex.fx",
-        "../../materialsLibrary/src/sky/sky.fragment.fx"
-      ],
-      "output": "babylon.skyMaterial.js"
-    },
-    {
-      "file": "../../materialsLibrary/src/grid/babylon.gridMaterial.ts",
-      "shaderFiles": [
-        "../../materialsLibrary/src/grid/grid.vertex.fx",
-        "../../materialsLibrary/src/grid/grid.fragment.fx",
-        "../../materialsLibrary/src/grid/legacygrid.vertex.fx",
-        "../../materialsLibrary/src/grid/legacygrid.fragment.fx"
-      ],
-      "output": "babylon.gridMaterial.js",
-      "declarationFilename": "babylon.gridMaterial.d.ts"
+  "postProcessesLibrary": {
+      "libraries": [    
+      {
+        "file": "../../postProcessLibrary/src/asciiArt/babylon.asciiArtPostProcess.ts",
+        "shaderFiles": [
+          "../../postProcessLibrary/src/asciiArt/asciiart.fragment.fx"
+        ],
+        "output": "babylon.asciiArtPostProcess.js"
+      },
+      {
+        "file": "../../postProcessLibrary/src/digitalRain/babylon.digitalRainPostProcess.ts",
+        "shaderFiles": [
+          "../../postProcessLibrary/src/digitalRain/digitalrain.fragment.fx"
+        ],
+        "output": "babylon.digitalRainPostProcess.js"
+      }
+    ],
+    "build": {
+      "distOutputDirectory": "../../dist/postProcessesLibrary/"
+    }
+  },
+
+  "proceduralTexturesLibrary": {
+    "libraries": [
+      {
+        "file": "../../proceduralTexturesLibrary/src/wood/babylon.woodProceduralTexture.ts",
+        "shaderFiles": [
+          "../../proceduralTexturesLibrary/src/wood/woodProceduralTexture.fragment.fx"
+        ],
+        "output": "babylon.woodProceduralTexture.js"
+      },
+      {
+        "file": "../../proceduralTexturesLibrary/src/fire/babylon.fireProceduralTexture.ts",
+        "shaderFiles": [
+          "../../proceduralTexturesLibrary/src/fire/fireProceduralTexture.fragment.fx"
+        ],
+        "output": "babylon.fireProceduralTexture.js"
+      },
+      {
+        "file": "../../proceduralTexturesLibrary/src/cloud/babylon.cloudProceduralTexture.ts",
+        "shaderFiles": [
+          "../../proceduralTexturesLibrary/src/cloud/cloudProceduralTexture.fragment.fx"
+        ],
+        "output": "babylon.cloudProceduralTexture.js"
+      },
+      {
+        "file": "../../proceduralTexturesLibrary/src/grass/babylon.grassProceduralTexture.ts",
+        "shaderFiles": [
+          "../../proceduralTexturesLibrary/src/grass/grassProceduralTexture.fragment.fx"
+        ],
+        "output": "babylon.grassProceduralTexture.js"
+      },
+      {
+        "file": "../../proceduralTexturesLibrary/src/road/babylon.roadProceduralTexture.ts",
+        "shaderFiles": [
+          "../../proceduralTexturesLibrary/src/road/roadProceduralTexture.fragment.fx"
+        ],
+        "output": "babylon.roadProceduralTexture.js"
+      },
+      {
+        "file": "../../proceduralTexturesLibrary/src/brick/babylon.brickProceduralTexture.ts",
+        "shaderFiles": [
+          "../../proceduralTexturesLibrary/src/brick/brickProceduralTexture.fragment.fx"
+        ],
+        "output": "babylon.brickProceduralTexture.js"
+      },
+      {
+        "file": "../../proceduralTexturesLibrary/src/marble/babylon.marbleProceduralTexture.ts",
+        "shaderFiles": [
+          "../../proceduralTexturesLibrary/src/marble/marbleProceduralTexture.fragment.fx"
+        ],
+        "output": "babylon.marbleProceduralTexture.js"
+      },
+      {
+        "file": "../../proceduralTexturesLibrary/src/starfield/babylon.starfieldProceduralTexture.ts",
+        "shaderFiles": [
+          "../../proceduralTexturesLibrary/src/starfield/starfieldProceduralTexture.fragment.fx"
+        ],
+        "output": "babylon.starfieldProceduralTexture.js"
+      }
+    ],
+    "build": {
+      "distOutputDirectory": "../../dist/proceduralTexturesLibrary/"
     }
     }
-  ],
-  "materialsBuild": {
-    "distOutputDirectory": "../../dist/materialsLibrary/",
-    "dtsOutputDirectory": "../../dist/materialsLibrary/dts/"
   }
   }
 }
 }

+ 95 - 38
Tools/Gulp/gulpfile.js

@@ -29,6 +29,9 @@ var workersStream;
 var extendsSearchRegex = /var\s__extends[\s\S]+?\};/g;
 var extendsSearchRegex = /var\s__extends[\s\S]+?\};/g;
 var decorateSearchRegex = /var\s__decorate[\s\S]+?\};/g;
 var decorateSearchRegex = /var\s__decorate[\s\S]+?\};/g;
 
 
+/**
+ * TS configurations shared in the gulp file.
+ */
 var tsConfig = {
 var tsConfig = {
     noExternalResolve: true,
     noExternalResolve: true,
     target: 'ES5',
     target: 'ES5',
@@ -37,6 +40,7 @@ var tsConfig = {
     experimentalDecorators: true,
     experimentalDecorators: true,
     isolatedModules: false
     isolatedModules: false
 };
 };
+var tsProject = typescript.createProject(tsConfig);
 
 
 var externalTsConfig = {
 var externalTsConfig = {
     noExternalResolve: false,
     noExternalResolve: false,
@@ -47,9 +51,9 @@ var externalTsConfig = {
     isolatedModules: false
     isolatedModules: false
 };
 };
 
 
-var tsProject = typescript.createProject(tsConfig);
-
-//function to convert the shaders' filenames to variable names.
+/*
+ * Shader Management.
+ */
 function shadersName(filename) {
 function shadersName(filename) {
     return filename.replace('.fragment', 'Pixel')
     return filename.replace('.fragment', 'Pixel')
         .replace('.vertex', 'Vertex')
         .replace('.vertex', 'Vertex')
@@ -60,6 +64,9 @@ function includeShadersName(filename) {
     return filename.replace('.fx', '');
     return filename.replace('.fx', '');
 }
 }
 
 
+/*
+ * Main necessary files stream Management.
+ */
 gulp.task("includeShaders", function (cb) {
 gulp.task("includeShaders", function (cb) {
     includeShadersStream = config.includeShadersDirectories.map(function (shadersDef) {
     includeShadersStream = config.includeShadersDirectories.map(function (shadersDef) {
         return gulp.src(shadersDef.files).
         return gulp.src(shadersDef.files).
@@ -97,7 +104,7 @@ gulp.task("workers", function (cb) {
 });
 });
 
 
 /*
 /*
-Compiles all typescript files and creating a declaration file.
+* Compiles all typescript files and creating a js and a declaration file.
 */
 */
 gulp.task('typescript-compile', function () {
 gulp.task('typescript-compile', function () {
     var tsResult = gulp.src(config.core.typescript)
     var tsResult = gulp.src(config.core.typescript)
@@ -135,39 +142,63 @@ gulp.task('typescript-compile', function () {
     ])
     ])
 });
 });
 
 
+/**
+ * External library Build (mat, post processes, ...).
+ */
 gulp.task('materialsLibrary', function () {
 gulp.task('materialsLibrary', function () {
-    var tasks = config.materials.map(function (material) {
-
-        var compilOutput = gulp.src(material.file, { base: '../../' })
-            .pipe(sourcemaps.init())
-            .pipe(typescript(externalTsConfig));
+    return buildExternalLibraries(config.materialsLibrary);
+});
 
 
-        var js = compilOutput.js;        
-        var shader = gulp.src(material.shaderFiles)
-                .pipe(uncommentShader())
-                .pipe(appendSrcToVariable("BABYLON.Effect.ShadersStore", true, shadersName));
-        
-        var generatedJs = merge2(js, shader, includeShader)
-            .pipe(cleants())
-            .pipe(replace(extendsSearchRegex, ""))
-            .pipe(concat(material.output))
-            
-        var maps = generatedJs.pipe(sourcemaps.write('.temp', {
-                    includeContent:false,
-                    sourceRoot: '../../'
-                }))
-            .pipe(gulp.dest(config.materialsBuild.distOutputDirectory));
+gulp.task('postProcessesLibrary', function () {
+    return buildExternalLibraries(config.postProcessesLibrary);
+});
 
 
-        var minified = generatedJs.pipe(rename({extname: ".min.js"}))
-            .pipe(uglify())
-            .pipe(gulp.dest(config.materialsBuild.distOutputDirectory));
+gulp.task('proceduralTexturesLibrary', function () {
+    return buildExternalLibraries(config.proceduralTexturesLibrary);
+});
 
 
-        return merge2(maps, minified);
+/**
+ * Helper methods to build external library (mat, post processes, ...).
+ */
+var buildExternalLibraries = function(settings) {
+    var tasks = settings.libraries.map(function (library) {
+        return buildExternalLibrary(library, settings); 
     });
     });
 
 
     return merge2(tasks);
     return merge2(tasks);
-});
+}
 
 
+var buildExternalLibrary= function(library, settings) {
+    var compilOutput = gulp.src(library.file, { base: '../../' })
+        .pipe(sourcemaps.init())
+        .pipe(typescript(externalTsConfig));
+
+    var js = compilOutput.js;        
+    var shader = gulp.src(library.shaderFiles)
+            .pipe(uncommentShader())
+            .pipe(appendSrcToVariable("BABYLON.Effect.ShadersStore", true, shadersName));
+    
+    var generatedJs = merge2(js, shader)
+        .pipe(cleants())
+        .pipe(replace(extendsSearchRegex, ""))
+        .pipe(concat(library.output))
+        
+    var maps = generatedJs.pipe(sourcemaps.write('.temp', {
+                includeContent:false,
+                sourceRoot: '../../'
+            }))
+        .pipe(gulp.dest(settings.build.distOutputDirectory));
+
+    var minified = generatedJs.pipe(rename({extname: ".min.js"}))
+        .pipe(uglify())
+        .pipe(gulp.dest(settings.build.distOutputDirectory));
+
+    return merge2(maps, minified);
+}
+
+/**
+ * Build tasks to concat minify uflify optimise the BJS js in different flavor (workers...).
+ */
 gulp.task("buildCore", ["shaders"], function () {
 gulp.task("buildCore", ["shaders"], function () {
     return merge2(
     return merge2(
         gulp.src(config.core.files).        
         gulp.src(config.core.files).        
@@ -226,31 +257,54 @@ gulp.task("build", ["workers", "shaders"], function () {
         .pipe(gulp.dest(config.build.outputDirectory));
         .pipe(gulp.dest(config.build.outputDirectory));
 });
 });
 
 
-gulp.task("typescript", function (cb) {
-    runSequence("typescript-compile", "default", cb);
-});
-
 /**
 /**
- * The default task, call the tasks: build
+ * The default task, concat and min the main BJS files.
  */
  */
 gulp.task('default', function (cb) {
 gulp.task('default', function (cb) {
     runSequence("buildNoWorker", "build", "buildCore", cb);
     runSequence("buildNoWorker", "build", "buildCore", cb);
 });
 });
 
 
 /**
 /**
- * Watch typescript task, will call the default typescript task if a typescript file is updated.
+ * Build the releasable files.
+ */
+gulp.task("typescript", function (cb) {
+    runSequence("typescript-compile", "default", cb);
+});
+
+gulp.task("typescript-libraries", ["materialsLibrary", "postProcessesLibrary", "proceduralTexturesLibrary"], function () {
+});
+
+gulp.task("typescript-all", function (cb) {
+    runSequence("typescript", "typescript-libraries", cb);
+});
+
+/**
+ * Watch ts files and fire repective tasks.
  */
  */
 gulp.task('watch', ['typescript-compile'], function () {
 gulp.task('watch', ['typescript-compile'], function () {
     var tasks = [gulp.watch(config.core.typescript, ['typescript-compile'])];
     var tasks = [gulp.watch(config.core.typescript, ['typescript-compile'])];
 
 
-    config.materials.map(function (material) {
-        tasks.push(gulp.watch(material.file, ['materialsLibrary']));
-        tasks.push(gulp.watch(material.shaderFiles, ['materialsLibrary']));
+    config.materialsLibrary.libraries.map(function (material) {
+        tasks.push(gulp.watch(material.file, () => buildExternalLibrary(material, config.materialsLibrary)));
+        tasks.push(gulp.watch(material.shaderFiles, () => buildExternalLibrary(material, config.materialsLibrary)));
+    });
+
+    config.postProcessesLibrary.libraries.map(function (postProcess) {
+        tasks.push(gulp.watch(postProcess.file, buildExternalLibrary(postProcess, config.postProcessesLibrary)));
+        tasks.push(gulp.watch(postProcess.shaderFiles, buildExternalLibrary(postProcess, config.postProcessesLibrary)));
+    });
+
+    config.proceduralTexturesLibrary.libraries.map(function (proceduralTexture) {
+        tasks.push(gulp.watch(proceduralTexture.file, buildExternalLibrary(proceduralTexture, config.proceduralTexturesLibrary)));
+        tasks.push(gulp.watch(proceduralTexture.shaderFiles, buildExternalLibrary(proceduralTexture, config.proceduralTexturesLibrary)));
     });
     });
 
 
     return tasks;
     return tasks;
 });
 });
 
 
+/**
+ * Embedded webserver for test convenience.
+ */
 gulp.task('webserver', function () {
 gulp.task('webserver', function () {
     gulp.src('../../.').pipe(webserver({
     gulp.src('../../.').pipe(webserver({
       port: 1338,
       port: 1338,
@@ -258,5 +312,8 @@ gulp.task('webserver', function () {
     }));
     }));
 });
 });
 
 
+/**
+ * Combine Webserver and Watch as long as vscode does not handle multi tasks.
+ */
 gulp.task('run', ['watch', 'webserver'], function () {
 gulp.task('run', ['watch', 'webserver'], function () {
 });
 });

File diff suppressed because it is too large
+ 1 - 0
dist/materialsLibrary/babylon.fireMaterial.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/materialsLibrary/babylon.furMaterial.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/materialsLibrary/babylon.gradientMaterial.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/materialsLibrary/babylon.gridMaterial.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/materialsLibrary/babylon.lavaMaterial.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/materialsLibrary/babylon.normalMaterial.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/materialsLibrary/babylon.simpleMaterial.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/materialsLibrary/babylon.skyMaterial.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/materialsLibrary/babylon.terrainMaterial.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/materialsLibrary/babylon.triPlanarMaterial.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/materialsLibrary/babylon.waterMaterial.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/postProcessesLibrary/babylon.asciiArtPostProcess.js


File diff suppressed because it is too large
+ 1 - 0
dist/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/postProcessesLibrary/babylon.digitalRainPostProcess.js


File diff suppressed because it is too large
+ 1 - 0
dist/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


File diff suppressed because it is too large
+ 5475 - 5475
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 362 - 179
dist/preview release/babylon.max.js


File diff suppressed because it is too large
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.brickProceduralTexture.min.js


File diff suppressed because it is too large
+ 1 - 1
proceduralTexturesLibrary/dist/babylon.cloudProceduralTexture.min.js


File diff suppressed because it is too large
+ 1 - 1
proceduralTexturesLibrary/dist/babylon.fireProceduralTexture.min.js


File diff suppressed because it is too large
+ 1 - 1
proceduralTexturesLibrary/dist/babylon.grassProceduralTexture.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.marbleProceduralTexture.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.roadProceduralTexture.min.js


File diff suppressed because it is too large
+ 1 - 1
proceduralTexturesLibrary/dist/babylon.starfieldProceduralTexture.min.js


File diff suppressed because it is too large
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.woodProceduralTexture.min.js


+ 0 - 21
postProcessLibrary/config.json

@@ -1,21 +0,0 @@
-{
-  "postProcesses": [    
-    {
-      "file": "postProcesses/asciiArt/babylon.asciiArtPostProcess.ts",
-      "shaderFiles": [
-        "postProcesses/asciiArt/asciiart.fragment.fx"
-      ],
-      "output": "babylon.asciiArtPostProcess.js"
-    },
-    {
-      "file": "postProcesses/digitalRain/babylon.digitalRainPostProcess.ts",
-      "shaderFiles": [
-        "postProcesses/digitalRain/digitalrain.fragment.fx"
-      ],
-      "output": "babylon.digitalRainPostProcess.js"
-    }
-  ],
-  "build": {
-    "distOutputDirectory": "dist/"
-  }
-}

File diff suppressed because it is too large
+ 0 - 207
postProcessLibrary/dist/babylon.asciiArtPostProcess.js


File diff suppressed because it is too large
+ 0 - 1
postProcessLibrary/dist/babylon.asciiArtPostProcess.min.js


File diff suppressed because it is too large
+ 0 - 216
postProcessLibrary/dist/babylon.digitalRainPostProcess.js


File diff suppressed because it is too large
+ 0 - 1
postProcessLibrary/dist/babylon.digitalRainPostProcess.min.js


+ 0 - 68
postProcessLibrary/gulp-srcToVariable.js

@@ -1,68 +0,0 @@
-var through = require('through2');
-var gutil = require('gulp-util');
-var PluginError = gutil.PluginError;
-var path = require('path');
-var File = gutil.File;
-
-// Consts
-const PLUGIN_NAME = 'gulp-srcToVariable';
-
-var srcToVariable = function srcToVariable(varName, asMap, namingCallback) {
-
-    var content;
-    var firstFile;
-
-    namingCallback = namingCallback || function (filename) { return filename; };
-
-    function bufferContents(file, enc, cb) {
-        // ignore empty files
-        if (file.isNull()) {
-            cb();
-            return;
-        }
-
-        // no stream support, only files.
-        if (file.isStream()) {
-            this.emit('error', new PluginError('gulp-concat', 'Streaming not supported'));
-            cb();
-            return;
-        }
-
-        // set first file if not already set
-        if (!firstFile) {
-            firstFile = file;
-        }
-
-        // construct concat instance
-        if (!content) {
-            content = "";
-        }
-        var name = namingCallback(file.relative);
-        content += varName + "['" + name + "'] = " + JSON.stringify(file.contents.toString()) + ";\r\n";
-        cb();
-    }
-
-    function endStream(cb) {
-        if (!firstFile || !content) {
-            cb();
-            return;
-        }
-
-        var joinedPath = path.join(firstFile.base, varName);
-
-        var joinedFile = new File({
-            cwd: firstFile.cwd,
-            base: firstFile.base,
-            path: joinedPath,
-            contents: new Buffer(content)
-        });
-
-        this.push(joinedFile);
-
-        cb();
-    }
-
-    return through.obj(bufferContents, endStream);
-}
-
-module.exports = srcToVariable;

+ 0 - 53
postProcessLibrary/gulpfile.js

@@ -1,53 +0,0 @@
-var gulp = require("gulp");
-var typescript = require("gulp-typescript");
-var srcToVariable = require("./gulp-srcToVariable");
-var merge2 = require("merge2");
-var concat = require("gulp-concat");
-var rename = require("gulp-rename");
-var cleants = require('gulp-clean-ts-extends');
-var replace = require("gulp-replace");
-var webserver = require('gulp-webserver');
-var uglify = require("gulp-uglify");
-
-var config = require("./config.json");
-var extendsSearchRegex = /var\s__extends[\s\S]+?\};/g;
-
-//function to convert the shaders' filenames to variable names.
-function shadersName(filename) {
-    return filename.replace('.fragment', 'Pixel')
-      .replace('.vertex', 'Vertex')
-      .replace('.fx', 'Shader');
-}
-
-gulp.task('copyReference', function () {
-    return gulp.src("../dist/preview release/babylon.max.js").pipe(gulp.dest("test/refs"));
-});
-
-/*
-Compiles all typescript files and creating a declaration file.
-*/
-gulp.task('default', ["copyReference"], function () {
-    var tasks = config.proceduralTextures.map(function (proceduralTexture) {
-        var js = gulp.src(proceduralTexture.file)
-            .pipe(typescript({
-                noExternalResolve: false,
-                target: 'ES5',
-                declarationFiles: true,
-                typescript: require('typescript'),
-                experimentalDecorators: true
-            })).js;
-
-        var shader = gulp.src(proceduralTexture.shaderFiles).pipe(srcToVariable("BABYLON.Effect.ShadersStore", true, shadersName));
-
-        return merge2(js, shader)
-            .pipe(cleants())
-            .pipe(replace(extendsSearchRegex, ""))
-            .pipe(concat(proceduralTexture.output))
-            .pipe(gulp.dest(config.build.distOutputDirectory))
-            .pipe(rename({extname: ".min.js"}))
-            .pipe(uglify())
-            .pipe(gulp.dest(config.build.distOutputDirectory));
-    });
-
-    return tasks;
-});

+ 103 - 0
postProcessLibrary/index.html

@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>Shaders Library</title>
+	<script src="../assets/refs/dat.gui.min.js"></script>
+	<script src="../dist/preview release/babylon.max.js"></script>
+	<script src="../dist/postProcessesLibrary/babylon.asciiArtPostProcess.js"></script>
+	<script src="../dist/postProcessesLibrary/babylon.digitalRainPostProcess.js"></script>
+
+	<style>
+		html, body {
+			width: 100%;
+			height: 100%;
+			padding: 0;
+			margin: 0;
+			overflow: hidden;
+		}
+
+		#renderCanvas {
+			width: 100%;
+			height: 100%;
+		}
+
+		#fps {
+			position: absolute;
+			background-color: black;
+			border: 2px solid red;
+			text-align: center;
+			font-size: 16px;
+			color: white;
+			top: 15px;
+			left: 10px;
+			width: 60px;
+			height: 20px;
+		}
+	</style>
+</head>
+<body>
+	<div id="fps">0</div>
+	<canvas id="renderCanvas"></canvas>
+
+	<script src="test/index.js"></script>
+	
+	<script>
+		if (BABYLON.Engine.isSupported()) {
+			var canvas = document.getElementById("renderCanvas");
+			var engine = new BABYLON.Engine(canvas, true);
+			var divFps = document.getElementById("fps");
+
+			var scene = new BABYLON.Scene(engine);
+
+			var camera = new BABYLON.ArcRotateCamera("Camera", Math.PI / 2, Math.PI / 6, 50, BABYLON.Vector3.Zero(), scene);
+			camera.attachControl(canvas, true);
+			camera.minZ = 0.1;
+
+			// Lights
+			var hemisphericLight = new BABYLON.HemisphericLight("hemi", new BABYLON.Vector3(0, 1, 0), scene);
+			
+			// Create meshes
+			var sphere = BABYLON.Mesh.CreateSphere("sphere", 48, 30.0, scene);			
+
+			// Register a render loop to repeatedly render the scene
+			engine.runRenderLoop(function () {
+				scene.render();
+				divFps.innerHTML = engine.getFps().toFixed() + " fps";
+			});
+
+			// Resize
+			window.addEventListener("resize", function () {
+				engine.resize();
+			});
+
+			var aaPostProcess = new BABYLON.AsciiArtPostProcess("AsciiArt", camera);
+			var drPostProcess = new BABYLON.DigitalRainPostProcess("AsciiArt", camera);
+
+			//camera.detachPostProcess(aaPostProcess);
+			camera.detachPostProcess(drPostProcess);
+
+			var gui = new dat.GUI();
+			var options = {
+				postProcess: "asciiArt"
+			}
+
+			gui.add(options, 'postProcess', ['asciiArt', 'digitalRain']).onFinishChange(function () {
+				
+				switch (options.postProcess) {
+					case "asciiArt":
+						camera.detachPostProcess(aaPostProcess);
+						camera.detachPostProcess(drPostProcess);
+						camera.attachPostProcess(aaPostProcess);
+						break;
+					case "digitalRain":
+						camera.detachPostProcess(aaPostProcess);
+						camera.detachPostProcess(drPostProcess);
+						camera.attachPostProcess(drPostProcess);
+						break;
+				}
+			});
+		}
+
+	</script>
+</body>
+</html>

+ 0 - 23
postProcessLibrary/package.json

@@ -1,23 +0,0 @@
-{
-  "name": "BabylonJS_PostProcessLibrary",
-  "version": "2.3.0",
-  "description": "PostProcess library for Babylon.js",
-  "main": "",
-  "repository": { "url": "https://github.com/BabylonJS/Babylon.js/" },
-  "readme": "https://github.com/BabylonJS/Babylon.js/edit/master/readme.md",
-  "license": "(Apache-2.0)",
-  "devDependencies": {
-    "gulp": "^3.8.11",
-    "gulp-uglify": "~1.4.2",
-    "typescript": "~1.6.2",
-    "gulp-typescript": "~2.13.0",
-    "through2": "~0.6.5",
-    "gulp-util": "~3.0.4",
-    "gulp-concat": "~2.6.0",
-    "merge2": "~0.3.5",
-    "gulp-rename": "~1.2.2",
-    "gulp-clean-ts-extends": "~0.1.1",
-    "gulp-replace": "~0.5.3",
-    "gulp-webserver": "^0.9.1"
-  }
-}

postProcessLibrary/postProcesses/asciiArt/asciiart.fragment.fx → postProcessLibrary/src/asciiArt/asciiart.fragment.fx


+ 3 - 1
postProcessLibrary/postProcesses/asciiArt/babylon.asciiArtPostProcess.ts

@@ -1,4 +1,6 @@
-module BABYLON {
+/// <reference path="../../../dist/preview release/babylon.d.ts"/>
+
+module BABYLON {
 
 
     /**
     /**
      * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
      * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.

+ 3 - 1
postProcessLibrary/postProcesses/digitalRain/babylon.digitalRainPostProcess.ts

@@ -1,4 +1,6 @@
-module BABYLON {
+/// <reference path="../../../dist/preview release/babylon.d.ts"/>
+
+module BABYLON {
 
 
     /**
     /**
      * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
      * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.

postProcessLibrary/postProcesses/digitalRain/digitalrain.fragment.fx → postProcessLibrary/src/digitalRain/digitalrain.fragment.fx


+ 0 - 7
postProcessLibrary/tsconfig.json

@@ -1,7 +0,0 @@
-{
-    "compilerOptions": {
-        "experimentalDecorators": true,
-        "module": "commonjs", 
-        "target": "es5"
-    }
-}

+ 0 - 63
proceduralTexturesLibrary/config.json

@@ -1,63 +0,0 @@
-{
-  "proceduralTextures": [
-    {
-      "file": "proceduralTextures/wood/babylon.woodProceduralTexture.ts",
-      "shaderFiles": [
-        "proceduralTextures/wood/woodProceduralTexture.fragment.fx"
-      ],
-      "output": "babylon.woodProceduralTexture.js"
-    },
-    {
-      "file": "proceduralTextures/fire/babylon.fireProceduralTexture.ts",
-      "shaderFiles": [
-        "proceduralTextures/fire/fireProceduralTexture.fragment.fx"
-      ],
-      "output": "babylon.fireProceduralTexture.js"
-    },
-    {
-      "file": "proceduralTextures/cloud/babylon.cloudProceduralTexture.ts",
-      "shaderFiles": [
-        "proceduralTextures/cloud/cloudProceduralTexture.fragment.fx"
-      ],
-      "output": "babylon.cloudProceduralTexture.js"
-    },
-    {
-      "file": "proceduralTextures/grass/babylon.grassProceduralTexture.ts",
-      "shaderFiles": [
-        "proceduralTextures/grass/grassProceduralTexture.fragment.fx"
-      ],
-      "output": "babylon.grassProceduralTexture.js"
-    },
-    {
-      "file": "proceduralTextures/road/babylon.roadProceduralTexture.ts",
-      "shaderFiles": [
-        "proceduralTextures/road/roadProceduralTexture.fragment.fx"
-      ],
-      "output": "babylon.roadProceduralTexture.js"
-    },
-    {
-      "file": "proceduralTextures/brick/babylon.brickProceduralTexture.ts",
-      "shaderFiles": [
-        "proceduralTextures/brick/brickProceduralTexture.fragment.fx"
-      ],
-      "output": "babylon.brickProceduralTexture.js"
-    },
-    {
-      "file": "proceduralTextures/marble/babylon.marbleProceduralTexture.ts",
-      "shaderFiles": [
-        "proceduralTextures/marble/marbleProceduralTexture.fragment.fx"
-      ],
-      "output": "babylon.marbleProceduralTexture.js"
-    },
-    {
-      "file": "proceduralTextures/starfield/babylon.starfieldProceduralTexture.ts",
-      "shaderFiles": [
-        "proceduralTextures/starfield/starfieldProceduralTexture.fragment.fx"
-      ],
-      "output": "babylon.starfieldProceduralTexture.js"
-    }
-  ],
-  "build": {
-    "distOutputDirectory": "dist/"
-  }
-}

File diff suppressed because it is too large
+ 0 - 70
proceduralTexturesLibrary/dist/babylon.brickProceduralTexture.js


File diff suppressed because it is too large
+ 0 - 1
proceduralTexturesLibrary/dist/babylon.brickProceduralTexture.min.js


File diff suppressed because it is too large
+ 0 - 44
proceduralTexturesLibrary/dist/babylon.cloudProceduralTexture.js


File diff suppressed because it is too large
+ 0 - 139
proceduralTexturesLibrary/dist/babylon.fireProceduralTexture.js


File diff suppressed because it is too large
+ 0 - 53
proceduralTexturesLibrary/dist/babylon.grassProceduralTexture.js


File diff suppressed because it is too large
+ 0 - 70
proceduralTexturesLibrary/dist/babylon.marbleProceduralTexture.js


File diff suppressed because it is too large
+ 0 - 1
proceduralTexturesLibrary/dist/babylon.marbleProceduralTexture.min.js


File diff suppressed because it is too large
+ 0 - 31
proceduralTexturesLibrary/dist/babylon.roadProceduralTexture.js


File diff suppressed because it is too large
+ 0 - 1
proceduralTexturesLibrary/dist/babylon.roadProceduralTexture.min.js


File diff suppressed because it is too large
+ 0 - 161
proceduralTexturesLibrary/dist/babylon.starfieldProceduralTexture.js


File diff suppressed because it is too large
+ 0 - 44
proceduralTexturesLibrary/dist/babylon.woodProceduralTexture.js


File diff suppressed because it is too large
+ 0 - 1
proceduralTexturesLibrary/dist/babylon.woodProceduralTexture.min.js


+ 0 - 68
proceduralTexturesLibrary/gulp-srcToVariable.js

@@ -1,68 +0,0 @@
-var through = require('through2');
-var gutil = require('gulp-util');
-var PluginError = gutil.PluginError;
-var path = require('path');
-var File = gutil.File;
-
-// Consts
-const PLUGIN_NAME = 'gulp-srcToVariable';
-
-var srcToVariable = function srcToVariable(varName, asMap, namingCallback) {
-
-    var content;
-    var firstFile;
-
-    namingCallback = namingCallback || function (filename) { return filename; };
-
-    function bufferContents(file, enc, cb) {
-        // ignore empty files
-        if (file.isNull()) {
-            cb();
-            return;
-        }
-
-        // no stream support, only files.
-        if (file.isStream()) {
-            this.emit('error', new PluginError('gulp-concat', 'Streaming not supported'));
-            cb();
-            return;
-        }
-
-        // set first file if not already set
-        if (!firstFile) {
-            firstFile = file;
-        }
-
-        // construct concat instance
-        if (!content) {
-            content = "";
-        }
-        var name = namingCallback(file.relative);
-        content += varName + "['" + name + "'] = " + JSON.stringify(file.contents.toString()) + ";\r\n";
-        cb();
-    }
-
-    function endStream(cb) {
-        if (!firstFile || !content) {
-            cb();
-            return;
-        }
-
-        var joinedPath = path.join(firstFile.base, varName);
-
-        var joinedFile = new File({
-            cwd: firstFile.cwd,
-            base: firstFile.base,
-            path: joinedPath,
-            contents: new Buffer(content)
-        });
-
-        this.push(joinedFile);
-
-        cb();
-    }
-
-    return through.obj(bufferContents, endStream);
-}
-
-module.exports = srcToVariable;

+ 0 - 67
proceduralTexturesLibrary/gulpfile.js

@@ -1,67 +0,0 @@
-var gulp = require("gulp");
-var typescript = require("gulp-typescript");
-var srcToVariable = require("./gulp-srcToVariable");
-var merge2 = require("merge2");
-var concat = require("gulp-concat");
-var rename = require("gulp-rename");
-var cleants = require('gulp-clean-ts-extends');
-var replace = require("gulp-replace");
-var webserver = require('gulp-webserver');
-var uglify = require("gulp-uglify");
-
-var config = require("./config.json");
-var extendsSearchRegex = /var\s__extends[\s\S]+?\};/g;
-
-//function to convert the shaders' filenames to variable names.
-function shadersName(filename) {
-    return filename.replace('.fragment', 'Pixel')
-      .replace('.vertex', 'Vertex')
-      .replace('.fx', 'Shader');
-}
-
-gulp.task('copyReference', function () {
-    return gulp.src("../dist/preview release/babylon.max.js").pipe(gulp.dest("test/refs"));
-});
-
-/*
-Compiles all typescript files and creating a declaration file.
-*/
-gulp.task('default', ["copyReference"], function () {
-    var tasks = config.proceduralTextures.map(function (proceduralTexture) {
-        var js = gulp.src(proceduralTexture.file)
-            .pipe(typescript({
-                noExternalResolve: false,
-                target: 'ES5',
-                declarationFiles: true,
-                typescript: require('typescript'),
-                experimentalDecorators: true
-            })).js;
-
-        var shader = gulp.src(proceduralTexture.shaderFiles).pipe(srcToVariable("BABYLON.Effect.ShadersStore", true, shadersName));
-
-        return merge2(js, shader)
-            .pipe(cleants())
-            .pipe(replace(extendsSearchRegex, ""))
-            .pipe(concat(proceduralTexture.output))
-            .pipe(gulp.dest(config.build.distOutputDirectory))
-            .pipe(rename({extname: ".min.js"}))
-            .pipe(uglify())
-            .pipe(gulp.dest(config.build.distOutputDirectory));
-    });
-
-    return tasks;
-});
-
-/**
- * Web server task to serve a local test page
- */
-gulp.task('webserver', function() {
-  gulp.src('.')
-    .pipe(webserver({
-      livereload: false,
-      open: 'http://localhost:1338/test/index.html',
-      port: 1338,
-      fallback: 'index.html'
-    }));
-});
-

proceduralTexturesLibrary/test/index.html → proceduralTexturesLibrary/index.html


+ 0 - 23
proceduralTexturesLibrary/package.json

@@ -1,23 +0,0 @@
-{
-  "name": "BabylonJS_PostProcessLibrary",
-  "version": "2.3.0",
-  "description": "PostProcess library for Babylon.js",
-  "main": "",
-  "repository": { "url": "https://github.com/BabylonJS/Babylon.js/" },
-  "readme": "https://github.com/BabylonJS/Babylon.js/edit/master/readme.md",
-  "license": "(Apache-2.0)",
-  "devDependencies": {
-    "gulp": "^3.8.11",
-    "gulp-uglify": "~1.4.2",
-    "typescript": "~1.6.2",
-    "gulp-typescript": "~2.13.0",
-    "through2": "~0.6.5",
-    "gulp-util": "~3.0.4",
-    "gulp-concat": "~2.6.0",
-    "merge2": "~0.3.5",
-    "gulp-rename": "~1.2.2",
-    "gulp-clean-ts-extends": "~0.1.1",
-    "gulp-replace": "~0.5.3",
-    "gulp-webserver": "^0.9.1"
-  }
-}

proceduralTexturesLibrary/proceduralTextures/brick/babylon.brickProceduralTexture.ts → proceduralTexturesLibrary/src/brick/babylon.brickProceduralTexture.ts


proceduralTexturesLibrary/proceduralTextures/brick/brickProceduralTexture.fragment.fx → proceduralTexturesLibrary/src/brick/brickProceduralTexture.fragment.fx


proceduralTexturesLibrary/proceduralTextures/cloud/babylon.cloudProceduralTexture.ts → proceduralTexturesLibrary/src/cloud/babylon.cloudProceduralTexture.ts


proceduralTexturesLibrary/proceduralTextures/cloud/cloudProceduralTexture.fragment.fx → proceduralTexturesLibrary/src/cloud/cloudProceduralTexture.fragment.fx


proceduralTexturesLibrary/proceduralTextures/fire/babylon.fireProceduralTexture.ts → proceduralTexturesLibrary/src/fire/babylon.fireProceduralTexture.ts


proceduralTexturesLibrary/proceduralTextures/fire/fireProceduralTexture.fragment.fx → proceduralTexturesLibrary/src/fire/fireProceduralTexture.fragment.fx


proceduralTexturesLibrary/proceduralTextures/grass/babylon.grassProceduralTexture.ts → proceduralTexturesLibrary/src/grass/babylon.grassProceduralTexture.ts


proceduralTexturesLibrary/proceduralTextures/grass/grassProceduralTexture.fragment.fx → proceduralTexturesLibrary/src/grass/grassProceduralTexture.fragment.fx


proceduralTexturesLibrary/proceduralTextures/marble/babylon.marbleProceduralTexture.ts → proceduralTexturesLibrary/src/marble/babylon.marbleProceduralTexture.ts


proceduralTexturesLibrary/proceduralTextures/marble/marbleProceduralTexture.fragment.fx → proceduralTexturesLibrary/src/marble/marbleProceduralTexture.fragment.fx


proceduralTexturesLibrary/proceduralTextures/road/babylon.roadProceduralTexture.ts → proceduralTexturesLibrary/src/road/babylon.roadProceduralTexture.ts


proceduralTexturesLibrary/proceduralTextures/road/roadProceduralTexture.fragment.fx → proceduralTexturesLibrary/src/road/roadProceduralTexture.fragment.fx


proceduralTexturesLibrary/proceduralTextures/starfield/babylon.starfieldProceduralTexture.ts → proceduralTexturesLibrary/src/starfield/babylon.starfieldProceduralTexture.ts


proceduralTexturesLibrary/proceduralTextures/starfield/starfieldProceduralTexture.fragment.fx → proceduralTexturesLibrary/src/starfield/starfieldProceduralTexture.fragment.fx


proceduralTexturesLibrary/proceduralTextures/wood/babylon.woodProceduralTexture.ts → proceduralTexturesLibrary/src/wood/babylon.woodProceduralTexture.ts


proceduralTexturesLibrary/proceduralTextures/wood/woodProceduralTexture.fragment.fx → proceduralTexturesLibrary/src/wood/woodProceduralTexture.fragment.fx


proceduralTexturesLibrary/test/add/addAsciiArtPP.js → proceduralTexturesLibrary/test/addAsciiArtPP.js


proceduralTexturesLibrary/test/add/addBrickPT.js → proceduralTexturesLibrary/test/addBrickPT.js


proceduralTexturesLibrary/test/add/addCloudPT.js → proceduralTexturesLibrary/test/addCloudPT.js


proceduralTexturesLibrary/test/add/addDigitalRainPP.js → proceduralTexturesLibrary/test/addDigitalRainPP.js


proceduralTexturesLibrary/test/add/addFirePT.js → proceduralTexturesLibrary/test/addFirePT.js


proceduralTexturesLibrary/test/add/addGrassPT.js → proceduralTexturesLibrary/test/addGrassPT.js


proceduralTexturesLibrary/test/add/addMarblePT.js → proceduralTexturesLibrary/test/addMarblePT.js


proceduralTexturesLibrary/test/add/addRoadPT.js → proceduralTexturesLibrary/test/addRoadPT.js


proceduralTexturesLibrary/test/add/addStarfieldPT.js → proceduralTexturesLibrary/test/addStarfieldPT.js


proceduralTexturesLibrary/test/add/addWoodPT.js → proceduralTexturesLibrary/test/addWoodPT.js


File diff suppressed because it is too large
+ 0 - 1
proceduralTexturesLibrary/test/meshes/Rabbit.babylon


File diff suppressed because it is too large
+ 0 - 61215
proceduralTexturesLibrary/test/refs/babylon.max.js


File diff suppressed because it is too large
+ 0 - 95
proceduralTexturesLibrary/test/refs/dat.gui.min.js


BIN
proceduralTexturesLibrary/test/textures/amiga.jpg


BIN
proceduralTexturesLibrary/test/textures/fire/diffuse.png


BIN
proceduralTexturesLibrary/test/textures/fire/distortion.png


BIN
proceduralTexturesLibrary/test/textures/fire/opacity.png


BIN
proceduralTexturesLibrary/test/textures/floor.png


BIN
proceduralTexturesLibrary/test/textures/floor_bump.PNG


BIN
proceduralTexturesLibrary/test/textures/grass.png


BIN
proceduralTexturesLibrary/test/textures/grassn.png


BIN
proceduralTexturesLibrary/test/textures/lava/cloud.png


BIN
proceduralTexturesLibrary/test/textures/lava/lavatile.jpg


BIN
proceduralTexturesLibrary/test/textures/mixMap.png


+ 0 - 0
proceduralTexturesLibrary/test/textures/rock.png


Some files were not shown because too many files changed in this diff