浏览代码

Merge remote-tracking branch 'origin/master' into native

Gary Hsu 6 年之前
父节点
当前提交
58337608f8
共有 100 个文件被更改,包括 9156 次插入5678 次删除
  1. 1 1
      .gitignore
  2. 3 0
      .travis.yml
  3. 0 6
      .vscode/launch.json
  4. 2 1
      .vscode/settings.json
  5. 1 1
      .vscode/tasks.json
  6. 7362 4247
      Playground/babylon.d.txt
  7. 41 34
      Playground/css/index.css
  8. 1 14
      Playground/frame.html
  9. 3 15
      Playground/full.html
  10. 9 3
      Playground/index-local.html
  11. 15 25
      Playground/index.html
  12. 3 14
      Playground/indexStable.html
  13. 1240 1225
      Playground/js/index.js
  14. 二进制
      Playground/scenes/Trees/BroadleafBark.jpg
  15. 二进制
      Playground/scenes/Trees/BroadleafBark_Normal.png
  16. 二进制
      Playground/scenes/Trees/Broadleaf_Desktop_Atlas.png
  17. 二进制
      Playground/scenes/Trees/Broadleaf_Desktop_Atlas_Billboards.png
  18. 二进制
      Playground/scenes/Trees/Broadleaf_Desktop_Atlas_Billboards_Normal.png
  19. 二进制
      Playground/scenes/Trees/Broadleaf_Desktop_Atlas_Normal.png
  20. 1 0
      Playground/scenes/Trees/rawtrees.babylon
  21. 5 5
      Playground/scripts/basic scene.js
  22. 1 0
      Playground/spinner.svg
  23. 二进制
      Playground/textures/BJS-logo_v3-astc.ktx
  24. 二进制
      Playground/textures/BJS-logo_v3-dxt.ktx
  25. 二进制
      Playground/textures/BJS-logo_v3-etc2.ktx
  26. 二进制
      Playground/textures/BJS-logo_v3-pvrtc.ktx
  27. 二进制
      Playground/textures/Runyon_Canyon_A_2k_cube_specular.env
  28. 二进制
      Playground/textures/SpecularHDR.env
  29. 二进制
      Playground/textures/Studio_Softbox_2Umbrellas_cube_specular.env
  30. 二进制
      Playground/textures/checkerBJS-astc.ktx
  31. 二进制
      Playground/textures/checkerBJS-dxt.ktx
  32. 二进制
      Playground/textures/checkerBJS-etc2.ktx
  33. 二进制
      Playground/textures/checkerBJS-pvrtc.ktx
  34. 二进制
      Playground/textures/country.dds
  35. 二进制
      Playground/textures/country.env
  36. 二进制
      Playground/textures/cubemapDebug/_nx-astc.ktx
  37. 二进制
      Playground/textures/cubemapDebug/_nx-dxt.ktx
  38. 二进制
      Playground/textures/cubemapDebug/_nx-etc1.ktx
  39. 二进制
      Playground/textures/cubemapDebug/_nx-etc2.ktx
  40. 二进制
      Playground/textures/cubemapDebug/_nx-pvrtc.ktx
  41. 二进制
      Playground/textures/cubemapDebug/_nx.jpg
  42. 二进制
      Playground/textures/cubemapDebug/_ny-astc.ktx
  43. 二进制
      Playground/textures/cubemapDebug/_ny-dxt.ktx
  44. 二进制
      Playground/textures/cubemapDebug/_ny-etc1.ktx
  45. 二进制
      Playground/textures/cubemapDebug/_ny-etc2.ktx
  46. 二进制
      Playground/textures/cubemapDebug/_ny-pvrtc.ktx
  47. 二进制
      Playground/textures/cubemapDebug/_ny.jpg
  48. 二进制
      Playground/textures/cubemapDebug/_nz-astc.ktx
  49. 二进制
      Playground/textures/cubemapDebug/_nz-dxt.ktx
  50. 二进制
      Playground/textures/cubemapDebug/_nz-etc1.ktx
  51. 二进制
      Playground/textures/cubemapDebug/_nz-etc2.ktx
  52. 二进制
      Playground/textures/cubemapDebug/_nz-pvrtc.ktx
  53. 二进制
      Playground/textures/cubemapDebug/_nz.jpg
  54. 二进制
      Playground/textures/cubemapDebug/_px-astc.ktx
  55. 二进制
      Playground/textures/cubemapDebug/_px-dxt.ktx
  56. 二进制
      Playground/textures/cubemapDebug/_px-etc1.ktx
  57. 二进制
      Playground/textures/cubemapDebug/_px-etc2.ktx
  58. 二进制
      Playground/textures/cubemapDebug/_px-pvrtc.ktx
  59. 二进制
      Playground/textures/cubemapDebug/_px.jpg
  60. 二进制
      Playground/textures/cubemapDebug/_py-astc.ktx
  61. 二进制
      Playground/textures/cubemapDebug/_py-dxt.ktx
  62. 二进制
      Playground/textures/cubemapDebug/_py-etc1.ktx
  63. 二进制
      Playground/textures/cubemapDebug/_py-etc2.ktx
  64. 二进制
      Playground/textures/cubemapDebug/_py-pvrtc.ktx
  65. 二进制
      Playground/textures/cubemapDebug/_py.jpg
  66. 二进制
      Playground/textures/cubemapDebug/_pz-astc.ktx
  67. 二进制
      Playground/textures/cubemapDebug/_pz-dxt.ktx
  68. 二进制
      Playground/textures/cubemapDebug/_pz-etc1.ktx
  69. 二进制
      Playground/textures/cubemapDebug/_pz-etc2.ktx
  70. 二进制
      Playground/textures/cubemapDebug/_pz-pvrtc.ktx
  71. 二进制
      Playground/textures/cubemapDebug/_pz.jpg
  72. 二进制
      Playground/textures/forest.dds
  73. 二进制
      Playground/textures/forest.env
  74. 二进制
      Playground/textures/night.dds
  75. 二进制
      Playground/textures/night.env
  76. 二进制
      Playground/textures/parking.dds
  77. 二进制
      Playground/textures/parking.env
  78. 二进制
      Playground/textures/room.dds
  79. 二进制
      Playground/textures/room.env
  80. 5 3
      Playground/ts.html
  81. 1 0
      Playground/v4.svg
  82. 二进制
      Playground/waitlogo.png
  83. 7 5
      Tools/Config/config.js
  84. 43 11
      Tools/Config/config.json
  85. 265 0
      Tools/Gulp/helpers/gulp-karmaJunitPlugin.js
  86. 17 0
      Tools/Gulp/helpers/gulp-processAmdDeclarationToModule.js
  87. 5 5
      Tools/Gulp/helpers/gulp-processModuleDeclarationToNamespace.js
  88. 28 23
      Tools/Gulp/helpers/gulp-validateTypedoc.js
  89. 4 3
      Tools/Gulp/package.json
  90. 2 2
      Tools/Gulp/readme.md
  91. 1 1
      Tools/Gulp/tasks/gulpTasks-intellisense.js
  92. 1 0
      Tools/Gulp/tasks/gulpTasks-libraries.js
  93. 15 13
      Tools/Gulp/tasks/gulpTasks-librariesES6.js
  94. 46 4
      Tools/Gulp/tasks/gulpTasks-tests.js
  95. 0 1
      Tools/Gulp/tasks/gulpTasks-viewerLibraries.js
  96. 21 12
      Tools/Gulp/tasks/gulpTasks-whatsNew.js
  97. 2 2
      Tools/Publisher/helpers/publish.js
  98. 1 1
      Tools/Publisher/tasks/prepareEs6DevPackages.js
  99. 4 1
      Tools/Publisher/tasks/processEs6Packages.js
  100. 0 0
      Tools/Publisher/tasks/processUMDViewer.js

+ 1 - 1
.gitignore

@@ -196,4 +196,4 @@ gui/dist/
 /Viewer/tests/tsc
 /Viewer/tests/tsc.cmd
 /Viewer/tests/tsserver
-/Viewer/tests/tsserver.cmd
+/Viewer/tests/tsserver.cmd

+ 3 - 0
.travis.yml

@@ -33,6 +33,7 @@ jobs:
     - sh -e /etc/init.d/xvfb start
     - sleep 3
     - set -e
+    - export CHROME_BIN=chromium-browser
     - gulp typescript-all
     - gulp tests-babylon-unit
     - travis_retry gulp tests-validation-virtualscreen
@@ -40,6 +41,7 @@ jobs:
   - env: JOB=ModuleTests
     script:
     - gulp typescript-all
+    - export CHROME_BIN=chromium-browser
     - gulp tests-modules
     - gulp deployAndTests-es6Modules
   - env: JOB=ViewerTests
@@ -48,6 +50,7 @@ jobs:
     - sh -e /etc/init.d/xvfb start
     - sleep 3
     - set -e
+    - export CHROME_BIN=chromium-browser
     - gulp typescript-all
     - gulp tests-viewer-unit
     - travis_retry gulp tests-viewer-validation-virtualscreen

+ 0 - 6
.vscode/launch.json

