浏览代码

Merge pull request #1541 from sebavan/Development

Development
David Catuhe 8 年之前
父节点
当前提交
87abffb0e0
共有 100 个文件被更改,包括 5209 次插入5275 次删除
  1. 3 1
      .gitignore
  2. 27 0
      .vscode/launch.json
  3. 9 3
      .vscode/settings.json
  4. 18 18
      Playground/index-local.html
  5. 184 0
      Tools/Gulp/config.json
  6. 3 3
      materialsLibrary/gulp-srcToVariable.js
  7. 128 15
      Tools/Gulp/gulpfile.js
  8. 1 1
      Tools/Gulp/package.json
  9. 0 0
      assets/meshes/Rabbit.babylon
  10. 0 0
      assets/refs/dat.gui.min.js
  11. 0 0
      assets/textures/ColorGrading.3DL
  12. 0 0
      assets/textures/amiga.jpg
  13. 0 0
      assets/textures/fire/diffuse.png
  14. 0 0
      assets/textures/fire/distortion.png
  15. 0 0
      assets/textures/fire/opacity.png
  16. 0 0
      assets/textures/floor.png
  17. 0 0
      assets/textures/floor_bump.PNG
  18. 0 0
      assets/textures/grass.png
  19. 0 0
      assets/textures/grassn.png
  20. 0 0
      assets/textures/hdr/environment.hdr
  21. 0 0
      assets/textures/heightMap.png
  22. 0 0
      assets/textures/lava/cloud.png
  23. 0 0
      assets/textures/lava/lavatile.jpg
  24. 0 0
      assets/textures/leopard_fur.JPG
  25. 0 0
      assets/textures/mixMap.png
  26. 0 0
      assets/textures/rock.png
  27. 0 0
      assets/textures/rockn.png
  28. 0 0
      assets/textures/skybox/TropicalSunnyDay_nx.jpg
  29. 0 0
      assets/textures/skybox/TropicalSunnyDay_ny.jpg
  30. 0 0
      assets/textures/skybox/TropicalSunnyDay_nz.jpg
  31. 0 0
      assets/textures/skybox/TropicalSunnyDay_px.jpg
  32. 0 0
      assets/textures/skybox/TropicalSunnyDay_py.jpg
  33. 0 0
      assets/textures/skybox/TropicalSunnyDay_pz.jpg
  34. 0 0
      assets/textures/speckles.jpg
  35. 0 0
      assets/textures/waterbump.png
  36. 13 13
      materialsLibrary/dist/babylon.fireMaterial.js
  37. 1 0
      dist/materialsLibrary/babylon.fireMaterial.min.js
  38. 25 26
      materialsLibrary/dist/babylon.furMaterial.js
  39. 1 0
      dist/materialsLibrary/babylon.furMaterial.min.js
  40. 15 15
      materialsLibrary/dist/babylon.gradientMaterial.js
  41. 1 0
      dist/materialsLibrary/babylon.gradientMaterial.min.js
  42. 14 14
      materialsLibrary/dist/babylon.gridMaterial.js
  43. 1 0
      dist/materialsLibrary/babylon.gridMaterial.min.js
  44. 18 18
      materialsLibrary/dist/babylon.lavaMaterial.js
  45. 1 0
      dist/materialsLibrary/babylon.lavaMaterial.min.js
  46. 11 11
      materialsLibrary/dist/babylon.normalMaterial.js
  47. 1 0
      dist/materialsLibrary/babylon.normalMaterial.min.js
  48. 12 12
      materialsLibrary/dist/babylon.simpleMaterial.js
  49. 1 0
      dist/materialsLibrary/babylon.simpleMaterial.min.js
  50. 18 18
      materialsLibrary/dist/babylon.skyMaterial.js
  51. 1 0
      dist/materialsLibrary/babylon.skyMaterial.min.js
  52. 20 20
      materialsLibrary/dist/babylon.terrainMaterial.js
  53. 1 0
      dist/materialsLibrary/babylon.terrainMaterial.min.js
  54. 21 21
      materialsLibrary/dist/babylon.triPlanarMaterial.js
  55. 1 0
      dist/materialsLibrary/babylon.triPlanarMaterial.min.js
  56. 30 31
      materialsLibrary/dist/babylon.waterMaterial.js
  57. 1 0
      dist/materialsLibrary/babylon.waterMaterial.min.js
  58. 11 11
      postProcessLibrary/dist/babylon.asciiArtPostProcess.js
  59. 1 0
      dist/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  60. 11 11
      postProcessLibrary/dist/babylon.digitalRainPostProcess.js
  61. 1 0
      dist/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  62. 4202 4202
      dist/preview release/babylon.d.ts
  63. 362 179
      dist/preview release/babylon.max.js
  64. 4 2
      proceduralTexturesLibrary/dist/babylon.brickProceduralTexture.js
  65. 1 0
      dist/proceduralTexturesLibrary/babylon.brickProceduralTexture.min.js
  66. 4 2
      proceduralTexturesLibrary/dist/babylon.cloudProceduralTexture.js
  67. 1 0
      dist/proceduralTexturesLibrary/babylon.cloudProceduralTexture.min.js
  68. 4 2
      proceduralTexturesLibrary/dist/babylon.fireProceduralTexture.js
  69. 1 0
      dist/proceduralTexturesLibrary/babylon.fireProceduralTexture.min.js
  70. 4 2
      proceduralTexturesLibrary/dist/babylon.grassProceduralTexture.js
  71. 1 0
      dist/proceduralTexturesLibrary/babylon.grassProceduralTexture.min.js
  72. 4 2
      proceduralTexturesLibrary/dist/babylon.marbleProceduralTexture.js
  73. 1 0
      dist/proceduralTexturesLibrary/babylon.marbleProceduralTexture.min.js
  74. 4 2
      proceduralTexturesLibrary/dist/babylon.roadProceduralTexture.js
  75. 1 0
      dist/proceduralTexturesLibrary/babylon.roadProceduralTexture.min.js
  76. 4 2
      proceduralTexturesLibrary/dist/babylon.starfieldProceduralTexture.js
  77. 1 0
      dist/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.min.js
  78. 4 2
      proceduralTexturesLibrary/dist/babylon.woodProceduralTexture.js
  79. 1 0
      dist/proceduralTexturesLibrary/babylon.woodProceduralTexture.min.js
  80. 0 100
      materialsLibrary/config.json
  81. 0 1
      materialsLibrary/dist/babylon.fireMaterial.min.js
  82. 0 1
      materialsLibrary/dist/babylon.furMaterial.min.js
  83. 0 1
      materialsLibrary/dist/babylon.gradientMaterial.min.js
  84. 0 1
      materialsLibrary/dist/babylon.gridMaterial.min.js
  85. 0 1
      materialsLibrary/dist/babylon.lavaMaterial.min.js
  86. 0 1
      materialsLibrary/dist/babylon.normalMaterial.min.js
  87. 0 1
      materialsLibrary/dist/babylon.simpleMaterial.min.js
  88. 0 1
      materialsLibrary/dist/babylon.skyMaterial.min.js
  89. 0 1
      materialsLibrary/dist/babylon.terrainMaterial.min.js
  90. 0 1
      materialsLibrary/dist/babylon.triPlanarMaterial.min.js
  91. 0 1
      materialsLibrary/dist/babylon.waterMaterial.min.js
  92. 0 28
      materialsLibrary/dist/dts/babylon.fireMaterial.d.ts
  93. 0 43
      materialsLibrary/dist/dts/babylon.furMaterial.d.ts
  94. 0 30
      materialsLibrary/dist/dts/babylon.gradientMaterial.d.ts
  95. 0 55
      materialsLibrary/dist/dts/babylon.gridMaterial.d.ts
  96. 0 34
      materialsLibrary/dist/dts/babylon.lavaMaterial.d.ts
  97. 0 26
      materialsLibrary/dist/dts/babylon.normalMaterial.d.ts
  98. 0 262
      materialsLibrary/dist/dts/babylon.pbrMaterial.d.ts
  99. 0 27
      materialsLibrary/dist/dts/babylon.simpleMaterial.d.ts
  100. 0 0
      materialsLibrary/dist/dts/babylon.skyMaterial.d.ts

