sebastien 6 年之前
父節點
當前提交
305922c7b6
共有 100 個文件被更改,包括 64974 次插入108626 次删除
  1. 8855 9795
      Playground/babylon.d.txt
  2. 402 402
      Playground/index.html
  3. 3 0
      Playground/package.json
  4. 15267 15175
      dist/preview release/babylon.d.ts
  5. 1 1
      dist/preview release/babylon.js
  6. 240 45
      dist/preview release/babylon.max.js
  7. 240 45
      dist/preview release/babylon.no-module.max.js
  8. 1 1
      dist/preview release/babylon.worker.js
  9. 240 45
      dist/preview release/es6.js
  10. 7 54
      dist/preview release/glTF2Interface/babylon.glTF2Interface.d.ts
  11. 1 1
      dist/preview release/glTF2Interface/package.json
  12. 13 1
      dist/preview release/gui/babylon.gui.d.ts
  13. 2 11851
      dist/preview release/gui/babylon.gui.js
  14. 1 1
      dist/preview release/gui/babylon.gui.min.js
  15. 1 1
      dist/preview release/gui/babylon.gui.min.js.map
  16. 202 190
      dist/preview release/gui/babylon.gui.module.d.ts
  17. 2 2
      dist/preview release/gui/package.json
  18. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js
  19. 1 1
      dist/preview release/inspector/babylon.inspector.bundle.js.map
  20. 20 0
      dist/preview release/inspector/babylon.inspector.d.ts
  21. 310 290
      dist/preview release/inspector/babylon.inspector.module.d.ts
  22. 5 5
      dist/preview release/inspector/package.json
  23. 2948 3254
      dist/preview release/loaders/babylon.glTF1FileLoader.js
  24. 1 3267
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  25. 3698 4021
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  26. 1 4021
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  27. 5867 6296
      dist/preview release/loaders/babylon.glTFFileLoader.js
  28. 1 6335
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  29. 885 1116
      dist/preview release/loaders/babylon.objFileLoader.js
  30. 1 1117
      dist/preview release/loaders/babylon.objFileLoader.min.js
  31. 173 415
      dist/preview release/loaders/babylon.stlFileLoader.js
  32. 1 415
      dist/preview release/loaders/babylon.stlFileLoader.min.js
  33. 1851 1737
      dist/preview release/loaders/babylonjs.loaders.d.ts
  34. 6970 7623
      dist/preview release/loaders/babylonjs.loaders.js
  35. 1 2
      dist/preview release/loaders/babylonjs.loaders.min.js
  36. 1857 3618
      dist/preview release/loaders/babylonjs.loaders.module.d.ts
  37. 3 3
      dist/preview release/loaders/package.json
  38. 280 0
      dist/preview release/materialsLibrary/babylon.backgroundMaterial.d.ts
  39. 920 0
      dist/preview release/materialsLibrary/babylon.backgroundMaterial.js
  40. 1 0
      dist/preview release/materialsLibrary/babylon.backgroundMaterial.min.js
  41. 29 0
      dist/preview release/materialsLibrary/babylon.cellMaterial.d.ts
  42. 298 519
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  43. 1 521
      dist/preview release/materialsLibrary/babylon.cellMaterial.min.js
  44. 50 0
      dist/preview release/materialsLibrary/babylon.customMaterial.d.ts
  45. 192 392
      dist/preview release/materialsLibrary/babylon.customMaterial.js
  46. 1 392
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  47. 30 0
      dist/preview release/materialsLibrary/babylon.fireMaterial.d.ts
  48. 336 557
      dist/preview release/materialsLibrary/babylon.fireMaterial.js
  49. 1 559
      dist/preview release/materialsLibrary/babylon.fireMaterial.min.js
  50. 46 0
      dist/preview release/materialsLibrary/babylon.furMaterial.d.ts
  51. 484 705
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  52. 1 707
      dist/preview release/materialsLibrary/babylon.furMaterial.min.js
  53. 29 0
      dist/preview release/materialsLibrary/babylon.gradientMaterial.d.ts
  54. 308 529
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  55. 1 531
      dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js
  56. 61 0
      dist/preview release/materialsLibrary/babylon.gridMaterial.d.ts
  57. 215 440
      dist/preview release/materialsLibrary/babylon.gridMaterial.js
  58. 1 440
      dist/preview release/materialsLibrary/babylon.gridMaterial.min.js
  59. 37 0
      dist/preview release/materialsLibrary/babylon.lavaMaterial.d.ts
  60. 386 607
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  61. 1 609
      dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js
  62. 56 0
      dist/preview release/materialsLibrary/babylon.mixMaterial.d.ts
  63. 473 694
      dist/preview release/materialsLibrary/babylon.mixMaterial.js
  64. 1 696
      dist/preview release/materialsLibrary/babylon.mixMaterial.min.js
  65. 27 0
      dist/preview release/materialsLibrary/babylon.normalMaterial.d.ts
  66. 330 551
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  67. 1 553
      dist/preview release/materialsLibrary/babylon.normalMaterial.min.js
  68. 19 0
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.d.ts
  69. 220 441
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js
  70. 1 441
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  71. 27 0
      dist/preview release/materialsLibrary/babylon.simpleMaterial.d.ts
  72. 289 510
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  73. 1 512
      dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js
  74. 29 0
      dist/preview release/materialsLibrary/babylon.skyMaterial.d.ts
  75. 230 451
      dist/preview release/materialsLibrary/babylon.skyMaterial.js
  76. 1 451
      dist/preview release/materialsLibrary/babylon.skyMaterial.min.js
  77. 41 0
      dist/preview release/materialsLibrary/babylon.terrainMaterial.d.ts
  78. 404 625
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  79. 1 627
      dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js
  80. 41 0
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.d.ts
  81. 399 620
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  82. 1 622
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js
  83. 110 0
      dist/preview release/materialsLibrary/babylon.waterMaterial.d.ts
  84. 637 864
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  85. 1 866
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  86. 646 521
      dist/preview release/materialsLibrary/babylonjs.materials.d.ts
  87. 5019 6139
      dist/preview release/materialsLibrary/babylonjs.materials.js
  88. 1 2
      dist/preview release/materialsLibrary/babylonjs.materials.min.js
  89. 650 1151
      dist/preview release/materialsLibrary/babylonjs.materials.module.d.ts
  90. 2 2
      dist/preview release/materialsLibrary/package.json
  91. 102 0
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.d.ts
  92. 225 0
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js
  93. 1 435
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  94. 225 435
      dist/preview release/postProcessesLibrary/babylon.asciiArtpostProcess.js
  95. 98 0
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.d.ts
  96. 231 440
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js
  97. 1 440
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  98. 201 163
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.d.ts
  99. 450 719
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.js
  100. 0 0
      dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js

文件差異過大導致無法顯示
+ 8855 - 9795
Playground/babylon.d.txt


+ 402 - 402
Playground/index.html

@@ -1,489 +1,489 @@
 <!DOCTYPE html>
 <html>
 
-<head>
-    <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">
-
-    <script src="js/libs/pep.min.js"></script>
-    <!--For canvas/code separator-->
-    <script src="js/libs/split.js"></script>
-
-    <script src="js/libs/dat.gui.min.js"></script>
-    <!-- jszip -->
-    <script src="js/libs/jszip.min.js"></script>
-    <script src="js/libs/fileSaver.js"></script>
-    <!-- Dependencies -->
-    <script src="https://preview.babylonjs.com/cannon.js"></script>
-    <script src="https://preview.babylonjs.com/Oimo.js"></script>
-    <script src="https://preview.babylonjs.com/gltf_validator.js"></script>
-    <script src="https://preview.babylonjs.com/earcut.min.js"></script>
-    <!-- Babylon.js -->
-    <script src="https://preview.babylonjs.com/babylon.js"></script>
-    <script src="https://preview.babylonjs.com/gui/babylon.gui.min.js"></script>
-    <script src="https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js"></script>
-    <script src="https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.min.js"></script>
-    <script src="https://preview.babylonjs.com/proceduralTexturesLibrary/babylonjs.proceduralTextures.min.js"></script>
-    <script src="https://preview.babylonjs.com/postProcessesLibrary/babylonjs.postProcesses.min.js"></script>
-    <script src="https://preview.babylonjs.com/loaders/babylonjs.loaders.js"></script>
-    <script src="https://preview.babylonjs.com/serializers/babylonjs.serializers.min.js"></script>
-
-    <!-- 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 src="https://www.babylontoolkit.com/playground/scripts/babylon.navmesh.js"></script>
-    <script src="https://www.babylontoolkit.com/playground/scripts/babylon.manager.js"></script>
-
-    <link href="css/index.css" rel="stylesheet" />
-</head>
-
-<body>
-    <div class="navbar navBar1600">
-        <div class="title">
-            Babylon.js Playground
-        </div>
-        <div class="version" id="mainTitle">
-        </div>
+    <head>
+        <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">
+
+        <script src="js/libs/pep.min.js"></script>
+        <!--For canvas/code separator-->
+        <script src="js/libs/split.js"></script>
+
+        <script src="js/libs/dat.gui.min.js"></script>
+        <!-- jszip -->
+        <script src="js/libs/jszip.min.js"></script>
+        <script src="js/libs/fileSaver.js"></script>
+        <!-- Dependencies -->
+        <script src="https://preview.babylonjs.com/cannon.js"></script>
+        <script src="https://preview.babylonjs.com/Oimo.js"></script>
+        <script src="https://preview.babylonjs.com/gltf_validator.js"></script>
+        <script src="https://preview.babylonjs.com/earcut.min.js"></script>
+        <!-- Babylon.js -->
+        <script src="https://preview.babylonjs.com/babylon.js"></script>
+        <script src="https://preview.babylonjs.com/gui/babylon.gui.min.js"></script>
+        <script src="https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js"></script>
+        <script src="https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.min.js"></script>
+        <script src="https://preview.babylonjs.com/proceduralTexturesLibrary/babylonjs.proceduralTextures.min.js"></script>
+        <script src="https://preview.babylonjs.com/postProcessesLibrary/babylonjs.postProcess.min.js"></script>
+        <script src="https://preview.babylonjs.com/loaders/babylonjs.loaders.js"></script>
+        <script src="https://preview.babylonjs.com/serializers/babylonjs.serializers.min.js"></script>
+
+        <!-- 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 src="https://www.babylontoolkit.com/playground/scripts/babylon.navmesh.js"></script>
+        <script src="https://www.babylontoolkit.com/playground/scripts/babylon.manager.js"></script>
+
+        <link href="css/index.css" rel="stylesheet" />
+    </head>
+
+    <body>
+        <div class="navbar navBar1600">
+            <div class="title">
+                Babylon.js Playground
+            </div>
+            <div class="version" id="mainTitle">
+            </div>
 
-        <div class="category">
-            <div class="button run" id="runButton1600">Run
-                <i class="fa fa-play" aria-hidden="true"></i>
+            <div class="category">
+                <div class="button run" id="runButton1600">Run
+                    <i class="fa fa-play" aria-hidden="true"></i>
+                </div>
             </div>
-        </div>
 
 
-        <div class="category">
-            <div class="button" id="newButton1600">New
-                <i class="fa fa-file" aria-hidden="true"></i>
-            </div>
-            <div class="button removeOnPhone" id="clearButton1600">Clear
-                <i class="fa fa-trash" aria-hidden="true"></i>
+            <div class="category">
+                <div class="button" id="newButton1600">New
+                    <i class="fa fa-file" aria-hidden="true"></i>
+                </div>
+                <div class="button removeOnPhone" id="clearButton1600">Clear
+                    <i class="fa fa-trash" aria-hidden="true"></i>
+                </div>
             </div>
-        </div>
 
-        <div class="category">
-            <div class="button" id="saveButton1600">Save
-                <i class="fa fa-floppy-o" aria-hidden="true"></i>
-            </div>
-            <div class="button removeOnPhone" id="zipButton1600">Zip
-                <i class="fa fa-download" aria-hidden="true"></i>
+            <div class="category">
+                <div class="button" id="saveButton1600">Save
+                    <i class="fa fa-floppy-o" aria-hidden="true"></i>
+                </div>
+                <div class="button removeOnPhone" id="zipButton1600">Zip
+                    <i class="fa fa-download" aria-hidden="true"></i>
+                </div>
             </div>
-        </div>
 
-        <div class="category">
-            <div class="button select">Settings
-                <div class="toDisplay">
-                    <div class="option subSelect">Theme
-                        <i class="fa fa-chevron-right" aria-hidden="true"></i>
-                        <div class="toDisplaySub">
-                            <div class="option" id="darkTheme1600">Dark</div>
-                            <div class="option" id="lightTheme1600">Light</div>
+            <div class="category">
+                <div class="button select">Settings
+                    <div class="toDisplay">
+                        <div class="option subSelect">Theme
+                            <i class="fa fa-chevron-right" aria-hidden="true"></i>
+                            <div class="toDisplaySub">
+                                <div class="option" id="darkTheme1600">Dark</div>
+                                <div class="option" id="lightTheme1600">Light</div>
+                            </div>
                         </div>
-                    </div>
-                    <div class="option subSelect">
-                        <span id="currentFontSize1600">Font: 14</span>
-                        <i class="fa fa-chevron-right" aria-hidden="true"></i>
-                        <div class="toDisplaySub">
-                            <div class="option" onclick="setFontSize(12);">12</div>
-                            <div class="option" onclick="setFontSize(14);">14</div>
-                            <div class="option" onclick="setFontSize(16);">16</div>
-                            <div class="option" onclick="setFontSize(18);">18</div>
-                            <div class="option" onclick="setFontSize(20);">20</div>
-                            <div class="option" onclick="setFontSize(22);">22</div>
+                        <div class="option subSelect">
+                            <span id="currentFontSize1600">Font: 14</span>
+                            <i class="fa fa-chevron-right" aria-hidden="true"></i>
+                            <div class="toDisplaySub">
+                                <div class="option" onclick="setFontSize(12);">12</div>
+                                <div class="option" onclick="setFontSize(14);">14</div>
+                                <div class="option" onclick="setFontSize(16);">16</div>
+                                <div class="option" onclick="setFontSize(18);">18</div>
+                                <div class="option" onclick="setFontSize(20);">20</div>
+                                <div class="option" onclick="setFontSize(22);">22</div>
+                            </div>
+                        </div>
+                        <div class="option" id="safemodeToggle1600">Safe mode
+                            <i class="far fa-square" aria-hidden="true"></i>
+                        </div>
+                        <div class="option checked" id="editorButton1600">Editor
+                            <i class="fa fa-check-square" aria-hidden="true"></i>
+                        </div>
+                        <div class="option" id="fullscreenButton1600">Fullscreen</div>
+                        <div class="option" id="editorFullscreenButton1600">Editor Fullscreen</div>
+                        <div class="option" id="formatButton1600">Format code</div>
+                        <div class="option" id="minimapToggle1600">Minimap
+                            <i class="far fa-square" aria-hidden="true"></i>
                         </div>
-                    </div>
-                    <div class="option" id="safemodeToggle1600">Safe mode
-                        <i class="far fa-square" aria-hidden="true"></i>
-                    </div>
-                    <div class="option checked" id="editorButton1600">Editor
-                        <i class="fa fa-check-square" aria-hidden="true"></i>
-                    </div>
-                    <div class="option" id="fullscreenButton1600">Fullscreen</div>
-                    <div class="option" id="editorFullscreenButton1600">Editor Fullscreen</div>
-                    <div class="option" id="formatButton1600">Format code</div>
-                    <div class="option" id="minimapToggle1600">Minimap
-                        <i class="far fa-square" aria-hidden="true"></i>
                     </div>
                 </div>
-            </div>
 
-            <div class="button uncheck" id="debugButton1600">Inspector</div>
-            <div class="button" id="metadataButton1600">Metadata</div>
-        </div>
+                <div class="button uncheck" id="debugButton1600">Inspector</div>
+                <div class="button" id="metadataButton1600">Metadata</div>
+            </div>
 
 
 
-        <div class="category right">
-            <div class="button select">
-                <span id="currentVersion1600">Version: Latest</span>
-                <div class="toDisplay">
-                    <div class="option" onclick="setVersion('latest');">Latest</div>
-                    <div class="option" onclick="setVersion('stable');">Stable</div>
+            <div class="category right">
+                <div class="button select">
+                    <span id="currentVersion1600">Version: Latest</span>
+                    <div class="toDisplay">
+                        <div class="option" onclick="setVersion('latest');">Latest</div>
+                        <div class="option" onclick="setVersion('stable');">Stable</div>
+                    </div>
+                </div>
+                <div class="button select">
+                    <span class="examplesButton">Examples</span>
                 </div>
-            </div>
-            <div class="button select">
-                <span class="examplesButton">Examples</span>
             </div>
         </div>
-    </div>
 
-    <div class="navbar navBar1475">
-        <div class="title">
-            Babylon.js Playground
-        </div>
-        <div class="version" id="mainTitle">
-        </div>
+        <div class="navbar navBar1475">
+            <div class="title">
+                Babylon.js Playground
+            </div>
+            <div class="version" id="mainTitle">
+            </div>
 
-        <div class="category">
-            <div class="button run" id="runButton1475">Run
-                <i class="fa fa-play" aria-hidden="true"></i>
+            <div class="category">
+                <div class="button run" id="runButton1475">Run
+                    <i class="fa fa-play" aria-hidden="true"></i>
+                </div>
             </div>
-        </div>
 
 
-        <div class="category">
-            <div class="button" id="newButton1475">New
-                <i class="fa fa-file" aria-hidden="true"></i>
-            </div>
-            <div class="button removeOnPhone" id="clearButton1475">Clear
-                <i class="fa fa-trash" aria-hidden="true"></i>
+            <div class="category">
+                <div class="button" id="newButton1475">New
+                    <i class="fa fa-file" aria-hidden="true"></i>
+                </div>
+                <div class="button removeOnPhone" id="clearButton1475">Clear
+                    <i class="fa fa-trash" aria-hidden="true"></i>
+                </div>
             </div>
-        </div>
 
-        <div class="category">
-            <div class="button" id="saveButton1475">Save
-                <i class="fa fa-floppy-o" aria-hidden="true"></i>
-            </div>
-            <div class="button removeOnPhone" id="zipButton1475">Zip
-                <i class="fa fa-download" aria-hidden="true"></i>
+            <div class="category">
+                <div class="button" id="saveButton1475">Save
+                    <i class="fa fa-floppy-o" aria-hidden="true"></i>
+                </div>
+                <div class="button removeOnPhone" id="zipButton1475">Zip
+                    <i class="fa fa-download" aria-hidden="true"></i>
+                </div>
             </div>
-        </div>
 
-        <div class="category">
-            <div class="button select">Settings
-                <div class="toDisplay">
-                    <div class="option subSelect">Theme
-                        <i class="fa fa-chevron-right" aria-hidden="true"></i>
-                        <div class="toDisplaySub">
-                            <div class="option" id="darkTheme1475">Dark</div>
-                            <div class="option" id="lightTheme1475">Light</div>
+            <div class="category">
+                <div class="button select">Settings
+                    <div class="toDisplay">
+                        <div class="option subSelect">Theme
+                            <i class="fa fa-chevron-right" aria-hidden="true"></i>
+                            <div class="toDisplaySub">
+                                <div class="option" id="darkTheme1475">Dark</div>
+                                <div class="option" id="lightTheme1475">Light</div>
+                            </div>
                         </div>
-                    </div>
-                    <div class="option subSelect">
-                        <span id="currentFontSize1475">Font: 14</span>
-                        <i class="fa fa-chevron-right" aria-hidden="true"></i>
-                        <div class="toDisplaySub">
-                            <div class="option" onclick="setFontSize(12);">12</div>
-                            <div class="option" onclick="setFontSize(14);">14</div>
-                            <div class="option" onclick="setFontSize(16);">16</div>
-                            <div class="option" onclick="setFontSize(18);">18</div>
-                            <div class="option" onclick="setFontSize(20);">20</div>
-                            <div class="option" onclick="setFontSize(22);">22</div>
+                        <div class="option subSelect">
+                            <span id="currentFontSize1475">Font: 14</span>
+                            <i class="fa fa-chevron-right" aria-hidden="true"></i>
+                            <div class="toDisplaySub">
+                                <div class="option" onclick="setFontSize(12);">12</div>
+                                <div class="option" onclick="setFontSize(14);">14</div>
+                                <div class="option" onclick="setFontSize(16);">16</div>
+                                <div class="option" onclick="setFontSize(18);">18</div>
+                                <div class="option" onclick="setFontSize(20);">20</div>
+                                <div class="option" onclick="setFontSize(22);">22</div>
+                            </div>
                         </div>
-                    </div>
-                    <div class="option" id='safemodeToggle1475'>Safe mode
-                        <i class="far fa-square" aria-hidden="true"></i>
-                    </div>
-                    <div class="option checked" id="editorButton1475">Editor
-                        <i class="fa fa-check-square" aria-hidden="true"></i>
-                    </div>
-                    <div class="option" id="fullscreenButton1475">Fullscreen</div>
-                    <div class="option" id="editorFullscreenButton1475">Editor Fullscreen</div>
-                    <div class="option" id="formatButton1475">Format code</div>
-                    <div class="option" id="minimapToggle1475">Minimap
-                        <i class="far fa-square" aria-hidden="true"></i>
-                    </div>
-                    <div class="option" id="debugButton1475">Inspector</div>
-                    <div class="option" id="metadataButton1475">Metadata</div>
-                    <div class="option subSelect">
-                        <span id="currentVersion1475">Vers. : Latest</span>
-                        <i class="fa fa-chevron-right" aria-hidden="true"></i>
-                        <div class="toDisplaySub">
-                            <div class="option" onclick="setVersion('latest');">Latest</div>
-                            <div class="option" onclick="setVersion('stable');">Stable</div>
+                        <div class="option" id='safemodeToggle1475'>Safe mode
+                            <i class="far fa-square" aria-hidden="true"></i>
+                        </div>
+                        <div class="option checked" id="editorButton1475">Editor
+                            <i class="fa fa-check-square" aria-hidden="true"></i>
+                        </div>
+                        <div class="option" id="fullscreenButton1475">Fullscreen</div>
+                        <div class="option" id="editorFullscreenButton1475">Editor Fullscreen</div>
+                        <div class="option" id="formatButton1475">Format code</div>
+                        <div class="option" id="minimapToggle1475">Minimap
+                            <i class="far fa-square" aria-hidden="true"></i>
+                        </div>
+                        <div class="option" id="debugButton1475">Inspector</div>
+                        <div class="option" id="metadataButton1475">Metadata</div>
+                        <div class="option subSelect">
+                            <span id="currentVersion1475">Vers. : Latest</span>
+                            <i class="fa fa-chevron-right" aria-hidden="true"></i>
+                            <div class="toDisplaySub">
+                                <div class="option" onclick="setVersion('latest');">Latest</div>
+                                <div class="option" onclick="setVersion('stable');">Stable</div>
+                            </div>
                         </div>
                     </div>
                 </div>
             </div>
-        </div>
 
-        <div class="category right">
-            <div class="button select">
-                <span class="examplesButton">Examples</span>
+            <div class="category right">
+                <div class="button select">
+                    <span class="examplesButton">Examples</span>
+                </div>
             </div>
         </div>
-    </div>
 
-    <div class="navbar navBar1030">
-        <div class="category">
-            <div class="button run" id="runButton1030">Run
-                <i class="fa fa-play" aria-hidden="true"></i>
+        <div class="navbar navBar1030">
+            <div class="category">
+                <div class="button run" id="runButton1030">Run
+                    <i class="fa fa-play" aria-hidden="true"></i>
+                </div>
             </div>
-        </div>
 
 
-        <div class="category">
-            <div class="button" id="newButton1030">New
-                <i class="fa fa-file" aria-hidden="true"></i>
-            </div>
-            <div class="button removeOnPhone" id="clearButton1030">Clear
-                <i class="fa fa-trash" aria-hidden="true"></i>
+            <div class="category">
+                <div class="button" id="newButton1030">New
+                    <i class="fa fa-file" aria-hidden="true"></i>
+                </div>
+                <div class="button removeOnPhone" id="clearButton1030">Clear
+                    <i class="fa fa-trash" aria-hidden="true"></i>
+                </div>
             </div>
-        </div>
 
-        <div class="category">
-            <div class="button" id="saveButton1030">Save
-                <i class="fa fa-floppy-o" aria-hidden="true"></i>
-            </div>
-            <div class="button removeOnPhone" id="zipButton1030">Zip
-                <i class="fa fa-download" aria-hidden="true"></i>
+            <div class="category">
+                <div class="button" id="saveButton1030">Save
+                    <i class="fa fa-floppy-o" aria-hidden="true"></i>
+                </div>
+                <div class="button removeOnPhone" id="zipButton1030">Zip
+                    <i class="fa fa-download" aria-hidden="true"></i>
+                </div>
             </div>
-        </div>
 
-        <div class="category">
-            <div class="button select">Settings
-                <div class="toDisplay">
-                    <div class="option subSelect">Theme
-                        <i class="fa fa-chevron-right" aria-hidden="true"></i>
-                        <div class="toDisplaySub">
-                            <div class="option" id="darkTheme1030">Dark</div>
-                            <div class="option" id="lightTheme1030">Light</div>
+            <div class="category">
+                <div class="button select">Settings
+                    <div class="toDisplay">
+                        <div class="option subSelect">Theme
+                            <i class="fa fa-chevron-right" aria-hidden="true"></i>
+                            <div class="toDisplaySub">
+                                <div class="option" id="darkTheme1030">Dark</div>
+                                <div class="option" id="lightTheme1030">Light</div>
+                            </div>
                         </div>
-                    </div>
-                    <div class="option subSelect">
-                        <span id="currentFontSize1030">Font: 14</span>
-                        <i class="fa fa-chevron-right" aria-hidden="true"></i>
-                        <div class="toDisplaySub">
-                            <div class="option" onclick="setFontSize(12);">12</div>
-                            <div class="option" onclick="setFontSize(14);">14</div>
-                            <div class="option" onclick="setFontSize(16);">16</div>
-                            <div class="option" onclick="setFontSize(18);">18</div>
-                            <div class="option" onclick="setFontSize(20);">20</div>
-                            <div class="option" onclick="setFontSize(22);">22</div>
+                        <div class="option subSelect">
+                            <span id="currentFontSize1030">Font: 14</span>
+                            <i class="fa fa-chevron-right" aria-hidden="true"></i>
+                            <div class="toDisplaySub">
+                                <div class="option" onclick="setFontSize(12);">12</div>
+                                <div class="option" onclick="setFontSize(14);">14</div>
+                                <div class="option" onclick="setFontSize(16);">16</div>
+                                <div class="option" onclick="setFontSize(18);">18</div>
+                                <div class="option" onclick="setFontSize(20);">20</div>
+                                <div class="option" onclick="setFontSize(22);">22</div>
+                            </div>
                         </div>