@@ -15,12 +15,6 @@
             ]
         },
         {
-            "name": "Launch nullEngine",
-            "type": "node",
-            "request": "launch",
-            "program": "${workspaceFolder}/tests/nullEngine/app.js"
-        },
-        {
             "name": "Launch sandbox (Chrome)",
             "type": "chrome",
             "request": "launch",

+ 2 - 1
.vscode/settings.json

@@ -17,8 +17,9 @@
         "materialsLibrary/**/*.d.ts": true,
         "postProcessesLibrary/**/*.d.ts": true,
         "proceduralTexturesLibrary/**/*.d.ts": true,
-        "serielazers/**/*.d.ts": true,
+        "serializers/**/*.d.ts": true,
         "Viewer/**/*.d.ts": true,
+        "src/**/*.js.map": true,
         "gui/**/*.js.map": true,
         "inspector/**/*.js.map": true,
         "loaders/**/*.js.map": true,

+ 1 - 1
.vscode/tasks.json

@@ -3,7 +3,7 @@
     // for the documentation about the tasks.json format
     "version": "2.0.0",
     "command": "gulp",
-    "args": [],
+    "args": ["--max-old-space-size=8192"],
     "type": "shell",
     "options": {
         "cwd": "${workspaceRoot}/Tools/Gulp"

文件差异内容过多而无法显示
+ 7362 - 4247
Playground/babylon.d.txt


+ 41 - 34
Playground/css/index.css

@@ -1,5 +1,4 @@
-@import url("https://fonts.googleapis.com/css?family=Montserrat:300,400");
-@import url("https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css");
+@import url("https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css");
 html,
 body {
     width: 100%;
@@ -7,7 +6,7 @@ body {
     margin: 0;
     padding: 0;
     overflow: hidden;
-    font-family: sans-serif;
+    font-family: "acumin-pro";
 }
 #waitDiv {
     position: absolute;
@@ -24,12 +23,27 @@ body {
     flex-direction: column;
 }
 
+#logo-part {
+    width: 20vw;
+    display: grid;
+    grid-template-rows: 100%;
+    grid-template-columns: 100%;
+}
+
 #waitLogo {
-    -webkit-animation: spin1 2s infinite ease-in-out;
-    -moz-animation: spin1 2s infinite ease-in-out;
-    -o-animation: spin1 2s infinite ease-in-out;
-    -ms-animation: spin1 2s infinite ease-in-out;
-    animation: spin1 2s infinite ease-in-out;
+    grid-column: 1;
+    grid-row: 1;
+    margin: 25%;
+}
+
+#waitSpinner {
+    grid-column: 1;
+    grid-row: 1;
+    -webkit-animation: spin1 0.5s infinite linear;
+    -moz-animation: spin1 0.5s infinite linear;
+    -o-animation: spin1 0.5s infinite linear;
+    -ms-animation: spin1 0.5s infinite linear;
+    animation: spin1 0.5s infinite linear;
     -webkit-transform-origin: 50% 50%;
     -moz-transform-origin: 50% 50%;
     -o-transform-origin: 50% 50%;
@@ -60,7 +74,7 @@ body {
 #waitTitle {
     text-align: center;
     font-size: 38px;
-    color: #15A4FA;
+    color: #BB464B;
 }
 .wrapper {
     height: calc(100% - 40px - 30px); /* nvabar top and bottom*/
@@ -132,8 +146,7 @@ body {
     border-right: 1px solid #efefef;
 }
 #exampleList #exampleBanner {
-    background-image: url("../css/pattern_ban_1.png");
-    background-repeat: repeat;
+    background-color: #E0684B;
     text-align: center;
     padding: 10px 0;
     margin-left: 2px;
@@ -141,7 +154,7 @@ body {
 #exampleList #exampleBanner h1 {
     text-align: center;
     font-weight: 700;
-    color: #00aeef;
+    color: #BB464B;
     font-size: 2em;
     margin: .67em 0;
 }
@@ -149,7 +162,6 @@ body {
     width: 80%;
     height: 0;
     display: block;
-    border-top: 1px solid #00aeef;
     margin: 0 auto 20px auto;
 }
 #exampleList #filterBar {
@@ -215,7 +227,7 @@ body {
     bottom: 20px;
     font-size: 15px;
     text-decoration: underline;
-    color: #00aeef;
+    color: #BB464B;
 }
 #exampleList .categoryContainer .itemLine .itemContent .itemLinePGLink {
     display: none;
@@ -225,7 +237,7 @@ body {
     text-align: right;
     font-size: 15px;
     text-decoration: underline;
-    color: #00aeef;
+    color: #BB464B;
 }
 
 .wrapper #jsEditor {
@@ -255,18 +267,16 @@ body {
     top: 50px;
     cursor: default;
     z-index:10;
-    background-color: #7283a0;
+    background-color: #E0684B;
     color:white;
     padding:5px;
     border-radius: 3px;
-    font-family: 'Montserrat';
     pointer-events: none;
     user-select: none;
 }
 .navbar {
     height: 40px;
     width: 100%;
-    font-family: "Montserrat";
     font-weight: 400;
     -webkit-user-select: none;
     -moz-user-select: none;
@@ -287,13 +297,13 @@ body {
 .navbar .title {
     height: 40px;
     padding-left: 10px;
-    color: #15A4FA;
+    color: #BB464B;
     display: inline-block;
 }
 .navbar .version {
     height: 40px;
     display: inline-block;
-    color: #7283a0;
+    color: #E0684B;
     margin-right: 20px;
 }
 .navbar .category {
@@ -309,9 +319,9 @@ body {
 .button {
     display: inline-block;
     height: 25px;
-    line-height: 25px;
+    line-height: 23px;
     color: white;
-    background-color: #7283a0;
+    background-color: #E0684B;
     margin: 0 2px 0 2px;
     padding: 0 10px 0 10px;
     font-size: 0.85em;
@@ -323,12 +333,12 @@ body {
 }
 .button:hover {
     cursor: pointer;
-    background-color: #15A4FA;
+    background-color: #BB464B;
 }
 .navbar .button.run {
     height: 30px;
-    line-height: 30px;
-    background-color: #15A4FA;
+    line-height: 28px;
+    background-color: #BB464B;
     font-size: 1.0em;
 }
 .navbar .select {
@@ -343,7 +353,7 @@ body {
     content: "\00a0 \00a0 \00a0 \f078";
 }
 .navbar .select .toDisplay {
-    border: 1px solid #7283a0;
+    border: 1px solid #E0684B;
     position: absolute;
     z-index: 10;
     left: 0;
@@ -354,7 +364,7 @@ body {
 }
 
 .navbar .select .subSelect .toDisplaySub {
-    border: 1px solid #7283a0;
+    border: 1px solid #E0684B;
     position: absolute;
     z-index: 10;
     left: 100%;
@@ -384,7 +394,7 @@ body {
 }
 .navbar .select .toDisplay .option.light {
     background-color: white;
-    color: #7283a0;
+    color: #E0684B;
 }
 .navbar .select .toDisplay .option.dark:hover {
     cursor: pointer;
@@ -392,7 +402,7 @@ body {
 }
 
 .navbar .select .toDisplayBig {
-    border: 1px solid #7283a0;
+    border: 1px solid #E0684B;
     border-radius: 5px;
     position: absolute;
     z-index: 10;
@@ -409,7 +419,7 @@ body {
 
 .navbar .select .toDisplayBig.light {
     background-color: white;    
-    color: #15A4FA;
+    color: #BB464B;
 }
 
 .navbar .select .toDisplayBig.dark {
@@ -448,7 +458,7 @@ body {
 }
 
 .navbar .select .toDisplayBig a.light {
-    color: #7283a0;
+    color: #E0684B;
 }
 
 
@@ -497,7 +507,6 @@ body {
     width:100%;
     line-height:30px;
     position:relative;
-    font-family: 'Montserrat';
 }
 .navbarBottom.dark {
     background-color: #333;
@@ -567,7 +576,6 @@ body {
     background-color: rgba(27, 27, 27, 0.75);
     border-color: #252525;
     color: white;
-    font-family: "Montserrat";
     font-size: 14px;
 }
 .save-layer .save-form .separator {
@@ -582,7 +590,6 @@ body {
     width: 350px;
     margin:auto;
     margin-bottom: 20px;
-    font-family: "Montserrat";
     padding:5px;
 }
 

+ 1 - 14
Playground/frame.html

@@ -4,19 +4,6 @@
     <head>
         <title>Babylon.js Playground</title>
         <link rel="shortcut icon" href="https://www.babylonjs.com/img/favicon/favicon.ico">
-        <link rel="apple-touch-icon" sizes="57x57" href="https://www.babylonjs.com/img/favicon/apple-icon-57x57.png">
-        <link rel="apple-touch-icon" sizes="60x60" href="https://www.babylonjs.com/img/favicon/apple-icon-60x60.png">
-        <link rel="apple-touch-icon" sizes="72x72" href="https://www.babylonjs.com/img/favicon/apple-icon-72x72.png">
-        <link rel="apple-touch-icon" sizes="76x76" href="https://www.babylonjs.com/img/favicon/apple-icon-76x76.png">
-        <link rel="apple-touch-icon" sizes="114x114" href="https://www.babylonjs.com/img/favicon/apple-icon-114x114.png">
-        <link rel="apple-touch-icon" sizes="120x120" href="https://www.babylonjs.com/img/favicon/apple-icon-120x120.png">
-        <link rel="apple-touch-icon" sizes="144x144" href="https://www.babylonjs.com/img/favicon/apple-icon-144x144.png">
-        <link rel="apple-touch-icon" sizes="152x152" href="https://www.babylonjs.com/img/favicon/apple-icon-152x152.png">
-        <link rel="apple-touch-icon" sizes="180x180" href="https://www.babylonjs.com/img/favicon/apple-icon-180x180.png">
-        <link rel="icon" type="image/png" sizes="192x192" href="https://www.babylonjs.com/img/favicon/android-icon-192x192.png">
-        <link rel="icon" type="image/png" sizes="32x32" href="https://www.babylonjs.com/img/favicon/favicon-32x32.png">
-        <link rel="icon" type="image/png" sizes="96x96" href="https://www.babylonjs.com/img/favicon/favicon-96x96.png">
-        <link rel="icon" type="image/png" sizes="16x16" href="https://www.babylonjs.com/img/favicon/favicon-16x16.png">
         <link rel="manifest" href="https://www.babylonjs.com/img/favicon/manifest.json">
         <meta name="msapplication-TileColor" content="#ffffff">
         <meta name="msapplication-TileImage" content="https://www.babylonjs.com/img/favicon/ms-icon-144x144.png">
@@ -103,4 +90,4 @@
         </script>
     </body>
 
-</html>
+</html>

+ 3 - 15
Playground/full.html

@@ -4,19 +4,6 @@
     <head>
         <title>Babylon.js Playground</title>
         <link rel="shortcut icon" href="https://www.babylonjs.com/img/favicon/favicon.ico">
-        <link rel="apple-touch-icon" sizes="57x57" href="https://www.babylonjs.com/img/favicon/apple-icon-57x57.png">
-        <link rel="apple-touch-icon" sizes="60x60" href="https://www.babylonjs.com/img/favicon/apple-icon-60x60.png">
-        <link rel="apple-touch-icon" sizes="72x72" href="https://www.babylonjs.com/img/favicon/apple-icon-72x72.png">
-        <link rel="apple-touch-icon" sizes="76x76" href="https://www.babylonjs.com/img/favicon/apple-icon-76x76.png">
-        <link rel="apple-touch-icon" sizes="114x114" href="https://www.babylonjs.com/img/favicon/apple-icon-114x114.png">
-        <link rel="apple-touch-icon" sizes="120x120" href="https://www.babylonjs.com/img/favicon/apple-icon-120x120.png">
-        <link rel="apple-touch-icon" sizes="144x144" href="https://www.babylonjs.com/img/favicon/apple-icon-144x144.png">
-        <link rel="apple-touch-icon" sizes="152x152" href="https://www.babylonjs.com/img/favicon/apple-icon-152x152.png">
-        <link rel="apple-touch-icon" sizes="180x180" href="https://www.babylonjs.com/img/favicon/apple-icon-180x180.png">
-        <link rel="icon" type="image/png" sizes="192x192" href="https://www.babylonjs.com/img/favicon/android-icon-192x192.png">
-        <link rel="icon" type="image/png" sizes="32x32" href="https://www.babylonjs.com/img/favicon/favicon-32x32.png">
-        <link rel="icon" type="image/png" sizes="96x96" href="https://www.babylonjs.com/img/favicon/favicon-96x96.png">
-        <link rel="icon" type="image/png" sizes="16x16" href="https://www.babylonjs.com/img/favicon/favicon-16x16.png">
         <link rel="manifest" href="https://www.babylonjs.com/img/favicon/manifest.json">
         <meta name="msapplication-TileColor" content="#ffffff">
         <meta name="msapplication-TileImage" content="https://www.babylonjs.com/img/favicon/ms-icon-144x144.png">
@@ -50,7 +37,8 @@
     </head>
 
     <body>
-        <canvas touch-action="none" id="renderCanvas" tabindex="1"></canvas>
+        <!-- Override frame style -->
+        <canvas touch-action="none" id="renderCanvas" tabindex="1" style="height: 100%"></canvas>
         <script src="https://code.jquery.com/jquery.js"></script>
         <script src="js/frame.js"></script>
 
@@ -65,4 +53,4 @@
         </script>
     </body>
 
-</html>
+</html>

+ 9 - 3
Playground/index-local.html

@@ -7,6 +7,8 @@
     <meta charset='utf-8' />
     <meta name="viewport" content="width=device-width, user-scalable=no">
     <script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
+    <link rel="stylesheet" href="https://use.typekit.net/cta4xsb.css">
+
     <!--For canvas/code separator-->
     <script src="js/libs/split.js"></script>
 
@@ -376,7 +378,8 @@
         </div>
         <div class="horizontalSeparator"></div>
         <input id="filterBar" type="text" placeholder="Filter examples...">
-        <img id="filterBarClear" src="https://d33wubrfki0l68.cloudfront.net/17ca450bae302631f4857cd8c3992234ec5dd9a7/057f9/img/ui/clear_button.png">
+        <img id="filterBarClear"
+            src="https://d33wubrfki0l68.cloudfront.net/17ca450bae302631f4857cd8c3992234ec5dd9a7/057f9/img/ui/clear_button.png">
     </div>
 
     <span class="label" id="fpsLabel">FPS</span>
@@ -433,7 +436,10 @@
             <BR>
             <BR>
         </span>
-        <img src="waitlogo.png" id="waitLogo" />
+        <div id="logo-part">
+            <img src="v4.svg" id="waitLogo" />
+            <img src="spinner.svg" id="waitSpinner" />
+        </div>
     </div>
 
     <script src="https://code.jquery.com/jquery.js"></script>
@@ -454,4 +460,4 @@
     </script>
 </body>
 
-</html>
+</html>

+ 15 - 25
Playground/index.html

@@ -5,25 +5,9 @@
     <title>Babylon.js Playground</title>
     <meta charset='utf-8' />
     <meta name="viewport" content="width=device-width, user-scalable=no">
-    <link rel="shortcut icon" href="https://www.babylonjs.com/img/favicon/favicon.ico">
-    <link rel="apple-touch-icon" sizes="57x57" href="https://www.babylonjs.com/img/favicon/apple-icon-57x57.png">
-    <link rel="apple-touch-icon" sizes="60x60" href="https://www.babylonjs.com/img/favicon/apple-icon-60x60.png">
-    <link rel="apple-touch-icon" sizes="72x72" href="https://www.babylonjs.com/img/favicon/apple-icon-72x72.png">
-    <link rel="apple-touch-icon" sizes="76x76" href="https://www.babylonjs.com/img/favicon/apple-icon-76x76.png">
-    <link rel="apple-touch-icon" sizes="114x114" href="https://www.babylonjs.com/img/favicon/apple-icon-114x114.png">
-    <link rel="apple-touch-icon" sizes="120x120" href="https://www.babylonjs.com/img/favicon/apple-icon-120x120.png">
-    <link rel="apple-touch-icon" sizes="144x144" href="https://www.babylonjs.com/img/favicon/apple-icon-144x144.png">
-    <link rel="apple-touch-icon" sizes="152x152" href="https://www.babylonjs.com/img/favicon/apple-icon-152x152.png">
-    <link rel="apple-touch-icon" sizes="180x180" href="https://www.babylonjs.com/img/favicon/apple-icon-180x180.png">
-    <link rel="icon" type="image/png" sizes="192x192" href="https://www.babylonjs.com/img/favicon/android-icon-192x192.png">
-    <link rel="icon" type="image/png" sizes="32x32" href="https://www.babylonjs.com/img/favicon/favicon-32x32.png">
-    <link rel="icon" type="image/png" sizes="96x96" href="https://www.babylonjs.com/img/favicon/favicon-96x96.png">
-    <link rel="icon" type="image/png" sizes="16x16" href="https://www.babylonjs.com/img/favicon/favicon-16x16.png">
-    <link rel="manifest" href="https://www.babylonjs.com/img/favicon/manifest.json">
-    <meta name="msapplication-TileColor" content="#ffffff">
-    <meta name="msapplication-TileImage" content="https://www.babylonjs.com/img/favicon/ms-icon-144x144.png">
-    <meta name="msapplication-config" content="https://www.babylonjs.com/img/favicon/browserconfig.xml">
-    <meta name="theme-color" content="#ffffff">
+    <link rel="shortcut icon" href="https://www.babylonjs.com/favicon.ico">
+
+    <link rel="stylesheet" href="https://use.typekit.net/cta4xsb.css">
 
     <script src="js/libs/pep.min.js"></script>
     <!--For canvas/code separator-->
@@ -52,12 +36,14 @@
     <!-- Monaco -->
     <script src="node_modules/monaco-editor/min/vs/loader.js"></script>
 
-
     <!-- Extensions -->
     <script src="https://rawgit.com/BabylonJS/Extensions/master/ClonerSystem/src/babylonx.cloner.js" async></script>
-    <script src="https://rawgit.com/BabylonJS/Extensions/master/CompoundShader/src/babylonx.CompoundShader.js" async></script>
-    <!-- <script async src="https://www.babylontoolkit.com/Playground/scripts/babylon.navmesh.js"></script>
-    <script async src="https://www.babylontoolkit.com/Playground/scripts/babylon.manager.js"></script> -->
+    <script src="https://rawgit.com/BabylonJS/Extensions/master/CompoundShader/src/babylonx.CompoundShader.js"
+        async></script>
+
+    <!-- Scene Manager -->
+    <script src="https://mackeyk24.github.io/toolkit/babylon.manager.js"></script>
+    <script src="https://mackeyk24.github.io/toolkit/babylon.navmesh.js"></script>
 
     <link href="css/index.css" rel="stylesheet" />
 </head>
@@ -410,7 +396,8 @@
         </div>
         <div class="horizontalSeparator"></div>
         <input id="filterBar" type="text" placeholder="Filter examples...">
-        <img id="filterBarClear" src="https://d33wubrfki0l68.cloudfront.net/17ca450bae302631f4857cd8c3992234ec5dd9a7/057f9/img/ui/clear_button.png">
+        <img id="filterBarClear"
+            src="https://d33wubrfki0l68.cloudfront.net/17ca450bae302631f4857cd8c3992234ec5dd9a7/057f9/img/ui/clear_button.png">
     </div>
 
     <span class="label" id="fpsLabel">FPS</span>
@@ -467,7 +454,10 @@
             <BR>
             <BR>
         </span>
-        <img src="waitlogo.png" id="waitLogo" />
+        <div id="logo-part">
+            <img src="v4.svg" id="waitLogo" />
+            <img src="spinner.svg" id="waitSpinner" />
+        </div>
     </div>
 
     <script src="js/libs/jquery.min.js"></script>

+ 3 - 14
Playground/indexStable.html

@@ -6,24 +6,12 @@
     <meta charset='utf-8' />
     <meta name="viewport" content="width=device-width, user-scalable=no">
     <link rel="shortcut icon" href="https://www.babylonjs.com/img/favicon/favicon.ico">
-    <link rel="apple-touch-icon" sizes="57x57" href="https://www.babylonjs.com/img/favicon/apple-icon-57x57.png">
-    <link rel="apple-touch-icon" sizes="60x60" href="https://www.babylonjs.com/img/favicon/apple-icon-60x60.png">
-    <link rel="apple-touch-icon" sizes="72x72" href="https://www.babylonjs.com/img/favicon/apple-icon-72x72.png">
-    <link rel="apple-touch-icon" sizes="76x76" href="https://www.babylonjs.com/img/favicon/apple-icon-76x76.png">
-    <link rel="apple-touch-icon" sizes="114x114" href="https://www.babylonjs.com/img/favicon/apple-icon-114x114.png">
-    <link rel="apple-touch-icon" sizes="120x120" href="https://www.babylonjs.com/img/favicon/apple-icon-120x120.png">
-    <link rel="apple-touch-icon" sizes="144x144" href="https://www.babylonjs.com/img/favicon/apple-icon-144x144.png">
-    <link rel="apple-touch-icon" sizes="152x152" href="https://www.babylonjs.com/img/favicon/apple-icon-152x152.png">
-    <link rel="apple-touch-icon" sizes="180x180" href="https://www.babylonjs.com/img/favicon/apple-icon-180x180.png">
-    <link rel="icon" type="image/png" sizes="192x192" href="https://www.babylonjs.com/img/favicon/android-icon-192x192.png">
-    <link rel="icon" type="image/png" sizes="32x32" href="https://www.babylonjs.com/img/favicon/favicon-32x32.png">
-    <link rel="icon" type="image/png" sizes="96x96" href="https://www.babylonjs.com/img/favicon/favicon-96x96.png">
-    <link rel="icon" type="image/png" sizes="16x16" href="https://www.babylonjs.com/img/favicon/favicon-16x16.png">
     <link rel="manifest" href="https://www.babylonjs.com/img/favicon/manifest.json">
     <meta name="msapplication-TileColor" content="#ffffff">
     <meta name="msapplication-TileImage" content="https://www.babylonjs.com/img/favicon/ms-icon-144x144.png">
     <meta name="msapplication-config" content="https://www.babylonjs.com/img/favicon/browserconfig.xml">
     <meta name="theme-color" content="#ffffff">
+    <link rel="stylesheet" href="https://use.typekit.net/cta4xsb.css">
 
     <script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
     <!--For canvas/code separator-->
@@ -401,7 +389,8 @@
         </div>
         <div class="horizontalSeparator"></div>
         <input id="filterBar" type="text" placeholder="Filter examples...">
-        <img id="filterBarClear" src="https://d33wubrfki0l68.cloudfront.net/17ca450bae302631f4857cd8c3992234ec5dd9a7/057f9/img/ui/clear_button.png">
+        <img id="filterBarClear"
+            src="https://d33wubrfki0l68.cloudfront.net/17ca450bae302631f4857cd8c3992234ec5dd9a7/057f9/img/ui/clear_button.png">
     </div>
 
     <span class="label" id="fpsLabel">FPS</span>

文件差异内容过多而无法显示
+ 1240 - 1225
Playground/js/index.js


二进制
Playground/scenes/Trees/BroadleafBark.jpg


二进制
Playground/scenes/Trees/BroadleafBark_Normal.png


二进制
Playground/scenes/Trees/Broadleaf_Desktop_Atlas.png


二进制
Playground/scenes/Trees/Broadleaf_Desktop_Atlas_Billboards.png


二进制
Playground/scenes/Trees/Broadleaf_Desktop_Atlas_Billboards_Normal.png


二进制
Playground/scenes/Trees/Broadleaf_Desktop_Atlas_Normal.png


文件差异内容过多而无法显示
+ 1 - 0
Playground/scenes/Trees/rawtrees.babylon


+ 5 - 5
Playground/scripts/basic scene.js

@@ -13,19 +13,19 @@
     camera.attachControl(canvas, true);
 
     // This creates a light, aiming 0,1,0 - to the sky (non-mesh)
-    var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
+    var light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(0, 1, 0), scene);
 
     // Default intensity is 1. Let's dim the light a small amount
     light.intensity = 0.7;
 
-    // Our built-in 'sphere' shape. Params: name, subdivs, size, scene
-    var sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene);
+    // Our built-in 'sphere' shape.
+    var sphere = BABYLON.MeshBuilder.CreateSphere("sphere", {diameter: 2, segments: 32}, scene);
 
     // Move the sphere upward 1/2 its height
     sphere.position.y = 1;
 
-    // Our built-in 'ground' shape. Params: name, width, depth, subdivs, scene
-    var ground = BABYLON.Mesh.CreateGround("ground1", 6, 6, 2, scene);
+    // Our built-in 'ground' shape.
+    var ground = BABYLON.MeshBuilder.CreateGround("ground", {width: 6, height: 6}, scene);
 
     return scene;
 

文件差异内容过多而无法显示
+ 1 - 0
Playground/spinner.svg


二进制
Playground/textures/BJS-logo_v3-astc.ktx


二进制
Playground/textures/BJS-logo_v3-dxt.ktx


二进制
Playground/textures/BJS-logo_v3-etc2.ktx


二进制
Playground/textures/BJS-logo_v3-pvrtc.ktx


二进制
Playground/textures/Runyon_Canyon_A_2k_cube_specular.env


二进制
Playground/textures/SpecularHDR.env


二进制
Playground/textures/Studio_Softbox_2Umbrellas_cube_specular.env


二进制
Playground/textures/checkerBJS-astc.ktx


二进制
Playground/textures/checkerBJS-dxt.ktx


二进制
Playground/textures/checkerBJS-etc2.ktx


二进制
Playground/textures/checkerBJS-pvrtc.ktx


二进制
Playground/textures/country.dds


二进制
Playground/textures/country.env


二进制
Playground/textures/cubemapDebug/_nx-astc.ktx


二进制
Playground/textures/cubemapDebug/_nx-dxt.ktx


二进制
Playground/textures/cubemapDebug/_nx-etc1.ktx


二进制
Playground/textures/cubemapDebug/_nx-etc2.ktx


二进制
Playground/textures/cubemapDebug/_nx-pvrtc.ktx


二进制
Playground/textures/cubemapDebug/_nx.jpg


二进制
Playground/textures/cubemapDebug/_ny-astc.ktx


二进制
Playground/textures/cubemapDebug/_ny-dxt.ktx


二进制
Playground/textures/cubemapDebug/_ny-etc1.ktx


二进制
Playground/textures/cubemapDebug/_ny-etc2.ktx


二进制
Playground/textures/cubemapDebug/_ny-pvrtc.ktx


二进制
Playground/textures/cubemapDebug/_ny.jpg


二进制
Playground/textures/cubemapDebug/_nz-astc.ktx


二进制
Playground/textures/cubemapDebug/_nz-dxt.ktx


二进制
Playground/textures/cubemapDebug/_nz-etc1.ktx


二进制
Playground/textures/cubemapDebug/_nz-etc2.ktx


二进制
Playground/textures/cubemapDebug/_nz-pvrtc.ktx


二进制
Playground/textures/cubemapDebug/_nz.jpg


二进制
Playground/textures/cubemapDebug/_px-astc.ktx


二进制
Playground/textures/cubemapDebug/_px-dxt.ktx


二进制
Playground/textures/cubemapDebug/_px-etc1.ktx


二进制
Playground/textures/cubemapDebug/_px-etc2.ktx


二进制
Playground/textures/cubemapDebug/_px-pvrtc.ktx


二进制
Playground/textures/cubemapDebug/_px.jpg


二进制
Playground/textures/cubemapDebug/_py-astc.ktx


二进制
Playground/textures/cubemapDebug/_py-dxt.ktx


二进制
Playground/textures/cubemapDebug/_py-etc1.ktx


二进制
Playground/textures/cubemapDebug/_py-etc2.ktx


二进制
Playground/textures/cubemapDebug/_py-pvrtc.ktx


二进制
Playground/textures/cubemapDebug/_py.jpg


二进制
Playground/textures/cubemapDebug/_pz-astc.ktx


二进制
Playground/textures/cubemapDebug/_pz-dxt.ktx


二进制
Playground/textures/cubemapDebug/_pz-etc1.ktx


二进制
Playground/textures/cubemapDebug/_pz-etc2.ktx


二进制
Playground/textures/cubemapDebug/_pz-pvrtc.ktx


二进制
Playground/textures/cubemapDebug/_pz.jpg


二进制
Playground/textures/forest.dds


二进制
Playground/textures/forest.env


二进制
Playground/textures/night.dds


二进制
Playground/textures/night.env


二进制
Playground/textures/parking.dds


二进制
Playground/textures/parking.env


二进制
Playground/textures/room.dds


二进制
Playground/textures/room.env


+ 5 - 3
Playground/ts.html

@@ -54,9 +54,11 @@
         <!-- Extensions -->
         <script src="https://rawgit.com/BabylonJS/Extensions/master/ClonerSystem/src/babylonx.cloner.js" async></script>
         <script src="https://rawgit.com/BabylonJS/Extensions/master/CompoundShader/src/babylonx.CompoundShader.js" async></script>
-        <script src="https://www.babylontoolkit.com/Playground/scripts/babylon.navmesh.js"></script>
-        <script src="https://www.babylontoolkit.com/Playground/scripts/babylon.manager.js"></script>
-                               
+
+        <!-- Scene Manager -->
+        <script src="https://mackeyk24.github.io/toolkit/babylon.manager.js"></script>
+        <script src="https://mackeyk24.github.io/toolkit/babylon.navmesh.js"></script>
+
         <link href="css/index.css" rel="stylesheet" />
         <link href="css/color_ts.css" rel="stylesheet" />
     </head>

文件差异内容过多而无法显示
+ 1 - 0
Playground/v4.svg


二进制
Playground/waitlogo.png


+ 7 - 5
Tools/Config/config.js

@@ -52,7 +52,7 @@ config.additionalNpmPackages.forEach(package => {
     };
 });
 
-config.modules.map(function(module) {
+config.es6modules.map(function(module) {
     const settings = config[module];
 
     const mainDirectory = path.resolve(rootFolder, settings.build.mainFolder);
@@ -103,11 +103,13 @@ config.modules.map(function(module) {
         const tsGlob = srcDirectory.replace(/\\/g, "/") + "/**/*.ts*";
 
         for (let library of settings.libraries) {
-            const entryPath = path.join(srcDirectory, library.entry);
+            if(library.entry){
+                const entryPath = path.join(srcDirectory, library.entry);
 
-            library.computed = {
-                entryPath
-            };
+                library.computed = {
+                    entryPath
+                };
+            }
         }
 
         settings.computed.srcDirectory = srcDirectory;

+ 43 - 11
Tools/Config/config.json

@@ -47,6 +47,17 @@
         "gui",
         "inspector"
     ],
+    "es6modules": [
+        "core",
+        "materialsLibrary",
+        "postProcessesLibrary",
+        "proceduralTexturesLibrary",
+        "loaders",
+        "serializers",
+        "gui",
+        "inspector",
+        "viewer"
+    ],
     "lintModules": [
         "core",
         "materialsLibrary",
@@ -105,7 +116,8 @@
                             "path": "babylonjs/Debug/skeletonViewer",
                             "namespace": "BABYLON.Debug"
                         }
-                    ]
+                    ],
+                    "hiddenConsts": ["Debug"]
                 },
                 "requiredFiles": [
                     "readme.md"
@@ -548,12 +560,11 @@
                 }
             },
             "es6": {
-                "webpackBuild": {
-                    "dependencies": [
-                        "node_modules/re-resizable/lib/index.es5.js",
-                        "Tools/**/*"
-                    ]
-                },
+                "webpackBuild": true,
+                "buildDependencies": [
+                    "node_modules/re-resizable/lib/index.es5.js",
+                    "Tools/**/*"
+                ],
                 "packageName": "@babylonjs/inspector",
                 "readme": "dist/preview release/inspector/readme-es6.md",
                 "packagesFiles": [
@@ -579,6 +590,7 @@
             }
         ],
         "build": {
+            "mainFolder": "./Viewer/",
             "webpack": "../../../Viewer/webpack.gulp.config.js",
             "distOutputDirectory": "/viewer/",
             "dtsBundle": {
@@ -591,7 +603,7 @@
                 "processDeclaration": {
                     "moduleName": "BabylonViewer",
                     "doNotAppendNamespace": true,
-                    "prependText": "/// <reference path=\"./babylon.module.d.ts\"/>\n/// <reference path=\"./babylon.glTF2Interface.d.ts\"/>\n/// <reference path=\"./babylonjs.loaders.d.ts\"/>\ndeclare module \"babylonjs-loaders\"{ export=BABYLON;}\n",
+                    "prependText": "/// <reference path=\"./babylon.module.d.ts\"/>\n/// <reference path=\"./babylon.glTF2Interface.d.ts\"/>\n/// <reference path=\"./babylonjs.loaders.module.d.ts\"/>\n",
                     "importsToRemove": [
                         "pep",
                         "babylonjs-loaders"
@@ -599,7 +611,17 @@
                     "classMap": {
                         "babylonjs": "BABYLON",
                         "babylonjs-loaders": "BABYLON"
-                    }
+                    },
+                    "replacements": [
+                        {
+                            "from": "import(\"./configuration\")",
+                            "to": "import(\"babylonjs-viewer/configuration/configuration\")"
+                        },
+                        {
+                            "from": "import(\"./viewer\")",
+                            "to": "import(\"babylonjs-viewer/viewer/viewer\")"
+                        }
+                    ]
                 },
                 "requiredFiles": [
                     "dist/preview release/viewer/readme.md",
@@ -620,7 +642,7 @@
                             "outputDirectory": "/viewer/",
                             "addBabylonDeclaration": [
                                 "babylon.module.d.ts",
-                                "loaders/babylonjs.loaders.d.ts",
+                                "loaders/babylonjs.loaders.module.d.ts",
                                 "glTF2Interface/babylon.glTF2Interface.d.ts"
                             ]
                         }
@@ -640,7 +662,17 @@
                     ]
                 }
             ],
-            "legacyPackageOutputDirectory": "../../../Viewer/build/src/"
+            "legacyPackageOutputDirectory": "../../../Viewer/build/src/",
+            "es6": {
+                "buildDependencies": [
+                    "node_modules/handlebars/**/*",
+                    "node_modules/@types/**/*"
+                ],
+                "packageName": "@babylonjs/viewer",
+                "readme": "Viewer/README-ES6.md",
+                "skipLibCheck": true,
+                "packageBuildFolder": "src"
+            }
         }
     },
     "viewer-assets": {

+ 265 - 0
Tools/Gulp/helpers/gulp-karmaJunitPlugin.js

@@ -0,0 +1,265 @@
+var os = require('os')
+var path = require('path')
+var fs = require('fs')
+var builder = require('xmlbuilder')
+
+/* XML schemas supported by the reporter: 'xmlVersion' in karma.conf.js,
+   'XMLconfigValue' as variable here.
+   0 = "old", original XML format. For example, SonarQube versions prior to 6.2
+   1 = first amended version. Compatible with SonarQube starting from 6.2
+*/
+
+// concatenate test suite(s) and test description by default
+function defaultNameFormatter (browser, result) {
+  return result.suite.join(' ') + ' ' + result.description
+}
+
+var JUnitReporter = function (baseReporterDecorator, config, logger, helper, formatError) {
+  var log = logger.create('reporter.junit')
+  var reporterConfig = config.junitReporter || {}
+  // All reporterConfig.something are for reading flags from the Karma config file
+  var pkgName = reporterConfig.suite || ''
+  var outputDir = reporterConfig.outputDir
+  var outputFile = reporterConfig.outputFile
+  var useBrowserName = reporterConfig.useBrowserName
+  var nameFormatter = reporterConfig.nameFormatter || defaultNameFormatter
+  var classNameFormatter = reporterConfig.classNameFormatter
+  var properties = reporterConfig.properties
+  // The below two variables have to do with adding support for new SonarQube XML format
+  var XMLconfigValue = reporterConfig.xmlVersion
+  var NEWXML
+  // We need one global variable for the tag <file> to be visible to functions
+  var exposee
+  var suites = []
+  var pendingFileWritings = 0
+  var fileWritingFinished = function () {}
+  var allMessages = []
+
+  // The NEWXML is just sugar, a flag. Remove it when there are more than 2
+  // supported XML output formats.
+  if (!XMLconfigValue) {
+    XMLconfigValue = 0
+    NEWXML = false
+  } else {
+    // Slack behavior: "If defined, assume to be 1" since we have only two formats now
+    XMLconfigValue = 1
+    NEWXML = true
+  }
+
+  if (outputDir == null) {
+    outputDir = '.'
+  }
+
+  outputDir = helper.normalizeWinPath(path.resolve(config.basePath, outputDir)) + path.sep
+
+  if (typeof useBrowserName === 'undefined') {
+    useBrowserName = true
+  }
+
+  baseReporterDecorator(this)
+
+  this.adapters = [
+    function (msg) {
+      allMessages.push(msg)
+    }
+  ]
+
+  // Creates the outermost XML element: <unitTest>
+  var initializeXmlForBrowser = function (browser) {
+    var timestamp = (new Date()).toISOString().substr(0, 19)
+    var suite
+    if (NEWXML) {
+      suite = suites[browser.id] = builder.create('unitTest')
+      suite.att('version', '1')
+      exposee = suite.ele('file', {'path': 'fixedString'})
+    } else {
+      suite = suites[browser.id] = builder.create('testsuite')
+      suite.att('name', pkgName)
+      .att('package', pkgName)
+      .att('timestamp', timestamp)
+      .att('id', 'MYTESTMYTEST')
+      .att('hostname', os.hostname())
+      var propertiesElement = suite.ele('properties')
+      propertiesElement.ele('property', {name: 'browser.fullName', value: browser.fullName})
+
+      // add additional properties passed in through the config
+      for (var property in properties) {
+        if (properties.hasOwnProperty(property)) {
+          propertiesElement.ele('property', {name: property, value: properties[property]})
+        }
+      }
+    }
+  }
+
+  // This function takes care of writing the XML into a file
+  var writeXmlForBrowser = function (browser) {
+    // Define the file name using rules
+    var safeBrowserName = browser.name.replace(/ /g, '_')
+    var newOutputFile
+    if (outputFile && path.isAbsolute(outputFile)) {
+      newOutputFile = outputFile
+    } else if (outputFile != null) {
+      var dir = useBrowserName ? path.join(outputDir, safeBrowserName)
+                               : outputDir
+      newOutputFile = path.join(dir, outputFile)
+    } else if (useBrowserName) {
+      newOutputFile = path.join(outputDir, 'TESTS-' + safeBrowserName + '.xml')
+    } else {
+      newOutputFile = path.join(outputDir, 'TESTS.xml')
+    }
+
+    var xmlToOutput = suites[browser.id]
+
+    if (!xmlToOutput) {
+      return // don't die if browser didn't start
+    }
+
+    pendingFileWritings++
+    helper.mkdirIfNotExists(path.dirname(newOutputFile), function () {
+      fs.writeFile(newOutputFile, xmlToOutput.end({pretty: true}), function (err) {
+        if (err) {
+          log.warn('Cannot write JUnit xml\n\t' + err.message)
+        } else {
+          log.debug('JUnit results written to "%s".', newOutputFile)
+        }
+
+        if (!--pendingFileWritings) {
+          fileWritingFinished()
+        }
+      })
+    })
+  }
+
+  // Return a 'safe' name for test. This will be the name="..." content in XML.
+  var getClassName = function (browser, result) {
+    var name = ''
+    // configuration tells whether to use browser name at all
+    if (useBrowserName) {
+      name += browser.name
+        .replace(/ /g, '_')
+        .replace(/\./g, '_') + '.'
+    }
+    if (pkgName) {
+      name += '.'
+    }
+    if (result.suite && result.suite.length > 0) {
+      name += result.suite.join(' ')
+    }
+    return name
+  }
+
+  // "run_start" - a test run is beginning for all browsers
+  this.onRunStart = function (browsers) {
+    // TODO(vojta): remove once we don't care about Karma 0.10
+    browsers.forEach(initializeXmlForBrowser)
+  }
+
+  // "browser_start" - a test run is beginning in _this_ browser
+  this.onBrowserStart = function (browser) {
+    initializeXmlForBrowser(browser)
+  }
+
+  // "browser_complete" - a test run has completed in _this_ browser
+  // writes the XML to file and releases memory
+  this.onBrowserComplete = function (browser) {
+    var suite = suites[browser.id]
+    var result = browser.lastResult
+    if (!suite || !result) {
+      return // don't die if browser didn't start
+    }
+
+    if (!NEWXML) {
+      suite.att('tests', result.total ? result.total : 0)
+      suite.att('errors', result.disconnected || result.error ? 1 : 0)
+      suite.att('failures', result.failed ? result.failed : 0)
+      suite.att('time', (result.netTime || 0) / 1000)
+      suite.ele('system-out').dat(allMessages.join() + '\n')
+      suite.ele('system-err')
+    }
+
+    writeXmlForBrowser(browser)
+
+    // Release memory held by the test suite.
+    suites[browser.id] = null
+  }
+
+  // "run_complete" - a test run has completed on all browsers
+  this.onRunComplete = function () {
+    allMessages.length = 0
+  }
+
+  // --------------------------------------------
+  // | Producing XML for individual testCase    |
+  // --------------------------------------------
+  this.specSuccess = this.specSkipped = this.specFailure = function (browser, result) {
+    var testsuite = suites[browser.id]
+    var validMilliTime
+    var spec
+
+    if (!testsuite) {
+      return
+    }
+
+    // New in the XSD schema: only name and duration. classname is obsoleted
+    if (NEWXML) {
+      if (!result.time || result.time === 0) {
+        validMilliTime = 1
+      } else {
+        validMilliTime = result.time
+      }
+    }
+
+    // create the tag for a new test case
+    /*
+    if (NEWXML) {
+      spec = testsuite.ele('testCase', {
+      name: nameFormatter(browser, result),
+      duration: validMilliTime })
+    }
+    */
+
+    if (NEWXML) {
+      spec = exposee.ele('testCase', {
+        name: nameFormatter(browser, result),
+        duration: validMilliTime })
+    } else {
+      // old XML format. Code as-was
+      spec = testsuite.ele('testcase', {
+        name: nameFormatter(browser, result),
+        time: ((result.time || 0) / 1000),
+        classname: (typeof classNameFormatter === 'function' ? classNameFormatter : getClassName)(browser, result)
+      })
+    }
+
+    if (result.skipped) {
+      spec.ele('skipped')
+    }
+
+    if (!result.success) {
+      result.log.forEach(function (err) {
+        if (!NEWXML) {
+          spec.ele('failure', {type: ''}, formatError(err))
+        } else {
+        // In new XML format, an obligatory 'message' attribute in failure
+          spec.ele('failure', {message: formatError(err)})
+        }
+      })
+    }
+  }
+
+  // wait for writing all the xml files, before exiting
+  this.onExit = function (done) {
+    if (pendingFileWritings) {
+      fileWritingFinished = done
+    } else {
+      done()
+    }
+  }
+}
+
+JUnitReporter.$inject = ['baseReporterDecorator', 'config', 'logger', 'helper', 'formatError']
+
+// PUBLISH DI MODULE
+module.exports = {
+  'reporter:junit': ['type', JUnitReporter]
+}

+ 17 - 0
Tools/Gulp/helpers/gulp-processAmdDeclarationToModule.js

@@ -119,6 +119,23 @@ var processData = function(data, options) {
         str = str.replace(/^\s*$/gm, "");
     }
 
+    // Hide Exported Consts if necessary
+    if (options.hiddenConsts) {
+        for (let toHide of options.hiddenConsts) {
+            var constStart = str.indexOf(`export const ${toHide}`);
+            if (constStart > -1) {
+                for (let i = constStart; i < str.length; i++) {
+                    if (str[i] === "}") {
+                        // +1 to enroll the last }
+                        // +2 to enroll the trailing ;
+                        str = str.substr(0, constStart) + str.substr(i + 2);
+                        break;
+                    }
+                }
+            }
+        }
+    }
+
     // Add Entry point.
     str += `
 declare module "${moduleName}" {

+ 5 - 5
Tools/Gulp/helpers/gulp-processModuleDeclarationToNamespace.js

@@ -232,8 +232,11 @@ module.exports = function(fileLocation, packageName, options, cb) {
         if (err) throw err;
 
         data += "";
-        // For Raanan, litteral import hack TO BETTER INTEGRATE
-        data = data.replace('import "../sass/main.scss";', "");
+        if (options.replacements) {
+            for (let replacement of options.replacements) {
+                data = data.replace(replacement.from, replacement.to);
+            }
+        }
 
         if (options.prependText) {
             data = options.prependText + '\n' + data.toString();
@@ -244,9 +247,6 @@ module.exports = function(fileLocation, packageName, options, cb) {
             newData = processData(data, packageName, options);
 
             var namespaceData = newData;
-            if (options.prependToNamespaceText) {
-                namespaceData = options.prependToNamespaceText + '\n' + namespaceData;
-            }
             fs.writeFileSync(fileLocation.replace('.module', ''), namespaceData);
         }
 

+ 28 - 23
Tools/Gulp/helpers/gulp-validateTypedoc.js

@@ -29,7 +29,7 @@ function Validate(validationBaselineFileName, namespaceName, validateNamingConve
     };
 }
 
-Validate.hasTag = function (node, tagName) {
+Validate.hasTag = function(node, tagName) {
     tagName = tagName.trim().toLowerCase();
 
     if (node.comment && node.comment.tags) {
@@ -43,7 +43,7 @@ Validate.hasTag = function (node, tagName) {
     return false;
 }
 
-Validate.position = function (node) {
+Validate.position = function(node) {
     if (!node.sources) {
         log(node);
     }
@@ -56,7 +56,7 @@ Validate.camelCase = new RegExp("^[a-z][a-zA-Z0-9_]*$");
 Validate.underscoreCamelCase = new RegExp("^_[a-z][a-zA-Z0-9_]*$");
 Validate.underscorePascalCase = new RegExp("^_[A-Z][a-zA-Z0-9_]*$");
 
-Validate.prototype.errorCallback = function (parent, node, nodeKind, category, type, msg, position) {
+Validate.prototype.errorCallback = function(parent, node, nodeKind, category, type, msg, position) {
     this.results[this.filePath] = this.results[this.filePath] || { errors: 0 };
     var results = this.results[this.filePath];
 
@@ -136,10 +136,10 @@ Validate.prototype.errorCallback = function (parent, node, nodeKind, category, t
     }
 }
 
-Validate.prototype.init = function (cb) {
+Validate.prototype.init = function(cb) {
     var self = this;
     if (!this.generateBaseLine && fs.existsSync(this.validationBaselineFileName)) {
-        fs.readFile(this.validationBaselineFileName, "utf-8", function (err, data) {
+        fs.readFile(this.validationBaselineFileName, "utf-8", function(err, data) {
             self.previousResults = JSON.parse(data);
             cb();
         });
@@ -149,7 +149,7 @@ Validate.prototype.init = function (cb) {
     }
 }
 
-Validate.prototype.add = function (filePath, content) {
+Validate.prototype.add = function(filePath, content) {
     this.filePath = filePath && unixStylePath(filePath);
 
     if (!Buffer.isBuffer(content)) {
@@ -165,18 +165,18 @@ Validate.prototype.add = function (filePath, content) {
     }
 }
 
-Validate.prototype.getResults = function () {
+Validate.prototype.getResults = function() {
     return this.results;
 }
 
-Validate.prototype.getContents = function () {
+Validate.prototype.getContents = function() {
     return Buffer.from(JSON.stringify(this.results));
 }
 
 /**
  * Validate a TypeDoc JSON file
  */
-Validate.prototype.validateTypedoc = function (json) {
+Validate.prototype.validateTypedoc = function(json) {
     for (var i = 0; i < json.children.length; i++) {
         var namespaces = json.children[i].children;
         this.validateTypedocNamespaces(namespaces);
@@ -185,7 +185,7 @@ Validate.prototype.validateTypedoc = function (json) {
 /**
  * Validate namespaces attach to a declaration file from a TypeDoc JSON file
  */
-Validate.prototype.validateTypedocNamespaces = function (namespaces) {
+Validate.prototype.validateTypedocNamespaces = function(namespaces) {
     var namespace = null;
 
     // Check for BABYLON namespace
@@ -208,7 +208,7 @@ Validate.prototype.validateTypedocNamespaces = function (namespaces) {
 /**
  * Validate classes and modules attach to a declaration file from a TypeDoc JSON file
  */
-Validate.prototype.validateTypedocNamespace = function (namespace) {
+Validate.prototype.validateTypedocNamespace = function(namespace) {
     var containerNode;
     var childNode;
     var children;
@@ -305,7 +305,7 @@ Validate.prototype.validateTypedocNamespace = function (namespace) {
                                         "Unrecognized tag " + tags + " at " + signatureNode.name + " (id: " + signatureNode.id + ") in " + containerNode.name + " (id: " + containerNode.id + ")", Validate.position(childNode));
                                 }
 
-                                if (signatureNode.kindString !== "Constructor" && 
+                                if (signatureNode.kindString !== "Constructor" &&
                                     signatureNode.kindString !== "Constructor signature") {
                                     if (signatureNode.type.name !== "void" && signatureNode.comment && !signatureNode.comment.returns) {
                                         this.errorCallback(containerNode.name,
@@ -315,7 +315,7 @@ Validate.prototype.validateTypedocNamespace = function (namespace) {
                                             "MissingReturn",
                                             "No Return Comment at " + signatureNode.name + " (id: " + signatureNode.id + ") in " + containerNode.name + " (id: " + containerNode.id + ")", Validate.position(childNode));
                                     }
-    
+
                                     if (signatureNode.type.name === "void" && signatureNode.comment && signatureNode.comment.returns) {
                                         this.errorCallback(containerNode.name,
                                             signatureNode.name,
@@ -348,7 +348,7 @@ Validate.prototype.validateTypedocNamespace = function (namespace) {
 /**
  * Validate that tags are recognized
  */
-Validate.prototype.validateTags = function (node) {
+Validate.prototype.validateTags = function(node) {
     var tags;
     var errorTags = [];
 
@@ -373,7 +373,13 @@ Validate.prototype.validateTags = function (node) {
 /**
  * Validate that a JSON node has the correct TypeDoc comments
  */
-Validate.prototype.validateComment = function (node) {
+Validate.prototype.validateComment = function(node) {
+
+    // Return true for all contents coming from the TS d.ts
+    if (node.sources && node.sources[0].fileName.indexOf("lib.dom.d.ts") > -1) {
+        return true;
+    }
+
     // Return-only methods are allowed to just have a @return tag
     if ((node.kindString === "Call signature" || node.kindString === "Accessor") && !node.parameters && node.comment && node.comment.returns) {
         return true;
@@ -407,14 +413,13 @@ Validate.prototype.validateComment = function (node) {
     if (node.kindString === "Function") {
         return true;
     }
-
     return false;
 }
 
 /**
  * Validate comments for paramters on a node
  */
-Validate.prototype.validateParameters = function (containerNode, method, signature, parameters, isPublic) {
+Validate.prototype.validateParameters = function(containerNode, method, signature, parameters, isPublic) {
     var parametersNode;
     for (var parameter in parameters) {
         parametersNode = parameters[parameter];
@@ -432,10 +437,10 @@ Validate.prototype.validateParameters = function (containerNode, method, signatu
         if (this.validateNamingConvention && !Validate.camelCase.test(parametersNode.name)) {
             if (containerNode.kindString === "Constructor" ||
                 containerNode.kindString !== "Constructor signature") {
-                    if (Validate.underscoreCamelCase.test(parametersNode.name)) {
-                        continue;
-                    }
+                if (Validate.underscoreCamelCase.test(parametersNode.name)) {
+                    continue;
                 }
+            }
             this.errorCallback([containerNode.name, method.kindString, signature.name],
                 parametersNode.name,
                 parametersNode.kindString,
@@ -449,7 +454,7 @@ Validate.prototype.validateParameters = function (containerNode, method, signatu
 /**
  * Validate naming conventions of a node
  */
-Validate.prototype.validateNaming = function (parent, node) {
+Validate.prototype.validateNaming = function(parent, node) {
     if (!this.validateNamingConvention) {
         return;
     }
@@ -614,7 +619,7 @@ function gulpValidateTypedoc(validationBaselineFileName, namespaceName, validate
         latestFile = file;
 
         // What will happen once all set.
-        var done = function () {
+        var done = function() {
             // add file to concat instance
             validate.add(file.relative, file.contents);
 
@@ -657,7 +662,7 @@ function gulpValidateTypedoc(validationBaselineFileName, namespaceName, validate
 
         var action = generateBaseLine ? "baseline generation" : "validation";
         var self = this;
-        var error = function (message) {
+        var error = function(message) {
             generateBaseLine ? warn : err;
             if (generateBaseLine) {
                 warn(message);

+ 4 - 3
Tools/Gulp/package.json

@@ -1,6 +1,6 @@
 {
     "name": "babylonjs",
-    "version": "3.3.0",
+    "version": "0.0.0",
     "description": "Babylon.js is a 3D engine based on webgl and javascript",
     "main": "",
     "repository": {
@@ -10,6 +10,7 @@
     "license": "(Apache-2.0)",
     "scripts": {
         "install": "cd ../../ && npm install && cd Playground/ && npm install && cd ../Viewer && npm install && cd ../Tools/Gulp/",
-        "build": "gulp --max-old-space-size=8192 --tsLintFix"
+        "build": "gulp --max-old-space-size=8192 --tsLintFix",
+        "start": "gulp run --max-old-space-size=8192"
     }
-}
+}

+ 2 - 2
Tools/Gulp/readme.md

@@ -25,7 +25,7 @@ npm update
 ## Build all the distributed files and tests (release build):
 
 ```
-gulp
+npm run build
 ```
 Will generate all the files of the dist/preview release folder.
 
@@ -52,4 +52,4 @@ you can now freely test in the following URLs:
 - [Materials Library](http://localhost:1338/materialsLibrary/index.html)
 - [Postprocess Library](http://localhost:1338/postProcessLibrary/index.html)
 - [Procedural Textures Library](http://localhost:1338/proceduralTexturesLibrary/index.html)
-- [Local Dev Samples](http://localhost:1338/localDev/index.html)
+- [Local Dev Samples](http://localhost:1338/localDev/index.html)

+ 1 - 1
Tools/Gulp/tasks/gulpTasks-intellisense.js

@@ -15,7 +15,7 @@ gulp.task("intellisense", function() {
         .pipe(replace(/^\s*readonly _/gm, "protected readonly _"))
         .pipe(replace(/^\s*static _/gm, "private static _"))
         .pipe(replace(/^\s*class _/gm, "private class _"))
-        .pipe(replace(/^\s* _/gm, ""))
+        .pipe(replace(/^\s* _/gm, "private _"))
         .pipe(replace(/^\s*_/gm, "private _"))
         .pipe(gulp.dest(config.build.playgroundDirectory));
 });

+ 1 - 0
Tools/Gulp/tasks/gulpTasks-libraries.js

@@ -134,6 +134,7 @@ var processDTSFiles = function(libraries, settings, cb) {
             moduleName: commandLineOptions.moduleName || settings.build.umd.packageName,
             entryPoint: library.entry,
             externals: settings.build.umd.processDeclaration.classMap,
+            hiddenConsts: settings.build.umd.processDeclaration.hiddenConsts
         });
 
         // Convert Module to Namespace for globals

+ 15 - 13
Tools/Gulp/tasks/gulpTasks-librariesES6.js

@@ -68,8 +68,8 @@ var dep = function(settings) {
         }
     }
 
-    if (settings.build.es6.webpackBuild && settings.build.es6.webpackBuild.dependencies) {
-        for (let pathName of settings.build.es6.webpackBuild.dependencies) {
+    if (settings.build.es6.buildDependencies) {
+        for (let pathName of settings.build.es6.buildDependencies) {
             const dependencyPath = path.join(config.computed.rootFolder, pathName);
             copyPaths.push(dependencyPath);
         }
@@ -91,7 +91,7 @@ var modifySources = function(settings) {
             pathName = pathName.replace("/*", "");
         }
 
-        for (var moduleName of config.modules) {
+        for (var moduleName of config.es6modules) {
             var module = config[moduleName];
             if (module.build.umd.packageName === pathName) {
                 if (module.build.es6.packageName) {
@@ -127,7 +127,7 @@ var modifyTsConfig = function(settings, cb) {
         }
 
         var mapped = false;
-        for (var moduleName of config.modules) {
+        for (var moduleName of config.es6modules) {
             var module = config[moduleName];
             if (module.build.umd.packageName === pathName) {
                 if (module.build.es6.packageName) {
@@ -187,7 +187,9 @@ var build = function(settings, cb) {
         verbose: true
     };
 
-    let command = `node "${config.computed.tscPath}" --skipLibCheck false --inlineSources --sourceMap true -t es5 -m esNext --outDir "${settings.computed.distES6Directory}"`;
+    var skipLibCheck = settings.build.es6.skipLibCheck ? 'true' : 'false';
+    let command = `node "${config.computed.tscPath}" --skipLibCheck ${skipLibCheck} --inlineSources --sourceMap true -t es5 -m esNext --outDir "${settings.computed.distES6Directory}"`;
+
     shelljs.exec(command, options, function(code, stdout, stderr) {
         if (stderr) {
             console.log(stderr);
@@ -252,11 +254,11 @@ function buildES6Library(settings, module) {
     // Creates the required tasks.
     var tasks = [];
 
-    var cleanTasks = [
-        function cleanES6(cb) { return cleanSourceAndDist(settings, cb); },
-        function cleanES6Shaders() { return cleanShaders(settings); }
-    ];
-    var shaders = function() { return buildShaders(settings); };
+    var cleanAndShaderTasks = [ function cleanES6(cb) { return cleanSourceAndDist(settings, cb); } ];
+    if (settings.computed.shaderTSGlob) {
+        cleanAndShaderTasks.push(function cleanES6Shaders() { return cleanShaders(settings); });
+        cleanAndShaderTasks.push(function() { return buildShaders(settings); });
+    }
     var copySource = function() { return source(settings); };
     var dependencies = function() { return dep(settings); };
     var adaptSourceImportPaths = function() { return modifySources(settings); };
@@ -278,7 +280,7 @@ function buildES6Library(settings, module) {
         ];
     }
 
-    tasks.push(...cleanTasks, shaders, copySource, dependencies, adaptSourceImportPaths, adaptTsConfigImportPaths, ...buildSteps);
+    tasks.push(...cleanAndShaderTasks, copySource, dependencies, adaptSourceImportPaths, adaptTsConfigImportPaths, ...buildSteps);
 
     return gulp.series.apply(this, tasks);
 }
@@ -286,7 +288,7 @@ function buildES6Library(settings, module) {
 /**
  * Dynamic es 6 module creation.
  */
-config.modules.map(function(module) {
+config.es6modules.map(function(module) {
     const settings = config[module];
     gulp.task(module + "-es6", buildES6Library(settings, module));
 });
@@ -294,4 +296,4 @@ config.modules.map(function(module) {
 /**
  * Build all es 6 libs.
  */
-gulp.task("typescript-es6", gulp.series(config.modules.map((module) => module + "-es6")));
+gulp.task("typescript-es6", gulp.series(config.es6modules.map((module) => module + "-es6")));

+ 46 - 4
Tools/Gulp/tasks/gulpTasks-tests.js

@@ -42,6 +42,32 @@ gulp.task("tests-validation-virtualscreen", function(done) {
 });
 
 /**
+ * Launches the KARMA validation tests in ff or virtual screen ff on travis for a quick analysis during the build.
+ */
+gulp.task("tests-validation-virtualscreenWebGL1", function(done) {
+    var kamaServerOptions = {
+        configFile: rootDir + "tests/validation/karma.conf.js",
+        singleRun: true,
+        browsers: ['Firefox'],
+        client: {
+            args: ["--disableWebGL2Support"]
+        },
+        junitReporter: {
+            outputDir: '.temp/testResults', // results will be saved as $outputDir/$browserName.xml
+            outputFile: 'ValidationTests1.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
+            suite: 'Validation Tests WebGL1', // suite will become the package name attribute in xml testsuite element
+            useBrowserName: false, // add browser name to report and classes names
+            nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
+            classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
+            properties: {} // key value pair of properties to add to the <properties> section of the report
+        }
+    };
+
+    var server = new karmaServer(kamaServerOptions, done);
+    server.start();
+});
+
+/**
  * Launches the KARMA validation tests in browser stack for remote and cross devices validation tests.
  */
 gulp.task("tests-validation-browserstack", function(done) {
@@ -50,6 +76,12 @@ gulp.task("tests-validation-browserstack", function(done) {
         return;
     }
 
+    // not in safe build
+    if (process.env.BROWSER_STACK_USERNAME === "$(babylon.browserStack.userName)") {
+        done();
+        return;
+    }
+
     var kamaServerOptions = {
         configFile: rootDir + "tests/validation/karma.conf.browserstack.js",
         singleRun: true
@@ -93,7 +125,7 @@ gulp.task("tests-unit-debug", gulp.series("tests-unit-transpile", function(done)
 }));
 
 /**
- * Launches the KARMA unit tests in phantomJS.
+ * Launches the KARMA unit tests in chrome headless.
  */
 gulp.task("tests-babylon-unit", gulp.series("tests-unit-transpile", function(done) {
     var kamaServerOptions = {
@@ -207,7 +239,7 @@ gulp.task("tests-viewer-unit-debug", gulp.series("tests-viewer-transpile", funct
 }));
 
 /**
- * Launches the KARMA unit tests in phantomJS.
+ * Launches the KARMA unit tests in chrome headless.
  */
 gulp.task("tests-viewer-unit", gulp.series("tests-viewer-transpile", function(done) {
     var kamaServerOptions = {
@@ -220,12 +252,12 @@ gulp.task("tests-viewer-unit", gulp.series("tests-viewer-transpile", function(do
 }));
 
 /**
- * Launches the KARMA unit tests in phantomJS.
+ * Launches the KARMA unit tests in chrome headless.
  */
 gulp.task("tests-unit", gulp.series("tests-babylon-unit", "tests-viewer-unit"));
 
 /**
- * Launches the KARMA module tests in phantomJS.
+ * Launches the KARMA module tests in chrome headless.
  */
 gulp.task("tests-modules", function() {
     let testsToRun = require(relativeRootDir + 'tests/modules/tests.json');
@@ -303,6 +335,16 @@ gulp.task("tests-modules", function() {
                 return new Promise(function(resolve, reject) {
                     var kamaServerOptions = {
                         configFile: rootDir + "tests/modules/karma.conf.js",
+
+                        junitReporter: {
+                            outputDir: '.temp/testResults', // results will be saved as $outputDir/$browserName.xml
+                            outputFile:  test.reportName + '.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
+                            suite: test.displayName, // suite will become the package name attribute in xml testsuite element
+                            useBrowserName: false, // add browser name to report and classes names
+                            nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
+                            classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
+                            properties: {} // key value pair of properties to add to the <properties> section of the report
+                        },
                     };
 
                     var server = new karmaServer(kamaServerOptions, (err) => {

+ 0 - 1
Tools/Gulp/tasks/gulpTasks-viewerLibraries.js

@@ -10,7 +10,6 @@ var rename = require("gulp-rename");
 // Gulp Helpers
 var processDeclaration = require('../helpers/gulp-processModuleDeclarationToNamespace');
 var addModuleExports = require("../helpers/gulp-addModuleExports");
-
 // Import Build Config
 var config = require("../../Config/config.json");
 

+ 21 - 12
Tools/Gulp/tasks/gulpTasks-whatsNew.js

@@ -6,23 +6,32 @@ var fs = require("fs");
  * Tests the whats new file to ensure changes have been made in the PR.
  */
 gulp.task("tests-whatsnew", function(done) {
-    // Only checks on Travis
-    if (!process.env.TRAVIS) {
-        done();
-        return;
-    }
+    // Check status on azure
+    if (!process.env["AZURE_PULLREQUESTID"]) {
+        // Only checks on Travis
+        if (!process.env.TRAVIS) {
+            done();
+            return;
+        }
 
-    // Only checks on Pull Requests
-    if (process.env.TRAVIS_PULL_REQUEST == "false") {
-        done();
-        return;
+        // Only checks on Pull Requests
+        if (process.env.TRAVIS_PULL_REQUEST == "false") {
+            done();
+            return;
+        }
+
+        // Do not check deploy
+        if (process.env.TRAVIS_BRANCH == "preview") {
+            done();
+            return;
+        }
     }
 
-    // Do not check deploy
-    if (process.env.TRAVIS_BRANCH == "preview") {
+    // Only on PR not once in.
+    if (process.env.BROWSER_STACK_USERNAME !== "$(babylon.browserStack.userName)") {
         done();
         return;
-    }
+    };
 
     // Compare what's new with the current one in the preview release folder.
     const https = require("https");

+ 2 - 2
Tools/Publisher/helpers/publish.js

@@ -10,14 +10,14 @@ function publish(version, packageName, publishPath, public) {
 
     let tag = "";
     // check for alpha or beta
-    if (version.indexOf('alpha') !== -1 || version.indexOf('beta') !== -1) {
+    if (version.indexOf('alpha') !== -1 || version.indexOf('beta') !== -1 || version.indexOf('rc') !== -1) {
         tag = ' --tag preview';
     }
 
     //publish the respected package
     var cmd = 'npm publish "' + publishPath + '"' + tag;
     if (public) {
-       cmd += " --access public";
+        cmd += " --access public";
     }
 
     if (process.env.BABYLONJSREALPUBLISH === "true") {

+ 1 - 1
Tools/Publisher/tasks/prepareEs6DevPackages.js

@@ -12,7 +12,7 @@ const config = require("../../Config/config.js");
  * Prepare an es6 Dev folder npm linked for test purpose.
  */
 function prepareEs6DevPackages() {
-    config.modules.forEach(moduleName => {
+    config.es6modules.forEach(moduleName => {
         const module = config[moduleName];
 
         colorConsole.log("Prepare " + "ES6Dev".magenta + " Package: " + moduleName.blue.bold);

+ 4 - 1
Tools/Publisher/tasks/processEs6Packages.js

@@ -16,13 +16,16 @@ const modules = config.modules.concat(config.viewerModules);
  * Process ES6 Packages.
  */
 function processEs6Packages(version) {
-    config.modules.forEach(moduleName => {
+    config.es6modules.forEach(moduleName => {
         let module = config[moduleName];
         let es6Config = module.build.es6;
 
         colorConsole.log("Process " + "ES6".magenta + " Package: " + moduleName.blue.bold);
 
         let distPath = module.computed.distES6Directory;
+        if (es6Config.packageBuildFolder) {
+            distPath = path.join(distPath, es6Config.packageBuildFolder);
+        }
         let packagePath = module.computed.packageES6Directory;
         let umdPackageJson = require(module.computed.packageJSONPath);
 

+ 0 - 0
Tools/Publisher/tasks/processUMDViewer.js


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