+ 3 - 1
.gitignore

@@ -132,4 +132,6 @@ node_modules
 # for VSCode
 /.vs
 /Playground/project.lock.json
-.tempChromeProfileForDebug
+.tempChromeProfileForDebug
+.temp
+*.js.map

+ 27 - 0
.vscode/launch.json

@@ -9,6 +9,33 @@
             "webRoot": "${workspaceRoot}/",
             "sourceMaps": true,
             "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug"
+        },
+        {
+            "name": "Launch Materials Library (Chrome)",
+            "type": "chrome",
+            "request": "launch",
+            "url": "http://localhost:1338/materialsLibrary/index.html",
+            "webRoot": "${workspaceRoot}/",
+            "sourceMaps": true,
+            "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug"
+        },
+        {
+            "name": "Launch Post Processes Library (Chrome)",
+            "type": "chrome",
+            "request": "launch",
+            "url": "http://localhost:1338/postProcessLibrary/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"
         }
     ]
 }

+ 9 - 3
.vscode/settings.json

@@ -6,9 +6,14 @@
         "**/.svn": true,
         "**/.hg": true,
         "**/.DS_Store": true,
-        "**/.vs": true,
+        "**/.vs": true,        
         "**/.tempChromeProfileForDebug": true,
-        "**/node_modules": true
+        "**/node_modules": true,
+        "**/temp": true,
+        "**/*.js.map": true,
+        "**/*.js": { 
+            "when":"$(basename).ts"
+        }
     },
     "files.associations": {
         "*.fx": "glsl"
@@ -17,6 +22,7 @@
         "**/node_modules": true,
         "**/bower_components": true,
         "**/.vs": true,
-        "**/.tempChromeProfileForDebug": true
+        "**/.tempChromeProfileForDebug": true,
+        "**/.temp": true
     }
 }

+ 18 - 18
Playground/index-local.html

@@ -195,25 +195,25 @@
     <script src="../src/Materials/Textures/babylon.colorGradingTexture.js"></script>
     <script src="../src/Layer/babylon.highlightlayer.js"></script>
 
-    <script src="../materialsLibrary/dist/babylon.fireMaterial.min.js"></script>
-    <script src="../materialsLibrary/dist/babylon.waterMaterial.min.js"></script>
-    <script src="../materialsLibrary/dist/babylon.lavaMaterial.min.js"></script>
-    <script src="../materialsLibrary/dist/babylon.normalMaterial.min.js"></script>
-    <script src="../materialsLibrary/dist/babylon.skyMaterial.min.js"></script>
-    <script src="../materialsLibrary/dist/babylon.triPlanarMaterial.min.js"></script>
-    <script src="../materialsLibrary/dist/babylon.terrainMaterial.min.js"></script>
-    <script src="../materialsLibrary/dist/babylon.gradientMaterial.min.js"></script>
-    <script src="../materialsLibrary/dist/babylon.furMaterial.min.js"></script>
-    <script src="../materialsLibrary/dist/babylon.gridMaterial.min.js"></script>
+    <script src="../dist/materialsLibrary/babylon.fireMaterial.js"></script>
+    <script src="../dist/materialsLibrary/babylon.waterMaterial.js"></script>
+    <script src="../dist/materialsLibrary/babylon.lavaMaterial.js"></script>
+    <script src="../dist/materialsLibrary/babylon.normalMaterial.js"></script>
+    <script src="../dist/materialsLibrary/babylon.skyMaterial.js"></script>
+    <script src="../dist/materialsLibrary/babylon.triPlanarMaterial.js"></script>
+    <script src="../dist/materialsLibrary/babylon.terrainMaterial.js"></script>
+    <script src="../dist/materialsLibrary/babylon.gradientMaterial.js"></script>
+    <script src="../dist/materialsLibrary/babylon.furMaterial.js"></script>
+    <script src="../dist/materialsLibrary/babylon.gridMaterial.js"></script>
 
-    <script src="../proceduralTexturesLibrary/dist/babylon.brickProceduralTexture.min.js"></script>
-    <script src="../proceduralTexturesLibrary/dist/babylon.cloudProceduralTexture.min.js"></script>
-    <script src="../proceduralTexturesLibrary/dist/babylon.fireProceduralTexture.min.js"></script>
-    <script src="../proceduralTexturesLibrary/dist/babylon.grassProceduralTexture.min.js"></script>
-    <script src="../proceduralTexturesLibrary/dist/babylon.marbleProceduralTexture.min.js"></script>
-    <script src="../proceduralTexturesLibrary/dist/babylon.roadProceduralTexture.min.js"></script>
-    <script src="../proceduralTexturesLibrary/dist/babylon.starfieldProceduralTexture.min.js"></script>
-    <script src="../proceduralTexturesLibrary/dist/babylon.woodProceduralTexture.min.js"></script>
+    <script src="../dist/proceduralTexturesLibrary/babylon.brickProceduralTexture.js"></script>
+    <script src="../dist/proceduralTexturesLibrary/babylon.cloudProceduralTexture.js"></script>
+    <script src="../dist/proceduralTexturesLibrary/babylon.fireProceduralTexture.js"></script>
+    <script src="../dist/proceduralTexturesLibrary/babylon.grassProceduralTexture.js"></script>
+    <script src="../dist/proceduralTexturesLibrary/babylon.marbleProceduralTexture.js"></script>
+    <script src="../dist/proceduralTexturesLibrary/babylon.roadProceduralTexture.js"></script>
+    <script src="../dist/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.js"></script>
+    <script src="../dist/proceduralTexturesLibrary/babylon.woodProceduralTexture.js"></script>
     <link href="index.css" rel="stylesheet" />
 </head>
 <body>