-                    </div>
-                    <div class="option" id="safemodeToggle1030">Safe mode
-                        <i class="far fa-square" aria-hidden="true"></i>
-                    </div>
-                    <div class="option checked" id="editorButton1030">Editor
-                        <i class="fa fa-check-square" aria-hidden="true"></i>
-                    </div>
-                    <div class="option" id="fullscreenButton1030">Fullscreen</div>
-                    <div class="option" id="editorFullscreenButton1030">Editor Fullscreen</div>
-                    <div class="option" id="formatButton1030">Format code</div>
-                    <div class="option" id="minimapToggle1030">Minimap
-                        <i class="far fa-square" aria-hidden="true"></i>
-                    </div>
-                    <div class="option" id="debugButton1030">Inspector</div>
-                    <div class="option" id="metadataButton1030">Metadata</div>
-                    <div class="option subSelect">
-                        <span id="currentVersion1030">Vers. : Latest</span>
-                        <i class="fa fa-chevron-right" aria-hidden="true"></i>
-                        <div class="toDisplaySub">
-                            <div class="option" onclick="setVersion('latest');">Latest</div>
-                            <div class="option" onclick="setVersion('stable');">Stable</div>
+                        <div class="option" id="safemodeToggle1030">Safe mode
+                            <i class="far fa-square" aria-hidden="true"></i>
+                        </div>
+                        <div class="option checked" id="editorButton1030">Editor
+                            <i class="fa fa-check-square" aria-hidden="true"></i>
+                        </div>
+                        <div class="option" id="fullscreenButton1030">Fullscreen</div>
+                        <div class="option" id="editorFullscreenButton1030">Editor Fullscreen</div>
+                        <div class="option" id="formatButton1030">Format code</div>
+                        <div class="option" id="minimapToggle1030">Minimap
+                            <i class="far fa-square" aria-hidden="true"></i>
+                        </div>
+                        <div class="option" id="debugButton1030">Inspector</div>
+                        <div class="option" id="metadataButton1030">Metadata</div>
+                        <div class="option subSelect">
+                            <span id="currentVersion1030">Vers. : Latest</span>
+                            <i class="fa fa-chevron-right" aria-hidden="true"></i>
+                            <div class="toDisplaySub">
+                                <div class="option" onclick="setVersion('latest');">Latest</div>
+                                <div class="option" onclick="setVersion('stable');">Stable</div>
+                            </div>
                         </div>
                     </div>
                 </div>
             </div>
-        </div>
 
-        <div class="category right">
-            <div class="button select">
-                <span class="examplesButton">Examples</span>
+            <div class="category right">
+                <div class="button select">
+                    <span class="examplesButton">Examples</span>
+                </div>
             </div>
         </div>
-    </div>
-
-    <div class="navbar navBar750">
-        <div class="category">
-            <div class="button select">File
-                <div class="toDisplay">
-                    <div class="option" id="runButton750">Run
-                        <i class="fa fa-play" aria-hidden="true"></i>
-                    </div>
-                    <div class="option" id="newButton750">New
-                        <i class="fa fa-file" aria-hidden="true"></i>
-                    </div>
-                    <div class="option" id="clearButton750">Clear
-                        <i class="fa fa-trash" aria-hidden="true"></i>
-                    </div>
-                    <div class="option" id="saveButton750">Save
-                        <i class="fa fa-floppy-o" aria-hidden="true"></i>
-                    </div>
-                    <div class="option" id="zipButton750">Zip
-                        <i class="fa fa-download" aria-hidden="true"></i>
+
+        <div class="navbar navBar750">
+            <div class="category">
+                <div class="button select">File
+                    <div class="toDisplay">
+                        <div class="option" id="runButton750">Run
+                            <i class="fa fa-play" aria-hidden="true"></i>
+                        </div>
+                        <div class="option" id="newButton750">New
+                            <i class="fa fa-file" aria-hidden="true"></i>
+                        </div>
+                        <div class="option" id="clearButton750">Clear
+                            <i class="fa fa-trash" aria-hidden="true"></i>
+                        </div>
+                        <div class="option" id="saveButton750">Save
+                            <i class="fa fa-floppy-o" aria-hidden="true"></i>
+                        </div>
+                        <div class="option" id="zipButton750">Zip
+                            <i class="fa fa-download" aria-hidden="true"></i>
+                        </div>
                     </div>
                 </div>
             </div>
-        </div>
 
-        <div class="category">
-            <div class="button select">Settings
-                <div class="toDisplay">
-                    <div class="option subSelect">Theme
-                        <i class="fa fa-chevron-right" aria-hidden="true"></i>
-                        <div class="toDisplaySub">
-                            <div class="option" id="darkTheme750">Dark</div>
-                            <div class="option" id="lightTheme750">Light</div>
+            <div class="category">
+                <div class="button select">Settings
+                    <div class="toDisplay">
+                        <div class="option subSelect">Theme
+                            <i class="fa fa-chevron-right" aria-hidden="true"></i>
+                            <div class="toDisplaySub">
+                                <div class="option" id="darkTheme750">Dark</div>
+                                <div class="option" id="lightTheme750">Light</div>
+                            </div>
                         </div>
-                    </div>
-                    <div class="option subSelect">
-                        <span id="currentFontSize750">Font: 14</span>
-                        <i class="fa fa-chevron-right" aria-hidden="true"></i>
-                        <div class="toDisplaySub">
-                            <div class="option" onclick="setFontSize(12);">12</div>
-                            <div class="option" onclick="setFontSize(14);">14</div>
-                            <div class="option" onclick="setFontSize(16);">16</div>
-                            <div class="option" onclick="setFontSize(18);">18</div>
-                            <div class="option" onclick="setFontSize(20);">20</div>
-                            <div class="option" onclick="setFontSize(22);">22</div>
+                        <div class="option subSelect">
+                            <span id="currentFontSize750">Font: 14</span>
+                            <i class="fa fa-chevron-right" aria-hidden="true"></i>
+                            <div class="toDisplaySub">
+                                <div class="option" onclick="setFontSize(12);">12</div>
+                                <div class="option" onclick="setFontSize(14);">14</div>
+                                <div class="option" onclick="setFontSize(16);">16</div>
+                                <div class="option" onclick="setFontSize(18);">18</div>
+                                <div class="option" onclick="setFontSize(20);">20</div>
+                                <div class="option" onclick="setFontSize(22);">22</div>
+                            </div>
                         </div>
-                    </div>
-                    <div class="option" id="safemodeToggle750">Safe mode
-                        <i class="far fa-square" aria-hidden="true"></i>
-                    </div>
-                    <div style="display:none;" class="option checked" id="editorButton750">Editor
-                        <i class="fa fa-check-square" aria-hidden="true"></i>
-                    </div>
-                    <div class="option" id="fullscreenButton750">Fullscreen</div>
-                    <div class="option" id="editorFullscreenButton750">Editor Fullscreen</div>
-                    <div class="option" id="formatButton750">Format code</div>
-                    <div class="option" id="minimapToggle750">Minimap
-                        <i class="far fa-square" aria-hidden="true"></i>
-                    </div>
-                    <div class="option" id="debugButton750">Inspector</div>
-                    <div class="option" id="metadataButton750">Metadata</div>
-                    <div class="option subSelect">
-                        <span id="currentVersion750">Vers. : Latest</span>
-                        <i class="fa fa-chevron-right" aria-hidden="true"></i>
-                        <div class="toDisplaySub">
-                            <div class="option" onclick="setVersion('latest');">Latest</div>
-                            <div class="option" onclick="setVersion('stable');">Stable</div>
+                        <div class="option" id="safemodeToggle750">Safe mode
+                            <i class="far fa-square" aria-hidden="true"></i>
+                        </div>
+                        <div style="display:none;" class="option checked" id="editorButton750">Editor
+                            <i class="fa fa-check-square" aria-hidden="true"></i>
+                        </div>
+                        <div class="option" id="fullscreenButton750">Fullscreen</div>
+                        <div class="option" id="editorFullscreenButton750">Editor Fullscreen</div>
+                        <div class="option" id="formatButton750">Format code</div>
+                        <div class="option" id="minimapToggle750">Minimap
+                            <i class="far fa-square" aria-hidden="true"></i>
+                        </div>
+                        <div class="option" id="debugButton750">Inspector</div>
+                        <div class="option" id="metadataButton750">Metadata</div>
+                        <div class="option subSelect">
+                            <span id="currentVersion750">Vers. : Latest</span>
+                            <i class="fa fa-chevron-right" aria-hidden="true"></i>
+                            <div class="toDisplaySub">
+                                <div class="option" onclick="setVersion('latest');">Latest</div>
+                                <div class="option" onclick="setVersion('stable');">Stable</div>
+                            </div>
                         </div>
                     </div>
                 </div>
             </div>
-        </div>
 
-        <div class="category right">
-            <div class="button select">
-                <span id="currentScript750">Examples</span>
+            <div class="category right">
+                <div class="button select">
+                    <span id="currentScript750">Examples</span>
+                </div>
             </div>
         </div>
-    </div>
 
-    <div class="wrapper">
-        <div id="jsEditor"></div>
-        <div id="canvasZone">
-            <canvas touch-action="none" id="renderCanvas"></canvas>
+        <div class="wrapper">
+            <div id="jsEditor"></div>
+            <div id="canvasZone">
+                <canvas touch-action="none" id="renderCanvas"></canvas>
+            </div>
         </div>
-    </div>
-    <div id="exampleList" class="javascript">
-        <div id="exampleBanner">
-            <h1>Examples</h1>
+        <div id="exampleList" class="javascript">
+            <div id="exampleBanner">
+                <h1>Examples</h1>
+            </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">
         </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">
-    </div>
 
-    <span class="label" id="fpsLabel">FPS</span>
+        <span class="label" id="fpsLabel">FPS</span>
 
-    <div id="errorZone">
-    </div>
+        <div id="errorZone">
+        </div>
 
-    <div class="navbarBottom">
-        <div id="statusBar"></div>
-        <div class="links">
-            <div class='link'>
-                <a target='_new' href="https://www.netlify.com/">Deployed by Netlify</a>
-            </div>
-            <div class='link'>
-                <a target='_new' href="http://www.html5gamedevs.com/forum/16-babylonjs/">Forum</a>
-            </div>
-            <div class='link'>
-                <a target='_new' href="https://www.babylonjs.com/sandbox">Sandbox</a>
-            </div>
-            <div class='link'>
-                <a target='_new' href="https://doc.babylonjs.com">Documentation</a>
-            </div>
-            <div class='link'>
-                <a target='_new' href="https://doc.babylonjs.com/playground">Search</a>
+        <div class="navbarBottom">
+            <div id="statusBar"></div>
+            <div class="links">
+                <div class='link'>
+                    <a target='_new' href="https://www.netlify.com/">Deployed by Netlify</a>
+                </div>
+                <div class='link'>
+                    <a target='_new' href="http://www.html5gamedevs.com/forum/16-babylonjs/">Forum</a>
+                </div>
+                <div class='link'>
+                    <a target='_new' href="https://www.babylonjs.com/sandbox">Sandbox</a>
+                </div>
+                <div class='link'>
+                    <a target='_new' href="https://doc.babylonjs.com">Documentation</a>
+                </div>
+                <div class='link'>
+                    <a target='_new' href="https://doc.babylonjs.com/playground">Search</a>
+                </div>
             </div>
         </div>
-    </div>
 
-    <div id="saveLayer" class="save-layer">
-        <div class="save-form">
-            <label for="saveFormTitle">TITLE</label>
-            <div class="separator"></div>
-            <input type="text" maxlength="120" id="saveFormTitle" class="save-form-title">
+        <div id="saveLayer" class="save-layer">
+            <div class="save-form">
+                <label for="saveFormTitle">TITLE</label>
+                <div class="separator"></div>
+                <input type="text" maxlength="120" id="saveFormTitle" class="save-form-title">
 
-            <label for="saveFormDescription">DESCRIPTION</label>
-            <div class="separator"></div>
-            <textarea id="saveFormDescription" rows="4" cols="10"></textarea>
+                <label for="saveFormDescription">DESCRIPTION</label>
+                <div class="separator"></div>
+                <textarea id="saveFormDescription" rows="4" cols="10"></textarea>
 
-            <label for="saveFormTags">TAGS (separated by comma)</label>
-            <div class="separator"></div>
-            <textarea id="saveFormTags" rows="4" cols="10"></textarea>
+                <label for="saveFormTags">TAGS (separated by comma)</label>
+                <div class="separator"></div>
+                <textarea id="saveFormTags" rows="4" cols="10"></textarea>
 
-            <div class="save-form-buttons" id="saveFormButtons">
+                <div class="save-form-buttons" id="saveFormButtons">
 
-                <div id="saveFormButtonOk" class="button">OK</div>
-                <div id="saveFormButtonCancel" class="button">Cancel</div>
+                    <div id="saveFormButtonOk" class="button">OK</div>
+                    <div id="saveFormButtonCancel" class="button">Cancel</div>
+                </div>
             </div>
         </div>
-    </div>
-
-    <div id="waitDiv">
-        <span id="waitTitle">Babylon.js Playground
-            <BR>
-            <BR>
-            <BR>
-        </span>
-        <img src="waitlogo.png" id="waitLogo" />
-    </div>
-
-    <script src="js/libs/jquery.min.js"></script>
-
-    <script src="js/actions.js"></script>
-    <script src="js/pbt.js"></script>
-    <script src="js/index.js"></script>
-
-    <!-- Global site tag (gtag.js) - Google Analytics -->
-    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-41767310-2"></script>
-    <script>
-        window.dataLayer = window.dataLayer || [];
-        function gtag() { dataLayer.push(arguments); }
-        gtag('js', new Date());
-
-        gtag('config', 'UA-41767310-2');
-    </script>
-</body>
+
+        <div id="waitDiv">
+            <span id="waitTitle">Babylon.js Playground
+                <BR>
+                <BR>
+                <BR>
+            </span>
+            <img src="waitlogo.png" id="waitLogo" />
+        </div>
+
+        <script src="js/libs/jquery.min.js"></script>
+
+        <script src="js/actions.js"></script>
+        <script src="js/pbt.js"></script>
+        <script src="js/index.js"></script>
+
+        <!-- Global site tag (gtag.js) - Google Analytics -->
+        <script async src="https://www.googletagmanager.com/gtag/js?id=UA-41767310-2"></script>
+        <script>
+            window.dataLayer = window.dataLayer || [];
+            function gtag() { dataLayer.push(arguments); }
+            gtag('js', new Date());
+
+            gtag('config', 'UA-41767310-2');
+        </script>
+    </body>
 
 </html>

+ 3 - 0
Playground/package.json

@@ -10,5 +10,8 @@
   "license": "(Apache-2.0)",
   "devDependencies": {
     "monaco-editor": "~0.10.1"
+  },
+  "scripts": {
+    "test": "browser-sync start --server --files **/* --no-inject-changes --startPath index.html"
   }
 }

文件差異過大導致無法顯示
+ 15267 - 15175
dist/preview release/babylon.d.ts


文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/babylon.js


+ 240 - 45
dist/preview release/babylon.max.js

@@ -5353,6 +5353,47 @@ var BABYLON;
             return this.normalizeFromLength(this.length());
         };
         /**
+         * Reorders the x y z properties of the vector in place
+         * @param order new ordering of the properties (eg. for vector 1,2,3 with "ZYX" will produce 3,2,1)
+         * @returns the current updated vector
+         */
+        Vector3.prototype.reorderInPlace = function (order) {
+            var _this = this;
+            order = order.toLowerCase();
+            if (order === "xyz") {
+                return this;
+            }
+            MathTmp.Vector3[0].copyFrom(this);
+            ["x", "y", "z"].forEach(function (val, i) {
+                _this[val] = MathTmp.Vector3[0][order[i]];
+            });
+            return this;
+        };
+        /**
+         * Rotates the vector around 0,0,0 by a quaternion
+         * @param quaternion the rotation quaternion
+         * @param result vector to store the result
+         * @returns the resulting vector
+         */
+        Vector3.prototype.rotateByQuaternionToRef = function (quaternion, result) {
+            quaternion.toRotationMatrix(MathTmp.Matrix[0]);
+            Vector3.TransformCoordinatesToRef(this, MathTmp.Matrix[0], result);
+            return result;
+        };
+        /**
+         * Rotates a vector around a given point
+         * @param quaternion the rotation quaternion
+         * @param point the point to rotate around
+         * @param result vector to store the result
+         * @returns the resulting vector
+         */
+        Vector3.prototype.rotateByQuaternionAroundPointToRef = function (quaternion, point, result) {
+            this.subtractToRef(point, MathTmp.Vector3[0]);
+            MathTmp.Vector3[0].rotateByQuaternionToRef(quaternion, MathTmp.Vector3[0]);
+            point.addToRef(MathTmp.Vector3[0], result);
+            return result;
+        };
+        /**
          * Normalize the current Vector3 with the given input length.
          * Please note that this is an in place operation.
          * @param len the length of the vector
@@ -5825,6 +5866,15 @@ var BABYLON;
             matrix.multiplyToRef(viewportMatrix, matrix);
             return Vector3.TransformCoordinates(vector, matrix);
         };
+        /** @hidden */
+        Vector3.UnprojectFromInvertedMatrixToRef = function (source, matrix, result) {
+            Vector3.TransformCoordinatesToRef(source, matrix, result);
+            var m = matrix.m;
+            var num = source.x * m[3] + source.y * m[7] + source.z * m[11] + m[15];
+            if (BABYLON.Scalar.WithinEpsilon(num, 1.0)) {
+                result.scaleInPlace(1.0 / num);
+            }
+        };
         /**
          * Unproject from screen space to object space
          * @param source defines the screen space Vector3 to use
@@ -5840,12 +5890,8 @@ var BABYLON;
             matrix.invert();
             source.x = source.x / viewportWidth * 2 - 1;
             source.y = -(source.y / viewportHeight * 2 - 1);
-            var vector = Vector3.TransformCoordinates(source, matrix);
-            var m = matrix.m;
-            var num = source.x * m[3] + source.y * m[7] + source.z * m[11] + m[15];
-            if (BABYLON.Scalar.WithinEpsilon(num, 1.0)) {
-                vector = vector.scale(1.0 / num);
-            }
+            var vector = new Vector3();
+            Vector3.UnprojectFromInvertedMatrixToRef(source, matrix, vector);
             return vector;
         };
         /**
@@ -5897,12 +5943,36 @@ var BABYLON;
             screenSource.x = sourceX / viewportWidth * 2 - 1;
             screenSource.y = -(sourceY / viewportHeight * 2 - 1);
             screenSource.z = 2 * sourceZ - 1.0;
-            Vector3.TransformCoordinatesToRef(screenSource, matrix, result);
-            var m = matrix.m;
-            var num = screenSource.x * m[3] + screenSource.y * m[7] + screenSource.z * m[11] + m[15];
-            if (BABYLON.Scalar.WithinEpsilon(num, 1.0)) {
-                result.scaleInPlace(1.0 / num);
-            }
+            Vector3.UnprojectFromInvertedMatrixToRef(screenSource, matrix, result);
+        };
+        /**
+          * Unproject a ray from screen space to object space
+          * @param sourceX defines the screen space x coordinate to use
+          * @param sourceY defines the screen space y coordinate to use
+          * @param viewportWidth defines the current width of the viewport
+          * @param viewportHeight defines the current height of the viewport
+          * @param world defines the world matrix to use (can be set to Identity to go to world space)
+          * @param view defines the view matrix to use
+          * @param projection defines the projection matrix to use
+          * @param ray defines the Ray where to store the result
+          */
+        Vector3.UnprojectRayToRef = function (sourceX, sourceY, viewportWidth, viewportHeight, world, view, projection, ray) {
+            var matrix = MathTmp.Matrix[0];
+            world.multiplyToRef(view, matrix);
+            matrix.multiplyToRef(projection, matrix);
+            matrix.invert();
+            var nearScreenSource = MathTmp.Vector3[0];
+            nearScreenSource.x = sourceX / viewportWidth * 2 - 1;
+            nearScreenSource.y = -(sourceY / viewportHeight * 2 - 1);
+            nearScreenSource.z = -1.0;
+            var farScreenSource = MathTmp.Vector3[1].copyFromFloats(nearScreenSource.x, nearScreenSource.y, 1.0);
+            var nearVec3 = MathTmp.Vector3[2];
+            var farVec3 = MathTmp.Vector3[3];
+            Vector3.UnprojectFromInvertedMatrixToRef(nearScreenSource, matrix, nearVec3);
+            Vector3.UnprojectFromInvertedMatrixToRef(farScreenSource, matrix, farVec3);
+            ray.origin.copyFrom(nearVec3);
+            farVec3.subtractToRef(nearVec3, ray.direction);
+            ray.direction.normalize();
         };
         /**
          * Gets the minimal coordinate values between two Vector3
@@ -7207,6 +7277,16 @@ var BABYLON;
             return new Quaternion(-q.x, -q.y, -q.z, q.w);
         };
         /**
+         * Inverse a given quaternion
+         * @param q defines the source quaternion
+         * @param result the quaternion the result will be stored in
+         * @returns the result quaternion
+         */
+        Quaternion.InverseToRef = function (q, result) {
+            result.set(-q.x, -q.y, -q.z, q.w);
+            return result;
+        };
+        /**
          * Creates an identity quaternion
          * @returns the identity quaternion
          */
@@ -7259,6 +7339,50 @@ var BABYLON;
             return new Quaternion(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);
         };
         /**
+         * Create a quaternion from Euler rotation angles
+         * @param x Pitch
+         * @param y Yaw
+         * @param z Roll
+         * @returns the new Quaternion
+         */
+        Quaternion.FromEulerAngles = function (x, y, z) {
+            var q = new Quaternion();
+            Quaternion.RotationYawPitchRollToRef(y, x, z, q);
+            return q;
+        };
+        /**
+         * Updates a quaternion from Euler rotation angles
+         * @param x Pitch
+         * @param y Yaw
+         * @param z Roll
+         * @param result the quaternion to store the result
+         * @returns the updated quaternion
+         */
+        Quaternion.FromEulerAnglesToRef = function (x, y, z, result) {
+            Quaternion.RotationYawPitchRollToRef(y, x, z, result);
+            return result;
+        };
+        /**
+         * Create a quaternion from Euler rotation vector
+         * @param vec the Euler vector (x Pitch, y Yaw, z Roll)
+         * @returns the new Quaternion
+         */
+        Quaternion.FromEulerVector = function (vec) {
+            var q = new Quaternion();
+            Quaternion.RotationYawPitchRollToRef(vec.y, vec.x, vec.z, q);
+            return q;
+        };
+        /**
+         * Updates a quaternion from Euler rotation vector
+         * @param vec the Euler vector (x Pitch, y Yaw, z Roll)
+         * @param result the quaternion to store the result
+         * @returns the updated quaternion
+         */
+        Quaternion.FromEulerVectorToRef = function (vec, result) {
+            Quaternion.RotationYawPitchRollToRef(vec.y, vec.x, vec.z, result);
+            return result;
+        };
+        /**
          * Creates a new quaternion from the given Euler float angles (y, x, z)
          * @param yaw defines the rotation around Y axis
          * @param pitch defines the rotation around X axis
@@ -12703,7 +12827,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "4.0.0-alpha.4";
+                return "4.0.0-alpha.5";
             },
             enumerable: true,
             configurable: true
@@ -25596,6 +25720,10 @@ var BABYLON;
             */
             _this.onAfterStepObservable = new BABYLON.Observable();
             /**
+             * An event triggered when the activeCamera property is updated
+             */
+            _this.onActiveCameraChanged = new BABYLON.Observable();
+            /**
              * This Observable will be triggered before rendering each renderingGroup of each rendered camera.
              * The RenderinGroupInfo class contains all the information about the context in which the observable is called
              * If you wish to register an Observer only for a given set of renderingGroup, use the mask with a combination of the renderingGroup index elevated to the power of two (1 for renderingGroup 0, 2 for renderingrOup1, 4 for 2 and 8 for 3)
@@ -26234,6 +26362,21 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(Scene.prototype, "activeCamera", {
+            /** Gets or sets the current active camera */
+            get: function () {
+                return this._activeCamera;
+            },
+            set: function (value) {
+                if (value === this._activeCamera) {
+                    return;
+                }
+                this._activeCamera = value;
+                this.onActiveCameraChanged.notifyObservers(this);
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(Scene.prototype, "defaultMaterial", {
             /** The default material used on meshes when no material is affected */
             get: function () {
@@ -27028,6 +27171,7 @@ var BABYLON;
                     canvas.focus();
                 }
                 _this._initClickEvent(_this.onPrePointerObservable, _this.onPointerObservable, evt, function (clickInfo, pickResult) {
+                    _this._pointerCaptures[evt.pointerId] = false;
                     // PreObservable support
                     if (_this.onPrePointerObservable.hasObservers()) {
                         if (!clickInfo.ignore) {
@@ -27051,7 +27195,6 @@ var BABYLON;
                     if (!_this.cameraToUseForPointers && !_this.activeCamera) {
                         return;
                     }
-                    _this._pointerCaptures[evt.pointerId] = false;
                     if (!_this.pointerUpPredicate) {
                         _this.pointerUpPredicate = function (mesh) {
                             return mesh.isPickable && mesh.isVisible && mesh.isReady() && mesh.isEnabled();
@@ -29423,6 +29566,7 @@ var BABYLON;
             this.onPointerObservable.clear();
             this.onPreKeyboardObservable.clear();
             this.onKeyboardObservable.clear();
+            this.onActiveCameraChanged.clear();
             this.detachControl();
             // Detach cameras
             var canvas = this._engine.getRenderingCanvas();
@@ -29596,7 +29740,7 @@ var BABYLON;
             // Moving coordinates to local viewport world
             x = x / this._engine.getHardwareScalingLevel() - viewport.x;
             y = y / this._engine.getHardwareScalingLevel() - (this._engine.getRenderHeight() - viewport.y - viewport.height);
-            result.update(x, y, viewport.width, viewport.height, world ? world : BABYLON.Matrix.Identity(), cameraViewSpace ? BABYLON.Matrix.Identity() : camera.getViewMatrix(), camera.getProjectionMatrix());
+            result.update(x, y, viewport.width, viewport.height, world ? world : BABYLON.Matrix.IdentityReadOnly, cameraViewSpace ? BABYLON.Matrix.IdentityReadOnly : camera.getViewMatrix(), camera.getProjectionMatrix());
             return this;
         };
         /**
@@ -34533,7 +34677,12 @@ var BABYLON;
                 serializationObject.rotation = this.rotation.asArray();
             }
             serializationObject.scaling = this.scaling.asArray();
-            serializationObject.localMatrix = this.getPivotMatrix().asArray();
+            if (this._postMultiplyPivotMatrix) {
+                serializationObject.pivotMatrix = this.getPivotMatrix().asArray();
+            }
+            else {
+                serializationObject.localMatrix = this.getPivotMatrix().asArray();
+            }
             serializationObject.isEnabled = this.isEnabled(false);
             serializationObject.isVisible = this.isVisible;
             serializationObject.infiniteDistance = this.infiniteDistance;
@@ -58767,8 +58916,8 @@ var BABYLON;
          */
         Ray.prototype.intersectsBoxMinMax = function (minimum, maximum, intersectionTreshold) {
             if (intersectionTreshold === void 0) { intersectionTreshold = 0; }
-            var newMinimum = Ray._min.copyFromFloats(minimum.x - intersectionTreshold, minimum.y - intersectionTreshold, minimum.z - intersectionTreshold);
-            var newMaximum = Ray._max.copyFromFloats(maximum.x + intersectionTreshold, maximum.y + intersectionTreshold, maximum.z + intersectionTreshold);
+            var newMinimum = Ray.TmpVector3[0].copyFromFloats(minimum.x - intersectionTreshold, minimum.y - intersectionTreshold, minimum.z - intersectionTreshold);
+            var newMaximum = Ray.TmpVector3[1].copyFromFloats(maximum.x + intersectionTreshold, maximum.y + intersectionTreshold, maximum.z + intersectionTreshold);
             var d = 0.0;
             var maxValue = Number.MAX_VALUE;
             var inv;
@@ -58888,26 +59037,31 @@ var BABYLON;
          * @returns intersection information if hit
          */
         Ray.prototype.intersectsTriangle = function (vertex0, vertex1, vertex2) {
-            vertex1.subtractToRef(vertex0, Ray._edge1);
-            vertex2.subtractToRef(vertex0, Ray._edge2);
-            BABYLON.Vector3.CrossToRef(this.direction, Ray._edge2, Ray._pvec);
-            var det = BABYLON.Vector3.Dot(Ray._edge1, Ray._pvec);
+            var edge1 = Ray.TmpVector3[0];
+            var edge2 = Ray.TmpVector3[1];
+            var pvec = Ray.TmpVector3[2];
+            var tvec = Ray.TmpVector3[3];
+            var qvec = Ray.TmpVector3[4];
+            vertex1.subtractToRef(vertex0, edge1);
+            vertex2.subtractToRef(vertex0, edge2);
+            BABYLON.Vector3.CrossToRef(this.direction, edge2, pvec);
+            var det = BABYLON.Vector3.Dot(edge1, pvec);
             if (det === 0) {
                 return null;
             }
             var invdet = 1 / det;
-            this.origin.subtractToRef(vertex0, Ray._tvec);
-            var bu = BABYLON.Vector3.Dot(Ray._tvec, Ray._pvec) * invdet;
+            this.origin.subtractToRef(vertex0, tvec);
+            var bu = BABYLON.Vector3.Dot(tvec, pvec) * invdet;
             if (bu < 0 || bu > 1.0) {
                 return null;
             }
-            BABYLON.Vector3.CrossToRef(Ray._tvec, Ray._edge1, Ray._qvec);
-            var bv = BABYLON.Vector3.Dot(this.direction, Ray._qvec) * invdet;
+            BABYLON.Vector3.CrossToRef(tvec, edge1, qvec);
+            var bv = BABYLON.Vector3.Dot(this.direction, qvec) * invdet;
             if (bv < 0 || bu + bv > 1.0) {
                 return null;
             }
             //check if the distance is longer than the predefined length.
-            var distance = BABYLON.Vector3.Dot(Ray._edge2, Ray._qvec) * invdet;
+            var distance = BABYLON.Vector3.Dot(edge2, qvec) * invdet;
             if (distance > this.length) {
                 return null;
             }
@@ -58997,10 +59151,15 @@ var BABYLON;
          * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
          */
         Ray.prototype.intersectionSegment = function (sega, segb, threshold) {
-            var rsegb = this.origin.add(this.direction.multiplyByFloats(Ray.rayl, Ray.rayl, Ray.rayl));
-            var u = segb.subtract(sega);
-            var v = rsegb.subtract(this.origin);
-            var w = sega.subtract(this.origin);
+            var o = this.origin;
+            var u = BABYLON.Tmp.Vector3[0];
+            var rsegb = BABYLON.Tmp.Vector3[1];
+            var v = BABYLON.Tmp.Vector3[2];
+            var w = BABYLON.Tmp.Vector3[3];
+            segb.subtractToRef(sega, u);
+            this.direction.scaleToRef(Ray.rayl, v);
+            o.addToRef(v, rsegb);
+            sega.subtractToRef(o, w);
             var a = BABYLON.Vector3.Dot(u, u); // always >= 0
             var b = BABYLON.Vector3.Dot(u, v);
             var c = BABYLON.Vector3.Dot(v, v); // always >= 0
@@ -59062,8 +59221,11 @@ var BABYLON;
             sc = (Math.abs(sN) < Ray.smallnum ? 0.0 : sN / sD);
             tc = (Math.abs(tN) < Ray.smallnum ? 0.0 : tN / tD);
             // get the difference of the two closest points
-            var qtc = v.multiplyByFloats(tc, tc, tc);
-            var dP = w.add(u.multiplyByFloats(sc, sc, sc)).subtract(qtc); // = S1(sc) - S2(tc)
+            var qtc = BABYLON.Tmp.Vector3[4];
+            v.scaleToRef(tc, qtc);
+            var dP = BABYLON.Tmp.Vector3[5];
+            u.scaleToRef(sc, dP);
+            dP.addInPlace(w).subtractInPlace(qtc); // = S1(sc) - S2(tc)
             var isIntersected = (tc > 0) && (tc <= this.length) && (dP.lengthSquared() < (threshold * threshold)); // return intersection result
             if (isIntersected) {
                 return qtc.length();
@@ -59082,10 +59244,7 @@ var BABYLON;
          * @returns this ray updated
          */
         Ray.prototype.update = function (x, y, viewportWidth, viewportHeight, world, view, projection) {
-            BABYLON.Vector3.UnprojectFloatsToRef(x, y, 0, viewportWidth, viewportHeight, world, view, projection, this.origin);
-            BABYLON.Vector3.UnprojectFloatsToRef(x, y, 1, viewportWidth, viewportHeight, world, view, projection, BABYLON.Tmp.Vector3[0]);
-            BABYLON.Tmp.Vector3[0].subtractToRef(this.origin, this.direction);
-            this.direction.normalize();
+            BABYLON.Vector3.UnprojectRayToRef(x, y, viewportWidth, viewportHeight, world, view, projection, this);
             return this;
         };
         // Statics
@@ -59157,13 +59316,7 @@ var BABYLON;
                 result.length *= len;
             }
         };
-        Ray._edge1 = BABYLON.Vector3.Zero();
-        Ray._edge2 = BABYLON.Vector3.Zero();
-        Ray._pvec = BABYLON.Vector3.Zero();
-        Ray._tvec = BABYLON.Vector3.Zero();
-        Ray._qvec = BABYLON.Vector3.Zero();
-        Ray._min = BABYLON.Vector3.Zero();
-        Ray._max = BABYLON.Vector3.Zero();
+        Ray.TmpVector3 = BABYLON.Tools.BuildArray(6, BABYLON.Vector3.Zero);
         Ray.smallnum = 0.00000001;
         Ray.rayl = 10e8;
         return Ray;
@@ -98728,7 +98881,14 @@ var BABYLON;
                 mesh.computeWorldMatrix(true);
                 //get original center with no rotation
                 var c = center.clone();
-                var oldPivot = mesh.getPivotMatrix() || BABYLON.Matrix.Translation(0, 0, 0);
+                var oldPivot = mesh.getPivotMatrix();
+                if (oldPivot) {
+                    // create a copy the pivot Matrix as it is modified in place
+                    oldPivot = oldPivot.clone();
+                }
+                else {
+                    oldPivot = BABYLON.Matrix.Identity();
+                }
                 //calculate the new center using a pivot (since this.BJSCANNON.js doesn't center height maps)
                 var p = BABYLON.Matrix.Translation(boundingInfo.boundingBox.extendSizeWorld.x, 0, -boundingInfo.boundingBox.extendSizeWorld.z);
                 mesh.setPreTransformMatrix(p);
@@ -108386,6 +108546,7 @@ var BABYLON;
                 var newCamera = new BABYLON.TargetCamera("view: " + this.rigCameras.length, BABYLON.Vector3.Zero(), this.getScene());
                 newCamera.minZ = 0;
                 newCamera.parent = this;
+                newCamera.rotationQuaternion = new BABYLON.Quaternion();
                 this.rigCameras.push(newCamera);
             }
             while (this.rigCameras.length > viewCount) {
@@ -108681,6 +108842,7 @@ var BABYLON;
             this.camera = new BABYLON.WebXRCamera("", scene);
             this._sessionManager = new BABYLON.WebXRSessionManager(scene);
             this.container = new BABYLON.AbstractMesh("", scene);
+            this.camera.parent = this.container;
         }
         WebXRExperienceHelper.prototype._setState = function (val) {
             this.state = val;
@@ -108750,6 +108912,27 @@ var BABYLON;
             return this._sessionManager.environmentPointHitTestAsync(ray);
         };
         /**
+         * Updates the global position of the camera by moving the camera's container
+         * This should be used instead of modifying the camera's position as it will be overwritten by an xrSessions's update frame
+         * @param position The desired global position of the camera
+         */
+        WebXRExperienceHelper.prototype.setPositionOfCameraUsingContainer = function (position) {
+            this.camera.globalPosition.subtractToRef(position, WebXRExperienceHelper._TmpVector);
+            this.container.position.subtractInPlace(WebXRExperienceHelper._TmpVector);
+        };
+        /**
+         * Rotates the xr camera by rotating the camera's container around the camera's position
+         * This should be used instead of modifying the camera's rotation as it will be overwritten by an xrSessions's update frame
+         * @param rotation the desired quaternion rotation to apply to the camera
+         */
+        WebXRExperienceHelper.prototype.rotateCameraByQuaternionUsingContainer = function (rotation) {
+            if (!this.container.rotationQuaternion) {
+                this.container.rotationQuaternion = BABYLON.Quaternion.FromEulerVector(this.container.rotation);
+            }
+            this.container.rotationQuaternion.multiplyInPlace(rotation);
+            this.container.position.rotateByQuaternionAroundPointToRef(rotation, this.camera.globalPosition, this.container.position);
+        };
+        /**
          * Checks if the creation options are supported by the xr session
          * @param options creation options
          * @returns true if supported
@@ -108769,6 +108952,7 @@ var BABYLON;
             this.onStateChangedObservable.clear();
             this._sessionManager.dispose();
         };
+        WebXRExperienceHelper._TmpVector = new BABYLON.Vector3();
         return WebXRExperienceHelper;
     }());
     BABYLON.WebXRExperienceHelper = WebXRExperienceHelper;
@@ -108857,6 +109041,14 @@ var BABYLON;
             this.scene = scene;
             this._buttons = [];
             this._activeButton = null;
+            /**
+             * Fired every time the active button is changed.
+             *
+             * When xr is entered via a button that launches xr that button will be the callback parameter
+             *
+             * When exiting xr the callback parameter will be null)
+             */
+            this.activeButtonChangedObservable = new BABYLON.Observable();
             this._overlay = document.createElement("div");
             this._overlay.style.cssText = "z-index:11;position: absolute; right: 20px;bottom: 50px;";
             if (options.customButtons) {
@@ -108934,6 +109126,7 @@ var BABYLON;
                         }); };
                     }
                 });
+                return ui;
             });
         };
         WebXREnterExitUI.prototype._updateButtons = function (activeButton) {
@@ -108942,6 +109135,7 @@ var BABYLON;
             this._buttons.forEach(function (b) {
                 b.update(_this._activeButton);
             });
+            this.activeButtonChangedObservable.notifyObservers(this._activeButton);
         };
         /**
          * Disposes of the object
@@ -108951,6 +109145,7 @@ var BABYLON;
             if (renderCanvas && renderCanvas.parentNode && renderCanvas.parentNode.contains(this._overlay)) {
                 renderCanvas.parentNode.removeChild(this._overlay);
             }
+            this.activeButtonChangedObservable.clear();
         };
         return WebXREnterExitUI;
     }());

+ 240 - 45
dist/preview release/babylon.no-module.max.js

@@ -5320,6 +5320,47 @@ var BABYLON;
             return this.normalizeFromLength(this.length());
         };
         /**
+         * Reorders the x y z properties of the vector in place
+         * @param order new ordering of the properties (eg. for vector 1,2,3 with "ZYX" will produce 3,2,1)
+         * @returns the current updated vector
+         */
+        Vector3.prototype.reorderInPlace = function (order) {
+            var _this = this;
+            order = order.toLowerCase();
+            if (order === "xyz") {
+                return this;
+            }
+            MathTmp.Vector3[0].copyFrom(this);
+            ["x", "y", "z"].forEach(function (val, i) {
+                _this[val] = MathTmp.Vector3[0][order[i]];
+            });
+            return this;
+        };
+        /**
+         * Rotates the vector around 0,0,0 by a quaternion
+         * @param quaternion the rotation quaternion
+         * @param result vector to store the result
+         * @returns the resulting vector
+         */
+        Vector3.prototype.rotateByQuaternionToRef = function (quaternion, result) {
+            quaternion.toRotationMatrix(MathTmp.Matrix[0]);
+            Vector3.TransformCoordinatesToRef(this, MathTmp.Matrix[0], result);
+            return result;
+        };
+        /**
+         * Rotates a vector around a given point
+         * @param quaternion the rotation quaternion
+         * @param point the point to rotate around
+         * @param result vector to store the result
+         * @returns the resulting vector
+         */
+        Vector3.prototype.rotateByQuaternionAroundPointToRef = function (quaternion, point, result) {
+            this.subtractToRef(point, MathTmp.Vector3[0]);
+            MathTmp.Vector3[0].rotateByQuaternionToRef(quaternion, MathTmp.Vector3[0]);
+            point.addToRef(MathTmp.Vector3[0], result);
+            return result;
+        };
+        /**
          * Normalize the current Vector3 with the given input length.
          * Please note that this is an in place operation.
          * @param len the length of the vector
@@ -5792,6 +5833,15 @@ var BABYLON;
             matrix.multiplyToRef(viewportMatrix, matrix);
             return Vector3.TransformCoordinates(vector, matrix);
         };
+        /** @hidden */
+        Vector3.UnprojectFromInvertedMatrixToRef = function (source, matrix, result) {
+            Vector3.TransformCoordinatesToRef(source, matrix, result);
+            var m = matrix.m;
+            var num = source.x * m[3] + source.y * m[7] + source.z * m[11] + m[15];
+            if (BABYLON.Scalar.WithinEpsilon(num, 1.0)) {
+                result.scaleInPlace(1.0 / num);
+            }
+        };
         /**
          * Unproject from screen space to object space
          * @param source defines the screen space Vector3 to use
@@ -5807,12 +5857,8 @@ var BABYLON;
             matrix.invert();
             source.x = source.x / viewportWidth * 2 - 1;
             source.y = -(source.y / viewportHeight * 2 - 1);
-            var vector = Vector3.TransformCoordinates(source, matrix);
-            var m = matrix.m;
-            var num = source.x * m[3] + source.y * m[7] + source.z * m[11] + m[15];
-            if (BABYLON.Scalar.WithinEpsilon(num, 1.0)) {
-                vector = vector.scale(1.0 / num);
-            }
+            var vector = new Vector3();
+            Vector3.UnprojectFromInvertedMatrixToRef(source, matrix, vector);
             return vector;
         };
         /**
@@ -5864,12 +5910,36 @@ var BABYLON;
             screenSource.x = sourceX / viewportWidth * 2 - 1;
             screenSource.y = -(sourceY / viewportHeight * 2 - 1);
             screenSource.z = 2 * sourceZ - 1.0;
-            Vector3.TransformCoordinatesToRef(screenSource, matrix, result);
-            var m = matrix.m;
-            var num = screenSource.x * m[3] + screenSource.y * m[7] + screenSource.z * m[11] + m[15];
-            if (BABYLON.Scalar.WithinEpsilon(num, 1.0)) {
-                result.scaleInPlace(1.0 / num);
-            }
+            Vector3.UnprojectFromInvertedMatrixToRef(screenSource, matrix, result);
+        };
+        /**
+          * Unproject a ray from screen space to object space
+          * @param sourceX defines the screen space x coordinate to use
+          * @param sourceY defines the screen space y coordinate to use
+          * @param viewportWidth defines the current width of the viewport
+          * @param viewportHeight defines the current height of the viewport
+          * @param world defines the world matrix to use (can be set to Identity to go to world space)
+          * @param view defines the view matrix to use
+          * @param projection defines the projection matrix to use
+          * @param ray defines the Ray where to store the result
+          */
+        Vector3.UnprojectRayToRef = function (sourceX, sourceY, viewportWidth, viewportHeight, world, view, projection, ray) {
+            var matrix = MathTmp.Matrix[0];
+            world.multiplyToRef(view, matrix);
+            matrix.multiplyToRef(projection, matrix);
+            matrix.invert();
+            var nearScreenSource = MathTmp.Vector3[0];
+            nearScreenSource.x = sourceX / viewportWidth * 2 - 1;
+            nearScreenSource.y = -(sourceY / viewportHeight * 2 - 1);
+            nearScreenSource.z = -1.0;
+            var farScreenSource = MathTmp.Vector3[1].copyFromFloats(nearScreenSource.x, nearScreenSource.y, 1.0);
+            var nearVec3 = MathTmp.Vector3[2];
+            var farVec3 = MathTmp.Vector3[3];
+            Vector3.UnprojectFromInvertedMatrixToRef(nearScreenSource, matrix, nearVec3);
+            Vector3.UnprojectFromInvertedMatrixToRef(farScreenSource, matrix, farVec3);
+            ray.origin.copyFrom(nearVec3);
+            farVec3.subtractToRef(nearVec3, ray.direction);
+            ray.direction.normalize();
         };
         /**
          * Gets the minimal coordinate values between two Vector3
@@ -7174,6 +7244,16 @@ var BABYLON;
             return new Quaternion(-q.x, -q.y, -q.z, q.w);
         };
         /**
+         * Inverse a given quaternion
+         * @param q defines the source quaternion
+         * @param result the quaternion the result will be stored in
+         * @returns the result quaternion
+         */
+        Quaternion.InverseToRef = function (q, result) {
+            result.set(-q.x, -q.y, -q.z, q.w);
+            return result;
+        };
+        /**
          * Creates an identity quaternion
          * @returns the identity quaternion
          */
@@ -7226,6 +7306,50 @@ var BABYLON;
             return new Quaternion(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);
         };
         /**
+         * Create a quaternion from Euler rotation angles
+         * @param x Pitch
+         * @param y Yaw
+         * @param z Roll
+         * @returns the new Quaternion
+         */
+        Quaternion.FromEulerAngles = function (x, y, z) {
+            var q = new Quaternion();
+            Quaternion.RotationYawPitchRollToRef(y, x, z, q);
+            return q;
+        };
+        /**
+         * Updates a quaternion from Euler rotation angles
+         * @param x Pitch
+         * @param y Yaw
+         * @param z Roll
+         * @param result the quaternion to store the result
+         * @returns the updated quaternion
+         */
+        Quaternion.FromEulerAnglesToRef = function (x, y, z, result) {
+            Quaternion.RotationYawPitchRollToRef(y, x, z, result);
+            return result;
+        };
+        /**
+         * Create a quaternion from Euler rotation vector
+         * @param vec the Euler vector (x Pitch, y Yaw, z Roll)
+         * @returns the new Quaternion
+         */
+        Quaternion.FromEulerVector = function (vec) {
+            var q = new Quaternion();
+            Quaternion.RotationYawPitchRollToRef(vec.y, vec.x, vec.z, q);
+            return q;
+        };
+        /**
+         * Updates a quaternion from Euler rotation vector
+         * @param vec the Euler vector (x Pitch, y Yaw, z Roll)
+         * @param result the quaternion to store the result
+         * @returns the updated quaternion
+         */
+        Quaternion.FromEulerVectorToRef = function (vec, result) {
+            Quaternion.RotationYawPitchRollToRef(vec.y, vec.x, vec.z, result);
+            return result;
+        };
+        /**
          * Creates a new quaternion from the given Euler float angles (y, x, z)
          * @param yaw defines the rotation around Y axis
          * @param pitch defines the rotation around X axis
@@ -12670,7 +12794,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "4.0.0-alpha.4";
+                return "4.0.0-alpha.5";
             },
             enumerable: true,
             configurable: true
@@ -25563,6 +25687,10 @@ var BABYLON;
             */
             _this.onAfterStepObservable = new BABYLON.Observable();
             /**
+             * An event triggered when the activeCamera property is updated
+             */
+            _this.onActiveCameraChanged = new BABYLON.Observable();
+            /**
              * This Observable will be triggered before rendering each renderingGroup of each rendered camera.
              * The RenderinGroupInfo class contains all the information about the context in which the observable is called
              * If you wish to register an Observer only for a given set of renderingGroup, use the mask with a combination of the renderingGroup index elevated to the power of two (1 for renderingGroup 0, 2 for renderingrOup1, 4 for 2 and 8 for 3)
@@ -26201,6 +26329,21 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(Scene.prototype, "activeCamera", {
+            /** Gets or sets the current active camera */
+            get: function () {
+                return this._activeCamera;
+            },
+            set: function (value) {
+                if (value === this._activeCamera) {
+                    return;
+                }
+                this._activeCamera = value;
+                this.onActiveCameraChanged.notifyObservers(this);
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(Scene.prototype, "defaultMaterial", {
             /** The default material used on meshes when no material is affected */
             get: function () {
@@ -26995,6 +27138,7 @@ var BABYLON;
                     canvas.focus();
                 }
                 _this._initClickEvent(_this.onPrePointerObservable, _this.onPointerObservable, evt, function (clickInfo, pickResult) {
+                    _this._pointerCaptures[evt.pointerId] = false;
                     // PreObservable support
                     if (_this.onPrePointerObservable.hasObservers()) {
                         if (!clickInfo.ignore) {
@@ -27018,7 +27162,6 @@ var BABYLON;
                     if (!_this.cameraToUseForPointers && !_this.activeCamera) {
                         return;
                     }
-                    _this._pointerCaptures[evt.pointerId] = false;
                     if (!_this.pointerUpPredicate) {
                         _this.pointerUpPredicate = function (mesh) {
                             return mesh.isPickable && mesh.isVisible && mesh.isReady() && mesh.isEnabled();
@@ -29390,6 +29533,7 @@ var BABYLON;
             this.onPointerObservable.clear();
             this.onPreKeyboardObservable.clear();
             this.onKeyboardObservable.clear();
+            this.onActiveCameraChanged.clear();
             this.detachControl();
             // Detach cameras
             var canvas = this._engine.getRenderingCanvas();
@@ -29563,7 +29707,7 @@ var BABYLON;
             // Moving coordinates to local viewport world
             x = x / this._engine.getHardwareScalingLevel() - viewport.x;
             y = y / this._engine.getHardwareScalingLevel() - (this._engine.getRenderHeight() - viewport.y - viewport.height);
-            result.update(x, y, viewport.width, viewport.height, world ? world : BABYLON.Matrix.Identity(), cameraViewSpace ? BABYLON.Matrix.Identity() : camera.getViewMatrix(), camera.getProjectionMatrix());
+            result.update(x, y, viewport.width, viewport.height, world ? world : BABYLON.Matrix.IdentityReadOnly, cameraViewSpace ? BABYLON.Matrix.IdentityReadOnly : camera.getViewMatrix(), camera.getProjectionMatrix());
             return this;
         };
         /**
@@ -34500,7 +34644,12 @@ var BABYLON;
                 serializationObject.rotation = this.rotation.asArray();
             }
             serializationObject.scaling = this.scaling.asArray();
-            serializationObject.localMatrix = this.getPivotMatrix().asArray();
+            if (this._postMultiplyPivotMatrix) {
+                serializationObject.pivotMatrix = this.getPivotMatrix().asArray();
+            }
+            else {
+                serializationObject.localMatrix = this.getPivotMatrix().asArray();
+            }
             serializationObject.isEnabled = this.isEnabled(false);
             serializationObject.isVisible = this.isVisible;
             serializationObject.infiniteDistance = this.infiniteDistance;
@@ -58734,8 +58883,8 @@ var BABYLON;
          */
         Ray.prototype.intersectsBoxMinMax = function (minimum, maximum, intersectionTreshold) {
             if (intersectionTreshold === void 0) { intersectionTreshold = 0; }
-            var newMinimum = Ray._min.copyFromFloats(minimum.x - intersectionTreshold, minimum.y - intersectionTreshold, minimum.z - intersectionTreshold);
-            var newMaximum = Ray._max.copyFromFloats(maximum.x + intersectionTreshold, maximum.y + intersectionTreshold, maximum.z + intersectionTreshold);
+            var newMinimum = Ray.TmpVector3[0].copyFromFloats(minimum.x - intersectionTreshold, minimum.y - intersectionTreshold, minimum.z - intersectionTreshold);
+            var newMaximum = Ray.TmpVector3[1].copyFromFloats(maximum.x + intersectionTreshold, maximum.y + intersectionTreshold, maximum.z + intersectionTreshold);
             var d = 0.0;
             var maxValue = Number.MAX_VALUE;
             var inv;
@@ -58855,26 +59004,31 @@ var BABYLON;
          * @returns intersection information if hit
          */
         Ray.prototype.intersectsTriangle = function (vertex0, vertex1, vertex2) {
-            vertex1.subtractToRef(vertex0, Ray._edge1);
-            vertex2.subtractToRef(vertex0, Ray._edge2);
-            BABYLON.Vector3.CrossToRef(this.direction, Ray._edge2, Ray._pvec);
-            var det = BABYLON.Vector3.Dot(Ray._edge1, Ray._pvec);
+            var edge1 = Ray.TmpVector3[0];
+            var edge2 = Ray.TmpVector3[1];
+            var pvec = Ray.TmpVector3[2];
+            var tvec = Ray.TmpVector3[3];
+            var qvec = Ray.TmpVector3[4];
+            vertex1.subtractToRef(vertex0, edge1);
+            vertex2.subtractToRef(vertex0, edge2);
+            BABYLON.Vector3.CrossToRef(this.direction, edge2, pvec);
+            var det = BABYLON.Vector3.Dot(edge1, pvec);
             if (det === 0) {
                 return null;
             }
             var invdet = 1 / det;
-            this.origin.subtractToRef(vertex0, Ray._tvec);
-            var bu = BABYLON.Vector3.Dot(Ray._tvec, Ray._pvec) * invdet;
+            this.origin.subtractToRef(vertex0, tvec);
+            var bu = BABYLON.Vector3.Dot(tvec, pvec) * invdet;
             if (bu < 0 || bu > 1.0) {
                 return null;
             }
-            BABYLON.Vector3.CrossToRef(Ray._tvec, Ray._edge1, Ray._qvec);
-            var bv = BABYLON.Vector3.Dot(this.direction, Ray._qvec) * invdet;
+            BABYLON.Vector3.CrossToRef(tvec, edge1, qvec);
+            var bv = BABYLON.Vector3.Dot(this.direction, qvec) * invdet;
             if (bv < 0 || bu + bv > 1.0) {
                 return null;
             }
             //check if the distance is longer than the predefined length.
-            var distance = BABYLON.Vector3.Dot(Ray._edge2, Ray._qvec) * invdet;
+            var distance = BABYLON.Vector3.Dot(edge2, qvec) * invdet;
             if (distance > this.length) {
                 return null;
             }
@@ -58964,10 +59118,15 @@ var BABYLON;
          * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
          */
         Ray.prototype.intersectionSegment = function (sega, segb, threshold) {
-            var rsegb = this.origin.add(this.direction.multiplyByFloats(Ray.rayl, Ray.rayl, Ray.rayl));
-            var u = segb.subtract(sega);
-            var v = rsegb.subtract(this.origin);
-            var w = sega.subtract(this.origin);
+            var o = this.origin;
+            var u = BABYLON.Tmp.Vector3[0];
+            var rsegb = BABYLON.Tmp.Vector3[1];
+            var v = BABYLON.Tmp.Vector3[2];
+            var w = BABYLON.Tmp.Vector3[3];
+            segb.subtractToRef(sega, u);
+            this.direction.scaleToRef(Ray.rayl, v);
+            o.addToRef(v, rsegb);
+            sega.subtractToRef(o, w);
             var a = BABYLON.Vector3.Dot(u, u); // always >= 0
             var b = BABYLON.Vector3.Dot(u, v);
             var c = BABYLON.Vector3.Dot(v, v); // always >= 0
@@ -59029,8 +59188,11 @@ var BABYLON;
             sc = (Math.abs(sN) < Ray.smallnum ? 0.0 : sN / sD);
             tc = (Math.abs(tN) < Ray.smallnum ? 0.0 : tN / tD);
             // get the difference of the two closest points
-            var qtc = v.multiplyByFloats(tc, tc, tc);
-            var dP = w.add(u.multiplyByFloats(sc, sc, sc)).subtract(qtc); // = S1(sc) - S2(tc)
+            var qtc = BABYLON.Tmp.Vector3[4];
+            v.scaleToRef(tc, qtc);
+            var dP = BABYLON.Tmp.Vector3[5];
+            u.scaleToRef(sc, dP);
+            dP.addInPlace(w).subtractInPlace(qtc); // = S1(sc) - S2(tc)
             var isIntersected = (tc > 0) && (tc <= this.length) && (dP.lengthSquared() < (threshold * threshold)); // return intersection result
             if (isIntersected) {
                 return qtc.length();
@@ -59049,10 +59211,7 @@ var BABYLON;
          * @returns this ray updated
          */
         Ray.prototype.update = function (x, y, viewportWidth, viewportHeight, world, view, projection) {
-            BABYLON.Vector3.UnprojectFloatsToRef(x, y, 0, viewportWidth, viewportHeight, world, view, projection, this.origin);
-            BABYLON.Vector3.UnprojectFloatsToRef(x, y, 1, viewportWidth, viewportHeight, world, view, projection, BABYLON.Tmp.Vector3[0]);
-            BABYLON.Tmp.Vector3[0].subtractToRef(this.origin, this.direction);
-            this.direction.normalize();
+            BABYLON.Vector3.UnprojectRayToRef(x, y, viewportWidth, viewportHeight, world, view, projection, this);
             return this;
         };
         // Statics
@@ -59124,13 +59283,7 @@ var BABYLON;
                 result.length *= len;
             }
         };
-        Ray._edge1 = BABYLON.Vector3.Zero();
-        Ray._edge2 = BABYLON.Vector3.Zero();
-        Ray._pvec = BABYLON.Vector3.Zero();
-        Ray._tvec = BABYLON.Vector3.Zero();
-        Ray._qvec = BABYLON.Vector3.Zero();
-        Ray._min = BABYLON.Vector3.Zero();
-        Ray._max = BABYLON.Vector3.Zero();
+        Ray.TmpVector3 = BABYLON.Tools.BuildArray(6, BABYLON.Vector3.Zero);
         Ray.smallnum = 0.00000001;
         Ray.rayl = 10e8;
         return Ray;
@@ -98695,7 +98848,14 @@ var BABYLON;
                 mesh.computeWorldMatrix(true);
                 //get original center with no rotation
                 var c = center.clone();
-                var oldPivot = mesh.getPivotMatrix() || BABYLON.Matrix.Translation(0, 0, 0);
+                var oldPivot = mesh.getPivotMatrix();
+                if (oldPivot) {
+                    // create a copy the pivot Matrix as it is modified in place
+                    oldPivot = oldPivot.clone();
+                }
+                else {
+                    oldPivot = BABYLON.Matrix.Identity();
+                }
                 //calculate the new center using a pivot (since this.BJSCANNON.js doesn't center height maps)
                 var p = BABYLON.Matrix.Translation(boundingInfo.boundingBox.extendSizeWorld.x, 0, -boundingInfo.boundingBox.extendSizeWorld.z);
                 mesh.setPreTransformMatrix(p);
@@ -108353,6 +108513,7 @@ var BABYLON;
                 var newCamera = new BABYLON.TargetCamera("view: " + this.rigCameras.length, BABYLON.Vector3.Zero(), this.getScene());
                 newCamera.minZ = 0;
                 newCamera.parent = this;
+                newCamera.rotationQuaternion = new BABYLON.Quaternion();
                 this.rigCameras.push(newCamera);
             }
             while (this.rigCameras.length > viewCount) {
@@ -108648,6 +108809,7 @@ var BABYLON;
             this.camera = new BABYLON.WebXRCamera("", scene);
             this._sessionManager = new BABYLON.WebXRSessionManager(scene);
             this.container = new BABYLON.AbstractMesh("", scene);
+            this.camera.parent = this.container;
         }
         WebXRExperienceHelper.prototype._setState = function (val) {
             this.state = val;
@@ -108717,6 +108879,27 @@ var BABYLON;
             return this._sessionManager.environmentPointHitTestAsync(ray);
         };
         /**
+         * Updates the global position of the camera by moving the camera's container
+         * This should be used instead of modifying the camera's position as it will be overwritten by an xrSessions's update frame
+         * @param position The desired global position of the camera
+         */
+        WebXRExperienceHelper.prototype.setPositionOfCameraUsingContainer = function (position) {
+            this.camera.globalPosition.subtractToRef(position, WebXRExperienceHelper._TmpVector);
+            this.container.position.subtractInPlace(WebXRExperienceHelper._TmpVector);
+        };
+        /**
+         * Rotates the xr camera by rotating the camera's container around the camera's position
+         * This should be used instead of modifying the camera's rotation as it will be overwritten by an xrSessions's update frame
+         * @param rotation the desired quaternion rotation to apply to the camera
+         */
+        WebXRExperienceHelper.prototype.rotateCameraByQuaternionUsingContainer = function (rotation) {
+            if (!this.container.rotationQuaternion) {
+                this.container.rotationQuaternion = BABYLON.Quaternion.FromEulerVector(this.container.rotation);
+            }
+            this.container.rotationQuaternion.multiplyInPlace(rotation);
+            this.container.position.rotateByQuaternionAroundPointToRef(rotation, this.camera.globalPosition, this.container.position);
+        };
+        /**
          * Checks if the creation options are supported by the xr session
          * @param options creation options
          * @returns true if supported
@@ -108736,6 +108919,7 @@ var BABYLON;
             this.onStateChangedObservable.clear();
             this._sessionManager.dispose();
         };
+        WebXRExperienceHelper._TmpVector = new BABYLON.Vector3();
         return WebXRExperienceHelper;
     }());
     BABYLON.WebXRExperienceHelper = WebXRExperienceHelper;
@@ -108824,6 +109008,14 @@ var BABYLON;
             this.scene = scene;
             this._buttons = [];
             this._activeButton = null;
+            /**
+             * Fired every time the active button is changed.
+             *
+             * When xr is entered via a button that launches xr that button will be the callback parameter
+             *
+             * When exiting xr the callback parameter will be null)
+             */
+            this.activeButtonChangedObservable = new BABYLON.Observable();
             this._overlay = document.createElement("div");
             this._overlay.style.cssText = "z-index:11;position: absolute; right: 20px;bottom: 50px;";
             if (options.customButtons) {
@@ -108901,6 +109093,7 @@ var BABYLON;
                         }); };
                     }
                 });
+                return ui;
             });
         };
         WebXREnterExitUI.prototype._updateButtons = function (activeButton) {
@@ -108909,6 +109102,7 @@ var BABYLON;
             this._buttons.forEach(function (b) {
                 b.update(_this._activeButton);
             });
+            this.activeButtonChangedObservable.notifyObservers(this._activeButton);
         };
         /**
          * Disposes of the object
@@ -108918,6 +109112,7 @@ var BABYLON;
             if (renderCanvas && renderCanvas.parentNode && renderCanvas.parentNode.contains(this._overlay)) {
                 renderCanvas.parentNode.removeChild(this._overlay);
             }
+            this.activeButtonChangedObservable.clear();
         };
         return WebXREnterExitUI;
     }());

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/babylon.worker.js


+ 240 - 45
dist/preview release/es6.js

@@ -5320,6 +5320,47 @@ var BABYLON;
             return this.normalizeFromLength(this.length());
         };
         /**
+         * Reorders the x y z properties of the vector in place
+         * @param order new ordering of the properties (eg. for vector 1,2,3 with "ZYX" will produce 3,2,1)
+         * @returns the current updated vector
+         */
+        Vector3.prototype.reorderInPlace = function (order) {
+            var _this = this;
+            order = order.toLowerCase();
+            if (order === "xyz") {
+                return this;
+            }
+            MathTmp.Vector3[0].copyFrom(this);
+            ["x", "y", "z"].forEach(function (val, i) {
+                _this[val] = MathTmp.Vector3[0][order[i]];
+            });
+            return this;
+        };
+        /**
+         * Rotates the vector around 0,0,0 by a quaternion
+         * @param quaternion the rotation quaternion
+         * @param result vector to store the result
+         * @returns the resulting vector
+         */
+        Vector3.prototype.rotateByQuaternionToRef = function (quaternion, result) {
+            quaternion.toRotationMatrix(MathTmp.Matrix[0]);
+            Vector3.TransformCoordinatesToRef(this, MathTmp.Matrix[0], result);
+            return result;
+        };
+        /**
+         * Rotates a vector around a given point
+         * @param quaternion the rotation quaternion
+         * @param point the point to rotate around
+         * @param result vector to store the result
+         * @returns the resulting vector
+         */
+        Vector3.prototype.rotateByQuaternionAroundPointToRef = function (quaternion, point, result) {
+            this.subtractToRef(point, MathTmp.Vector3[0]);
+            MathTmp.Vector3[0].rotateByQuaternionToRef(quaternion, MathTmp.Vector3[0]);
+            point.addToRef(MathTmp.Vector3[0], result);
+            return result;
+        };
+        /**
          * Normalize the current Vector3 with the given input length.
          * Please note that this is an in place operation.
          * @param len the length of the vector
@@ -5792,6 +5833,15 @@ var BABYLON;
             matrix.multiplyToRef(viewportMatrix, matrix);
             return Vector3.TransformCoordinates(vector, matrix);
         };
+        /** @hidden */
+        Vector3.UnprojectFromInvertedMatrixToRef = function (source, matrix, result) {
+            Vector3.TransformCoordinatesToRef(source, matrix, result);
+            var m = matrix.m;
+            var num = source.x * m[3] + source.y * m[7] + source.z * m[11] + m[15];
+            if (BABYLON.Scalar.WithinEpsilon(num, 1.0)) {
+                result.scaleInPlace(1.0 / num);
+            }
+        };
         /**
          * Unproject from screen space to object space
          * @param source defines the screen space Vector3 to use
@@ -5807,12 +5857,8 @@ var BABYLON;
             matrix.invert();
             source.x = source.x / viewportWidth * 2 - 1;
             source.y = -(source.y / viewportHeight * 2 - 1);
-            var vector = Vector3.TransformCoordinates(source, matrix);
-            var m = matrix.m;
-            var num = source.x * m[3] + source.y * m[7] + source.z * m[11] + m[15];
-            if (BABYLON.Scalar.WithinEpsilon(num, 1.0)) {
-                vector = vector.scale(1.0 / num);
-            }
+            var vector = new Vector3();
+            Vector3.UnprojectFromInvertedMatrixToRef(source, matrix, vector);
             return vector;
         };
         /**
@@ -5864,12 +5910,36 @@ var BABYLON;
             screenSource.x = sourceX / viewportWidth * 2 - 1;
             screenSource.y = -(sourceY / viewportHeight * 2 - 1);
             screenSource.z = 2 * sourceZ - 1.0;
-            Vector3.TransformCoordinatesToRef(screenSource, matrix, result);
-            var m = matrix.m;
-            var num = screenSource.x * m[3] + screenSource.y * m[7] + screenSource.z * m[11] + m[15];
-            if (BABYLON.Scalar.WithinEpsilon(num, 1.0)) {
-                result.scaleInPlace(1.0 / num);
-            }
+            Vector3.UnprojectFromInvertedMatrixToRef(screenSource, matrix, result);
+        };
+        /**
+          * Unproject a ray from screen space to object space
+          * @param sourceX defines the screen space x coordinate to use
+          * @param sourceY defines the screen space y coordinate to use
+          * @param viewportWidth defines the current width of the viewport
+          * @param viewportHeight defines the current height of the viewport
+          * @param world defines the world matrix to use (can be set to Identity to go to world space)
+          * @param view defines the view matrix to use
+          * @param projection defines the projection matrix to use
+          * @param ray defines the Ray where to store the result
+          */
+        Vector3.UnprojectRayToRef = function (sourceX, sourceY, viewportWidth, viewportHeight, world, view, projection, ray) {
+            var matrix = MathTmp.Matrix[0];
+            world.multiplyToRef(view, matrix);
+            matrix.multiplyToRef(projection, matrix);
+            matrix.invert();
+            var nearScreenSource = MathTmp.Vector3[0];
+            nearScreenSource.x = sourceX / viewportWidth * 2 - 1;
+            nearScreenSource.y = -(sourceY / viewportHeight * 2 - 1);
+            nearScreenSource.z = -1.0;
+            var farScreenSource = MathTmp.Vector3[1].copyFromFloats(nearScreenSource.x, nearScreenSource.y, 1.0);
+            var nearVec3 = MathTmp.Vector3[2];
+            var farVec3 = MathTmp.Vector3[3];
+            Vector3.UnprojectFromInvertedMatrixToRef(nearScreenSource, matrix, nearVec3);
+            Vector3.UnprojectFromInvertedMatrixToRef(farScreenSource, matrix, farVec3);
+            ray.origin.copyFrom(nearVec3);
+            farVec3.subtractToRef(nearVec3, ray.direction);
+            ray.direction.normalize();
         };
         /**
          * Gets the minimal coordinate values between two Vector3
@@ -7174,6 +7244,16 @@ var BABYLON;
             return new Quaternion(-q.x, -q.y, -q.z, q.w);
         };
         /**
+         * Inverse a given quaternion
+         * @param q defines the source quaternion
+         * @param result the quaternion the result will be stored in
+         * @returns the result quaternion
+         */
+        Quaternion.InverseToRef = function (q, result) {
+            result.set(-q.x, -q.y, -q.z, q.w);
+            return result;
+        };
+        /**
          * Creates an identity quaternion
          * @returns the identity quaternion
          */
@@ -7226,6 +7306,50 @@ var BABYLON;
             return new Quaternion(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);
         };
         /**
+         * Create a quaternion from Euler rotation angles
+         * @param x Pitch
+         * @param y Yaw
+         * @param z Roll
+         * @returns the new Quaternion
+         */
+        Quaternion.FromEulerAngles = function (x, y, z) {
+            var q = new Quaternion();
+            Quaternion.RotationYawPitchRollToRef(y, x, z, q);
+            return q;
+        };
+        /**
+         * Updates a quaternion from Euler rotation angles
+         * @param x Pitch
+         * @param y Yaw
+         * @param z Roll
+         * @param result the quaternion to store the result
+         * @returns the updated quaternion
+         */
+        Quaternion.FromEulerAnglesToRef = function (x, y, z, result) {
+            Quaternion.RotationYawPitchRollToRef(y, x, z, result);
+            return result;
+        };
+        /**
+         * Create a quaternion from Euler rotation vector
+         * @param vec the Euler vector (x Pitch, y Yaw, z Roll)
+         * @returns the new Quaternion
+         */
+        Quaternion.FromEulerVector = function (vec) {
+            var q = new Quaternion();
+            Quaternion.RotationYawPitchRollToRef(vec.y, vec.x, vec.z, q);
+            return q;
+        };
+        /**
+         * Updates a quaternion from Euler rotation vector
+         * @param vec the Euler vector (x Pitch, y Yaw, z Roll)
+         * @param result the quaternion to store the result
+         * @returns the updated quaternion
+         */
+        Quaternion.FromEulerVectorToRef = function (vec, result) {
+            Quaternion.RotationYawPitchRollToRef(vec.y, vec.x, vec.z, result);
+            return result;
+        };
+        /**
          * Creates a new quaternion from the given Euler float angles (y, x, z)
          * @param yaw defines the rotation around Y axis
          * @param pitch defines the rotation around X axis
@@ -12670,7 +12794,7 @@ var BABYLON;
              * Returns the current version of the framework
              */
             get: function () {
-                return "4.0.0-alpha.4";
+                return "4.0.0-alpha.5";
             },
             enumerable: true,
             configurable: true