+ 184 - 0
Tools/Gulp/config.json

@@ -226,5 +226,189 @@
       "../../src/Debug/babylon.debugLayer.js",
       "../../src/PostProcess/babylon.standardRenderingPipeline.js"
     ]
+  },
+
+  "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/"
+    }
+  },
+
+  "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/"
+    }
   }
 }

+ 3 - 3
materialsLibrary/gulp-srcToVariable.js

@@ -5,9 +5,9 @@ var path = require('path');
 var File = gutil.File;
 
 // Consts
-const PLUGIN_NAME = 'gulp-srcToVariable';
+const PLUGIN_NAME = 'gulp-appendSrcToVariable';
 
-var srcToVariable = function srcToVariable(varName, asMap, namingCallback) {
+var appendSrcToVariable = function appendSrcToVariable(varName, asMap, namingCallback) {
 
     var content;
     var firstFile;
@@ -65,4 +65,4 @@ var srcToVariable = function srcToVariable(varName, asMap, namingCallback) {
     return through.obj(bufferContents, endStream);
 }
 
-module.exports = srcToVariable;
+module.exports = appendSrcToVariable;

+ 128 - 15
Tools/Gulp/gulpfile.js

@@ -3,6 +3,7 @@ var uglify = require("gulp-uglify");
 var typescript = require("gulp-typescript");
 var sourcemaps = require("gulp-sourcemaps");
 var srcToVariable = require("gulp-content-to-variable");
+var appendSrcToVariable = require("./gulp-appendSrcToVariable");
 var addDtsExport = require("./gulp-addDtsExport");
 var addModuleExports = require("./gulp-addModuleExports");
 var merge2 = require("merge2");
@@ -16,7 +17,7 @@ var uncommentShader = require("./gulp-removeShaderComments");
 var expect = require('gulp-expect-file');
 var optimisejs = require('gulp-optimize-js');
 var webserver = require('gulp-webserver');
-const path = require('path');
+var path = require('path');
 
 var config = require("./config.json");
 
@@ -28,16 +29,31 @@ var workersStream;
 var extendsSearchRegex = /var\s__extends[\s\S]+?\};/g;
 var decorateSearchRegex = /var\s__decorate[\s\S]+?\};/g;
 
-var tsProject = typescript.createProject({
+/**
+ * TS configurations shared in the gulp file.
+ */
+var tsConfig = {
     noExternalResolve: true,
     target: 'ES5',
     declarationFiles: true,
     typescript: require('typescript'),
     experimentalDecorators: true,
-    isolatedModules: false,
-});
+    isolatedModules: false
+};
+var tsProject = typescript.createProject(tsConfig);
 