@@ -25563,6 +25687,10 @@ var BABYLON;
             */
             _this.onAfterStepObservable = new BABYLON.Observable();
             /**
+             * An event triggered when the activeCamera property is updated
+             */
+            _this.onActiveCameraChanged = new BABYLON.Observable();
+            /**
              * This Observable will be triggered before rendering each renderingGroup of each rendered camera.
              * The RenderinGroupInfo class contains all the information about the context in which the observable is called
              * If you wish to register an Observer only for a given set of renderingGroup, use the mask with a combination of the renderingGroup index elevated to the power of two (1 for renderingGroup 0, 2 for renderingrOup1, 4 for 2 and 8 for 3)
@@ -26201,6 +26329,21 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(Scene.prototype, "activeCamera", {
+            /** Gets or sets the current active camera */
+            get: function () {
+                return this._activeCamera;
+            },
+            set: function (value) {
+                if (value === this._activeCamera) {
+                    return;
+                }
+                this._activeCamera = value;
+                this.onActiveCameraChanged.notifyObservers(this);
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(Scene.prototype, "defaultMaterial", {
             /** The default material used on meshes when no material is affected */
             get: function () {
@@ -26995,6 +27138,7 @@ var BABYLON;
                     canvas.focus();
                 }
                 _this._initClickEvent(_this.onPrePointerObservable, _this.onPointerObservable, evt, function (clickInfo, pickResult) {
+                    _this._pointerCaptures[evt.pointerId] = false;
                     // PreObservable support
                     if (_this.onPrePointerObservable.hasObservers()) {
                         if (!clickInfo.ignore) {
@@ -27018,7 +27162,6 @@ var BABYLON;
                     if (!_this.cameraToUseForPointers && !_this.activeCamera) {
                         return;
                     }
-                    _this._pointerCaptures[evt.pointerId] = false;
                     if (!_this.pointerUpPredicate) {
                         _this.pointerUpPredicate = function (mesh) {
                             return mesh.isPickable && mesh.isVisible && mesh.isReady() && mesh.isEnabled();
@@ -29390,6 +29533,7 @@ var BABYLON;
             this.onPointerObservable.clear();
             this.onPreKeyboardObservable.clear();
             this.onKeyboardObservable.clear();
+            this.onActiveCameraChanged.clear();
             this.detachControl();
             // Detach cameras
             var canvas = this._engine.getRenderingCanvas();
@@ -29563,7 +29707,7 @@ var BABYLON;
             // Moving coordinates to local viewport world
             x = x / this._engine.getHardwareScalingLevel() - viewport.x;
             y = y / this._engine.getHardwareScalingLevel() - (this._engine.getRenderHeight() - viewport.y - viewport.height);
-            result.update(x, y, viewport.width, viewport.height, world ? world : BABYLON.Matrix.Identity(), cameraViewSpace ? BABYLON.Matrix.Identity() : camera.getViewMatrix(), camera.getProjectionMatrix());
+            result.update(x, y, viewport.width, viewport.height, world ? world : BABYLON.Matrix.IdentityReadOnly, cameraViewSpace ? BABYLON.Matrix.IdentityReadOnly : camera.getViewMatrix(), camera.getProjectionMatrix());
             return this;
         };
         /**
@@ -34500,7 +34644,12 @@ var BABYLON;
                 serializationObject.rotation = this.rotation.asArray();
             }
             serializationObject.scaling = this.scaling.asArray();
-            serializationObject.localMatrix = this.getPivotMatrix().asArray();
+            if (this._postMultiplyPivotMatrix) {
+                serializationObject.pivotMatrix = this.getPivotMatrix().asArray();
+            }
+            else {
+                serializationObject.localMatrix = this.getPivotMatrix().asArray();
+            }
             serializationObject.isEnabled = this.isEnabled(false);
             serializationObject.isVisible = this.isVisible;
             serializationObject.infiniteDistance = this.infiniteDistance;
@@ -58734,8 +58883,8 @@ var BABYLON;
          */
         Ray.prototype.intersectsBoxMinMax = function (minimum, maximum, intersectionTreshold) {
             if (intersectionTreshold === void 0) { intersectionTreshold = 0; }
-            var newMinimum = Ray._min.copyFromFloats(minimum.x - intersectionTreshold, minimum.y - intersectionTreshold, minimum.z - intersectionTreshold);
-            var newMaximum = Ray._max.copyFromFloats(maximum.x + intersectionTreshold, maximum.y + intersectionTreshold, maximum.z + intersectionTreshold);
+            var newMinimum = Ray.TmpVector3[0].copyFromFloats(minimum.x - intersectionTreshold, minimum.y - intersectionTreshold, minimum.z - intersectionTreshold);
+            var newMaximum = Ray.TmpVector3[1].copyFromFloats(maximum.x + intersectionTreshold, maximum.y + intersectionTreshold, maximum.z + intersectionTreshold);
             var d = 0.0;
             var maxValue = Number.MAX_VALUE;
             var inv;
@@ -58855,26 +59004,31 @@ var BABYLON;
          * @returns intersection information if hit
          */
         Ray.prototype.intersectsTriangle = function (vertex0, vertex1, vertex2) {
-            vertex1.subtractToRef(vertex0, Ray._edge1);
-            vertex2.subtractToRef(vertex0, Ray._edge2);
-            BABYLON.Vector3.CrossToRef(this.direction, Ray._edge2, Ray._pvec);
-            var det = BABYLON.Vector3.Dot(Ray._edge1, Ray._pvec);
+            var edge1 = Ray.TmpVector3[0];
+            var edge2 = Ray.TmpVector3[1];
+            var pvec = Ray.TmpVector3[2];
+            var tvec = Ray.TmpVector3[3];
+            var qvec = Ray.TmpVector3[4];
+            vertex1.subtractToRef(vertex0, edge1);
+            vertex2.subtractToRef(vertex0, edge2);
+            BABYLON.Vector3.CrossToRef(this.direction, edge2, pvec);
+            var det = BABYLON.Vector3.Dot(edge1, pvec);
             if (det === 0) {
                 return null;
             }
             var invdet = 1 / det;
-            this.origin.subtractToRef(vertex0, Ray._tvec);
-            var bu = BABYLON.Vector3.Dot(Ray._tvec, Ray._pvec) * invdet;
+            this.origin.subtractToRef(vertex0, tvec);
+            var bu = BABYLON.Vector3.Dot(tvec, pvec) * invdet;
             if (bu < 0 || bu > 1.0) {
                 return null;
             }
-            BABYLON.Vector3.CrossToRef(Ray._tvec, Ray._edge1, Ray._qvec);
-            var bv = BABYLON.Vector3.Dot(this.direction, Ray._qvec) * invdet;
+            BABYLON.Vector3.CrossToRef(tvec, edge1, qvec);
+            var bv = BABYLON.Vector3.Dot(this.direction, qvec) * invdet;
             if (bv < 0 || bu + bv > 1.0) {
                 return null;
             }
             //check if the distance is longer than the predefined length.
-            var distance = BABYLON.Vector3.Dot(Ray._edge2, Ray._qvec) * invdet;
+            var distance = BABYLON.Vector3.Dot(edge2, qvec) * invdet;
             if (distance > this.length) {
                 return null;
             }
@@ -58964,10 +59118,15 @@ var BABYLON;
          * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
          */
         Ray.prototype.intersectionSegment = function (sega, segb, threshold) {
-            var rsegb = this.origin.add(this.direction.multiplyByFloats(Ray.rayl, Ray.rayl, Ray.rayl));
-            var u = segb.subtract(sega);
-            var v = rsegb.subtract(this.origin);
-            var w = sega.subtract(this.origin);
+            var o = this.origin;
+            var u = BABYLON.Tmp.Vector3[0];
+            var rsegb = BABYLON.Tmp.Vector3[1];
+            var v = BABYLON.Tmp.Vector3[2];
+            var w = BABYLON.Tmp.Vector3[3];
+            segb.subtractToRef(sega, u);
+            this.direction.scaleToRef(Ray.rayl, v);
+            o.addToRef(v, rsegb);
+            sega.subtractToRef(o, w);
             var a = BABYLON.Vector3.Dot(u, u); // always >= 0
             var b = BABYLON.Vector3.Dot(u, v);
             var c = BABYLON.Vector3.Dot(v, v); // always >= 0
@@ -59029,8 +59188,11 @@ var BABYLON;
             sc = (Math.abs(sN) < Ray.smallnum ? 0.0 : sN / sD);
             tc = (Math.abs(tN) < Ray.smallnum ? 0.0 : tN / tD);
             // get the difference of the two closest points
-            var qtc = v.multiplyByFloats(tc, tc, tc);
-            var dP = w.add(u.multiplyByFloats(sc, sc, sc)).subtract(qtc); // = S1(sc) - S2(tc)
+            var qtc = BABYLON.Tmp.Vector3[4];
+            v.scaleToRef(tc, qtc);
+            var dP = BABYLON.Tmp.Vector3[5];
+            u.scaleToRef(sc, dP);
+            dP.addInPlace(w).subtractInPlace(qtc); // = S1(sc) - S2(tc)
             var isIntersected = (tc > 0) && (tc <= this.length) && (dP.lengthSquared() < (threshold * threshold)); // return intersection result
             if (isIntersected) {
                 return qtc.length();
@@ -59049,10 +59211,7 @@ var BABYLON;
          * @returns this ray updated
          */
         Ray.prototype.update = function (x, y, viewportWidth, viewportHeight, world, view, projection) {
-            BABYLON.Vector3.UnprojectFloatsToRef(x, y, 0, viewportWidth, viewportHeight, world, view, projection, this.origin);
-            BABYLON.Vector3.UnprojectFloatsToRef(x, y, 1, viewportWidth, viewportHeight, world, view, projection, BABYLON.Tmp.Vector3[0]);
-            BABYLON.Tmp.Vector3[0].subtractToRef(this.origin, this.direction);
-            this.direction.normalize();
+            BABYLON.Vector3.UnprojectRayToRef(x, y, viewportWidth, viewportHeight, world, view, projection, this);
             return this;
         };
         // Statics
@@ -59124,13 +59283,7 @@ var BABYLON;
                 result.length *= len;
             }
         };
-        Ray._edge1 = BABYLON.Vector3.Zero();
-        Ray._edge2 = BABYLON.Vector3.Zero();
-        Ray._pvec = BABYLON.Vector3.Zero();
-        Ray._tvec = BABYLON.Vector3.Zero();
-        Ray._qvec = BABYLON.Vector3.Zero();
-        Ray._min = BABYLON.Vector3.Zero();
-        Ray._max = BABYLON.Vector3.Zero();
+        Ray.TmpVector3 = BABYLON.Tools.BuildArray(6, BABYLON.Vector3.Zero);
         Ray.smallnum = 0.00000001;
         Ray.rayl = 10e8;
         return Ray;
@@ -98695,7 +98848,14 @@ var BABYLON;
                 mesh.computeWorldMatrix(true);
                 //get original center with no rotation
                 var c = center.clone();
-                var oldPivot = mesh.getPivotMatrix() || BABYLON.Matrix.Translation(0, 0, 0);
+                var oldPivot = mesh.getPivotMatrix();
+                if (oldPivot) {
+                    // create a copy the pivot Matrix as it is modified in place
+                    oldPivot = oldPivot.clone();
+                }
+                else {
+                    oldPivot = BABYLON.Matrix.Identity();
+                }
                 //calculate the new center using a pivot (since this.BJSCANNON.js doesn't center height maps)
                 var p = BABYLON.Matrix.Translation(boundingInfo.boundingBox.extendSizeWorld.x, 0, -boundingInfo.boundingBox.extendSizeWorld.z);
                 mesh.setPreTransformMatrix(p);
@@ -108353,6 +108513,7 @@ var BABYLON;
                 var newCamera = new BABYLON.TargetCamera("view: " + this.rigCameras.length, BABYLON.Vector3.Zero(), this.getScene());
                 newCamera.minZ = 0;
                 newCamera.parent = this;
+                newCamera.rotationQuaternion = new BABYLON.Quaternion();
                 this.rigCameras.push(newCamera);
             }
             while (this.rigCameras.length > viewCount) {
@@ -108648,6 +108809,7 @@ var BABYLON;
             this.camera = new BABYLON.WebXRCamera("", scene);
             this._sessionManager = new BABYLON.WebXRSessionManager(scene);
             this.container = new BABYLON.AbstractMesh("", scene);
+            this.camera.parent = this.container;
         }
         WebXRExperienceHelper.prototype._setState = function (val) {
             this.state = val;
@@ -108717,6 +108879,27 @@ var BABYLON;
             return this._sessionManager.environmentPointHitTestAsync(ray);
         };
         /**
+         * Updates the global position of the camera by moving the camera's container
+         * This should be used instead of modifying the camera's position as it will be overwritten by an xrSessions's update frame
+         * @param position The desired global position of the camera
+         */
+        WebXRExperienceHelper.prototype.setPositionOfCameraUsingContainer = function (position) {
+            this.camera.globalPosition.subtractToRef(position, WebXRExperienceHelper._TmpVector);
+            this.container.position.subtractInPlace(WebXRExperienceHelper._TmpVector);
+        };
+        /**
+         * Rotates the xr camera by rotating the camera's container around the camera's position
+         * This should be used instead of modifying the camera's rotation as it will be overwritten by an xrSessions's update frame
+         * @param rotation the desired quaternion rotation to apply to the camera
+         */
+        WebXRExperienceHelper.prototype.rotateCameraByQuaternionUsingContainer = function (rotation) {
+            if (!this.container.rotationQuaternion) {
+                this.container.rotationQuaternion = BABYLON.Quaternion.FromEulerVector(this.container.rotation);
+            }
+            this.container.rotationQuaternion.multiplyInPlace(rotation);
+            this.container.position.rotateByQuaternionAroundPointToRef(rotation, this.camera.globalPosition, this.container.position);
+        };
+        /**
          * Checks if the creation options are supported by the xr session
          * @param options creation options
          * @returns true if supported
@@ -108736,6 +108919,7 @@ var BABYLON;
             this.onStateChangedObservable.clear();
             this._sessionManager.dispose();
         };
+        WebXRExperienceHelper._TmpVector = new BABYLON.Vector3();
         return WebXRExperienceHelper;
     }());
     BABYLON.WebXRExperienceHelper = WebXRExperienceHelper;
@@ -108824,6 +109008,14 @@ var BABYLON;
             this.scene = scene;
             this._buttons = [];
             this._activeButton = null;
+            /**
+             * Fired every time the active button is changed.
+             *
+             * When xr is entered via a button that launches xr that button will be the callback parameter
+             *
+             * When exiting xr the callback parameter will be null)
+             */
+            this.activeButtonChangedObservable = new BABYLON.Observable();
             this._overlay = document.createElement("div");
             this._overlay.style.cssText = "z-index:11;position: absolute; right: 20px;bottom: 50px;";
             if (options.customButtons) {
@@ -108901,6 +109093,7 @@ var BABYLON;
                         }); };
                     }
                 });
+                return ui;
             });
         };
         WebXREnterExitUI.prototype._updateButtons = function (activeButton) {
@@ -108909,6 +109102,7 @@ var BABYLON;
             this._buttons.forEach(function (b) {
                 b.update(_this._activeButton);
             });
+            this.activeButtonChangedObservable.notifyObservers(this._activeButton);
         };
         /**
          * Disposes of the object
@@ -108918,6 +109112,7 @@ var BABYLON;
             if (renderCanvas && renderCanvas.parentNode && renderCanvas.parentNode.contains(this._overlay)) {
                 renderCanvas.parentNode.removeChild(this._overlay);
             }
+            this.activeButtonChangedObservable.clear();
         };
         return WebXREnterExitUI;
     }());

+ 7 - 54
dist/preview release/glTF2Interface/babylon.glTF2Interface.d.ts

@@ -1,11 +1,12 @@
+/**
+ * @ignoreChildren
+ * @ignore
+ */
 declare module "babylonjs-gltf2interface" {
     export = BABYLON.GLTF2;
 }
-
 /**
  * Module for glTF 2.0 Interface
- * @ignoreChildren
- * @ignore
  */
 declare module BABYLON.GLTF2 {
     /**
@@ -851,54 +852,6 @@ declare module BABYLON.GLTF2 {
          */
         textures?: ITexture[];
     }
-
-    /**
-     * Interface for glTF validation results
-     */
-    interface IGLTFValidationResults {
-        info: {
-            generator: string;
-            hasAnimations: boolean;
-            hasDefaultScene: boolean;
-            hasMaterials: boolean;
-            hasMorphTargets: boolean;
-            hasSkins: boolean;
-            hasTextures: boolean;
-            maxAttributesUsed: number;
-            primitivesCount: number
-        };
-        issues: {
-            messages: Array<string>;
-            numErrors: number;
-            numHints: number;
-            numInfos: number;
-            numWarnings: number;
-            truncated: boolean
-        };
-        mimeType: string;
-        uri: string;
-        validatedAt: string;
-        validatorVersion: string;
-    }
-
-    /**
-     * Interface for glTF validation options
-     */
-    interface IGLTFValidationOptions {
-        uri?: string;
-        externalResourceFunction?: (uri: string) => Promise<Uint8Array>;
-        validateAccessorData?: boolean;
-        maxIssues?: number;
-        ignoredIssues?: Array<string>;
-        severityOverrides?: Object;
-    }
-
-    /**
-     * glTF validator object Tyyings
-     */
-    interface IGLTFValidatorTypings {
-        validateString: (json: string, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
-    }
 }
 
 /**
@@ -943,8 +896,8 @@ interface IGLTFValidationOptions {
 }
 
 /**
- * glTF validator object Tyyings
+ * glTF validator object
  */
-interface IGLTFValidatorTypings {
+declare var GLTFValidator: {
     validateString: (json: string, options?: IGLTFValidationOptions) => Promise<IGLTFValidationResults>;
-}
+};

+ 1 - 1
dist/preview release/glTF2Interface/package.json

@@ -1,7 +1,7 @@
 {
     "name": "babylonjs-gltf2interface",
     "description": "A typescript declaration of babylon's gltf2 inteface.",
-    "version": "4.0.0-alpha.4",
+    "version": "4.0.0-alpha.5",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"

+ 13 - 1
dist/preview release/gui/babylon.gui.d.ts

@@ -2,6 +2,14 @@
 // Dependencies for this module:
 //   ../../../../Tools/Gulp/babylonjs
 declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
     /**
         * Interface used to define a control that can receive focus
         */
@@ -490,6 +498,10 @@ declare module BABYLON.GUI {
     }
 }
 declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
     /**
         * Class used to manage 3D user interface
         * @see http://doc.babylonjs.com/how_to/gui3d
@@ -1472,7 +1484,7 @@ declare module BABYLON.GUI {
                 */
             keepsFocusWith(): BABYLON.Nullable<Control[]>;
             /** @hidden */
-            processKey(keyCode: number, key?: string): void;
+            processKey(keyCode: number, key?: string, evt?: KeyboardEvent): void;
             /** @hidden */
             processKeyboard(evt: KeyboardEvent): void;
             _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;

文件差異過大導致無法顯示
+ 2 - 11851
dist/preview release/gui/babylon.gui.js


文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js.map


+ 202 - 190
dist/preview release/gui/babylon.gui.module.d.ts

@@ -3,58 +3,58 @@
 //   ../../../../Tools/Gulp/babylonjs
 
 declare module 'babylonjs-gui' {
-    export * from "babylonjs-gui/src/2D";
-    export * from "babylonjs-gui/src/3D";
+    export * from "babylonjs-gui/2D";
+    export * from "babylonjs-gui/3D";
 }
 
-declare module 'babylonjs-gui/src/2D' {
-    export * from "babylonjs-gui/src/2D/controls";
-    export * from "babylonjs-gui/src/2D/advancedDynamicTexture";
-    export * from "babylonjs-gui/src/2D/math2D";
-    export * from "babylonjs-gui/src/2D/measure";
-    export * from "babylonjs-gui/src/2D/multiLinePoint";
-    export * from "babylonjs-gui/src/2D/style";
-    export * from "babylonjs-gui/src/2D/valueAndUnit";
+declare module 'babylonjs-gui/2D' {
+    export * from "babylonjs-gui/2D/controls";
+    export * from "babylonjs-gui/2D/advancedDynamicTexture";
+    export * from "babylonjs-gui/2D/math2D";
+    export * from "babylonjs-gui/2D/measure";
+    export * from "babylonjs-gui/2D/multiLinePoint";
+    export * from "babylonjs-gui/2D/style";
+    export * from "babylonjs-gui/2D/valueAndUnit";
 }
 
-declare module 'babylonjs-gui/src/3D' {
-    export * from "babylonjs-gui/src/3D/controls";
-    export * from "babylonjs-gui/src/3D/materials";
-    export * from "babylonjs-gui/src/3D/gui3DManager";
-    export * from "babylonjs-gui/src/3D/vector3WithInfo";
+declare module 'babylonjs-gui/3D' {
+    export * from "babylonjs-gui/3D/controls";
+    export * from "babylonjs-gui/3D/materials";
+    export * from "babylonjs-gui/3D/gui3DManager";
+    export * from "babylonjs-gui/3D/vector3WithInfo";
 }
 
-declare module 'babylonjs-gui/src/2D/controls' {
-    export * from "babylonjs-gui/src/2D/controls/button";
-    export * from "babylonjs-gui/src/2D/controls/checkbox";
-    export * from "babylonjs-gui/src/2D/controls/colorpicker";
-    export * from "babylonjs-gui/src/2D/controls/container";
-    export * from "babylonjs-gui/src/2D/controls/control";
-    export * from "babylonjs-gui/src/2D/controls/ellipse";
-    export * from "babylonjs-gui/src/2D/controls/grid";
-    export * from "babylonjs-gui/src/2D/controls/image";
-    export * from "babylonjs-gui/src/2D/controls/inputText";
-    export * from "babylonjs-gui/src/2D/controls/inputPassword";
-    export * from "babylonjs-gui/src/2D/controls/line";
-    export * from "babylonjs-gui/src/2D/controls/multiLine";
-    export * from "babylonjs-gui/src/2D/controls/radioButton";
-    export * from "babylonjs-gui/src/2D/controls/stackPanel";
-    export * from "babylonjs-gui/src/2D/controls/selector";
-    export * from "babylonjs-gui/src/2D/controls/textBlock";
-    export * from "babylonjs-gui/src/2D/controls/virtualKeyboard";
-    export * from "babylonjs-gui/src/2D/controls/rectangle";
-    export * from "babylonjs-gui/src/2D/controls/displayGrid";
-    export * from "babylonjs-gui/src/2D/controls/baseSlider";
-    export * from "babylonjs-gui/src/2D/controls/slider";
-    export * from "babylonjs-gui/src/2D/controls/imageBasedSlider";
-    export * from "babylonjs-gui/src/2D/controls/statics";
+declare module 'babylonjs-gui/2D/controls' {
+    export * from "babylonjs-gui/2D/controls/button";
+    export * from "babylonjs-gui/2D/controls/checkbox";
+    export * from "babylonjs-gui/2D/controls/colorpicker";
+    export * from "babylonjs-gui/2D/controls/container";
+    export * from "babylonjs-gui/2D/controls/control";
+    export * from "babylonjs-gui/2D/controls/ellipse";
+    export * from "babylonjs-gui/2D/controls/grid";
+    export * from "babylonjs-gui/2D/controls/image";
+    export * from "babylonjs-gui/2D/controls/inputText";
+    export * from "babylonjs-gui/2D/controls/inputPassword";
+    export * from "babylonjs-gui/2D/controls/line";
+    export * from "babylonjs-gui/2D/controls/multiLine";
+    export * from "babylonjs-gui/2D/controls/radioButton";
+    export * from "babylonjs-gui/2D/controls/stackPanel";
+    export * from "babylonjs-gui/2D/controls/selector";
+    export * from "babylonjs-gui/2D/controls/textBlock";
+    export * from "babylonjs-gui/2D/controls/virtualKeyboard";
+    export * from "babylonjs-gui/2D/controls/rectangle";
+    export * from "babylonjs-gui/2D/controls/displayGrid";
+    export * from "babylonjs-gui/2D/controls/baseSlider";
+    export * from "babylonjs-gui/2D/controls/slider";
+    export * from "babylonjs-gui/2D/controls/imageBasedSlider";
+    export * from "babylonjs-gui/2D/controls/statics";
 }
 
-declare module 'babylonjs-gui/src/2D/advancedDynamicTexture' {
+declare module 'babylonjs-gui/2D/advancedDynamicTexture' {
     import { DynamicTexture, Nullable, Layer, Viewport, Scene, Vector3, Matrix, Vector2, AbstractMesh } from "babylonjs";
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { Style } from "babylonjs-gui/src/2D/style";
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { Style } from "babylonjs-gui/2D/style";
     /**
         * Interface used to define a control that can receive focus
         */
@@ -252,7 +252,7 @@ declare module 'babylonjs-gui/src/2D/advancedDynamicTexture' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/math2D' {
+declare module 'babylonjs-gui/2D/math2D' {
     import { Vector2, Nullable } from "babylonjs";
     /**
         * Class used to transport Vector2 information for pointer events
@@ -359,7 +359,7 @@ declare module 'babylonjs-gui/src/2D/math2D' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/measure' {
+declare module 'babylonjs-gui/2D/measure' {
     /**
         * Class used to store 2D control sizes
         */
@@ -415,9 +415,9 @@ declare module 'babylonjs-gui/src/2D/measure' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/multiLinePoint' {
-    import { MultiLine } from "babylonjs-gui/src/2D/controls/multiLine";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+declare module 'babylonjs-gui/2D/multiLinePoint' {
+    import { MultiLine } from "babylonjs-gui/2D/controls/multiLine";
+    import { Control } from "babylonjs-gui/2D/controls/control";
     import { AbstractMesh, Nullable, Vector2 } from "babylonjs";
     /**
         * Class used to store a point for a MultiLine object.
@@ -451,10 +451,10 @@ declare module 'babylonjs-gui/src/2D/multiLinePoint' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/style' {
+declare module 'babylonjs-gui/2D/style' {
     import { IDisposable, Observable } from "babylonjs";
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
-    import { ValueAndUnit } from "babylonjs-gui/src/2D/valueAndUnit";
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
+    import { ValueAndUnit } from "babylonjs-gui/2D/valueAndUnit";
     /**
         * Define a style used by control to automatically setup properties based on a template.
         * Only support font related properties so far
@@ -492,8 +492,8 @@ declare module 'babylonjs-gui/src/2D/style' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/valueAndUnit' {
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
+declare module 'babylonjs-gui/2D/valueAndUnit' {
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
     /**
         * Class used to specific a value and its associated unit
         */
@@ -556,29 +556,29 @@ declare module 'babylonjs-gui/src/2D/valueAndUnit' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls' {
-    export * from "babylonjs-gui/src/3D/controls/abstractButton3D";
-    export * from "babylonjs-gui/src/3D/controls/button3D";
-    export * from "babylonjs-gui/src/3D/controls/container3D";
-    export * from "babylonjs-gui/src/3D/controls/control3D";
-    export * from "babylonjs-gui/src/3D/controls/cylinderPanel";
-    export * from "babylonjs-gui/src/3D/controls/holographicButton";
-    export * from "babylonjs-gui/src/3D/controls/meshButton3D";
-    export * from "babylonjs-gui/src/3D/controls/planePanel";
-    export * from "babylonjs-gui/src/3D/controls/scatterPanel";
-    export * from "babylonjs-gui/src/3D/controls/spherePanel";
-    export * from "babylonjs-gui/src/3D/controls/stackPanel3D";
-    export * from "babylonjs-gui/src/3D/controls/volumeBasedPanel";
+declare module 'babylonjs-gui/3D/controls' {
+    export * from "babylonjs-gui/3D/controls/abstractButton3D";
+    export * from "babylonjs-gui/3D/controls/button3D";
+    export * from "babylonjs-gui/3D/controls/container3D";
+    export * from "babylonjs-gui/3D/controls/control3D";
+    export * from "babylonjs-gui/3D/controls/cylinderPanel";
+    export * from "babylonjs-gui/3D/controls/holographicButton";
+    export * from "babylonjs-gui/3D/controls/meshButton3D";
+    export * from "babylonjs-gui/3D/controls/planePanel";
+    export * from "babylonjs-gui/3D/controls/scatterPanel";
+    export * from "babylonjs-gui/3D/controls/spherePanel";
+    export * from "babylonjs-gui/3D/controls/stackPanel3D";
+    export * from "babylonjs-gui/3D/controls/volumeBasedPanel";
 }
 
-declare module 'babylonjs-gui/src/3D/materials' {
-    export * from "babylonjs-gui/src/3D/materials/fluentMaterial";
+declare module 'babylonjs-gui/3D/materials' {
+    export * from "babylonjs-gui/3D/materials/fluentMaterial";
 }
 
-declare module 'babylonjs-gui/src/3D/gui3DManager' {
+declare module 'babylonjs-gui/3D/gui3DManager' {
     import { IDisposable, Scene, Nullable, UtilityLayerRenderer, Observable, Vector3, Material } from "babylonjs";
-    import { Container3D } from "babylonjs-gui/src/3D/controls/container3D";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+    import { Container3D } from "babylonjs-gui/3D/controls/container3D";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     /**
         * Class used to manage 3D user interface
         * @see http://doc.babylonjs.com/how_to/gui3d
@@ -640,7 +640,7 @@ declare module 'babylonjs-gui/src/3D/gui3DManager' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/vector3WithInfo' {
+declare module 'babylonjs-gui/3D/vector3WithInfo' {
     import { Vector3 } from "babylonjs";
     /**
         * Class used to transport Vector3 information for pointer events
@@ -659,11 +659,11 @@ declare module 'babylonjs-gui/src/3D/vector3WithInfo' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/button' {
-    import { Rectangle } from "babylonjs-gui/src/2D/controls/rectangle";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { TextBlock } from "babylonjs-gui/src/2D/controls/textBlock";
-    import { Image } from "babylonjs-gui/src/2D/controls/image";
+declare module 'babylonjs-gui/2D/controls/button' {
+    import { Rectangle } from "babylonjs-gui/2D/controls/rectangle";
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { TextBlock } from "babylonjs-gui/2D/controls/textBlock";
+    import { Image } from "babylonjs-gui/2D/controls/image";
     import { Vector2, Nullable } from "babylonjs";
     /**
         * Class used to create 2D buttons
@@ -743,11 +743,11 @@ declare module 'babylonjs-gui/src/2D/controls/button' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/checkbox' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/checkbox' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { Measure } from "babylonjs-gui/2D/measure";
     import { Observable, Vector2 } from "babylonjs";
-    import { StackPanel } from "babylonjs-gui/src/2D/controls/stackPanel";
+    import { StackPanel } from "babylonjs-gui/2D/controls/stackPanel";
     /**
         * Class used to represent a 2D checkbox
         */
@@ -785,10 +785,10 @@ declare module 'babylonjs-gui/src/2D/controls/checkbox' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/colorpicker' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+declare module 'babylonjs-gui/2D/controls/colorpicker' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
     import { Color3, Observable, Vector2 } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /** Class used to create color pickers */
     export class ColorPicker extends Control {
             name?: string | undefined;
@@ -818,11 +818,11 @@ declare module 'babylonjs-gui/src/2D/controls/colorpicker' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/container' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/container' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { Measure } from "babylonjs-gui/2D/measure";
     import { Nullable } from "babylonjs";
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
     /**
         * Root class for 2D containers
         * @see http://doc.babylonjs.com/how_to/gui#containers
@@ -911,14 +911,14 @@ declare module 'babylonjs-gui/src/2D/controls/container' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/control' {
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
-    import { ValueAndUnit } from "babylonjs-gui/src/2D/valueAndUnit";
+declare module 'babylonjs-gui/2D/controls/control' {
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
+    import { ValueAndUnit } from "babylonjs-gui/2D/valueAndUnit";
     import { Nullable, Vector2, AbstractMesh, Observable, Vector3, Scene } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { Style } from "babylonjs-gui/src/2D/style";
-    import { Matrix2D, Vector2WithInfo } from "babylonjs-gui/src/2D/math2D";
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { Style } from "babylonjs-gui/2D/style";
+    import { Matrix2D, Vector2WithInfo } from "babylonjs-gui/2D/math2D";
     /**
         * Root class used for all 2D controls
         * @see http://doc.babylonjs.com/how_to/gui#controls
@@ -1339,9 +1339,9 @@ declare module 'babylonjs-gui/src/2D/controls/control' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/ellipse' {
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/ellipse' {
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /** Class used to create 2D ellipse containers */
     export class Ellipse extends Container {
             name?: string | undefined;
@@ -1359,10 +1359,10 @@ declare module 'babylonjs-gui/src/2D/controls/ellipse' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/grid' {
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/grid' {
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { Measure } from "babylonjs-gui/2D/measure";
     import { Nullable } from "babylonjs";
     /**
         * Class used to create a 2D grid container
@@ -1454,10 +1454,10 @@ declare module 'babylonjs-gui/src/2D/controls/grid' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/image' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+declare module 'babylonjs-gui/2D/controls/image' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
     import { Nullable, Observable } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /**
         * Class used to create 2D images
         */
@@ -1539,12 +1539,12 @@ declare module 'babylonjs-gui/src/2D/controls/image' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/inputText' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { IFocusableControl } from "babylonjs-gui/src/2D/advancedDynamicTexture";
+declare module 'babylonjs-gui/2D/controls/inputText' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { IFocusableControl } from "babylonjs-gui/2D/advancedDynamicTexture";
     import { Nullable, Observable, Vector2 } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { VirtualKeyboard } from "babylonjs-gui/src/2D/controls/virtualKeyboard";
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { VirtualKeyboard } from "babylonjs-gui/2D/controls/virtualKeyboard";
     /**
         * Class used to create input text control
         */
@@ -1609,7 +1609,7 @@ declare module 'babylonjs-gui/src/2D/controls/inputText' {
                 */
             keepsFocusWith(): Nullable<Control[]>;
             /** @hidden */
-            processKey(keyCode: number, key?: string): void;
+            processKey(keyCode: number, key?: string, evt?: KeyboardEvent): void;
             /** @hidden */
             processKeyboard(evt: KeyboardEvent): void;
             _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;
@@ -1620,8 +1620,8 @@ declare module 'babylonjs-gui/src/2D/controls/inputText' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/inputPassword' {
-    import { InputText } from "babylonjs-gui/src/2D/controls/inputText";
+declare module 'babylonjs-gui/2D/controls/inputPassword' {
+    import { InputText } from "babylonjs-gui/2D/controls/inputText";
     /**
       * Class used to create a password control
       */
@@ -1630,10 +1630,10 @@ declare module 'babylonjs-gui/src/2D/controls/inputPassword' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/line' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+declare module 'babylonjs-gui/2D/controls/line' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
     import { Vector3, Scene } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /** Class used to render 2D lines */
     export class Line extends Control {
             name?: string | undefined;
@@ -1680,11 +1680,11 @@ declare module 'babylonjs-gui/src/2D/controls/line' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/multiLine' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { MultiLinePoint } from "babylonjs-gui/src/2D/multiLinePoint";
+declare module 'babylonjs-gui/2D/controls/multiLine' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { MultiLinePoint } from "babylonjs-gui/2D/multiLinePoint";
     import { AbstractMesh } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /**
         * Class used to create multi line control
         */
@@ -1749,11 +1749,11 @@ declare module 'babylonjs-gui/src/2D/controls/multiLine' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/radioButton' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+declare module 'babylonjs-gui/2D/controls/radioButton' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
     import { Observable, Vector2 } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { StackPanel } from "babylonjs-gui/src/2D/controls";
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { StackPanel } from "babylonjs-gui/2D/controls";
     /**
         * Class used to create radio button controls
         */
@@ -1791,9 +1791,9 @@ declare module 'babylonjs-gui/src/2D/controls/radioButton' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/stackPanel' {
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/stackPanel' {
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /**
         * Class used to create a 2D stack panel container
         */
@@ -1821,9 +1821,9 @@ declare module 'babylonjs-gui/src/2D/controls/stackPanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/selector' {
-    import { Rectangle } from "babylonjs-gui/src/2D/controls/rectangle";
-    import { StackPanel } from "babylonjs-gui/src/2D/controls/stackPanel";
+declare module 'babylonjs-gui/2D/controls/selector' {
+    import { Rectangle } from "babylonjs-gui/2D/controls/rectangle";
+    import { StackPanel } from "babylonjs-gui/2D/controls/stackPanel";
     /** Class used to create a RadioGroup
         * which contains groups of radio buttons
      */
@@ -1998,10 +1998,10 @@ declare module 'babylonjs-gui/src/2D/controls/selector' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/textBlock' {
+declare module 'babylonjs-gui/2D/controls/textBlock' {
     import { Observable } from "babylonjs";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { Control } from "babylonjs-gui/2D/controls/control";
     /**
         * Enum that determines the text-wrapping mode to use.
         */
@@ -2100,10 +2100,10 @@ declare module 'babylonjs-gui/src/2D/controls/textBlock' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/virtualKeyboard' {
-    import { StackPanel } from "babylonjs-gui/src/2D/controls/stackPanel";
+declare module 'babylonjs-gui/2D/controls/virtualKeyboard' {
+    import { StackPanel } from "babylonjs-gui/2D/controls/stackPanel";
     import { Observable, Nullable } from "babylonjs";
-    import { InputText } from "babylonjs-gui/src/2D/controls/inputText";
+    import { InputText } from "babylonjs-gui/2D/controls/inputText";
     /**
         * Class used to store key control properties
         */
@@ -2193,9 +2193,9 @@ declare module 'babylonjs-gui/src/2D/controls/virtualKeyboard' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/rectangle' {
-    import { Container } from "babylonjs-gui/src/2D/controls/container";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
+declare module 'babylonjs-gui/2D/controls/rectangle' {
+    import { Container } from "babylonjs-gui/2D/controls/container";
+    import { Measure } from "babylonjs-gui/2D/measure";
     /** Class used to create rectangle container */
     export class Rectangle extends Container {
             name?: string | undefined;
@@ -2215,9 +2215,9 @@ declare module 'babylonjs-gui/src/2D/controls/rectangle' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/displayGrid' {
-    import { Control } from "babylonjs-gui/src/2D/controls";
-    import { Measure } from "babylonjs-gui/src/2D";
+declare module 'babylonjs-gui/2D/controls/displayGrid' {
+    import { Control } from "babylonjs-gui/2D/controls";
+    import { Measure } from "babylonjs-gui/2D";
     /** Class used to render a grid  */
     export class DisplayGrid extends Control {
             name?: string | undefined;
@@ -2251,9 +2251,9 @@ declare module 'babylonjs-gui/src/2D/controls/displayGrid' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/baseSlider' {
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
-    import { ValueAndUnit } from "babylonjs-gui/src/2D/valueAndUnit";
+declare module 'babylonjs-gui/2D/controls/baseSlider' {
+    import { Control } from "babylonjs-gui/2D/controls/control";
+    import { ValueAndUnit } from "babylonjs-gui/2D/valueAndUnit";
     import { Observable, Vector2 } from "babylonjs";
     /**
         * Class used to create slider controls
@@ -2308,9 +2308,9 @@ declare module 'babylonjs-gui/src/2D/controls/baseSlider' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/slider' {
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { BaseSlider } from "babylonjs-gui/src/2D/controls/baseSlider";
+declare module 'babylonjs-gui/2D/controls/slider' {
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { BaseSlider } from "babylonjs-gui/2D/controls/baseSlider";
     /**
         * Class used to create slider controls
         */
@@ -2332,10 +2332,10 @@ declare module 'babylonjs-gui/src/2D/controls/slider' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/imageBasedSlider' {
-    import { BaseSlider } from "babylonjs-gui/src/2D/controls/baseSlider";
-    import { Measure } from "babylonjs-gui/src/2D/measure";
-    import { Image } from "babylonjs-gui/src/2D/controls/image";
+declare module 'babylonjs-gui/2D/controls/imageBasedSlider' {
+    import { BaseSlider } from "babylonjs-gui/2D/controls/baseSlider";
+    import { Measure } from "babylonjs-gui/2D/measure";
+    import { Image } from "babylonjs-gui/2D/controls/image";
     /**
         * Class used to create slider controls based on images
         */
@@ -2364,7 +2364,7 @@ declare module 'babylonjs-gui/src/2D/controls/imageBasedSlider' {
     }
 }
 
-declare module 'babylonjs-gui/src/2D/controls/statics' {
+declare module 'babylonjs-gui/2D/controls/statics' {
     /**
       * Forcing an export so that this code will execute
       * @hidden
@@ -2373,8 +2373,8 @@ declare module 'babylonjs-gui/src/2D/controls/statics' {
     export { name };
 }
 
-declare module 'babylonjs-gui/src/3D/controls/abstractButton3D' {
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+declare module 'babylonjs-gui/3D/controls/abstractButton3D' {
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     import { TransformNode, Scene } from "babylonjs";
     /**
         * Class used as a root to all buttons
@@ -2390,11 +2390,11 @@ declare module 'babylonjs-gui/src/3D/controls/abstractButton3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/button3D' {
-    import { AbstractButton3D } from "babylonjs-gui/src/3D/controls/abstractButton3D";
+declare module 'babylonjs-gui/3D/controls/button3D' {
+    import { AbstractButton3D } from "babylonjs-gui/3D/controls/abstractButton3D";
     import { Material, int, Scene, TransformNode, AbstractMesh } from "babylonjs";
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
-    import { Control } from "babylonjs-gui/src/2D/controls/control";
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
+    import { Control } from "babylonjs-gui/2D/controls/control";
     /**
         * Class used to create a button in 3D
         */
@@ -2436,8 +2436,8 @@ declare module 'babylonjs-gui/src/3D/controls/button3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/container3D' {
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+declare module 'babylonjs-gui/3D/controls/container3D' {
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     import { Scene, Nullable, TransformNode } from "babylonjs";
     /**
         * Class used to create containers for controls
@@ -2507,11 +2507,11 @@ declare module 'babylonjs-gui/src/3D/controls/container3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/control3D' {
+declare module 'babylonjs-gui/3D/controls/control3D' {
     import { IDisposable, IBehaviorAware, Nullable, TransformNode, Vector3, Observable, Behavior, AbstractMesh, Scene } from "babylonjs";
-    import { GUI3DManager } from "babylonjs-gui/src/3D/gui3DManager";
-    import { Vector3WithInfo } from "babylonjs-gui/src/3D/vector3WithInfo";
-    import { Container3D } from "babylonjs-gui/src/3D/controls/container3D";
+    import { GUI3DManager } from "babylonjs-gui/3D/gui3DManager";
+    import { Vector3WithInfo } from "babylonjs-gui/3D/vector3WithInfo";
+    import { Container3D } from "babylonjs-gui/3D/controls/container3D";
     /**
         * Class used as base class for controls
         */
@@ -2651,10 +2651,10 @@ declare module 'babylonjs-gui/src/3D/controls/control3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/cylinderPanel' {
-    import { VolumeBasedPanel } from "babylonjs-gui/src/3D/controls/volumeBasedPanel";
+declare module 'babylonjs-gui/3D/controls/cylinderPanel' {
+    import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel";
     import { float, Vector3 } from "babylonjs";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     /**
         * Class used to create a container panel deployed on the surface of a cylinder
         */
@@ -2667,11 +2667,11 @@ declare module 'babylonjs-gui/src/3D/controls/cylinderPanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/holographicButton' {
-    import { Button3D } from "babylonjs-gui/src/3D/controls/button3D";
+declare module 'babylonjs-gui/3D/controls/holographicButton' {
+    import { Button3D } from "babylonjs-gui/3D/controls/button3D";
     import { Mesh, StandardMaterial, Nullable, Scene, TransformNode } from "babylonjs";
-    import { FluentMaterial } from "babylonjs-gui/src/3D/materials/fluentMaterial";
-    import { AdvancedDynamicTexture } from "babylonjs-gui/src/2D/advancedDynamicTexture";
+    import { FluentMaterial } from "babylonjs-gui/3D/materials/fluentMaterial";
+    import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
     /**
         * Class used to create a holographic button in 3D
         */
@@ -2720,9 +2720,9 @@ declare module 'babylonjs-gui/src/3D/controls/holographicButton' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/meshButton3D' {
+declare module 'babylonjs-gui/3D/controls/meshButton3D' {
     import { Scene, TransformNode, AbstractMesh, Mesh } from "babylonjs";
-    import { Button3D } from "babylonjs-gui/src/3D/controls/button3D";
+    import { Button3D } from "babylonjs-gui/3D/controls/button3D";
     /**
         * Class used to create an interactable object. It's a 3D button using a mesh coming from the current scene
         */
@@ -2741,10 +2741,10 @@ declare module 'babylonjs-gui/src/3D/controls/meshButton3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/planePanel' {
+declare module 'babylonjs-gui/3D/controls/planePanel' {
     import { Vector3 } from "babylonjs";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
-    import { VolumeBasedPanel } from "babylonjs-gui/src/3D/controls/volumeBasedPanel";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
+    import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel";
     /**
       * Class used to create a container panel deployed on the surface of a plane
       */
@@ -2753,10 +2753,10 @@ declare module 'babylonjs-gui/src/3D/controls/planePanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/scatterPanel' {
-    import { VolumeBasedPanel } from "babylonjs-gui/src/3D/controls/volumeBasedPanel";
+declare module 'babylonjs-gui/3D/controls/scatterPanel' {
+    import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel";
     import { float, Vector3 } from "babylonjs";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     /**
         * Class used to create a container panel where items get randomized planar mapping
         */
@@ -2770,10 +2770,10 @@ declare module 'babylonjs-gui/src/3D/controls/scatterPanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/spherePanel' {
-    import { VolumeBasedPanel } from "babylonjs-gui/src/3D/controls/volumeBasedPanel";
+declare module 'babylonjs-gui/3D/controls/spherePanel' {
+    import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel";
     import { float, Vector3 } from "babylonjs";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     /**
         * Class used to create a container panel deployed on the surface of a sphere
         */
@@ -2786,8 +2786,8 @@ declare module 'babylonjs-gui/src/3D/controls/spherePanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/stackPanel3D' {
-    import { Container3D } from "babylonjs-gui/src/3D/controls/container3D";
+declare module 'babylonjs-gui/3D/controls/stackPanel3D' {
+    import { Container3D } from "babylonjs-gui/3D/controls/container3D";
     /**
         * Class used to create a stack panel in 3D on XY plane
         */
@@ -2809,10 +2809,10 @@ declare module 'babylonjs-gui/src/3D/controls/stackPanel3D' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/controls/volumeBasedPanel' {
-    import { Container3D } from "babylonjs-gui/src/3D/controls/container3D";
+declare module 'babylonjs-gui/3D/controls/volumeBasedPanel' {
+    import { Container3D } from "babylonjs-gui/3D/controls/container3D";
     import { int, Vector3 } from "babylonjs";
-    import { Control3D } from "babylonjs-gui/src/3D/controls/control3D";
+    import { Control3D } from "babylonjs-gui/3D/controls/control3D";
     /**
         * Abstract class used to create a container panel deployed on the surface of a volume
         */
@@ -2856,7 +2856,7 @@ declare module 'babylonjs-gui/src/3D/controls/volumeBasedPanel' {
     }
 }
 
-declare module 'babylonjs-gui/src/3D/materials/fluentMaterial' {
+declare module 'babylonjs-gui/3D/materials/fluentMaterial' {
     import { MaterialDefines, PushMaterial, Color3, Color4, Vector3, Scene, Nullable, BaseTexture, AbstractMesh, SubMesh, Matrix, Mesh } from "babylonjs";
     /** @hidden */
     export class FluentMaterialDefines extends MaterialDefines {
@@ -2946,6 +2946,14 @@ declare module 'babylonjs-gui/src/3D/materials/fluentMaterial' {
 // Dependencies for this module:
 //   ../../../../Tools/Gulp/babylonjs
 declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
     /**
         * Interface used to define a control that can receive focus
         */
@@ -3434,6 +3442,10 @@ declare module BABYLON.GUI {
     }
 }
 declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
+}
+declare module BABYLON.GUI {
     /**
         * Class used to manage 3D user interface
         * @see http://doc.babylonjs.com/how_to/gui3d
@@ -4416,7 +4428,7 @@ declare module BABYLON.GUI {
                 */
             keepsFocusWith(): BABYLON.Nullable<Control[]>;
             /** @hidden */
-            processKey(keyCode: number, key?: string): void;
+            processKey(keyCode: number, key?: string, evt?: KeyboardEvent): void;
             /** @hidden */
             processKeyboard(evt: KeyboardEvent): void;
             _draw(parentMeasure: Measure, context: CanvasRenderingContext2D): void;

+ 2 - 2
dist/preview release/gui/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-gui",
     "description": "The Babylon.js GUI library is an extension you can use to generate interactive user interface. It is build on top of the DynamicTexture.",
-    "version": "4.0.0-alpha.4",
+    "version": "4.0.0-alpha.5",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.4"
+        "babylonjs": "4.0.0-alpha.5"
     },
     "engines": {
         "node": "*"

文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js


文件差異過大導致無法顯示
+ 1 - 1
dist/preview release/inspector/babylon.inspector.bundle.js.map


+ 20 - 0
dist/preview release/inspector/babylon.inspector.d.ts

@@ -2,6 +2,26 @@
 // Dependencies for this module:
 //   ../../../../Tools/Gulp/babylonjs
 declare module INSPECTOR {
+}
+declare module INSPECTOR {
+}
+declare module INSPECTOR {
+}
+declare module INSPECTOR {
+}
+declare module INSPECTOR {
+}
+declare module INSPECTOR {
+}
+declare module INSPECTOR {
+}
+declare module INSPECTOR {
+}
+declare module INSPECTOR {
+}
+declare module INSPECTOR {
+}
+declare module INSPECTOR {
     export class Inspector {
             /** The HTML document relative to this inspector (the window or the popup depending on its mode) */
             static DOCUMENT: HTMLDocument;

文件差異過大導致無法顯示
+ 310 - 290
dist/preview release/inspector/babylon.inspector.module.d.ts


+ 5 - 5
dist/preview release/inspector/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-inspector",
     "description": "The Babylon.js inspector.",
-    "version": "4.0.0-alpha.4",
+    "version": "4.0.0-alpha.5",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -28,10 +28,10 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.4",
-        "babylonjs-gui": "4.0.0-alpha.4",
-        "babylonjs-loaders": "4.0.0-alpha.4",
-        "babylonjs-serializers": "4.0.0-alpha.4"
+        "babylonjs": "4.0.0-alpha.5",
+        "babylonjs-gui": "4.0.0-alpha.5",
+        "babylonjs-loaders": "4.0.0-alpha.5",
+        "babylonjs-serializers": "4.0.0-alpha.5"
     },
     "engines": {
         "node": "*"

文件差異過大導致無法顯示
+ 2948 - 3254
dist/preview release/loaders/babylon.glTF1FileLoader.js


文件差異過大導致無法顯示
+ 1 - 3267
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


文件差異過大導致無法顯示
+ 3698 - 4021
dist/preview release/loaders/babylon.glTF2FileLoader.js


文件差異過大導致無法顯示
+ 1 - 4021
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


文件差異過大導致無法顯示
+ 5867 - 6296
dist/preview release/loaders/babylon.glTFFileLoader.js


文件差異過大導致無法顯示
+ 1 - 6335
dist/preview release/loaders/babylon.glTFFileLoader.min.js


文件差異過大導致無法顯示
+ 885 - 1116
dist/preview release/loaders/babylon.objFileLoader.js


文件差異過大導致無法顯示
+ 1 - 1117
dist/preview release/loaders/babylon.objFileLoader.min.js


+ 173 - 415
dist/preview release/loaders/babylon.stlFileLoader.js

@@ -1,415 +1,173 @@
-(function webpackUniversalModuleDefinition(root, factory) {
-	if(typeof exports === 'object' && typeof module === 'object')
-		module.exports = factory(require("babylonjs"));
-	else if(typeof define === 'function' && define.amd)
-		define("babylonjs-loaders", ["babylonjs"], factory);
-	else if(typeof exports === 'object')
-		exports["babylonjs-loaders"] = factory(require("babylonjs"));
-	else
-		root["LOADERS"] = factory(root["BABYLON"]);
-})(window, function(__WEBPACK_EXTERNAL_MODULE_babylonjs__) {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ 	// The module cache
-/******/ 	var installedModules = {};
-/******/
-/******/ 	// The require function
-/******/ 	function __webpack_require__(moduleId) {
-/******/
-/******/ 		// Check if module is in cache
-/******/ 		if(installedModules[moduleId]) {
-/******/ 			return installedModules[moduleId].exports;
-/******/ 		}
-/******/ 		// Create a new module (and put it into the cache)
-/******/ 		var module = installedModules[moduleId] = {
-/******/ 			i: moduleId,
-/******/ 			l: false,
-/******/ 			exports: {}
-/******/ 		};
-/******/
-/******/ 		// Execute the module function
-/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ 		// Flag the module as loaded
-/******/ 		module.l = true;
-/******/
-/******/ 		// Return the exports of the module
-/******/ 		return module.exports;
-/******/ 	}
-/******/
-/******/
-/******/ 	// expose the modules object (__webpack_modules__)
-/******/ 	__webpack_require__.m = modules;
-/******/
-/******/ 	// expose the module cache
-/******/ 	__webpack_require__.c = installedModules;
-/******/
-/******/ 	// define getter function for harmony exports
-/******/ 	__webpack_require__.d = function(exports, name, getter) {
-/******/ 		if(!__webpack_require__.o(exports, name)) {
-/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ 		}
-/******/ 	};
-/******/
-/******/ 	// define __esModule on exports
-/******/ 	__webpack_require__.r = function(exports) {
-/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ 		}
-/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
-/******/ 	};
-/******/
-/******/ 	// create a fake namespace object
-/******/ 	// mode & 1: value is a module id, require it
-/******/ 	// mode & 2: merge all properties of value into the ns
-/******/ 	// mode & 4: return value when already ns object
-/******/ 	// mode & 8|1: behave like require
-/******/ 	__webpack_require__.t = function(value, mode) {
-/******/ 		if(mode & 1) value = __webpack_require__(value);
-/******/ 		if(mode & 8) return value;
-/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ 		var ns = Object.create(null);
-/******/ 		__webpack_require__.r(ns);
-/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ 		return ns;
-/******/ 	};
-/******/
-/******/ 	// getDefaultExport function for compatibility with non-harmony modules
-/******/ 	__webpack_require__.n = function(module) {
-/******/ 		var getter = module && module.__esModule ?
-/******/ 			function getDefault() { return module['default']; } :
-/******/ 			function getModuleExports() { return module; };
-/******/ 		__webpack_require__.d(getter, 'a', getter);
-/******/ 		return getter;
-/******/ 	};
-/******/
-/******/ 	// Object.prototype.hasOwnProperty.call
-/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ 	// __webpack_public_path__
-/******/ 	__webpack_require__.p = "";
-/******/
-/******/
-/******/ 	// Load entry module and return exports
-/******/ 	return __webpack_require__(__webpack_require__.s = "./legacy/legacy-stlFileLoader.ts");
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ "../node_modules/webpack/buildin/global.js":
-/*!*************************************************!*\
-  !*** ../node_modules/webpack/buildin/global.js ***!
-  \*************************************************/
-/*! no static exports found */
-/***/ (function(module, exports) {
-
-var g;
-
-// This works in non-strict mode
-g = (function() {
-	return this;
-})();
-
-try {
-	// This works if eval is allowed (see CSP)
-	g = g || Function("return this")() || (1, eval)("this");
-} catch (e) {
-	// This works if the window reference is available
-	if (typeof window === "object") g = window;
-}
-
-// g can still be undefined, but nothing to do about it...
-// We return undefined, instead of nothing here, so it's
-// easier to handle this case. if(!global) { ...}
-
-module.exports = g;
-
-
-/***/ }),
-
-/***/ "./legacy/legacy-stlFileLoader.ts":
-/*!****************************************!*\
-  !*** ./legacy/legacy-stlFileLoader.ts ***!
-  \****************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {
-function __export(m) {
-    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-var Loaders = __webpack_require__(/*! ../src/STL */ "./src/STL/index.ts");
-/**
- * This is the entry point for the UMD module.
- * The entry point for a future ESM package should be index.ts
- */
-var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
-if (typeof globalObject !== "undefined") {
-    for (var key in Loaders) {
-        globalObject.BABYLON[key] = Loaders[key];
-    }
-}
-__export(__webpack_require__(/*! ../src/STL */ "./src/STL/index.ts"));
-
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/global.js */ "../node_modules/webpack/buildin/global.js")))
-
-/***/ }),
-
-/***/ "./src/STL/index.ts":
-/*!**************************!*\
-  !*** ./src/STL/index.ts ***!
-  \**************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-function __export(m) {
-    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(__webpack_require__(/*! ./stlFileLoader */ "./src/STL/stlFileLoader.ts"));
-
-
-/***/ }),
-
-/***/ "./src/STL/stlFileLoader.ts":
-/*!**********************************!*\
-  !*** ./src/STL/stlFileLoader.ts ***!
-  \**********************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var babylonjs_1 = __webpack_require__(/*! babylonjs */ "babylonjs");
-/**
- * STL file type loader.
- * This is a babylon scene loader plugin.
- */
-var STLFileLoader = /** @class */ (function () {
-    function STLFileLoader() {
-        /** @hidden */
-        this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
-        /** @hidden */
-        this.facetsPattern = /facet([\s\S]*?)endfacet/g;
-        /** @hidden */
-        this.normalPattern = /normal[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
-        /** @hidden */
-        this.vertexPattern = /vertex[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
-        /**
-         * Defines the name of the plugin.
-         */
-        this.name = "stl";
-        /**
-         * Defines the extensions the stl loader is able to load.
-         * force data to come in as an ArrayBuffer
-         * we'll convert to string if it looks like it's an ASCII .stl
-         */
-        this.extensions = {
-            ".stl": { isBinary: true },
-        };
-    }
-    /**
-     * Import meshes into a scene.
-     * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
-     * @param scene The scene to import into
-     * @param data The data to import
-     * @param rootUrl The root url for scene and resources
-     * @param meshes The meshes array to import into
-     * @param particleSystems The particle systems array to import into
-     * @param skeletons The skeletons array to import into
-     * @param onError The callback when import fails
-     * @returns True if successful or false otherwise
-     */
-    STLFileLoader.prototype.importMesh = function (meshesNames, scene, data, rootUrl, meshes, particleSystems, skeletons) {
-        var matches;
-        if (typeof data !== "string") {
-            if (this._isBinary(data)) {
-                // binary .stl
-                var babylonMesh = new babylonjs_1.Mesh("stlmesh", scene);
-                this._parseBinary(babylonMesh, data);
-                if (meshes) {
-                    meshes.push(babylonMesh);
-                }
-                return true;
-            }
-            // ASCII .stl
-            // convert to string
-            var array_buffer = new Uint8Array(data);
-            var str = '';
-            for (var i = 0; i < data.byteLength; i++) {
-                str += String.fromCharCode(array_buffer[i]); // implicitly assumes little-endian
-            }
-            data = str;
-        }
-        //if arrived here, data is a string, containing the STLA data.
-        while (matches = this.solidPattern.exec(data)) {
-            var meshName = matches[1];
-            var meshNameFromEnd = matches[3];
-            if (meshName != meshNameFromEnd) {
-                babylonjs_1.Tools.Error("Error in STL, solid name != endsolid name");
-                return false;
-            }
-            // check meshesNames
-            if (meshesNames && meshName) {
-                if (meshesNames instanceof Array) {
-                    if (!meshesNames.indexOf(meshName)) {
-                        continue;
-                    }
-                }
-                else {
-                    if (meshName !== meshesNames) {
-                        continue;
-                    }
-                }
-            }
-            // stl mesh name can be empty as well
-            meshName = meshName || "stlmesh";
-            var babylonMesh = new babylonjs_1.Mesh(meshName, scene);
-            this._parseASCII(babylonMesh, matches[2]);
-            if (meshes) {
-                meshes.push(babylonMesh);
-            }
-        }
-        return true;
-    };
-    /**
-     * Load into a scene.
-     * @param scene The scene to load into
-     * @param data The data to import
-     * @param rootUrl The root url for scene and resources
-     * @param onError The callback when import fails
-     * @returns true if successful or false otherwise
-     */
-    STLFileLoader.prototype.load = function (scene, data, rootUrl) {
-        var result = this.importMesh(null, scene, data, rootUrl, null, null, null);
-        if (result) {
-            scene.createDefaultCameraOrLight();
-        }
-        return result;
-    };
-    /**
-     * Load into an asset container.
-     * @param scene The scene to load into
-     * @param data The data to import
-     * @param rootUrl The root url for scene and resources
-     * @param onError The callback when import fails
-     * @returns The loaded asset container
-     */
-    STLFileLoader.prototype.loadAssetContainer = function (scene, data, rootUrl, onError) {
-        var container = new babylonjs_1.AssetContainer(scene);
-        this.importMesh(null, scene, data, rootUrl, container.meshes, null, null);
-        container.removeAllFromScene();
-        return container;
-    };
-    STLFileLoader.prototype._isBinary = function (data) {
-        // check if file size is correct for binary stl
-        var faceSize, nFaces, reader;
-        reader = new DataView(data);
-        faceSize = (32 / 8 * 3) + ((32 / 8 * 3) * 3) + (16 / 8);
-        nFaces = reader.getUint32(80, true);
-        if (80 + (32 / 8) + (nFaces * faceSize) === reader.byteLength) {
-            return true;
-        }
-        // check characters higher than ASCII to confirm binary
-        var fileLength = reader.byteLength;
-        for (var index = 0; index < fileLength; index++) {
-            if (reader.getUint8(index) > 127) {
-                return true;
-            }
-        }
-        return false;
-    };
-    STLFileLoader.prototype._parseBinary = function (mesh, data) {
-        var reader = new DataView(data);
-        var faces = reader.getUint32(80, true);
-        var dataOffset = 84;
-        var faceLength = 12 * 4 + 2;
-        var offset = 0;
-        var positions = new Float32Array(faces * 3 * 3);
-        var normals = new Float32Array(faces * 3 * 3);
-        var indices = new Uint32Array(faces * 3);
-        var indicesCount = 0;
-        for (var face = 0; face < faces; face++) {
-            var start = dataOffset + face * faceLength;
-            var normalX = reader.getFloat32(start, true);
-            var normalY = reader.getFloat32(start + 4, true);
-            var normalZ = reader.getFloat32(start + 8, true);
-            for (var i = 1; i <= 3; i++) {
-                var vertexstart = start + i * 12;
-                // ordering is intentional to match ascii import
-                positions[offset] = reader.getFloat32(vertexstart, true);
-                positions[offset + 2] = reader.getFloat32(vertexstart + 4, true);
-                positions[offset + 1] = reader.getFloat32(vertexstart + 8, true);
-                normals[offset] = normalX;
-                normals[offset + 2] = normalY;
-                normals[offset + 1] = normalZ;
-                offset += 3;
-            }
-            indices[indicesCount] = indicesCount++;
-            indices[indicesCount] = indicesCount++;
-            indices[indicesCount] = indicesCount++;
-        }
-        mesh.setVerticesData(babylonjs_1.VertexBuffer.PositionKind, positions);
-        mesh.setVerticesData(babylonjs_1.VertexBuffer.NormalKind, normals);
-        mesh.setIndices(indices);
-        mesh.computeWorldMatrix(true);
-    };
-    STLFileLoader.prototype._parseASCII = function (mesh, solidData) {
-        var positions = [];
-        var normals = [];
-        var indices = [];
-        var indicesCount = 0;
-        //load facets, ignoring loop as the standard doesn't define it can contain more than vertices
-        var matches;
-        while (matches = this.facetsPattern.exec(solidData)) {
-            var facet = matches[1];
-            //one normal per face
-            var normalMatches = this.normalPattern.exec(facet);
-            this.normalPattern.lastIndex = 0;
-            if (!normalMatches) {
-                continue;
-            }
-            var normal = [Number(normalMatches[1]), Number(normalMatches[5]), Number(normalMatches[3])];
-            var vertexMatch;
-            while (vertexMatch = this.vertexPattern.exec(facet)) {
-                positions.push(Number(vertexMatch[1]), Number(vertexMatch[5]), Number(vertexMatch[3]));
-                normals.push(normal[0], normal[1], normal[2]);
-            }
-            indices.push(indicesCount++, indicesCount++, indicesCount++);
-            this.vertexPattern.lastIndex = 0;
-        }
-        this.facetsPattern.lastIndex = 0;
-        mesh.setVerticesData(babylonjs_1.VertexBuffer.PositionKind, positions);
-        mesh.setVerticesData(babylonjs_1.VertexBuffer.NormalKind, normals);
-        mesh.setIndices(indices);
-        mesh.computeWorldMatrix(true);
-    };
-    return STLFileLoader;
-}());
-exports.STLFileLoader = STLFileLoader;
-if (babylonjs_1.SceneLoader) {
-    babylonjs_1.SceneLoader.RegisterPlugin(new STLFileLoader());
-}
-
-
-/***/ }),
-
-/***/ "babylonjs":
-/*!****************************************************************************************************!*\
-  !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
-  \****************************************************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports) {
-
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs__;
-
-/***/ })
-
-/******/ });
-});
-//# sourceMappingURL=babylon.stlFileLoader.js.map
+/// <reference path="../../../dist/preview release/babylon.d.ts"/>
+var BABYLON;
+(function (BABYLON) {
+    var STLFileLoader = /** @class */ (function () {
+        function STLFileLoader() {
+            this.solidPattern = /solid (\S*)([\S\s]*)endsolid[ ]*(\S*)/g;
+            this.facetsPattern = /facet([\s\S]*?)endfacet/g;
+            this.normalPattern = /normal[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
+            this.vertexPattern = /vertex[\s]+([\-+]?[0-9]+\.?[0-9]*([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+[\s]+([\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?)+/g;
+            this.name = "stl";
+            // force data to come in as an ArrayBuffer
+            // we'll convert to string if it looks like it's an ASCII .stl
+            this.extensions = {
+                ".stl": { isBinary: true },
+            };
+        }
+        STLFileLoader.prototype.importMesh = function (meshesNames, scene, data, rootUrl, meshes, particleSystems, skeletons) {
+            var matches;
+            if (typeof data !== "string") {
+                if (this.isBinary(data)) {
+                    // binary .stl
+                    var babylonMesh = new BABYLON.Mesh("stlmesh", scene);
+                    this.parseBinary(babylonMesh, data);
+                    if (meshes) {
+                        meshes.push(babylonMesh);
+                    }
+                    return true;
+                }
+                // ASCII .stl
+                // convert to string
+                var array_buffer = new Uint8Array(data);
+                var str = '';
+                for (var i = 0; i < data.byteLength; i++) {
+                    str += String.fromCharCode(array_buffer[i]); // implicitly assumes little-endian
+                }
+                data = str;
+            }
+            //if arrived here, data is a string, containing the STLA data.
+            while (matches = this.solidPattern.exec(data)) {
+                var meshName = matches[1];
+                var meshNameFromEnd = matches[3];
+                if (meshName != meshNameFromEnd) {
+                    BABYLON.Tools.Error("Error in STL, solid name != endsolid name");
+                    return false;
+                }
+                // check meshesNames
+                if (meshesNames && meshName) {
+                    if (meshesNames instanceof Array) {
+                        if (!meshesNames.indexOf(meshName)) {
+                            continue;
+                        }
+                    }
+                    else {
+                        if (meshName !== meshesNames) {
+                            continue;
+                        }
+                    }
+                }
+                // stl mesh name can be empty as well
+                meshName = meshName || "stlmesh";
+                var babylonMesh = new BABYLON.Mesh(meshName, scene);
+                this.parseASCII(babylonMesh, matches[2]);
+                if (meshes) {
+                    meshes.push(babylonMesh);
+                }
+            }
+            return true;
+        };
+        STLFileLoader.prototype.load = function (scene, data, rootUrl) {
+            var result = this.importMesh(null, scene, data, rootUrl, null, null, null);
+            if (result) {
+                scene.createDefaultCameraOrLight();
+            }
+            return result;
+        };
+        STLFileLoader.prototype.loadAssetContainer = function (scene, data, rootUrl, onError) {
+            var container = new BABYLON.AssetContainer(scene);
+            this.importMesh(null, scene, data, rootUrl, container.meshes, null, null);
+            container.removeAllFromScene();
+            return container;
+        };
+        STLFileLoader.prototype.isBinary = function (data) {
+            // check if file size is correct for binary stl
+            var faceSize, nFaces, reader;
+            reader = new DataView(data);
+            faceSize = (32 / 8 * 3) + ((32 / 8 * 3) * 3) + (16 / 8);
+            nFaces = reader.getUint32(80, true);
+            if (80 + (32 / 8) + (nFaces * faceSize) === reader.byteLength) {
+                return true;
+            }
+            // check characters higher than ASCII to confirm binary
+            var fileLength = reader.byteLength;
+            for (var index = 0; index < fileLength; index++) {
+                if (reader.getUint8(index) > 127) {
+                    return true;
+                }
+            }
+            return false;
+        };
+        STLFileLoader.prototype.parseBinary = function (mesh, data) {
+            var reader = new DataView(data);
+            var faces = reader.getUint32(80, true);
+            var dataOffset = 84;
+            var faceLength = 12 * 4 + 2;
+            var offset = 0;
+            var positions = new Float32Array(faces * 3 * 3);
+            var normals = new Float32Array(faces * 3 * 3);
+            var indices = new Uint32Array(faces * 3);
+            var indicesCount = 0;
+            for (var face = 0; face < faces; face++) {
+                var start = dataOffset + face * faceLength;
+                var normalX = reader.getFloat32(start, true);
+                var normalY = reader.getFloat32(start + 4, true);
+                var normalZ = reader.getFloat32(start + 8, true);
+                for (var i = 1; i <= 3; i++) {
+                    var vertexstart = start + i * 12;
+                    // ordering is intentional to match ascii import
+                    positions[offset] = reader.getFloat32(vertexstart, true);
+                    positions[offset + 2] = reader.getFloat32(vertexstart + 4, true);
+                    positions[offset + 1] = reader.getFloat32(vertexstart + 8, true);
+                    normals[offset] = normalX;
+                    normals[offset + 2] = normalY;
+                    normals[offset + 1] = normalZ;
+                    offset += 3;
+                }
+                indices[indicesCount] = indicesCount++;
+                indices[indicesCount] = indicesCount++;
+                indices[indicesCount] = indicesCount++;
+            }
+            mesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, positions);
+            mesh.setVerticesData(BABYLON.VertexBuffer.NormalKind, normals);
+            mesh.setIndices(indices);
+            mesh.computeWorldMatrix(true);
+        };
+        STLFileLoader.prototype.parseASCII = function (mesh, solidData) {
+            var positions = [];
+            var normals = [];
+            var indices = [];
+            var indicesCount = 0;
+            //load facets, ignoring loop as the standard doesn't define it can contain more than vertices
+            var matches;
+            while (matches = this.facetsPattern.exec(solidData)) {
+                var facet = matches[1];
+                //one normal per face
+                var normalMatches = this.normalPattern.exec(facet);
+                this.normalPattern.lastIndex = 0;
+                if (!normalMatches) {
+                    continue;
+                }
+                var normal = [Number(normalMatches[1]), Number(normalMatches[5]), Number(normalMatches[3])];
+                var vertexMatch;
+                while (vertexMatch = this.vertexPattern.exec(facet)) {
+                    positions.push(Number(vertexMatch[1]), Number(vertexMatch[5]), Number(vertexMatch[3]));
+                    normals.push(normal[0], normal[1], normal[2]);
+                }
+                indices.push(indicesCount++, indicesCount++, indicesCount++);
+                this.vertexPattern.lastIndex = 0;
+            }
+            this.facetsPattern.lastIndex = 0;
+            mesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, positions);
+            mesh.setVerticesData(BABYLON.VertexBuffer.NormalKind, normals);
+            mesh.setIndices(indices);
+            mesh.computeWorldMatrix(true);
+        };
+        return STLFileLoader;
+    }());
+    BABYLON.STLFileLoader = STLFileLoader;
+    if (BABYLON.SceneLoader) {
+        BABYLON.SceneLoader.RegisterPlugin(new STLFileLoader());
+    }
+})(BABYLON || (BABYLON = {}));
+
+//# sourceMappingURL=babylon.stlFileLoader.js.map

文件差異過大導致無法顯示
+ 1 - 415
dist/preview release/loaders/babylon.stlFileLoader.min.js


文件差異過大導致無法顯示
+ 1851 - 1737
dist/preview release/loaders/babylonjs.loaders.d.ts


文件差異過大導致無法顯示
+ 6970 - 7623
dist/preview release/loaders/babylonjs.loaders.js


文件差異過大導致無法顯示
+ 1 - 2
dist/preview release/loaders/babylonjs.loaders.min.js


文件差異過大導致無法顯示
+ 1857 - 3618
dist/preview release/loaders/babylonjs.loaders.module.d.ts


+ 3 - 3
dist/preview release/loaders/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-loaders",
     "description": "The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.",
-    "version": "4.0.0-alpha.4",
+    "version": "4.0.0-alpha.5",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,8 +27,8 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs-gltf2interface": "4.0.0-alpha.4",
-        "babylonjs": "4.0.0-alpha.4"
+        "babylonjs-gltf2interface": "4.0.0-alpha.5",
+        "babylonjs": "4.0.0-alpha.5"
     },
     "engines": {
         "node": "*"

+ 280 - 0
dist/preview release/materialsLibrary/babylon.backgroundMaterial.d.ts

@@ -0,0 +1,280 @@
+
+declare namespace BABYLON {
+    /**
+     * Background material
+     */
+    class BackgroundMaterial extends BABYLON.PushMaterial {
+        /**
+         * Key light Color (multiply against the R channel of the environement texture)
+         */
+        protected _primaryColor: Color3;
+        primaryColor: Color3;
+        /**
+         * Key light Level (allowing HDR output of the background)
+         */
+        protected _primaryLevel: float;
+        primaryLevel: float;
+        /**
+         * Secondary light Color (multiply against the G channel of the environement texture)
+         */
+        protected _secondaryColor: Color3;
+        secondaryColor: Color3;
+        /**
+         * Secondary light Level (allowing HDR output of the background)
+         */
+        protected _secondaryLevel: float;
+        secondaryLevel: float;
+        /**
+         * Tertiary light Color (multiply against the B channel of the environement texture)
+         */
+        protected _tertiaryColor: Color3;
+        tertiaryColor: Color3;
+        /**
+         * Tertiary light Level (allowing HDR output of the background)
+         */
+        protected _tertiaryLevel: float;
+        tertiaryLevel: float;
+        /**
+         * Reflection Texture used in the material.
+         * Should be author in a specific way for the best result (refer to the documentation).
+         */
+        protected _reflectionTexture: Nullable<BaseTexture>;
+        reflectionTexture: Nullable<BaseTexture>;
+        /**
+         * Reflection Texture level of blur.
+         *
+         * Can be use to reuse an existing HDR Texture and target a specific LOD to prevent authoring the
+         * texture twice.
+         */
+        protected _reflectionBlur: float;
+        reflectionBlur: float;
+        /**
+         * Diffuse Texture used in the material.
+         * Should be author in a specific way for the best result (refer to the documentation).
+         */
+        protected _diffuseTexture: Nullable<BaseTexture>;
+        diffuseTexture: Nullable<BaseTexture>;
+        /**
+         * Specify the list of lights casting shadow on the material.
+         * All scene shadow lights will be included if null.
+         */
+        protected _shadowLights: Nullable<IShadowLight[]>;
+        shadowLights: Nullable<IShadowLight[]>;
+        /**
+         * For the lights having a blurred shadow generator, this can add a second blur pass in order to reach
+         * soft lighting on the background.
+         */
+        protected _shadowBlurScale: int;
+        shadowBlurScale: int;
+        /**
+         * Helps adjusting the shadow to a softer level if required.
+         * 0 means black shadows and 1 means no shadows.
+         */
+        protected _shadowLevel: float;
+        shadowLevel: float;
+        /**
+         * In case of opacity Fresnel or reflection falloff, this is use as a scene center.
+         * It is usually zero but might be interesting to modify according to your setup.
+         */
+        protected _sceneCenter: Vector3;
+        sceneCenter: Vector3;
+        /**
+         * This helps specifying that the material is falling off to the sky box at grazing angle.
+         * This helps ensuring a nice transition when the camera goes under the ground.
+         */
+        protected _opacityFresnel: boolean;
+        opacityFresnel: boolean;
+        /**
+         * This helps specifying that the material is falling off from diffuse to the reflection texture at grazing angle.
+         * This helps adding a mirror texture on the ground.
+         */
+        protected _reflectionFresnel: boolean;
+        reflectionFresnel: boolean;
+        /**
+         * This helps specifying the falloff radius off the reflection texture from the sceneCenter.
+         * This helps adding a nice falloff effect to the reflection if used as a mirror for instance.
+         */
+        protected _reflectionFalloffDistance: number;
+        reflectionFalloffDistance: number;
+        /**
+         * This specifies the weight of the reflection against the background in case of reflection Fresnel.
+         */
+        protected _reflectionAmount: number;
+        reflectionAmount: number;
+        /**
+         * This specifies the weight of the reflection at grazing angle.
+         */
+        protected _reflectionReflectance0: number;
+        reflectionReflectance0: number;
+        /**
+         * This specifies the weight of the reflection at a perpendicular point of view.
+         */
+        protected _reflectionReflectance90: number;
+        reflectionReflectance90: number;
+        /**
+         * Helps to directly use the maps channels instead of their level.
+         */
+        protected _useRGBColor: boolean;
+        useRGBColor: boolean;
+        /**
+         * Number of Simultaneous lights allowed on the material.
+         */
+        private _maxSimultaneousLights;
+        maxSimultaneousLights: int;
+        /**
+         * Default configuration related to image processing available in the Background Material.
+         */
+        protected _imageProcessingConfiguration: ImageProcessingConfiguration;
+        /**
+         * Keep track of the image processing observer to allow dispose and replace.
+         */
+        private _imageProcessingObserver;
+        /**
+         * Attaches a new image processing configuration to the PBR Material.
+         * @param configuration (if null the scene configuration will be use)
+         */
+        protected _attachImageProcessingConfiguration(configuration: Nullable<ImageProcessingConfiguration>): void;
+        /**
+         * Gets the image processing configuration used either in this material.
+         */
+        /**
+         * Sets the Default image processing configuration used either in the this material.
+         *
+         * If sets to null, the scene one is in use.
+         */
+        imageProcessingConfiguration: Nullable<ImageProcessingConfiguration>;
+        /**
+         * Gets wether the color curves effect is enabled.
+         */
+        /**
+         * Sets wether the color curves effect is enabled.
+         */
+        cameraColorCurvesEnabled: boolean;
+        /**
+         * Gets wether the color grading effect is enabled.
+         */
+        /**
+         * Gets wether the color grading effect is enabled.
+         */
+        cameraColorGradingEnabled: boolean;
+        /**
+         * Gets wether tonemapping is enabled or not.
+         */
+        /**
+         * Sets wether tonemapping is enabled or not
+         */
+        cameraToneMappingEnabled: boolean;
+        /**
+         * 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.
+         */
+        /**
+         * 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: float;
+        /**
+         * Gets The camera contrast used on this material.
+         */
+        /**
+         * Sets The camera contrast used on this material.
+         */
+        cameraContrast: float;
+        /**
+         * Gets the Color Grading 2D Lookup Texture.
+         */
+        /**
+         * Sets the Color Grading 2D Lookup Texture.
+         */
+        cameraColorGradingTexture: Nullable<BaseTexture>;
+        /**
+         * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
+         * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
+         * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
+         * corresponding to low luminance, medium luminance, and high luminance areas respectively.
+         */
+        /**
+         * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
+         * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
+         * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
+         * corresponding to low luminance, medium luminance, and high luminance areas respectively.
+         */
+        cameraColorCurves: Nullable<ColorCurves>;
+        private _renderTargets;
+        private _reflectionControls;
+        /**
+         * constructor
+         * @param name The name of the material
+         * @param scene The scene to add the material to
+         */
+        constructor(name: string, scene: BABYLON.Scene);
+        /**
+         * The entire material has been created in order to prevent overdraw.
+         * @returns false
+         */
+        needAlphaTesting(): boolean;
+        /**
+         * The entire material has been created in order to prevent overdraw.
+         * @returns true if blending is enable
+         */
+        needAlphaBlending(): boolean;
+        /**
+         * Checks wether the material is ready to be rendered for a given mesh.
+         * @param mesh The mesh to render
+         * @param subMesh The submesh to check against
+         * @param useInstances Specify wether or not the material is used with instances
+         */
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        /**
+         * Build the uniform buffer used in the material.
+         */
+        buildUniformLayout(): void;
+        /**
+         * Unbind the material.
+         */
+        unbind(): void;
+        /**
+         * Bind only the world matrix to the material.
+         * @param world The world matrix to bind.
+         */
+        bindOnlyWorldMatrix(world: Matrix): void;
+        /**
+         * Bind the material for a dedicated submeh (every used meshes will be considered opaque).
+         * @param world The world matrix to bind.
+         * @param subMesh The submesh to bind for.
+         */
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        /**
+         * Dispose the material.
+         * @forceDisposeEffect Force disposal of the associated effect.
+         * @forceDisposeTextures Force disposal of the associated textures.
+         */
+        dispose(forceDisposeEffect?: boolean, forceDisposeTextures?: boolean): void;
+        /**
+         * Clones the material.
+         * @name The cloned name.
+         * @returns The cloned material.
+         */
+        clone(name: string): BackgroundMaterial;
+        /**
+         * Serializes the current material to its JSON representation.
+         * @returns The JSON representation.
+         */
+        serialize(): any;
+        /**
+         * Gets the class name of the material
+         * @returns "BackgroundMaterial"
+         */
+        getClassName(): string;
+        /**
+         * Parse a JSON input to create back a background material.
+         * @param source
+         * @param scene
+         * @param rootUrl
+         * @returns the instantiated BackgroundMaterial.
+         */
+        static Parse(source: any, scene: Scene, rootUrl: string): BackgroundMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 920 - 0
dist/preview release/materialsLibrary/babylon.backgroundMaterial.js


文件差異過大導致無法顯示
+ 1 - 0
dist/preview release/materialsLibrary/babylon.backgroundMaterial.min.js


+ 29 - 0
dist/preview release/materialsLibrary/babylon.cellMaterial.d.ts

@@ -0,0 +1,29 @@
+
+declare module BABYLON {
+    class CellMaterial extends PushMaterial {
+        private _diffuseTexture;
+        diffuseTexture: BaseTexture;
+        diffuseColor: Color3;
+        _computeHighLevel: boolean;
+        computeHighLevel: boolean;
+        private _disableLighting;
+        disableLighting: boolean;
+        private _maxSimultaneousLights;
+        maxSimultaneousLights: number;
+        private _renderId;
+        constructor(name: string, scene: Scene);
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        getAnimatables(): IAnimatable[];
+        getActiveTextures(): BaseTexture[];
+        hasTexture(texture: BaseTexture): boolean;
+        dispose(forceDisposeEffect?: boolean): void;
+        getClassName(): string;
+        clone(name: string): CellMaterial;
+        serialize(): any;
+        static Parse(source: any, scene: Scene, rootUrl: string): CellMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 298 - 519
dist/preview release/materialsLibrary/babylon.cellMaterial.js


文件差異過大導致無法顯示
+ 1 - 521
dist/preview release/materialsLibrary/babylon.cellMaterial.min.js


+ 50 - 0
dist/preview release/materialsLibrary/babylon.customMaterial.d.ts

@@ -0,0 +1,50 @@
+
+declare module BABYLON {
+    class CustomShaderStructure {
+        FragmentStore: string;
+        VertexStore: string;
+        constructor();
+    }
+    class ShaderSpecialParts {
+        constructor();
+        Fragment_Begin: string;
+        Fragment_Definitions: string;
+        Fragment_MainBegin: string;
+        Fragment_Custom_Diffuse: string;
+        Fragment_Custom_Alpha: string;
+        Fragment_Before_FragColor: string;
+        Vertex_Begin: string;
+        Vertex_Definitions: string;
+        Vertex_MainBegin: string;
+        Vertex_Before_PositionUpdated: string;
+        Vertex_Before_NormalUpdated: string;
+    }
+    class CustomMaterial extends StandardMaterial {
+        static ShaderIndexer: number;
+        CustomParts: ShaderSpecialParts;
+        _isCreatedShader: boolean;
+        _createdShaderName: string;
+        _customUniform: string[];
+        _newUniforms: string[];
+        _newUniformInstances: any[];
+        _newSamplerInstances: Texture[];
+        FragmentShader: string;
+        VertexShader: string;
+        AttachAfterBind(mesh: Mesh, effect: Effect): void;
+        ReviewUniform(name: string, arr: string[]): string[];
+        Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: StandardMaterialDefines): string;
+        constructor(name: string, scene: Scene);
+        AddUniform(name: string, kind: string, param: any): CustomMaterial;
+        Fragment_Begin(shaderPart: string): CustomMaterial;
+        Fragment_Definitions(shaderPart: string): CustomMaterial;
+        Fragment_MainBegin(shaderPart: string): CustomMaterial;
+        Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
+        Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
+        Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
+        Vertex_Begin(shaderPart: string): CustomMaterial;
+        Vertex_Definitions(shaderPart: string): CustomMaterial;
+        Vertex_MainBegin(shaderPart: string): CustomMaterial;
+        Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
+        Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
+    }
+}

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

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

文件差異過大導致無法顯示
+ 1 - 392
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


+ 30 - 0
dist/preview release/materialsLibrary/babylon.fireMaterial.d.ts

@@ -0,0 +1,30 @@
+
+declare module BABYLON {
+    class FireMaterial extends PushMaterial {
+        private _diffuseTexture;
+        diffuseTexture: Nullable<BaseTexture>;
+        private _distortionTexture;
+        distortionTexture: Nullable<BaseTexture>;
+        private _opacityTexture;
+        opacityTexture: Nullable<BaseTexture>;
+        diffuseColor: Color3;
+        speed: number;
+        private _scaledDiffuse;
+        private _renderId;
+        private _lastTime;
+        constructor(name: string, scene: Scene);
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        getAnimatables(): IAnimatable[];
+        getActiveTextures(): BaseTexture[];
+        hasTexture(texture: BaseTexture): boolean;
+        getClassName(): string;
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): FireMaterial;
+        serialize(): any;
+        static Parse(source: any, scene: Scene, rootUrl: string): FireMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 336 - 557
dist/preview release/materialsLibrary/babylon.fireMaterial.js


文件差異過大導致無法顯示
+ 1 - 559
dist/preview release/materialsLibrary/babylon.fireMaterial.min.js


+ 46 - 0
dist/preview release/materialsLibrary/babylon.furMaterial.d.ts

@@ -0,0 +1,46 @@
+
+declare module BABYLON {
+    class FurMaterial extends PushMaterial {
+        private _diffuseTexture;
+        diffuseTexture: BaseTexture;
+        private _heightTexture;
+        heightTexture: BaseTexture;
+        diffuseColor: Color3;
+        furLength: number;
+        furAngle: number;
+        furColor: Color3;
+        furOffset: number;
+        furSpacing: number;
+        furGravity: Vector3;
+        furSpeed: number;
+        furDensity: number;
+        furOcclusion: number;
+        furTexture: DynamicTexture;
+        private _disableLighting;
+        disableLighting: boolean;
+        private _maxSimultaneousLights;
+        maxSimultaneousLights: number;
+        highLevelFur: boolean;
+        _meshes: AbstractMesh[];
+        private _renderId;
+        private _furTime;
+        constructor(name: string, scene: Scene);
+        furTime: number;
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        updateFur(): void;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        getAnimatables(): IAnimatable[];
+        getActiveTextures(): BaseTexture[];
+        hasTexture(texture: BaseTexture): boolean;
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): FurMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): FurMaterial;
+        static GenerateTexture(name: string, scene: Scene): DynamicTexture;
+        static FurifyMesh(sourceMesh: Mesh, quality: number): Mesh[];
+    }
+}

文件差異過大導致無法顯示
+ 484 - 705
dist/preview release/materialsLibrary/babylon.furMaterial.js


文件差異過大導致無法顯示
+ 1 - 707
dist/preview release/materialsLibrary/babylon.furMaterial.min.js


+ 29 - 0
dist/preview release/materialsLibrary/babylon.gradientMaterial.d.ts

@@ -0,0 +1,29 @@
+
+declare module BABYLON {
+    class GradientMaterial extends PushMaterial {
+        private _maxSimultaneousLights;
+        maxSimultaneousLights: number;
+        topColor: Color3;
+        topColorAlpha: number;
+        bottomColor: Color3;
+        bottomColorAlpha: number;
+        offset: number;
+        scale: number;
+        smoothness: number;
+        disableLighting: boolean;
+        private _scaledDiffuse;
+        private _renderId;
+        constructor(name: string, scene: Scene);
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        getAnimatables(): IAnimatable[];
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): GradientMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): GradientMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 308 - 529
dist/preview release/materialsLibrary/babylon.gradientMaterial.js


文件差異過大導致無法顯示
+ 1 - 531
dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js


+ 61 - 0
dist/preview release/materialsLibrary/babylon.gridMaterial.d.ts

@@ -0,0 +1,61 @@
+
+declare module BABYLON {
+    /**
+     * The grid materials allows you to wrap any shape with a grid.
+     * Colors are customizable.
+     */
+    class GridMaterial extends BABYLON.PushMaterial {
+        /**
+         * Main color of the grid (e.g. between lines)
+         */
+        mainColor: Color3;
+        /**
+         * Color of the grid lines.
+         */
+        lineColor: Color3;
+        /**
+         * The scale of the grid compared to unit.
+         */
+        gridRatio: number;
+        /**
+         * Allows setting an offset for the grid lines.
+         */
+        gridOffset: Vector3;
+        /**
+         * The frequency of thicker lines.
+         */
+        majorUnitFrequency: number;
+        /**
+         * The visibility of minor units in the grid.
+         */
+        minorUnitVisibility: number;
+        /**
+         * The grid opacity outside of the lines.
+         */
+        opacity: number;
+        /**
+         * Determine RBG output is premultiplied by alpha value.
+         */
+        preMultiplyAlpha: boolean;
+        private _gridControl;
+        private _renderId;
+        /**
+         * constructor
+         * @param name The name given to the material in order to identify it afterwards.
+         * @param scene The scene the material is used in.
+         */
+        constructor(name: string, scene: Scene);
+        /**
+         * Returns wehter or not the grid requires alpha blending.
+         */
+        needAlphaBlending(): boolean;
+        needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): GridMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 215 - 440
dist/preview release/materialsLibrary/babylon.gridMaterial.js


文件差異過大導致無法顯示
+ 1 - 440
dist/preview release/materialsLibrary/babylon.gridMaterial.min.js


+ 37 - 0
dist/preview release/materialsLibrary/babylon.lavaMaterial.d.ts

@@ -0,0 +1,37 @@
+
+declare module BABYLON {
+    class LavaMaterial extends PushMaterial {
+        private _diffuseTexture;
+        diffuseTexture: BaseTexture;
+        noiseTexture: BaseTexture;
+        fogColor: Color3;
+        speed: number;
+        movingSpeed: number;
+        lowFrequencySpeed: number;
+        fogDensity: number;
+        private _lastTime;
+        diffuseColor: Color3;
+        private _disableLighting;
+        disableLighting: boolean;
+        private _unlit;
+        unlit: boolean;
+        private _maxSimultaneousLights;
+        maxSimultaneousLights: number;
+        private _scaledDiffuse;
+        private _renderId;
+        constructor(name: string, scene: Scene);
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        getAnimatables(): IAnimatable[];
+        getActiveTextures(): BaseTexture[];
+        hasTexture(texture: BaseTexture): boolean;
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): LavaMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): LavaMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 386 - 607
dist/preview release/materialsLibrary/babylon.lavaMaterial.js


文件差異過大導致無法顯示
+ 1 - 609
dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js


+ 56 - 0
dist/preview release/materialsLibrary/babylon.mixMaterial.d.ts

@@ -0,0 +1,56 @@
+
+declare module BABYLON {
+    class MixMaterial extends PushMaterial {
+        /**
+         * Mix textures
+         */
+        private _mixTexture1;
+        mixTexture1: BaseTexture;
+        private _mixTexture2;
+        mixTexture2: BaseTexture;
+        /**
+         * Diffuse textures
+         */
+        private _diffuseTexture1;
+        diffuseTexture1: Texture;
+        private _diffuseTexture2;
+        diffuseTexture2: Texture;
+        private _diffuseTexture3;
+        diffuseTexture3: Texture;
+        private _diffuseTexture4;
+        diffuseTexture4: Texture;
+        private _diffuseTexture5;
+        diffuseTexture5: Texture;
+        private _diffuseTexture6;
+        diffuseTexture6: Texture;
+        private _diffuseTexture7;
+        diffuseTexture7: Texture;
+        private _diffuseTexture8;
+        diffuseTexture8: Texture;
+        /**
+         * Uniforms
+         */
+        diffuseColor: Color3;
+        specularColor: Color3;
+        specularPower: number;
+        private _disableLighting;
+        disableLighting: boolean;
+        private _maxSimultaneousLights;
+        maxSimultaneousLights: number;
+        private _renderId;
+        constructor(name: string, scene: Scene);
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        getAnimatables(): IAnimatable[];
+        getActiveTextures(): BaseTexture[];
+        hasTexture(texture: BaseTexture): boolean;
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): MixMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): MixMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 473 - 694
dist/preview release/materialsLibrary/babylon.mixMaterial.js


文件差異過大導致無法顯示
+ 1 - 696
dist/preview release/materialsLibrary/babylon.mixMaterial.min.js


+ 27 - 0
dist/preview release/materialsLibrary/babylon.normalMaterial.d.ts

@@ -0,0 +1,27 @@
+
+declare module BABYLON {
+    class NormalMaterial extends PushMaterial {
+        private _diffuseTexture;
+        diffuseTexture: BaseTexture;
+        diffuseColor: Color3;
+        private _disableLighting;
+        disableLighting: boolean;
+        private _maxSimultaneousLights;
+        maxSimultaneousLights: number;
+        private _renderId;
+        constructor(name: string, scene: Scene);
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        getAnimatables(): IAnimatable[];
+        getActiveTextures(): BaseTexture[];
+        hasTexture(texture: BaseTexture): boolean;
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): NormalMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): NormalMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 330 - 551
dist/preview release/materialsLibrary/babylon.normalMaterial.js


文件差異過大導致無法顯示
+ 1 - 553
dist/preview release/materialsLibrary/babylon.normalMaterial.min.js


+ 19 - 0
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.d.ts

@@ -0,0 +1,19 @@
+
+declare module BABYLON {
+    class ShadowOnlyMaterial extends PushMaterial {
+        private _renderId;
+        private _activeLight;
+        constructor(name: string, scene: Scene);
+        shadowColor: Color3;
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        activeLight: IShadowLight;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        clone(name: string): ShadowOnlyMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): ShadowOnlyMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 220 - 441
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js


文件差異過大導致無法顯示
+ 1 - 441
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js


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

@@ -0,0 +1,27 @@
+
+declare module BABYLON {
+    class SimpleMaterial extends PushMaterial {
+        private _diffuseTexture;
+        diffuseTexture: BaseTexture;
+        diffuseColor: Color3;
+        private _disableLighting;
+        disableLighting: boolean;
+        private _maxSimultaneousLights;
+        maxSimultaneousLights: number;
+        private _renderId;
+        constructor(name: string, scene: Scene);
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        getAnimatables(): IAnimatable[];
+        getActiveTextures(): BaseTexture[];
+        hasTexture(texture: BaseTexture): boolean;
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): SimpleMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): SimpleMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 289 - 510
dist/preview release/materialsLibrary/babylon.simpleMaterial.js


文件差異過大導致無法顯示
+ 1 - 512
dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js


+ 29 - 0
dist/preview release/materialsLibrary/babylon.skyMaterial.d.ts

@@ -0,0 +1,29 @@
+
+declare module BABYLON {
+    class SkyMaterial extends PushMaterial {
+        luminance: number;
+        turbidity: number;
+        rayleigh: number;
+        mieCoefficient: number;
+        mieDirectionalG: number;
+        distance: number;
+        inclination: number;
+        azimuth: number;
+        sunPosition: Vector3;
+        useSunPosition: boolean;
+        private _cameraPosition;
+        private _renderId;
+        constructor(name: string, scene: Scene);
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        getAnimatables(): IAnimatable[];
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): SkyMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): SkyMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 230 - 451
dist/preview release/materialsLibrary/babylon.skyMaterial.js


文件差異過大導致無法顯示
+ 1 - 451
dist/preview release/materialsLibrary/babylon.skyMaterial.min.js


+ 41 - 0
dist/preview release/materialsLibrary/babylon.terrainMaterial.d.ts

@@ -0,0 +1,41 @@
+
+declare module BABYLON {
+    class TerrainMaterial extends PushMaterial {
+        private _mixTexture;
+        mixTexture: BaseTexture;
+        private _diffuseTexture1;
+        diffuseTexture1: Texture;
+        private _diffuseTexture2;
+        diffuseTexture2: Texture;
+        private _diffuseTexture3;
+        diffuseTexture3: Texture;
+        private _bumpTexture1;
+        bumpTexture1: Texture;
+        private _bumpTexture2;
+        bumpTexture2: Texture;
+        private _bumpTexture3;
+        bumpTexture3: Texture;
+        diffuseColor: Color3;
+        specularColor: Color3;
+        specularPower: number;
+        private _disableLighting;
+        disableLighting: boolean;
+        private _maxSimultaneousLights;
+        maxSimultaneousLights: number;
+        private _renderId;
+        constructor(name: string, scene: Scene);
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        getAnimatables(): IAnimatable[];
+        getActiveTextures(): BaseTexture[];
+        hasTexture(texture: BaseTexture): boolean;
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): TerrainMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): TerrainMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 404 - 625
dist/preview release/materialsLibrary/babylon.terrainMaterial.js


文件差異過大導致無法顯示
+ 1 - 627
dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js


+ 41 - 0
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.d.ts

@@ -0,0 +1,41 @@
+
+declare module BABYLON {
+    class TriPlanarMaterial extends PushMaterial {
+        mixTexture: BaseTexture;
+        private _diffuseTextureX;
+        diffuseTextureX: BaseTexture;
+        private _diffuseTextureY;
+        diffuseTextureY: BaseTexture;
+        private _diffuseTextureZ;
+        diffuseTextureZ: BaseTexture;
+        private _normalTextureX;
+        normalTextureX: BaseTexture;
+        private _normalTextureY;
+        normalTextureY: BaseTexture;
+        private _normalTextureZ;
+        normalTextureZ: BaseTexture;
+        tileSize: number;
+        diffuseColor: Color3;
+        specularColor: Color3;
+        specularPower: number;
+        private _disableLighting;
+        disableLighting: boolean;
+        private _maxSimultaneousLights;
+        maxSimultaneousLights: number;
+        private _renderId;
+        constructor(name: string, scene: Scene);
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        getAnimatables(): IAnimatable[];
+        getActiveTextures(): BaseTexture[];
+        hasTexture(texture: BaseTexture): boolean;
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): TriPlanarMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): TriPlanarMaterial;
+    }
+}

文件差異過大導致無法顯示
+ 399 - 620
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js


文件差異過大導致無法顯示
+ 1 - 622
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js


+ 110 - 0
dist/preview release/materialsLibrary/babylon.waterMaterial.d.ts

@@ -0,0 +1,110 @@
+
+declare module BABYLON {
+    class WaterMaterial extends PushMaterial {
+        renderTargetSize: Vector2;
+        private _bumpTexture;
+        bumpTexture: BaseTexture;
+        diffuseColor: Color3;
+        specularColor: Color3;
+        specularPower: number;
+        private _disableLighting;
+        disableLighting: boolean;
+        private _maxSimultaneousLights;
+        maxSimultaneousLights: number;
+        /**
+        * @param {number}: Represents the wind force
+        */
+        windForce: number;
+        /**
+        * @param {Vector2}: The direction of the wind in the plane (X, Z)
+        */
+        windDirection: Vector2;
+        /**
+        * @param {number}: Wave height, represents the height of the waves
+        */
+        waveHeight: number;
+        /**
+        * @param {number}: Bump height, represents the bump height related to the bump map
+        */
+        bumpHeight: number;
+        /**
+         * @param {boolean}: Add a smaller moving bump to less steady waves.
+         */
+        private _bumpSuperimpose;
+        bumpSuperimpose: boolean;
+        /**
+         * @param {boolean}: Color refraction and reflection differently with .waterColor2 and .colorBlendFactor2. Non-linear (physically correct) fresnel.
+         */
+        private _fresnelSeparate;
+        fresnelSeparate: boolean;
+        /**
+         * @param {boolean}: bump Waves modify the reflection.
+         */
+        private _bumpAffectsReflection;
+        bumpAffectsReflection: boolean;
+        /**
+        * @param {number}: The water color blended with the refraction (near)
+        */
+        waterColor: Color3;
+        /**
+        * @param {number}: The blend factor related to the water color
+        */
+        colorBlendFactor: number;
+        /**
+         * @param {number}: The water color blended with the reflection (far)
+         */
+        waterColor2: Color3;
+        /**
+         * @param {number}: The blend factor related to the water color (reflection, far)
+         */
+        colorBlendFactor2: number;
+        /**
+        * @param {number}: Represents the maximum length of a wave
+        */
+        waveLength: number;
+        /**
+        * @param {number}: Defines the waves speed
+        */
+        waveSpeed: number;
+        protected _renderTargets: SmartArray<RenderTargetTexture>;
+        private _mesh;
+        private _refractionRTT;
+        private _reflectionRTT;
+        private _reflectionTransform;
+        private _lastTime;
+        private _lastDeltaTime;
+        private _renderId;
+        private _useLogarithmicDepth;
+        private _waitingRenderList;
+        /**
+         * Gets a boolean indicating that current material needs to register RTT
+         */
+        readonly hasRenderTargetTextures: boolean;
+        /**
+        * Constructor
+        */
+        constructor(name: string, scene: Scene, renderTargetSize?: Vector2);
+        useLogarithmicDepth: boolean;
+        readonly refractionTexture: Nullable<RenderTargetTexture>;
+        readonly reflectionTexture: Nullable<RenderTargetTexture>;
+        addToRenderList(node: any): void;
+        enableRenderTargets(enable: boolean): void;
+        getRenderList(): Nullable<AbstractMesh[]>;
+        readonly renderTargetsEnabled: boolean;
+        needAlphaBlending(): boolean;
+        needAlphaTesting(): boolean;
+        getAlphaTestTexture(): Nullable<BaseTexture>;
+        isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
+        bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
+        private _createRenderTargets;
+        getAnimatables(): IAnimatable[];
+        getActiveTextures(): BaseTexture[];
+        hasTexture(texture: BaseTexture): boolean;
+        dispose(forceDisposeEffect?: boolean): void;
+        clone(name: string): WaterMaterial;
+        serialize(): any;
+        getClassName(): string;
+        static Parse(source: any, scene: Scene, rootUrl: string): WaterMaterial;
+        static CreateDefaultMesh(name: string, scene: Scene): Mesh;
+    }
+}

文件差異過大導致無法顯示
+ 637 - 864
dist/preview release/materialsLibrary/babylon.waterMaterial.js


文件差異過大導致無法顯示
+ 1 - 866
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


文件差異過大導致無法顯示
+ 646 - 521
dist/preview release/materialsLibrary/babylonjs.materials.d.ts


文件差異過大導致無法顯示
+ 5019 - 6139
dist/preview release/materialsLibrary/babylonjs.materials.js


文件差異過大導致無法顯示
+ 1 - 2
dist/preview release/materialsLibrary/babylonjs.materials.min.js


文件差異過大導致無法顯示
+ 650 - 1151
dist/preview release/materialsLibrary/babylonjs.materials.module.d.ts


+ 2 - 2
dist/preview release/materialsLibrary/package.json

@@ -4,7 +4,7 @@
     },
     "name": "babylonjs-materials",
     "description": "The Babylon.js materials library is a collection of advanced materials to be used in a Babylon.js scene.",
-    "version": "4.0.0-alpha.4",
+    "version": "4.0.0-alpha.5",
     "repository": {
         "type": "git",
         "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,7 +27,7 @@
     ],
     "license": "Apache-2.0",
     "dependencies": {
-        "babylonjs": "4.0.0-alpha.4"
+        "babylonjs": "4.0.0-alpha.5"
     },
     "engines": {
         "node": "*"

+ 102 - 0
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.d.ts

@@ -0,0 +1,102 @@
+
+declare module BABYLON {
+    /**
+     * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
+     *
+     * It basically takes care rendering the font front the given font size to a texture.
+     * This is used later on in the postprocess.
+     */
+    class AsciiArtFontTexture extends BaseTexture {
+        private _font;
+        private _text;
+        private _charSize;
+        /**
+         * Gets the size of one char in the texture (each char fits in size * size space in the texture).
+         */
+        readonly charSize: number;
+        /**
+         * Create a new instance of the Ascii Art FontTexture class
+         * @param name the name of the texture
+         * @param font the font to use, use the W3C CSS notation
+         * @param text the caracter set to use in the rendering.
+         * @param scene the scene that owns the texture
+         */
+        constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
+        /**
+         * Gets the max char width of a font.
+         * @param font the font to use, use the W3C CSS notation
+         * @return the max char width
+         */
+        private getFontWidth;
+        /**
+         * Gets the max char height of a font.
+         * @param font the font to use, use the W3C CSS notation
+         * @return the max char height
+         */
+        private getFontHeight;
+        /**
+         * Clones the current AsciiArtTexture.
+         * @return the clone of the texture.
+         */
+        clone(): AsciiArtFontTexture;
+        /**
+         * Parses a json object representing the texture and returns an instance of it.
+         * @param source the source JSON representation
+         * @param scene the scene to create the texture for
+         * @return the parsed texture
+         */
+        static Parse(source: any, scene: Scene): AsciiArtFontTexture;
+    }
+    /**
+     * Option available in the Ascii Art Post Process.
+     */
+    interface IAsciiArtPostProcessOptions {
+        /**
+         * The font to use following the w3c font definition.
+         */
+        font?: string;
+        /**
+         * The character set to use in the postprocess.
+         */
+        characterSet?: string;
+        /**
+         * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
+         * This number is defined between 0 and 1;
+         */
+        mixToTile?: number;
+        /**
+         * This defines the amount you want to mix the normal rendering pass in the ascii art.
+         * This number is defined between 0 and 1;
+         */
+        mixToNormal?: number;
+    }
+    /**
+     * AsciiArtPostProcess helps rendering everithing in Ascii Art.
+     *
+     * Simmply add it to your scene and let the nerd that lives in you have fun.
+     * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
+     */
+    class AsciiArtPostProcess extends PostProcess {
+        /**
+         * The font texture used to render the char in the post process.
+         */
+        private _asciiArtFontTexture;
+        /**
+         * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
+         * This number is defined between 0 and 1;
+         */
+        mixToTile: number;
+        /**
+         * This defines the amount you want to mix the normal rendering pass in the ascii art.
+         * This number is defined between 0 and 1;
+         */
+        mixToNormal: number;
+        /**
+         * Instantiates a new Ascii Art Post Process.
+         * @param name the name to give to the postprocess
+         * @camera the camera to apply the post process to.
+         * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
+         */
+        constructor(name: string, camera: Camera, options?: string | IAsciiArtPostProcessOptions);
+    }
+}

文件差異過大導致無法顯示
+ 225 - 0
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.js


文件差異過大導致無法顯示
+ 1 - 435
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


文件差異過大導致無法顯示
+ 225 - 435
dist/preview release/postProcessesLibrary/babylon.asciiArtpostProcess.js


+ 98 - 0
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.d.ts

@@ -0,0 +1,98 @@
+
+declare module BABYLON {
+    /**
+     * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
+     *
+     * It basically takes care rendering the font front the given font size to a texture.
+     * This is used later on in the postprocess.
+     */
+    class DigitalRainFontTexture extends BaseTexture {
+        private _font;
+        private _text;
+        private _charSize;
+        /**
+         * Gets the size of one char in the texture (each char fits in size * size space in the texture).
+         */
+        readonly charSize: number;
+        /**
+         * Create a new instance of the Digital Rain FontTexture class
+         * @param name the name of the texture
+         * @param font the font to use, use the W3C CSS notation
+         * @param text the caracter set to use in the rendering.
+         * @param scene the scene that owns the texture
+         */
+        constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
+        /**
+         * Gets the max char width of a font.
+         * @param font the font to use, use the W3C CSS notation
+         * @return the max char width
+         */
+        private getFontWidth;
+        /**
+         * Gets the max char height of a font.
+         * @param font the font to use, use the W3C CSS notation
+         * @return the max char height
+         */
+        private getFontHeight;
+        /**
+         * Clones the current DigitalRainFontTexture.
+         * @return the clone of the texture.
+         */
+        clone(): DigitalRainFontTexture;
+        /**
+         * Parses a json object representing the texture and returns an instance of it.
+         * @param source the source JSON representation
+         * @param scene the scene to create the texture for
+         * @return the parsed texture
+         */
+        static Parse(source: any, scene: Scene): DigitalRainFontTexture;
+    }
+    /**
+     * Option available in the Digital Rain Post Process.
+     */
+    interface IDigitalRainPostProcessOptions {
+        /**
+         * The font to use following the w3c font definition.
+         */
+        font?: string;
+        /**
+         * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
+         * This number is defined between 0 and 1;
+         */
+        mixToTile?: number;
+        /**
+         * This defines the amount you want to mix the normal rendering pass in the digital rain.
+         * This number is defined between 0 and 1;
+         */
+        mixToNormal?: number;
+    }
+    /**
+     * DigitalRainPostProcess helps rendering everithing in digital rain.
+     *
+     * Simmply add it to your scene and let the nerd that lives in you have fun.
+     * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
+     */
+    class DigitalRainPostProcess extends PostProcess {
+        /**
+         * The font texture used to render the char in the post process.
+         */
+        private _digitalRainFontTexture;
+        /**
+         * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
+         * This number is defined between 0 and 1;
+         */
+        mixToTile: number;
+        /**
+         * This defines the amount you want to mix the normal rendering pass in the digital rain.
+         * This number is defined between 0 and 1;
+         */
+        mixToNormal: number;
+        /**
+         * Instantiates a new Digital Rain Post Process.
+         * @param name the name to give to the postprocess
+         * @camera the camera to apply the post process to.
+         * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
+         */
+        constructor(name: string, camera: Camera, options?: string | IDigitalRainPostProcessOptions);
+    }
+}

文件差異過大導致無法顯示
+ 231 - 440
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.js


文件差異過大導致無法顯示
+ 1 - 440
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


+ 201 - 163
dist/preview release/postProcessesLibrary/babylonjs.postProcess.d.ts

@@ -1,163 +1,201 @@
-/*BabylonJS Postprocess library*/
-// Dependencies for this module:
-//   ../../../../Tools/Gulp/babylonjs
-declare module BABYLON {
-    /**
-        * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
-        *
-        * It basically takes care rendering the font front the given font size to a texture.
-        * This is used later on in the postprocess.
-        */
-    export class AsciiArtFontTexture extends BABYLON.BaseTexture {
-            /**
-                * Gets the size of one char in the texture (each char fits in size * size space in the texture).
-                */
-            readonly charSize: number;
-            /**
-                * Create a new instance of the Ascii Art FontTexture class
-                * @param name the name of the texture
-                * @param font the font to use, use the W3C CSS notation
-                * @param text the caracter set to use in the rendering.
-                * @param scene the scene that owns the texture
-                */
-            constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
-            /**
-                * Clones the current AsciiArtTexture.
-                * @return the clone of the texture.
-                */
-            clone(): AsciiArtFontTexture;
-            /**
-                * Parses a json object representing the texture and returns an instance of it.
-                * @param source the source JSON representation
-                * @param scene the scene to create the texture for
-                * @return the parsed texture
-                */
-            static Parse(source: any, scene: BABYLON.Scene): AsciiArtFontTexture;
-    }
-    /**
-        * Option available in the Ascii Art Post Process.
-        */
-    export interface IAsciiArtPostProcessOptions {
-            /**
-                * The font to use following the w3c font definition.
-                */
-            font?: string;
-            /**
-                * The character set to use in the postprocess.
-                */
-            characterSet?: string;
-            /**
-                * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
-                * This number is defined between 0 and 1;
-                */
-            mixToTile?: number;
-            /**
-                * This defines the amount you want to mix the normal rendering pass in the ascii art.
-                * This number is defined between 0 and 1;
-                */
-            mixToNormal?: number;
-    }
-    /**
-        * AsciiArtPostProcess helps rendering everithing in Ascii Art.
-        *
-        * Simmply add it to your scene and let the nerd that lives in you have fun.
-        * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
-        */
-    export class AsciiArtPostProcess extends BABYLON.PostProcess {
-            /**
-                * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
-                * This number is defined between 0 and 1;
-                */
-            mixToTile: number;
-            /**
-                * This defines the amount you want to mix the normal rendering pass in the ascii art.
-                * This number is defined between 0 and 1;
-                */
-            mixToNormal: number;
-            /**
-                * Instantiates a new Ascii Art Post Process.
-                * @param name the name to give to the postprocess
-                * @camera the camera to apply the post process to.
-                * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
-                */
-            constructor(name: string, camera: BABYLON.Camera, options?: string | IAsciiArtPostProcessOptions);
-    }
-}
-declare module BABYLON {
-    /**
-        * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
-        *
-        * It basically takes care rendering the font front the given font size to a texture.
-        * This is used later on in the postprocess.
-        */
-    export class DigitalRainFontTexture extends BABYLON.BaseTexture {
-            /**
-                * Gets the size of one char in the texture (each char fits in size * size space in the texture).
-                */
-            readonly charSize: number;
-            /**
-                * Create a new instance of the Digital Rain FontTexture class
-                * @param name the name of the texture
-                * @param font the font to use, use the W3C CSS notation
-                * @param text the caracter set to use in the rendering.
-                * @param scene the scene that owns the texture
-                */
-            constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
-            /**
-                * Clones the current DigitalRainFontTexture.
-                * @return the clone of the texture.
-                */
-            clone(): DigitalRainFontTexture;
-            /**
-                * Parses a json object representing the texture and returns an instance of it.
-                * @param source the source JSON representation
-                * @param scene the scene to create the texture for
-                * @return the parsed texture
-                */
-            static Parse(source: any, scene: BABYLON.Scene): DigitalRainFontTexture;
-    }
-    /**
-        * Option available in the Digital Rain Post Process.
-        */
-    export interface IDigitalRainPostProcessOptions {
-            /**
-                * The font to use following the w3c font definition.
-                */
-            font?: string;
-            /**
-                * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
-                * This number is defined between 0 and 1;
-                */
-            mixToTile?: number;
-            /**
-                * This defines the amount you want to mix the normal rendering pass in the digital rain.
-                * This number is defined between 0 and 1;
-                */
-            mixToNormal?: number;
-    }
-    /**
-        * DigitalRainPostProcess helps rendering everithing in digital rain.
-        *
-        * Simmply add it to your scene and let the nerd that lives in you have fun.
-        * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
-        */
-    export class DigitalRainPostProcess extends BABYLON.PostProcess {
-            /**
-                * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
-                * This number is defined between 0 and 1;
-                */
-            mixToTile: number;
-            /**
-                * This defines the amount you want to mix the normal rendering pass in the digital rain.
-                * This number is defined between 0 and 1;
-                */
-            mixToNormal: number;
-            /**
-                * Instantiates a new Digital Rain Post Process.
-                * @param name the name to give to the postprocess
-                * @camera the camera to apply the post process to.
-                * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
-                */
-            constructor(name: string, camera: BABYLON.Camera, options?: string | IDigitalRainPostProcessOptions);
-    }
-}
+
+declare module BABYLON {
+    /**
+     * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
+     *
+     * It basically takes care rendering the font front the given font size to a texture.
+     * This is used later on in the postprocess.
+     */
+    class AsciiArtFontTexture extends BaseTexture {
+        private _font;
+        private _text;
+        private _charSize;
+        /**
+         * Gets the size of one char in the texture (each char fits in size * size space in the texture).
+         */
+        readonly charSize: number;
+        /**
+         * Create a new instance of the Ascii Art FontTexture class
+         * @param name the name of the texture
+         * @param font the font to use, use the W3C CSS notation
+         * @param text the caracter set to use in the rendering.
+         * @param scene the scene that owns the texture
+         */
+        constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
+        /**
+         * Gets the max char width of a font.
+         * @param font the font to use, use the W3C CSS notation
+         * @return the max char width
+         */
+        private getFontWidth;
+        /**
+         * Gets the max char height of a font.
+         * @param font the font to use, use the W3C CSS notation
+         * @return the max char height
+         */
+        private getFontHeight;
+        /**
+         * Clones the current AsciiArtTexture.
+         * @return the clone of the texture.
+         */
+        clone(): AsciiArtFontTexture;
+        /**
+         * Parses a json object representing the texture and returns an instance of it.
+         * @param source the source JSON representation
+         * @param scene the scene to create the texture for
+         * @return the parsed texture
+         */
+        static Parse(source: any, scene: Scene): AsciiArtFontTexture;
+    }
+    /**
+     * Option available in the Ascii Art Post Process.
+     */
+    interface IAsciiArtPostProcessOptions {
+        /**
+         * The font to use following the w3c font definition.
+         */
+        font?: string;
+        /**
+         * The character set to use in the postprocess.
+         */
+        characterSet?: string;
+        /**
+         * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
+         * This number is defined between 0 and 1;
+         */
+        mixToTile?: number;
+        /**
+         * This defines the amount you want to mix the normal rendering pass in the ascii art.
+         * This number is defined between 0 and 1;
+         */
+        mixToNormal?: number;
+    }
+    /**
+     * AsciiArtPostProcess helps rendering everithing in Ascii Art.
+     *
+     * Simmply add it to your scene and let the nerd that lives in you have fun.
+     * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
+     */
+    class AsciiArtPostProcess extends PostProcess {
+        /**
+         * The font texture used to render the char in the post process.
+         */
+        private _asciiArtFontTexture;
+        /**
+         * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
+         * This number is defined between 0 and 1;
+         */
+        mixToTile: number;
+        /**
+         * This defines the amount you want to mix the normal rendering pass in the ascii art.
+         * This number is defined between 0 and 1;
+         */
+        mixToNormal: number;
+        /**
+         * Instantiates a new Ascii Art Post Process.
+         * @param name the name to give to the postprocess
+         * @camera the camera to apply the post process to.
+         * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
+         */
+        constructor(name: string, camera: Camera, options?: string | IAsciiArtPostProcessOptions);
+    }
+}
+
+
+declare module BABYLON {
+    /**
+     * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
+     *
+     * It basically takes care rendering the font front the given font size to a texture.
+     * This is used later on in the postprocess.
+     */
+    class DigitalRainFontTexture extends BaseTexture {
+        private _font;
+        private _text;
+        private _charSize;
+        /**
+         * Gets the size of one char in the texture (each char fits in size * size space in the texture).
+         */
+        readonly charSize: number;
+        /**
+         * Create a new instance of the Digital Rain FontTexture class
+         * @param name the name of the texture
+         * @param font the font to use, use the W3C CSS notation
+         * @param text the caracter set to use in the rendering.
+         * @param scene the scene that owns the texture
+         */
+        constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
+        /**
+         * Gets the max char width of a font.
+         * @param font the font to use, use the W3C CSS notation
+         * @return the max char width
+         */
+        private getFontWidth;
+        /**
+         * Gets the max char height of a font.
+         * @param font the font to use, use the W3C CSS notation
+         * @return the max char height
+         */
+        private getFontHeight;
+        /**
+         * Clones the current DigitalRainFontTexture.
+         * @return the clone of the texture.
+         */
+        clone(): DigitalRainFontTexture;
+        /**
+         * Parses a json object representing the texture and returns an instance of it.
+         * @param source the source JSON representation
+         * @param scene the scene to create the texture for
+         * @return the parsed texture
+         */
+        static Parse(source: any, scene: Scene): DigitalRainFontTexture;
+    }
+    /**
+     * Option available in the Digital Rain Post Process.
+     */
+    interface IDigitalRainPostProcessOptions {
+        /**
+         * The font to use following the w3c font definition.
+         */
+        font?: string;
+        /**
+         * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
+         * This number is defined between 0 and 1;
+         */
+        mixToTile?: number;
+        /**
+         * This defines the amount you want to mix the normal rendering pass in the digital rain.
+         * This number is defined between 0 and 1;
+         */
+        mixToNormal?: number;
+    }
+    /**
+     * DigitalRainPostProcess helps rendering everithing in digital rain.
+     *
+     * Simmply add it to your scene and let the nerd that lives in you have fun.
+     * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
+     */
+    class DigitalRainPostProcess extends PostProcess {
+        /**
+         * The font texture used to render the char in the post process.
+         */
+        private _digitalRainFontTexture;
+        /**
+         * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
+         * This number is defined between 0 and 1;
+         */
+        mixToTile: number;
+        /**
+         * This defines the amount you want to mix the normal rendering pass in the digital rain.
+         * This number is defined between 0 and 1;
+         */
+        mixToNormal: number;
+        /**
+         * Instantiates a new Digital Rain Post Process.
+         * @param name the name to give to the postprocess
+         * @camera the camera to apply the post process to.
+         * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
+         */
+        constructor(name: string, camera: Camera, options?: string | IDigitalRainPostProcessOptions);
+    }
+}

文件差異過大導致無法顯示
+ 450 - 719
dist/preview release/postProcessesLibrary/babylonjs.postProcess.js


+ 0 - 0
dist/preview release/postProcessesLibrary/babylonjs.postProcess.min.js


部分文件因文件數量過多而無法顯示