-//function to convert the shaders' filenames to variable names.
+var externalTsConfig = {
+    noExternalResolve: false,
+    target: 'ES5',
+    declarationFiles: true,
+    typescript: require('typescript'),
+    experimentalDecorators: true,
+    isolatedModules: false
+};
+
+/*
+ * Shader Management.
+ */
 function shadersName(filename) {
     return filename.replace('.fragment', 'Pixel')
         .replace('.vertex', 'Vertex')
@@ -48,6 +64,9 @@ function includeShadersName(filename) {
     return filename.replace('.fx', '');
 }
 
+/*
+ * Main necessary files stream Management.
+ */
 gulp.task("includeShaders", function (cb) {
     includeShadersStream = config.includeShadersDirectories.map(function (shadersDef) {
         return gulp.src(shadersDef.files).
@@ -85,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 () {
     var tsResult = gulp.src(config.core.typescript)
@@ -115,14 +134,75 @@ gulp.task('typescript-compile', function () {
                 {
                     includeContent:false, 
                     sourceRoot: (filePath) => {
-                        var repeatCount = filePath.relative.split(path.sep).length - 1;
-                        return '../'.repeat(repeatCount); 
+                        return ''; 
                     }
                 }))
             .pipe(gulp.dest(config.build.srcOutputDirectory))
     ])
 });
 
+/**
+ * External library Build (mat, post processes, ...).
+ */
+gulp.task('materialsLibrary', function () {
+    return buildExternalLibraries(config.materialsLibrary);
+});
+
+gulp.task('postProcessesLibrary', function () {
+    return buildExternalLibraries(config.postProcessesLibrary);
+});
+
+gulp.task('proceduralTexturesLibrary', function () {
+    return buildExternalLibraries(config.proceduralTexturesLibrary);
+});
+
+/**
+ * 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);
+}
+
+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 fulljs = merge2(js, shader)
+        .pipe(concat(library.output));
+
+    var unminifiedAndMaps = fulljs.pipe(sourcemaps.write('.temp', {
+                includeContent:false,
+                sourceRoot: function (file) {
+                    return '../';
+                }
+            }))
+        .pipe(gulp.dest(settings.build.distOutputDirectory));
+
+    var minified = fulljs
+        .pipe(cleants())
+        .pipe(replace(extendsSearchRegex, ""))
+        .pipe(replace(decorateSearchRegex, ""))
+        .pipe(rename({extname: ".min.js"}))
+        .pipe(uglify())
+        .pipe(optimisejs())
+        .pipe(gulp.dest(settings.build.distOutputDirectory));
+
+    return merge2(unminifiedAndMaps, minified);
+}
+
+/**
+ * Build tasks to concat minify uflify optimise the BJS js in different flavor (workers...).
+ */
 gulp.task("buildCore", ["shaders"], function () {
     return merge2(
         gulp.src(config.core.files).        
@@ -181,24 +261,54 @@ gulp.task("build", ["workers", "shaders"], function () {
         .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) {
     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 () {
-    return gulp.watch(config.core.typescript, ['typescript-compile']);
+    var tasks = [gulp.watch(config.core.typescript, ['typescript-compile'])];
+
+    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;
 });
 
+/**
+ * Embedded webserver for test convenience.
+ */
 gulp.task('webserver', function () {
     gulp.src('../../.').pipe(webserver({
       port: 1338,
@@ -206,5 +316,8 @@ gulp.task('webserver', function () {
     }));
 });
 
+/**
+ * Combine Webserver and Watch as long as vscode does not handle multi tasks.
+ */
 gulp.task('run', ['watch', 'webserver'], function () {
 });

+ 1 - 1
Tools/Gulp/package.json

@@ -9,7 +9,7 @@
   "devDependencies": {
     "gulp": "^3.8.11",
     "gulp-uglify": "~1.5.3",
-    "gulp-sourcemaps": "~1.5.2",
+    "gulp-sourcemaps": "~1.9.1",
     "typescript": "^1.7.5",
     "gulp-typescript": "~2.13.0",
     "through2": "~0.6.5",

proceduralTexturesLibrary/test/meshes/Rabbit.babylon → assets/meshes/Rabbit.babylon


proceduralTexturesLibrary/test/refs/dat.gui.min.js → assets/refs/dat.gui.min.js


materialsLibrary/test/textures/ColorGrading.3DL → assets/textures/ColorGrading.3DL


proceduralTexturesLibrary/test/textures/amiga.jpg → assets/textures/amiga.jpg


proceduralTexturesLibrary/test/textures/fire/diffuse.png → assets/textures/fire/diffuse.png


proceduralTexturesLibrary/test/textures/fire/distortion.png → assets/textures/fire/distortion.png


proceduralTexturesLibrary/test/textures/fire/opacity.png → assets/textures/fire/opacity.png


proceduralTexturesLibrary/test/textures/floor.png → assets/textures/floor.png


proceduralTexturesLibrary/test/textures/floor_bump.PNG → assets/textures/floor_bump.PNG


proceduralTexturesLibrary/test/textures/grass.png → assets/textures/grass.png


proceduralTexturesLibrary/test/textures/grassn.png → assets/textures/grassn.png


materialsLibrary/test/textures/hdr/environment.hdr → assets/textures/hdr/environment.hdr


materialsLibrary/test/textures/heightMap.png → assets/textures/heightMap.png


proceduralTexturesLibrary/test/textures/lava/cloud.png → assets/textures/lava/cloud.png


proceduralTexturesLibrary/test/textures/lava/lavatile.jpg → assets/textures/lava/lavatile.jpg


materialsLibrary/test/textures/leopard_fur.JPG → assets/textures/leopard_fur.JPG


materialsLibrary/test/textures/mixMap.png → assets/textures/mixMap.png


proceduralTexturesLibrary/test/textures/rock.png → assets/textures/rock.png


proceduralTexturesLibrary/test/textures/rockn.png → assets/textures/rockn.png


proceduralTexturesLibrary/test/textures/skybox/TropicalSunnyDay_nx.jpg → assets/textures/skybox/TropicalSunnyDay_nx.jpg


proceduralTexturesLibrary/test/textures/skybox/TropicalSunnyDay_ny.jpg → assets/textures/skybox/TropicalSunnyDay_ny.jpg


proceduralTexturesLibrary/test/textures/skybox/TropicalSunnyDay_nz.jpg → assets/textures/skybox/TropicalSunnyDay_nz.jpg


proceduralTexturesLibrary/test/textures/skybox/TropicalSunnyDay_px.jpg → assets/textures/skybox/TropicalSunnyDay_px.jpg


proceduralTexturesLibrary/test/textures/skybox/TropicalSunnyDay_py.jpg → assets/textures/skybox/TropicalSunnyDay_py.jpg


proceduralTexturesLibrary/test/textures/skybox/TropicalSunnyDay_pz.jpg → assets/textures/skybox/TropicalSunnyDay_pz.jpg


materialsLibrary/test/textures/speckles.jpg → assets/textures/speckles.jpg


proceduralTexturesLibrary/test/textures/waterbump.png → assets/textures/waterbump.png


文件差异内容过多而无法显示
+ 13 - 13
materialsLibrary/dist/babylon.fireMaterial.js


文件差异内容过多而无法显示
+ 1 - 0
dist/materialsLibrary/babylon.fireMaterial.min.js


文件差异内容过多而无法显示
+ 25 - 26
materialsLibrary/dist/babylon.furMaterial.js


文件差异内容过多而无法显示
+ 1 - 0
dist/materialsLibrary/babylon.furMaterial.min.js


文件差异内容过多而无法显示
+ 15 - 15
materialsLibrary/dist/babylon.gradientMaterial.js


文件差异内容过多而无法显示
+ 1 - 0
dist/materialsLibrary/babylon.gradientMaterial.min.js


文件差异内容过多而无法显示
+ 14 - 14
materialsLibrary/dist/babylon.gridMaterial.js


文件差异内容过多而无法显示
+ 1 - 0
dist/materialsLibrary/babylon.gridMaterial.min.js


文件差异内容过多而无法显示
+ 18 - 18
materialsLibrary/dist/babylon.lavaMaterial.js


文件差异内容过多而无法显示
+ 1 - 0
dist/materialsLibrary/babylon.lavaMaterial.min.js


文件差异内容过多而无法显示
+ 11 - 11
materialsLibrary/dist/babylon.normalMaterial.js


文件差异内容过多而无法显示
+ 1 - 0
dist/materialsLibrary/babylon.normalMaterial.min.js


文件差异内容过多而无法显示
+ 12 - 12
materialsLibrary/dist/babylon.simpleMaterial.js


文件差异内容过多而无法显示
+ 1 - 0
dist/materialsLibrary/babylon.simpleMaterial.min.js


文件差异内容过多而无法显示
+ 18 - 18
materialsLibrary/dist/babylon.skyMaterial.js


文件差异内容过多而无法显示
+ 1 - 0
dist/materialsLibrary/babylon.skyMaterial.min.js


文件差异内容过多而无法显示
+ 20 - 20
materialsLibrary/dist/babylon.terrainMaterial.js


文件差异内容过多而无法显示
+ 1 - 0
dist/materialsLibrary/babylon.terrainMaterial.min.js


文件差异内容过多而无法显示
+ 21 - 21
materialsLibrary/dist/babylon.triPlanarMaterial.js


文件差异内容过多而无法显示
+ 1 - 0
dist/materialsLibrary/babylon.triPlanarMaterial.min.js


文件差异内容过多而无法显示
+ 30 - 31
materialsLibrary/dist/babylon.waterMaterial.js


文件差异内容过多而无法显示
+ 1 - 0
dist/materialsLibrary/babylon.waterMaterial.min.js


文件差异内容过多而无法显示
+ 11 - 11
postProcessLibrary/dist/babylon.asciiArtPostProcess.js


文件差异内容过多而无法显示
+ 1 - 0
dist/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


文件差异内容过多而无法显示
+ 11 - 11
postProcessLibrary/dist/babylon.digitalRainPostProcess.js


文件差异内容过多而无法显示
+ 1 - 0
dist/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


文件差异内容过多而无法显示
+ 4202 - 4202
dist/preview release/babylon.d.ts


文件差异内容过多而无法显示
+ 362 - 179
dist/preview release/babylon.max.js


文件差异内容过多而无法显示
+ 4 - 2
proceduralTexturesLibrary/dist/babylon.brickProceduralTexture.js


文件差异内容过多而无法显示
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.brickProceduralTexture.min.js


文件差异内容过多而无法显示
+ 4 - 2
proceduralTexturesLibrary/dist/babylon.cloudProceduralTexture.js


文件差异内容过多而无法显示
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.cloudProceduralTexture.min.js


文件差异内容过多而无法显示
+ 4 - 2
proceduralTexturesLibrary/dist/babylon.fireProceduralTexture.js


文件差异内容过多而无法显示
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.fireProceduralTexture.min.js


文件差异内容过多而无法显示
+ 4 - 2
proceduralTexturesLibrary/dist/babylon.grassProceduralTexture.js


文件差异内容过多而无法显示
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.grassProceduralTexture.min.js


文件差异内容过多而无法显示
+ 4 - 2
proceduralTexturesLibrary/dist/babylon.marbleProceduralTexture.js


文件差异内容过多而无法显示
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.marbleProceduralTexture.min.js


文件差异内容过多而无法显示
+ 4 - 2
proceduralTexturesLibrary/dist/babylon.roadProceduralTexture.js


文件差异内容过多而无法显示
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.roadProceduralTexture.min.js


文件差异内容过多而无法显示
+ 4 - 2
proceduralTexturesLibrary/dist/babylon.starfieldProceduralTexture.js


文件差异内容过多而无法显示
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.starfieldProceduralTexture.min.js


文件差异内容过多而无法显示
+ 4 - 2
proceduralTexturesLibrary/dist/babylon.woodProceduralTexture.js


文件差异内容过多而无法显示
+ 1 - 0
dist/proceduralTexturesLibrary/babylon.woodProceduralTexture.min.js


+ 0 - 100
materialsLibrary/config.json

@@ -1,100 +0,0 @@
-{
-  "materials": [
-
-     {
-      "file": "materials/gradient/babylon.gradientMaterial.ts",
-      "shaderFiles": [
-        "materials/gradient/gradient.vertex.fx",
-        "materials/gradient/gradient.fragment.fx"
-      ],
-      "output": "babylon.gradientMaterial.js"
-    },
-    {
-      "file": "materials/normal/babylon.normalMaterial.ts",
-      "shaderFiles": [
-        "materials/normal/normal.vertex.fx",
-        "materials/normal/normal.fragment.fx"
-      ],
-      "output": "babylon.normalMaterial.js"
-    },
-    {
-      "file": "materials/lava/babylon.lavaMaterial.ts",
-      "shaderFiles": [
-        "materials/lava/lava.vertex.fx",
-        "materials/lava/lava.fragment.fx"
-      ],
-      "output": "babylon.lavaMaterial.js"
-    },
-    {
-      "file": "materials/simple/babylon.simpleMaterial.ts",
-      "shaderFiles": [
-        "materials/simple/simple.vertex.fx",
-        "materials/simple/simple.fragment.fx"
-      ],
-      "output": "babylon.simpleMaterial.js"
-    },
-    {
-      "file": "materials/water/babylon.waterMaterial.ts",
-      "shaderFiles": [
-        "materials/water/water.vertex.fx",
-        "materials/water/water.fragment.fx"
-      ],
-      "output": "babylon.waterMaterial.js"
-    },
-    {
-      "file": "materials/fire/babylon.fireMaterial.ts",
-      "shaderFiles": [
-        "materials/fire/fire.vertex.fx",
-        "materials/fire/fire.fragment.fx"
-      ],
-      "output": "babylon.fireMaterial.js"
-    },
-    {
-      "file": "materials/fur/babylon.furMaterial.ts",
-      "shaderFiles": [
-        "materials/fur/fur.vertex.fx",
-        "materials/fur/fur.fragment.fx"
-      ],
-      "output": "babylon.furMaterial.js"
-    },
-    {
-      "file": "materials/terrain/babylon.terrainMaterial.ts",
-      "shaderFiles": [
-        "materials/terrain/terrain.vertex.fx",
-        "materials/terrain/terrain.fragment.fx"
-      ],
-      "output": "babylon.terrainMaterial.js"
-    },
-    {
-      "file": "materials/triPlanar/babylon.triPlanarMaterial.ts",
-      "shaderFiles": [
-        "materials/triPlanar/triplanar.vertex.fx",
-        "materials/triPlanar/triplanar.fragment.fx"
-      ],
-      "output": "babylon.triPlanarMaterial.js"
-    },
-    {
-      "file": "materials/sky/babylon.skyMaterial.ts",
-      "shaderFiles": [
-        "materials/sky/sky.vertex.fx",
-        "materials/sky/sky.fragment.fx"
-      ],
-      "output": "babylon.skyMaterial.js"
-    },
-    {
-      "file": "materials/grid/babylon.gridMaterial.ts",
-      "shaderFiles": [
-        "materials/grid/grid.vertex.fx",
-        "materials/grid/grid.fragment.fx",
-        "materials/grid/legacygrid.vertex.fx",
-        "materials/grid/legacygrid.fragment.fx"
-      ],
-      "output": "babylon.gridMaterial.js",
-      "declarationFilename": "babylon.gridMaterial.d.ts"
-    }
-  ],
-  "build": {
-    "distOutputDirectory": "dist/",
-    "dtsOutputDirectory": "dist/dts/"
-  }
-}

文件差异内容过多而无法显示
+ 0 - 1
materialsLibrary/dist/babylon.fireMaterial.min.js


文件差异内容过多而无法显示
+ 0 - 1
materialsLibrary/dist/babylon.furMaterial.min.js


文件差异内容过多而无法显示
+ 0 - 1
materialsLibrary/dist/babylon.gradientMaterial.min.js


文件差异内容过多而无法显示
+ 0 - 1
materialsLibrary/dist/babylon.gridMaterial.min.js


文件差异内容过多而无法显示
+ 0 - 1
materialsLibrary/dist/babylon.lavaMaterial.min.js


文件差异内容过多而无法显示
+ 0 - 1
materialsLibrary/dist/babylon.normalMaterial.min.js


文件差异内容过多而无法显示
+ 0 - 1
materialsLibrary/dist/babylon.simpleMaterial.min.js


文件差异内容过多而无法显示
+ 0 - 1
materialsLibrary/dist/babylon.skyMaterial.min.js


文件差异内容过多而无法显示
+ 0 - 1
materialsLibrary/dist/babylon.terrainMaterial.min.js


文件差异内容过多而无法显示
+ 0 - 1
materialsLibrary/dist/babylon.triPlanarMaterial.min.js


文件差异内容过多而无法显示
+ 0 - 1
materialsLibrary/dist/babylon.waterMaterial.min.js


+ 0 - 28
materialsLibrary/dist/dts/babylon.fireMaterial.d.ts

@@ -1,28 +0,0 @@
-/// <reference path="../../../dist/preview release/babylon.d.ts" />
-declare module BABYLON {
-    class FireMaterial extends Material {
-        diffuseTexture: BaseTexture;
-        distortionTexture: BaseTexture;
-        opacityTexture: BaseTexture;
-        diffuseColor: Color3;
-        speed: number;
-        private _scaledDiffuse;
-        private _renderId;
-        private _defines;
-        private _cachedDefines;
-        private _lastTime;
-        constructor(name: string, scene: Scene);
-        needAlphaBlending(): boolean;
-        needAlphaTesting(): boolean;
-        getAlphaTestTexture(): BaseTexture;
-        private _checkCache(scene, mesh?, useInstances?);
-        isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
-        bindOnlyWorldMatrix(world: Matrix): void;
-        bind(world: Matrix, mesh?: Mesh): void;
-        getAnimatables(): IAnimatable[];
-        dispose(forceDisposeEffect?: boolean): void;
-        clone(name: string): FireMaterial;
-        serialize(): any;
-        static Parse(source: any, scene: Scene, rootUrl: string): FireMaterial;
-    }
-}

+ 0 - 43
materialsLibrary/dist/dts/babylon.furMaterial.d.ts

@@ -1,43 +0,0 @@
-/// <reference path="../../../dist/preview release/babylon.d.ts" />
-declare module BABYLON {
-    class FurMaterial extends Material {
-        diffuseTexture: BaseTexture;
-        heightTexture: BaseTexture;
-        diffuseColor: Color3;
-        furLength: number;
-        furAngle: number;
-        furColor: Color3;
-        furOffset: number;
-        furSpacing: number;
-        furGravity: Vector3;
-        furSpeed: number;
-        furDensity: number;
-        furTexture: DynamicTexture;
-        disableLighting: boolean;
-        highLevelFur: boolean;
-        maxSimultaneousLights: number;
-        _meshes: AbstractMesh[];
-        private _worldViewProjectionMatrix;
-        private _renderId;
-        private _furTime;
-        private _defines;
-        private _cachedDefines;
-        constructor(name: string, scene: Scene);
-        furTime: number;
-        needAlphaBlending(): boolean;
-        needAlphaTesting(): boolean;
-        getAlphaTestTexture(): BaseTexture;
-        updateFur(): void;
-        private _checkCache(scene, mesh?, useInstances?);
-        isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
-        bindOnlyWorldMatrix(world: Matrix): void;
-        bind(world: Matrix, mesh?: Mesh): void;
-        getAnimatables(): IAnimatable[];
-        dispose(forceDisposeEffect?: boolean): void;
-        clone(name: string): FurMaterial;
-        serialize(): any;
-        static Parse(source: any, scene: Scene, rootUrl: string): FurMaterial;
-        static GenerateTexture(name: string, scene: Scene): DynamicTexture;
-        static FurifyMesh(sourceMesh: Mesh, quality: number): Mesh[];
-    }
-}

+ 0 - 30
materialsLibrary/dist/dts/babylon.gradientMaterial.d.ts

@@ -1,30 +0,0 @@
-/// <reference path="../../../dist/preview release/babylon.d.ts" />
-declare module BABYLON {
-    class GradientMaterial extends Material {
-        topColor: Color3;
-        topColorAlpha: number;
-        bottomColor: Color3;
-        bottomColorAlpha: number;
-        offset: number;
-        smoothness: number;
-        disableLighting: boolean;
-        private _worldViewProjectionMatrix;
-        private _scaledDiffuse;
-        private _renderId;
-        private _defines;
-        private _cachedDefines;
-        constructor(name: string, scene: Scene);
-        needAlphaBlending(): boolean;
-        needAlphaTesting(): boolean;
-        getAlphaTestTexture(): BaseTexture;
-        private _checkCache(scene, mesh?, useInstances?);
-        isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
-        bindOnlyWorldMatrix(world: Matrix): void;
-        bind(world: Matrix, mesh?: Mesh): void;
-        getAnimatables(): IAnimatable[];
-        dispose(forceDisposeEffect?: boolean): void;
-        clone(name: string): GradientMaterial;
-        serialize(): any;
-        static Parse(source: any, scene: Scene, rootUrl: string): GradientMaterial;
-    }
-}

+ 0 - 55
materialsLibrary/dist/dts/babylon.gridMaterial.d.ts

@@ -1,55 +0,0 @@
-/// <reference path="../../../dist/preview release/babylon.d.ts" />
-declare module BABYLON {
-    /**
-     * The grid materials allows you to wrap any shape with a grid.
-     * Colors are customizable.
-     */
-    class GridMaterial extends BABYLON.Material {
-        /**
-         * 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;
-        /**
-         * 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;
-        private _gridControl;
-        private _renderId;
-        private _defines;
-        private _cachedDefines;
-        /**
-         * 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;
-        private _checkCache(scene, mesh?, useInstances?);
-        isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
-        bindOnlyWorldMatrix(world: Matrix): void;
-        bind(world: Matrix, mesh?: Mesh): void;
-        dispose(forceDisposeEffect?: boolean): void;
-        clone(name: string): GridMaterial;
-        serialize(): any;
-        static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
-    }
-}

+ 0 - 34
materialsLibrary/dist/dts/babylon.lavaMaterial.d.ts

@@ -1,34 +0,0 @@
-/// <reference path="../../../dist/preview release/babylon.d.ts" />
-declare module BABYLON {
-    class LavaMaterial extends Material {
-        diffuseTexture: BaseTexture;
-        noiseTexture: BaseTexture;
-        fogColor: Color3;
-        speed: number;
-        movingSpeed: number;
-        lowFrequencySpeed: number;
-        fogDensity: number;
-        private _lastTime;
-        diffuseColor: Color3;
-        disableLighting: boolean;
-        maxSimultaneousLights: number;
-        private _worldViewProjectionMatrix;
-        private _scaledDiffuse;
-        private _renderId;
-        private _defines;
-        private _cachedDefines;
-        constructor(name: string, scene: Scene);
-        needAlphaBlending(): boolean;
-        needAlphaTesting(): boolean;
-        getAlphaTestTexture(): BaseTexture;
-        private _checkCache(scene, mesh?, useInstances?);
-        isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
-        bindOnlyWorldMatrix(world: Matrix): void;
-        bind(world: Matrix, mesh?: Mesh): void;
-        getAnimatables(): IAnimatable[];
-        dispose(forceDisposeEffect?: boolean): void;
-        clone(name: string): LavaMaterial;
-        serialize(): any;
-        static Parse(source: any, scene: Scene, rootUrl: string): LavaMaterial;
-    }
-}

+ 0 - 26
materialsLibrary/dist/dts/babylon.normalMaterial.d.ts

@@ -1,26 +0,0 @@
-/// <reference path="../../../dist/preview release/babylon.d.ts" />
-declare module BABYLON {
-    class NormalMaterial extends Material {
-        diffuseTexture: BaseTexture;
-        diffuseColor: Color3;
-        disableLighting: boolean;
-        private _worldViewProjectionMatrix;
-        private _scaledDiffuse;
-        private _renderId;
-        private _defines;
-        private _cachedDefines;
-        constructor(name: string, scene: Scene);
-        needAlphaBlending(): boolean;
-        needAlphaTesting(): boolean;
-        getAlphaTestTexture(): BaseTexture;
-        private _checkCache(scene, mesh?, useInstances?);
-        isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
-        bindOnlyWorldMatrix(world: Matrix): void;
-        bind(world: Matrix, mesh?: Mesh): void;
-        getAnimatables(): IAnimatable[];
-        dispose(forceDisposeEffect?: boolean): void;
-        clone(name: string): NormalMaterial;
-        serialize(): any;
-        static Parse(source: any, scene: Scene, rootUrl: string): NormalMaterial;
-    }
-}

+ 0 - 262
materialsLibrary/dist/dts/babylon.pbrMaterial.d.ts

@@ -1,262 +0,0 @@
-/// <reference path="../../../dist/preview release/babylon.d.ts" />
-declare module BABYLON {
-    /**
-     * The Physically based material of BJS.
-     *
-     * This offers the main features of a standard PBR material.
-     * For more information, please refer to the documentation :
-     * http://doc.babylonjs.com/extensions/Physically_Based_Rendering
-     */
-    class PBRMaterial extends BABYLON.Material {
-        /**
-         * Intensity of the direct lights e.g. the four lights available in your scene.
-         * This impacts both the direct diffuse and specular highlights.
-         */
-        directIntensity: number;
-        /**
-         * Intensity of the emissive part of the material.
-         * This helps controlling the emissive effect without modifying the emissive color.
-         */
-        emissiveIntensity: number;
-        /**
-         * Intensity of the environment e.g. how much the environment will light the object
-         * either through harmonics for rough material or through the refelction for shiny ones.
-         */
-        environmentIntensity: number;
-        /**
-         * This is a special control allowing the reduction of the specular highlights coming from the
-         * four lights of the scene. Those highlights may not be needed in full environment lighting.
-         */
-        specularIntensity: number;
-        private _lightingInfos;
-        /**
-         * Debug Control allowing disabling the bump map on this material.
-         */
-        disableBumpMap: boolean;
-        /**
-         * Debug Control helping enforcing or dropping the darkness of shadows.
-         * 1.0 means the shadows have their normal darkness, 0.0 means the shadows are not visible.
-         */
-        overloadedShadowIntensity: number;
-        /**
-         * Debug Control helping dropping the shading effect coming from the diffuse lighting.
-         * 1.0 means the shade have their normal impact, 0.0 means no shading at all.
-         */
-        overloadedShadeIntensity: number;
-        private _overloadedShadowInfos;
-        /**
-         * The camera exposure used on this material.
-         * This property is here and not in the camera to allow controlling exposure without full screen post process.
-         * This corresponds to a photographic exposure.
-         */
-        cameraExposure: number;
-        /**
-         * The camera contrast used on this material.
-         * This property is here and not in the camera to allow controlling contrast without full screen post process.
-         */
-        cameraContrast: number;
-        private _cameraInfos;
-        private _microsurfaceTextureLods;
-        /**
-         * Debug Control allowing to overload the ambient color.
-         * This as to be use with the overloadedAmbientIntensity parameter.
-         */
-        overloadedAmbient: Color3;
-        /**
-         * Debug Control indicating how much the overloaded ambient color is used against the default one.
-         */
-        overloadedAmbientIntensity: number;
-        /**
-         * Debug Control allowing to overload the albedo color.
-         * This as to be use with the overloadedAlbedoIntensity parameter.
-         */
-        overloadedAlbedo: Color3;
-        /**
-         * Debug Control indicating how much the overloaded albedo color is used against the default one.
-         */
-        overloadedAlbedoIntensity: number;
-        /**
-         * Debug Control allowing to overload the reflectivity color.
-         * This as to be use with the overloadedReflectivityIntensity parameter.
-         */
-        overloadedReflectivity: Color3;
-        /**
-         * Debug Control indicating how much the overloaded reflectivity color is used against the default one.
-         */
-        overloadedReflectivityIntensity: number;
-        /**
-         * Debug Control allowing to overload the emissive color.
-         * This as to be use with the overloadedEmissiveIntensity parameter.
-         */
-        overloadedEmissive: Color3;
-        /**
-         * Debug Control indicating how much the overloaded emissive color is used against the default one.
-         */
-        overloadedEmissiveIntensity: number;
-        private _overloadedIntensity;
-        /**
-         * Debug Control allowing to overload the reflection color.
-         * This as to be use with the overloadedReflectionIntensity parameter.
-         */
-        overloadedReflection: Color3;
-        /**
-         * Debug Control indicating how much the overloaded reflection color is used against the default one.
-         */
-        overloadedReflectionIntensity: number;
-        /**
-         * Debug Control allowing to overload the microsurface.
-         * This as to be use with the overloadedMicroSurfaceIntensity parameter.
-         */
-        overloadedMicroSurface: number;
-        /**
-         * Debug Control indicating how much the overloaded microsurface is used against the default one.
-         */
-        overloadedMicroSurfaceIntensity: number;
-        private _overloadedMicroSurface;
-        /**
-         * AKA Diffuse Texture in standard nomenclature.
-         */
-        albedoTexture: BaseTexture;
-        /**
-         * AKA Occlusion Texture in other nomenclature.
-         */
-        ambientTexture: BaseTexture;
-        opacityTexture: BaseTexture;
-        reflectionTexture: BaseTexture;
-        emissiveTexture: BaseTexture;
-        /**
-         * AKA Specular texture in other nomenclature.
-         */
-        reflectivityTexture: BaseTexture;
-        bumpTexture: BaseTexture;
-        lightmapTexture: BaseTexture;
-        refractionTexture: BaseTexture;
-        ambientColor: Color3;
-        /**
-         * AKA Diffuse Color in other nomenclature.
-         */
-        albedoColor: Color3;
-        /**
-         * AKA Specular Color in other nomenclature.
-         */
-        reflectivityColor: Color3;
-        reflectionColor: Color3;
-        emissiveColor: Color3;
-        /**
-         * AKA Glossiness in other nomenclature.
-         */
-        microSurface: number;
-        /**
-         * source material index of refraction (IOR)' / 'destination material IOR.
-         */
-        indexOfRefraction: number;
-        /**
-         * Controls if refraction needs to be inverted on Y. This could be usefull for procedural texture.
-         */
-        invertRefractionY: boolean;
-        opacityFresnelParameters: FresnelParameters;
-        emissiveFresnelParameters: FresnelParameters;
-        /**
-         * This parameters will make the material used its opacity to control how much it is refracting aginst not.
-         * Materials half opaque for instance using refraction could benefit from this control.
-         */
-        linkRefractionWithTransparency: boolean;
-        /**
-         * The emissive and albedo are linked to never be more than one (Energy conservation).
-         */
-        linkEmissiveWithAlbedo: boolean;
-        useLightmapAsShadowmap: boolean;
-        /**
-         * In this mode, the emissive informtaion will always be added to the lighting once.
-         * A light for instance can be thought as emissive.
-         */
-        useEmissiveAsIllumination: boolean;
-        /**
-         * Secifies that the alpha is coming form the albedo channel alpha channel.
-         */
-        useAlphaFromAlbedoTexture: boolean;
-        /**
-         * Specifies that the material will keeps the specular highlights over a transparent surface (only the most limunous ones).
-         * A car glass is a good exemple of that. When sun reflects on it you can not see what is behind.
-         */
-        useSpecularOverAlpha: boolean;
-        /**
-         * Specifies if the reflectivity texture contains the glossiness information in its alpha channel.
-         */
-        useMicroSurfaceFromReflectivityMapAlpha: boolean;
-        /**
-         * In case the reflectivity map does not contain the microsurface information in its alpha channel,
-         * The material will try to infer what glossiness each pixel should be.
-         */
-        useAutoMicroSurfaceFromReflectivityMap: boolean;
-        /**
-         * Allows to work with scalar in linear mode. This is definitely a matter of preferences and tools used during
-         * the creation of the material.
-         */
-        useScalarInLinearSpace: boolean;
-        /**
-         * BJS is using an harcoded light falloff based on a manually sets up range.
-         * In PBR, one way to represents the fallof is to use the inverse squared root algorythm.
-         * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.
-         */
-        usePhysicalLightFalloff: boolean;
-        /**
-         * Specifies that the material will keeps the reflection highlights over a transparent surface (only the most limunous ones).
-         * A car glass is a good exemple of that. When the street lights reflects on it you can not see what is behind.
-         */
-        useRadianceOverAlpha: boolean;
-        /**
-         * Allows using the bump map in parallax mode.
-         */
-        useParallax: boolean;
-        /**
-         * Allows using the bump map in parallax occlusion mode.
-         */
-        useParallaxOcclusion: boolean;
-        /**
-         * Controls the scale bias of the parallax mode.
-         */
-        parallaxScaleBias: number;
-        disableLighting: boolean;
-        private _renderTargets;
-        private _worldViewProjectionMatrix;
-        private _globalAmbientColor;
-        private _tempColor;
-        private _renderId;
-        private _defines;
-        private _cachedDefines;
-        private _useLogarithmicDepth;
-        /**
-         * Instantiates a new PBRMaterial instance.
-         *
-         * @param name The material name
-         * @param scene The scene the material will be use in.
-         */
-        constructor(name: string, scene: Scene);
-        useLogarithmicDepth: boolean;
-        needAlphaBlending(): boolean;
-        needAlphaTesting(): boolean;
-        private _shouldUseAlphaFromAlbedoTexture();
-        getAlphaTestTexture(): BaseTexture;
-        private _checkCache(scene, mesh?, useInstances?);
-        private convertColorToLinearSpaceToRef(color, ref);
-        private static convertColorToLinearSpaceToRef(color, ref, useScalarInLinear);
-        private static _scaledAlbedo;
-        private static _scaledReflectivity;
-        private static _scaledEmissive;
-        private static _scaledReflection;
-        private static _lightRadiuses;
-        static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: MaterialDefines, useScalarInLinearSpace: boolean): void;
-        isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
-        unbind(): void;
-        bindOnlyWorldMatrix(world: Matrix): void;
-        private _myScene;
-        private _myShadowGenerator;
-        bind(world: Matrix, mesh?: Mesh): void;
-        getAnimatables(): IAnimatable[];
-        dispose(forceDisposeEffect?: boolean): void;
-        clone(name: string): PBRMaterial;
-        serialize(): any;
-        static Parse(source: any, scene: Scene, rootUrl: string): PBRMaterial;
-    }
-}

+ 0 - 27
materialsLibrary/dist/dts/babylon.simpleMaterial.d.ts

@@ -1,27 +0,0 @@
-/// <reference path="../../../dist/preview release/babylon.d.ts" />
-declare module BABYLON {
-    class SimpleMaterial extends Material {
-        diffuseTexture: BaseTexture;
-        diffuseColor: Color3;
-        disableLighting: boolean;
-        maxSimultaneousLights: number;
-        private _worldViewProjectionMatrix;
-        private _scaledDiffuse;
-        private _renderId;
-        private _defines;
-        private _cachedDefines;
-        constructor(name: string, scene: Scene);
-        needAlphaBlending(): boolean;
-        needAlphaTesting(): boolean;
-        getAlphaTestTexture(): BaseTexture;
-        private _checkCache(scene, mesh?, useInstances?);
-        isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
-        bindOnlyWorldMatrix(world: Matrix): void;
-        bind(world: Matrix, mesh?: Mesh): void;
-        getAnimatables(): IAnimatable[];
-        dispose(forceDisposeEffect?: boolean): void;
-        clone(name: string): SimpleMaterial;
-        serialize(): any;
-        static Parse(source: any, scene: Scene, rootUrl: string): SimpleMaterial;
-    }
-}

+ 0 - 0
materialsLibrary/dist/dts/babylon.skyMaterial.d.ts


部分文件因为文件数量过多而无法显示