Jelajahi Sumber

baseEngine - engine splitting part 2

David Catuhe 6 tahun lalu
induk
melakukan
c7bca52e5d
39 mengubah file dengan 39500 tambahan dan 35996 penghapusan
  1. 4285 3943
      Playground/babylon.d.txt
  2. 4 4
      Tools/Publisher/tasks/versionNumberManager.js
  3. 1 1
      Viewer/src/configuration/configuration.ts
  4. 4271 3915
      dist/preview release/babylon.d.ts
  5. 2 2
      dist/preview release/babylon.js
  6. 2295 1792
      dist/preview release/babylon.max.js
  7. 1 1
      dist/preview release/babylon.max.js.map
  8. 8926 8194
      dist/preview release/babylon.module.d.ts
  9. 4270 3922
      dist/preview release/documentation.d.ts
  10. 48 48
      dist/preview release/gui/babylon.gui.js
  11. 1 1
      dist/preview release/gui/babylon.gui.js.map
  12. 1 1
      dist/preview release/packagesSizeBaseLine.json
  13. 8918 8202
      dist/preview release/viewer/babylon.module.d.ts
  14. 1 0
      dist/preview release/viewer/babylon.viewer.d.ts
  15. 28 16
      dist/preview release/viewer/babylon.viewer.js
  16. 1 1
      dist/preview release/viewer/babylon.viewer.max.js
  17. 2 1
      dist/preview release/viewer/babylon.viewer.module.d.ts
  18. 12 11
      src/Engines/Extensions/engine.cubeTexture.ts
  19. 6 6
      src/Engines/Extensions/engine.multiRender.ts
  20. 10 10
      src/Engines/Extensions/engine.rawTexture.ts
  21. 4 4
      src/Engines/Extensions/engine.renderTarget.ts
  22. 1 1
      src/Engines/Extensions/engine.webVR.ts
  23. 2 2
      src/Engines/WebGL/webGLPipelineContext.ts
  24. 5591 0
      src/Engines/baseEngine.ts
  25. 13 0
      src/Engines/depthTextureCreationOptions.ts
  26. 342 5884
      src/Engines/engine.ts
  27. 87 0
      src/Engines/engineCapabilities.ts
  28. 3 0
      src/Engines/index.ts
  29. 35 0
      src/Engines/instancingAttributeInfo.ts
  30. 5 3
      src/Engines/nativeEngine.ts
  31. 300 7
      src/Engines/nullEngine.ts
  32. 4 4
      src/Materials/Textures/internalTexture.ts
  33. 2 1
      src/Materials/effect.ts
  34. 13 11
      src/Misc/basis.ts
  35. 5 5
      src/Misc/dds.ts
  36. 3 2
      src/Misc/environmentTextureTools.ts
  37. 2 1
      src/Misc/rgbdTextureTools.ts
  38. 4 0
      tests/es6Modules/baseEngineOnly.ts
  39. 1 0
      tests/es6Modules/webpack.config.js

File diff ditekan karena terlalu besar
+ 4285 - 3943
Playground/babylon.d.txt


+ 4 - 4
Tools/Publisher/tasks/versionNumberManager.js

@@ -5,13 +5,13 @@ const colorConsole = require("../../NodeHelpers/colorConsole");
 
 // Global Variables.
 const config = require("../../Config/config.js");
-const enginePath = path.join(config.core.computed.mainDirectory, "Engines/engine.ts");
+const enginePath = path.join(config.core.computed.mainDirectory, "Engines/baseEngine.ts");
 
 /**
  * Get the version from the engine class for Babylon
  */
 function getEngineVersion() {
-    colorConsole.log("Get version from engine.ts", enginePath);
+    colorConsole.log("Get version from baseEngine.ts", enginePath);
     const engineContent = fs.readFileSync(enginePath).toString();
 
     const versionRegex = new RegExp(`public static get Version\\(\\): string {\\s*return "(\\S*)";\\s*}`, "gm");
@@ -23,7 +23,7 @@ function getEngineVersion() {
         return version;
     }
 
-    colorConsole.error("Version not found in engine.ts");
+    colorConsole.error("Version not found in baseEngine.ts");
     process.exit(1);
 }
 
@@ -31,7 +31,7 @@ function getEngineVersion() {
  * Update the version in the engine class for Babylon
  */
 function updateEngineVersion(newVersion) {
-    colorConsole.log("Updating version in engine.ts to: " + newVersion.green);
+    colorConsole.log("Updating version in baseEngine.ts to: " + newVersion.green);
     let engineContent = fs.readFileSync(enginePath).toString();
     let replaced = engineContent.replace(/(public static get Version\(\): string {\s*return ")(.*)(";\s*})/g, "$1" + newVersion + "$3");
     replaced = replaced.replace(/(public static get NpmPackage\(\): string {\s*return ")(.*)(";\s*})/g, "$1" + "babylonjs@" + newVersion + "$3");

+ 1 - 1
Viewer/src/configuration/configuration.ts

@@ -1,6 +1,6 @@
-import { EngineOptions } from 'babylonjs/Engines/engine';
 import { ICameraConfiguration, IDefaultRenderingPipelineConfiguration, IGroundConfiguration, ILightConfiguration, IModelConfiguration, IObserversConfiguration, ISceneConfiguration, ISceneOptimizerConfiguration, ISkyboxConfiguration, ITemplateConfiguration, IVRConfiguration } from './interfaces';
 import { IEnvironmentMapConfiguration } from './interfaces/environmentMapConfiguration';
+import { EngineOptions } from 'babylonjs/Engines/baseEngine';
 
 export function getConfigurationKey(key: string, configObject: any) {
     let splits = key.split('.');

File diff ditekan karena terlalu besar
+ 4271 - 3915
dist/preview release/babylon.d.ts


File diff ditekan karena terlalu besar
+ 2 - 2
dist/preview release/babylon.js


File diff ditekan karena terlalu besar
+ 2295 - 1792
dist/preview release/babylon.max.js


File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/babylon.max.js.map


File diff ditekan karena terlalu besar
+ 8926 - 8194
dist/preview release/babylon.module.d.ts


File diff ditekan karena terlalu besar
+ 4270 - 3922
dist/preview release/documentation.d.ts


+ 48 - 48
dist/preview release/gui/babylon.gui.js

@@ -7,7 +7,7 @@
 		exports["babylonjs-gui"] = factory(require("babylonjs"));
 	else
 		root["BABYLON"] = root["BABYLON"] || {}, root["BABYLON"]["GUI"] = factory(root["BABYLON"]);
-})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Maths_math__) {
+})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), function(__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_perfCounter__) {
 return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
@@ -366,7 +366,7 @@ module.exports = g;
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AdvancedDynamicTextureInstrumentation", function() { return AdvancedDynamicTextureInstrumentation; });
-/* harmony import */ var babylonjs_Misc_perfCounter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/perfCounter */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_perfCounter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/perfCounter */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_perfCounter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_perfCounter__WEBPACK_IMPORTED_MODULE_0__);
 
 /**
@@ -509,7 +509,7 @@ var AdvancedDynamicTextureInstrumentation = /** @class */ (function () {
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AdvancedDynamicTexture", function() { return AdvancedDynamicTexture; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _controls_container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./controls/container */ "./2D/controls/container.ts");
 /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style */ "./2D/style.ts");
@@ -1419,7 +1419,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
 /* harmony import */ var _textBlock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./textBlock */ "./2D/controls/textBlock.ts");
 /* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./image */ "./2D/controls/image.ts");
-/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_5__);
 
 
@@ -1651,7 +1651,7 @@ babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_5__["_TypeStore"].RegisteredTy
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Checkbox", function() { return Checkbox; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
 /* harmony import */ var _stackPanel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stackPanel */ "./2D/controls/stackPanel.ts");
@@ -1834,7 +1834,7 @@ babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPicker", function() { return ColorPicker; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
 /* harmony import */ var _inputText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./inputText */ "./2D/controls/inputText.ts");
@@ -3223,7 +3223,7 @@ babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Container", function() { return Container; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/logger */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/logger */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_logger__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_logger__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
 /* harmony import */ var _measure__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../measure */ "./2D/measure.ts");
@@ -3638,7 +3638,7 @@ babylonjs_Misc_logger__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Control", function() { return Control; });
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__);
 /* harmony import */ var _valueAndUnit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../valueAndUnit */ "./2D/valueAndUnit.ts");
 /* harmony import */ var _measure__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../measure */ "./2D/measure.ts");
@@ -5509,7 +5509,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DisplayGrid", function() { return DisplayGrid; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
-/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__);
 
 
@@ -5742,7 +5742,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
 /* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./container */ "./2D/controls/container.ts");
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
-/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_3__);
 
 
@@ -5839,7 +5839,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./container */ "./2D/controls/container.ts");
 /* harmony import */ var _valueAndUnit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../valueAndUnit */ "./2D/valueAndUnit.ts");
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
-/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_4__);
 
 
@@ -6297,7 +6297,7 @@ babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_4__["_TypeStore"].RegisteredTypes[
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Image", function() { return Image; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
 
@@ -7123,7 +7123,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputPassword", function() { return InputPassword; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
 /* harmony import */ var _inputText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./inputText */ "./2D/controls/inputText.ts");
-/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__);
 
 
@@ -7162,7 +7162,7 @@ babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__["_TypeStore"].RegisteredTy
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputText", function() { return InputText; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
 /* harmony import */ var _valueAndUnit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../valueAndUnit */ "./2D/valueAndUnit.ts");
@@ -8175,7 +8175,7 @@ babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredT
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Line", function() { return Line; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
 /* harmony import */ var _valueAndUnit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../valueAndUnit */ "./2D/valueAndUnit.ts");
@@ -8445,7 +8445,7 @@ babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].RegisteredTypes[
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiLine", function() { return MultiLine; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Meshes_abstractMesh__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Meshes/abstractMesh */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Meshes_abstractMesh__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Meshes/abstractMesh */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Meshes_abstractMesh__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Meshes_abstractMesh__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
 /* harmony import */ var _multiLinePoint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../multiLinePoint */ "./2D/multiLinePoint.ts");
@@ -8714,7 +8714,7 @@ babylonjs_Meshes_abstractMesh__WEBPACK_IMPORTED_MODULE_1__["_TypeStore"].Registe
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RadioButton", function() { return RadioButton; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
 /* harmony import */ var _stackPanel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stackPanel */ "./2D/controls/stackPanel.ts");
@@ -8921,7 +8921,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rectangle", function() { return Rectangle; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
 /* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./container */ "./2D/controls/container.ts");
-/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__);
 
 
@@ -9065,7 +9065,7 @@ babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__["_TypeStore"].RegisteredTy
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollViewer", function() { return ScrollViewer; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Events_pointerEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Events/pointerEvents */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Events_pointerEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Events/pointerEvents */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Events_pointerEvents__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Events_pointerEvents__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _rectangle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rectangle */ "./2D/controls/rectangle.ts");
 /* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../grid */ "./2D/controls/grid.ts");
@@ -10158,7 +10158,7 @@ var SelectionPanel = /** @class */ (function (_super) {
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseSlider", function() { return BaseSlider; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../control */ "./2D/controls/control.ts");
 /* harmony import */ var _valueAndUnit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../valueAndUnit */ "./2D/valueAndUnit.ts");
@@ -10488,7 +10488,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
 /* harmony import */ var _baseSlider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./baseSlider */ "./2D/controls/sliders/baseSlider.ts");
 /* harmony import */ var _measure__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../measure */ "./2D/measure.ts");
-/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_3__);
 
 
@@ -10812,7 +10812,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return Slider; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
 /* harmony import */ var _baseSlider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./baseSlider */ "./2D/controls/sliders/baseSlider.ts");
-/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__);
 
 
@@ -11067,7 +11067,7 @@ babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_2__["_TypeStore"].RegisteredTy
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackPanel", function() { return StackPanel; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./container */ "./2D/controls/container.ts");
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
@@ -11335,7 +11335,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextWrapping", function() { return TextWrapping; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextBlock", function() { return TextBlock; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _valueAndUnit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../valueAndUnit */ "./2D/valueAndUnit.ts");
 /* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./control */ "./2D/controls/control.ts");
@@ -11798,7 +11798,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyPropertySet", function() { return KeyPropertySet; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualKeyboard", function() { return VirtualKeyboard; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _stackPanel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stackPanel */ "./2D/controls/stackPanel.ts");
 /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./button */ "./2D/controls/button.ts");
@@ -12185,7 +12185,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Vector2WithInfo", function() { return Vector2WithInfo; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Matrix2D", function() { return Matrix2D; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__);
 
 
@@ -12409,7 +12409,7 @@ var Matrix2D = /** @class */ (function () {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Measure", function() { return Measure; });
-/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_0__);
 
 
@@ -12542,7 +12542,7 @@ var Measure = /** @class */ (function () {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiLinePoint", function() { return MultiLinePoint; });
-/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_0__);
 /* harmony import */ var _valueAndUnit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./valueAndUnit */ "./2D/valueAndUnit.ts");
 
@@ -12685,7 +12685,7 @@ var MultiLinePoint = /** @class */ (function () {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Style", function() { return Style; });
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__);
 /* harmony import */ var _valueAndUnit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./valueAndUnit */ "./2D/valueAndUnit.ts");
 
@@ -12991,7 +12991,7 @@ var ValueAndUnit = /** @class */ (function () {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "XmlLoader", function() { return XmlLoader; });
-/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_typeStore__WEBPACK_IMPORTED_MODULE_0__);
 
 /**
@@ -13306,7 +13306,7 @@ var XmlLoader = /** @class */ (function () {
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractButton3D", function() { return AbstractButton3D; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Meshes_transformNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Meshes/transformNode */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Meshes_transformNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Meshes/transformNode */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Meshes_transformNode__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Meshes_transformNode__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _control3D__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control3D */ "./3D/controls/control3D.ts");
 
@@ -13349,7 +13349,7 @@ var AbstractButton3D = /** @class */ (function (_super) {
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button3D", function() { return Button3D; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _abstractButton3D__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./abstractButton3D */ "./3D/controls/abstractButton3D.ts");
 /* harmony import */ var _2D_advancedDynamicTexture__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../2D/advancedDynamicTexture */ "./2D/advancedDynamicTexture.ts");
@@ -13526,7 +13526,7 @@ var Button3D = /** @class */ (function (_super) {
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Container3D", function() { return Container3D; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Meshes_transformNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Meshes/transformNode */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Meshes_transformNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Meshes/transformNode */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Meshes_transformNode__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Meshes_transformNode__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _control3D__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control3D */ "./3D/controls/control3D.ts");
 
@@ -13683,7 +13683,7 @@ var Container3D = /** @class */ (function (_super) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Control3D", function() { return Control3D; });
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__);
 /* harmony import */ var _vector3WithInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../vector3WithInfo */ "./3D/vector3WithInfo.ts");
 
@@ -14089,7 +14089,7 @@ var Control3D = /** @class */ (function () {
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CylinderPanel", function() { return CylinderPanel; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _volumeBasedPanel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./volumeBasedPanel */ "./3D/controls/volumeBasedPanel.ts");
 /* harmony import */ var _container3D__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./container3D */ "./3D/controls/container3D.ts");
@@ -14175,7 +14175,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HolographicButton", function() { return HolographicButton; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
 /* harmony import */ var _button3D__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./button3D */ "./3D/controls/button3D.ts");
-/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_2__);
 /* harmony import */ var _materials_fluentMaterial__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../materials/fluentMaterial */ "./3D/materials/fluentMaterial.ts");
 /* harmony import */ var _2D_controls_stackPanel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../2D/controls/stackPanel */ "./2D/controls/stackPanel.ts");
@@ -14651,7 +14651,7 @@ var MeshButton3D = /** @class */ (function (_super) {
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlanePanel", function() { return PlanePanel; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _container3D__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./container3D */ "./3D/controls/container3D.ts");
 /* harmony import */ var _volumeBasedPanel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./volumeBasedPanel */ "./3D/controls/volumeBasedPanel.ts");
@@ -14706,7 +14706,7 @@ var PlanePanel = /** @class */ (function (_super) {
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScatterPanel", function() { return ScatterPanel; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _volumeBasedPanel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./volumeBasedPanel */ "./3D/controls/volumeBasedPanel.ts");
 /* harmony import */ var _container3D__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./container3D */ "./3D/controls/container3D.ts");
@@ -14833,7 +14833,7 @@ var ScatterPanel = /** @class */ (function (_super) {
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SpherePanel", function() { return SpherePanel; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _volumeBasedPanel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./volumeBasedPanel */ "./3D/controls/volumeBasedPanel.ts");
 /* harmony import */ var _container3D__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./container3D */ "./3D/controls/container3D.ts");
@@ -14918,7 +14918,7 @@ var SpherePanel = /** @class */ (function (_super) {
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StackPanel3D", function() { return StackPanel3D; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _container3D__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./container3D */ "./3D/controls/container3D.ts");
 
@@ -15043,7 +15043,7 @@ var StackPanel3D = /** @class */ (function (_super) {
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VolumeBasedPanel", function() { return VolumeBasedPanel; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/tools */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _container3D__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./container3D */ "./3D/controls/container3D.ts");
 
@@ -15234,7 +15234,7 @@ var VolumeBasedPanel = /** @class */ (function (_super) {
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GUI3DManager", function() { return GUI3DManager; });
-/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_0__);
 /* harmony import */ var _controls_container3D__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./controls/container3D */ "./3D/controls/container3D.ts");
 
@@ -15501,7 +15501,7 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FluentMaterialDefines", function() { return FluentMaterialDefines; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FluentMaterial", function() { return FluentMaterial; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/decorators */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
 /* harmony import */ var _shaders_fluent_vertex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shaders/fluent.vertex */ "./3D/materials/shaders/fluent.vertex.ts");
 /* harmony import */ var _shaders_fluent_fragment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./shaders/fluent.fragment */ "./3D/materials/shaders/fluent.fragment.ts");
@@ -15823,7 +15823,7 @@ __webpack_require__.r(__webpack_exports__);
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fluentPixelShader", function() { return fluentPixelShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 var name = 'fluentPixelShader';
@@ -15845,7 +15845,7 @@ var fluentPixelShader = { name: name, shader: shader };
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fluentVertexShader", function() { return fluentVertexShader; });
-/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/effect */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Materials_effect__WEBPACK_IMPORTED_MODULE_0__);
 
 var name = 'fluentVertexShader';
@@ -15868,7 +15868,7 @@ var fluentVertexShader = { name: name, shader: shader };
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Vector3WithInfo", function() { return Vector3WithInfo; });
 /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
-/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Maths/math");
+/* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Maths/math */ "babylonjs/Misc/perfCounter");
 /* harmony import */ var babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Maths_math__WEBPACK_IMPORTED_MODULE_1__);
 
 
@@ -16166,14 +16166,14 @@ if (typeof globalObject !== "undefined") {
 
 /***/ }),
 
-/***/ "babylonjs/Maths/math":
+/***/ "babylonjs/Misc/perfCounter":
 /*!****************************************************************************************************!*\
   !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
   \****************************************************************************************************/
 /*! no static exports found */
 /***/ (function(module, exports) {
 
-module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Maths_math__;
+module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_perfCounter__;
 
 /***/ })
 

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/gui/babylon.gui.js.map


+ 1 - 1
dist/preview release/packagesSizeBaseLine.json

@@ -1 +1 @@
-{"engineOnly":161797,"sceneOnly":503756,"minGridMaterial":633998,"minStandardMaterial":763472}
+{"baseEngineOnly":161797, "engineOnly":161797,"sceneOnly":503756,"minGridMaterial":633998,"minStandardMaterial":763472}

File diff ditekan karena terlalu besar
+ 8918 - 8202
dist/preview release/viewer/babylon.module.d.ts


+ 1 - 0
dist/preview release/viewer/babylon.viewer.d.ts

@@ -20,6 +20,7 @@
 //   ../../../../../Tools/Gulp/babylonjs/Maths/math
 //   ../../../../../Tools/Gulp/babylonjs-loaders/glTF/glTFFileLoader
 //   ../../../../../Tools/Gulp/babylonjs/Materials/Textures/baseTexture
+//   ../../../../../Tools/Gulp/babylonjs/Engines/baseEngine
 //   ../../../../../Tools/Gulp/babylonjs/Misc/sceneOptimizer
 //   ../../../../../Tools/Gulp/babylonjs/Cameras/arcRotateCamera
 //   ../../../../../Tools/Gulp/babylonjs/Lights/light

File diff ditekan karena terlalu besar
+ 28 - 16
dist/preview release/viewer/babylon.viewer.js


File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 2 - 1
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -21,6 +21,7 @@
 //   ../../../../../Tools/Gulp/babylonjs/Maths/math
 //   ../../../../../Tools/Gulp/babylonjs-loaders/glTF/glTFFileLoader
 //   ../../../../../Tools/Gulp/babylonjs/Materials/Textures/baseTexture
+//   ../../../../../Tools/Gulp/babylonjs/Engines/baseEngine
 //   ../../../../../Tools/Gulp/babylonjs/Misc/sceneOptimizer
 //   ../../../../../Tools/Gulp/babylonjs/Cameras/arcRotateCamera
 //   ../../../../../Tools/Gulp/babylonjs/Lights/light
@@ -1061,9 +1062,9 @@ declare module 'babylonjs-viewer/configuration' {
 }
 
 declare module 'babylonjs-viewer/configuration/configuration' {
-    import { EngineOptions } from 'babylonjs/Engines/engine';
     import { ICameraConfiguration, IDefaultRenderingPipelineConfiguration, IGroundConfiguration, ILightConfiguration, IModelConfiguration, IObserversConfiguration, ISceneConfiguration, ISceneOptimizerConfiguration, ISkyboxConfiguration, ITemplateConfiguration, IVRConfiguration } from 'babylonjs-viewer/configuration/interfaces';
     import { IEnvironmentMapConfiguration } from 'babylonjs-viewer/configuration/interfaces/environmentMapConfiguration';
+    import { EngineOptions } from 'babylonjs/Engines/baseEngine';
     export function getConfigurationKey(key: string, configObject: any): any;
     export interface ViewerConfiguration {
             version?: string;

+ 12 - 11
src/Engines/Extensions/engine.cubeTexture.ts

@@ -1,4 +1,4 @@
-import { Engine, DepthTextureCreationOptions } from "../../Engines/engine";
+import { BaseEngine } from "../../Engines/baseEngine";
 import { InternalTexture } from '../../Materials/Textures/internalTexture';
 import { Logger } from '../../Misc/logger';
 import { Nullable } from '../../types';
@@ -6,9 +6,10 @@ import { Scene } from '../../scene';
 import { IInternalTextureLoader } from '../../Materials/Textures/internalTextureLoader';
 import { WebRequest } from '../../Misc/webRequest';
 import { FileTools } from '../../Misc/fileTools';
+import { DepthTextureCreationOptions } from '../depthTextureCreationOptions';
 
-declare module "../../Engines/engine" {
-    export interface Engine {
+declare module "../../Engines/baseEngine" {
+    export interface BaseEngine {
         /**
          * Creates a depth stencil cube texture.
          * This is only available in WebGL 2.
@@ -88,7 +89,7 @@ declare module "../../Engines/engine" {
     }
 }
 
-Engine.prototype._createDepthStencilCubeTexture = function(size: number, options: DepthTextureCreationOptions): InternalTexture {
+BaseEngine.prototype._createDepthStencilCubeTexture = function(size: number, options: DepthTextureCreationOptions): InternalTexture {
     var internalTexture = new InternalTexture(this, InternalTexture.DATASOURCE_UNKNOWN);
     internalTexture.isCube = true;
 
@@ -124,7 +125,7 @@ Engine.prototype._createDepthStencilCubeTexture = function(size: number, options
     return internalTexture;
 };
 
-Engine.prototype._partialLoadFile = function(url: string, index: number, loadedFiles: (string | ArrayBuffer)[], onfinish: (files: (string | ArrayBuffer)[]) => void, onErrorCallBack: Nullable<(message?: string, exception?: any) => void> = null): void {
+BaseEngine.prototype._partialLoadFile = function(url: string, index: number, loadedFiles: (string | ArrayBuffer)[], onfinish: (files: (string | ArrayBuffer)[]) => void, onErrorCallBack: Nullable<(message?: string, exception?: any) => void> = null): void {
     var onload = (data: string | ArrayBuffer) => {
         loadedFiles[index] = data;
         (<any>loadedFiles)._internalCount++;
@@ -143,7 +144,7 @@ Engine.prototype._partialLoadFile = function(url: string, index: number, loadedF
     this._loadFile(url, onload, undefined, undefined, true, onerror);
 };
 
-Engine.prototype._cascadeLoadFiles = function(scene: Nullable<Scene>, onfinish: (images: (string | ArrayBuffer)[]) => void, files: string[], onError: Nullable<(message?: string, exception?: any) => void> = null): void {
+BaseEngine.prototype._cascadeLoadFiles = function(scene: Nullable<Scene>, onfinish: (images: (string | ArrayBuffer)[]) => void, files: string[], onError: Nullable<(message?: string, exception?: any) => void> = null): void {
     var loadedFiles: (string | ArrayBuffer)[] = [];
     (<any>loadedFiles)._internalCount = 0;
 
@@ -152,7 +153,7 @@ Engine.prototype._cascadeLoadFiles = function(scene: Nullable<Scene>, onfinish:
     }
 };
 
-Engine.prototype._cascadeLoadImgs = function(scene: Nullable<Scene>,
+BaseEngine.prototype._cascadeLoadImgs = function(scene: Nullable<Scene>,
     onfinish: (images: HTMLImageElement[]) => void, files: string[], onError: Nullable<(message?: string, exception?: any) => void> = null) {
 
     var loadedImages: HTMLImageElement[] = [];
@@ -163,7 +164,7 @@ Engine.prototype._cascadeLoadImgs = function(scene: Nullable<Scene>,
     }
 };
 
-Engine.prototype._partialLoadImg = function(url: string, index: number, loadedImages: HTMLImageElement[], scene: Nullable<Scene>,
+BaseEngine.prototype._partialLoadImg = function(url: string, index: number, loadedImages: HTMLImageElement[], scene: Nullable<Scene>,
     onfinish: (images: HTMLImageElement[]) => void, onErrorCallBack: Nullable<(message?: string, exception?: any) => void> = null) {
 
     var img: HTMLImageElement;
@@ -197,7 +198,7 @@ Engine.prototype._partialLoadImg = function(url: string, index: number, loadedIm
     }
 };
 
-Engine.prototype.createCubeTexture = function(rootUrl: string, scene: Nullable<Scene>, files: Nullable<string[]>, noMipmap?: boolean, onLoad: Nullable<(data?: any) => void> = null, onError: Nullable<(message?: string, exception?: any) => void> = null, format?: number, forcedExtension: any = null, createPolynomials: boolean = false, lodScale: number = 0, lodOffset: number = 0, fallback: Nullable<InternalTexture> = null, excludeLoaders: Array<IInternalTextureLoader> = []): InternalTexture {
+BaseEngine.prototype.createCubeTexture = function(rootUrl: string, scene: Nullable<Scene>, files: Nullable<string[]>, noMipmap?: boolean, onLoad: Nullable<(data?: any) => void> = null, onError: Nullable<(message?: string, exception?: any) => void> = null, format?: number, forcedExtension: any = null, createPolynomials: boolean = false, lodScale: number = 0, lodOffset: number = 0, fallback: Nullable<InternalTexture> = null, excludeLoaders: Array<IInternalTextureLoader> = []): InternalTexture {
     var gl = this._gl;
 
     var texture = fallback ? fallback : new InternalTexture(this, InternalTexture.DATASOURCE_CUBE);
@@ -216,7 +217,7 @@ Engine.prototype.createCubeTexture = function(rootUrl: string, scene: Nullable<S
     var extension = forcedExtension ? forcedExtension : (lastDot > -1 ? rootUrl.substring(lastDot).toLowerCase() : "");
 
     let loader: Nullable<IInternalTextureLoader> = null;
-    for (let availableLoader of Engine._TextureLoaders) {
+    for (let availableLoader of BaseEngine._TextureLoaders) {
         if (excludeLoaders.indexOf(availableLoader) === -1 && availableLoader.canLoad(extension, this._textureFormatInUse, fallback, false, false)) {
             loader = availableLoader;
             break;
@@ -268,7 +269,7 @@ Engine.prototype.createCubeTexture = function(rootUrl: string, scene: Nullable<S
         }
 
         this._cascadeLoadImgs(scene, (imgs) => {
-            var width = this.needPOTTextures ? Engine.GetExponentOfTwo(imgs[0].width, this._caps.maxCubemapTextureSize) : imgs[0].width;
+            var width = this.needPOTTextures ? BaseEngine.GetExponentOfTwo(imgs[0].width, this._caps.maxCubemapTextureSize) : imgs[0].width;
             var height = width;
 
             this._prepareWorkingCanvas();

+ 6 - 6
src/Engines/Extensions/engine.multiRender.ts

@@ -1,12 +1,12 @@
-import { Engine } from "../../Engines/engine";
 import { InternalTexture } from '../../Materials/Textures/internalTexture';
 import { IMultiRenderTargetOptions } from '../../Materials/Textures/multiRenderTarget';
 import { Logger } from '../../Misc/logger';
 import { Nullable } from '../../types';
 import { Constants } from '../constants';
+import { BaseEngine } from '../baseEngine';
 
-declare module "../../Engines/engine" {
-    export interface Engine {
+declare module "../../Engines/baseEngine" {
+    export interface BaseEngine {
         /**
          * Unbind a list of render target textures from the webGL context
          * This is used only when drawBuffer extension or webGL2 are active
@@ -36,7 +36,7 @@ declare module "../../Engines/engine" {
     }
 }
 
-Engine.prototype.unBindMultiColorAttachmentFramebuffer = function(textures: InternalTexture[], disableGenerateMipMaps: boolean = false, onBeforeUnbind?: () => void): void {
+BaseEngine.prototype.unBindMultiColorAttachmentFramebuffer = function(textures: InternalTexture[], disableGenerateMipMaps: boolean = false, onBeforeUnbind?: () => void): void {
     this._currentRenderTarget = null;
 
     // If MSAA, we need to bitblt back to main texture
@@ -93,7 +93,7 @@ Engine.prototype.unBindMultiColorAttachmentFramebuffer = function(textures: Inte
     this._bindUnboundFramebuffer(null);
 };
 
-Engine.prototype.createMultipleRenderTarget = function(size: any, options: IMultiRenderTargetOptions): InternalTexture[] {
+BaseEngine.prototype.createMultipleRenderTarget = function(size: any, options: IMultiRenderTargetOptions): InternalTexture[] {
     var generateMipMaps = false;
     var generateDepthBuffer = true;
     var generateStencilBuffer = false;
@@ -251,7 +251,7 @@ Engine.prototype.createMultipleRenderTarget = function(size: any, options: IMult
     return textures;
 };
 
-Engine.prototype.updateMultipleRenderTargetTextureSampleCount = function(textures: Nullable<InternalTexture[]>, samples: number): number {
+BaseEngine.prototype.updateMultipleRenderTargetTextureSampleCount = function(textures: Nullable<InternalTexture[]>, samples: number): number {
     if (this.webGLVersion < 2 || !textures || textures.length == 0) {
         return 1;
     }

+ 10 - 10
src/Engines/Extensions/engine.rawTexture.ts

@@ -1,5 +1,4 @@
 import { Nullable } from "../../types";
-import { Engine } from "../../Engines/engine";
 import { _TimeToken } from "../../Instrumentation/timeToken";
 import { InternalTexture } from '../../Materials/Textures/internalTexture';
 import { Logger } from '../../Misc/logger';
@@ -7,9 +6,10 @@ import { Tools } from '../../Misc/tools';
 import { Scene } from '../../scene';
 import { WebRequest } from '../../Misc/webRequest';
 import { Constants } from '../constants';
+import { BaseEngine } from '../baseEngine';
 
-declare module "../../Engines/engine" {
-    export interface Engine {
+declare module "../../Engines/baseEngine" {
+    export interface BaseEngine {
         /**
          * Creates a raw texture
          * @param data defines the data to store in the texture
@@ -174,7 +174,7 @@ declare module "../../Engines/engine" {
     }
 }
 
-Engine.prototype.updateRawTexture = function(texture: Nullable<InternalTexture>, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string> = null, type: number = Constants.TEXTURETYPE_UNSIGNED_INT): void {
+BaseEngine.prototype.updateRawTexture = function(texture: Nullable<InternalTexture>, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string> = null, type: number = Constants.TEXTURETYPE_UNSIGNED_INT): void {
     if (!texture) {
         return;
     }
@@ -213,7 +213,7 @@ Engine.prototype.updateRawTexture = function(texture: Nullable<InternalTexture>,
     texture.isReady = true;
 };
 
-Engine.prototype.createRawTexture = function(data: Nullable<ArrayBufferView>, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression: Nullable<string> = null, type: number = Constants.TEXTURETYPE_UNSIGNED_INT): InternalTexture {
+BaseEngine.prototype.createRawTexture = function(data: Nullable<ArrayBufferView>, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression: Nullable<string> = null, type: number = Constants.TEXTURETYPE_UNSIGNED_INT): InternalTexture {
     var texture = new InternalTexture(this, InternalTexture.DATASOURCE_RAW);
     texture.baseWidth = width;
     texture.baseHeight = height;
@@ -250,7 +250,7 @@ Engine.prototype.createRawTexture = function(data: Nullable<ArrayBufferView>, wi
     return texture;
 };
 
-Engine.prototype.createRawCubeTexture = function(data: Nullable<ArrayBufferView[]>, size: number, format: number, type: number,
+BaseEngine.prototype.createRawCubeTexture = function(data: Nullable<ArrayBufferView[]>, size: number, format: number, type: number,
     generateMipMaps: boolean, invertY: boolean, samplingMode: number,
     compression: Nullable<string> = null): InternalTexture {
     var gl = this._gl;
@@ -326,7 +326,7 @@ Engine.prototype.createRawCubeTexture = function(data: Nullable<ArrayBufferView[
     return texture;
 };
 
-Engine.prototype.updateRawCubeTexture = function(texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean, compression: Nullable<string> = null, level: number = 0): void {
+BaseEngine.prototype.updateRawCubeTexture = function(texture: InternalTexture, data: ArrayBufferView[], format: number, type: number, invertY: boolean, compression: Nullable<string> = null, level: number = 0): void {
     texture._bufferViewArray = data;
     texture.format = format;
     texture.type = type;
@@ -375,7 +375,7 @@ Engine.prototype.updateRawCubeTexture = function(texture: InternalTexture, data:
     texture.isReady = true;
 };
 
-Engine.prototype.createRawCubeTextureFromUrl = function(url: string, scene: Scene, size: number, format: number, type: number, noMipmap: boolean,
+BaseEngine.prototype.createRawCubeTextureFromUrl = function(url: string, scene: Scene, size: number, format: number, type: number, noMipmap: boolean,
     callback: (ArrayBuffer: ArrayBuffer) => Nullable<ArrayBufferView[]>,
     mipmapGenerator: Nullable<((faces: ArrayBufferView[]) => ArrayBufferView[][])>,
     onLoad: Nullable<() => void> = null,
@@ -453,7 +453,7 @@ Engine.prototype.createRawCubeTextureFromUrl = function(url: string, scene: Scen
     return texture;
 };
 
-Engine.prototype.createRawTexture3D = function(data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression: Nullable<string> = null, textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT): InternalTexture {
+BaseEngine.prototype.createRawTexture3D = function(data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression: Nullable<string> = null, textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT): InternalTexture {
     var texture = new InternalTexture(this, InternalTexture.DATASOURCE_RAW3D);
     texture.baseWidth = width;
     texture.baseHeight = height;
@@ -491,7 +491,7 @@ Engine.prototype.createRawTexture3D = function(data: Nullable<ArrayBufferView>,
     return texture;
 };
 
-Engine.prototype.updateRawTexture3D = function(texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string> = null, textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT): void {
+BaseEngine.prototype.updateRawTexture3D = function(texture: InternalTexture, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression: Nullable<string> = null, textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT): void {
     var internalType = this._getWebGLTextureType(textureType);
     var internalFormat = this._getInternalFormat(format);
     var internalSizedFomat = this._getRGBABufferInternalSizedFormat(textureType, format);

+ 4 - 4
src/Engines/Extensions/engine.renderTarget.ts

@@ -1,11 +1,11 @@
-import { Engine } from "../../Engines/engine";
 import { InternalTexture } from '../../Materials/Textures/internalTexture';
 import { Logger } from '../../Misc/logger';
 import { RenderTargetCreationOptions } from '../../Materials/Textures/renderTargetCreationOptions';
 import { Constants } from '../constants';
+import { BaseEngine } from '../baseEngine';
 
-declare module "../../Engines/engine" {
-    export interface Engine {
+declare module "../../Engines/baseEngine" {
+    export interface BaseEngine {
         /**
          * Creates a new render target cube texture
          * @param size defines the size of the texture
@@ -16,7 +16,7 @@ declare module "../../Engines/engine" {
     }
 }
 
-Engine.prototype.createRenderTargetCubeTexture = function(size: number, options?: Partial<RenderTargetCreationOptions>): InternalTexture {
+BaseEngine.prototype.createRenderTargetCubeTexture = function(size: number, options?: Partial<RenderTargetCreationOptions>): InternalTexture {
     let fullOptions = {
         generateMipMaps: true,
         generateDepthBuffer: true,

+ 1 - 1
src/Engines/Extensions/engine.webVR.ts

@@ -230,7 +230,7 @@ Engine.prototype.disableVR = function() {
     }
 };
 
-Engine.prototype._connectVREvents = function(canvas: HTMLCanvasElement, document: any) {
+Engine.prototype._connectVREvents = function(canvas?: HTMLCanvasElement, document?: any) {
     this._onVRDisplayPointerRestricted = () => {
         if (canvas) {
             canvas.requestPointerLock();

+ 2 - 2
src/Engines/WebGL/webGLPipelineContext.ts

@@ -1,10 +1,10 @@
 import { IPipelineContext } from '../IPipelineContext';
-import { Engine } from '../engine';
 import { Nullable } from '../../types';
+import { BaseEngine } from '../baseEngine';
 
 /** @hidden */
 export class WebGLPipelineContext implements IPipelineContext {
-    public engine: Engine;
+    public engine: BaseEngine;
     public program: Nullable<WebGLProgram>;
     public context?: WebGLRenderingContext;
     public vertexShader?: WebGLShader;

File diff ditekan karena terlalu besar
+ 5591 - 0
src/Engines/baseEngine.ts


+ 13 - 0
src/Engines/depthTextureCreationOptions.ts

@@ -0,0 +1,13 @@
+/**
+ * Define options used to create a depth texture
+ */
+export class DepthTextureCreationOptions {
+    /** Specifies whether or not a stencil should be allocated in the texture */
+    generateStencil?: boolean;
+    /** Specifies whether or not bilinear filtering is enable on the texture */
+    bilinearFiltering?: boolean;
+    /** Specifies the comparison function to set on the texture. If 0 or undefined, the texture is not in comparison mode */
+    comparisonFunction?: number;
+    /** Specifies if the created texture is a cube texture */
+    isCube?: boolean;
+}

File diff ditekan karena terlalu besar
+ 342 - 5884
src/Engines/engine.ts


+ 87 - 0
src/Engines/engineCapabilities.ts

@@ -0,0 +1,87 @@
+import { Nullable } from '../types';
+
+/**
+ * Class used to describe the capabilities of the engine relatively to the current browser
+ */
+export class EngineCapabilities {
+    /** Maximum textures units per fragment shader */
+    public maxTexturesImageUnits: number;
+    /** Maximum texture units per vertex shader */
+    public maxVertexTextureImageUnits: number;
+    /** Maximum textures units in the entire pipeline */
+    public maxCombinedTexturesImageUnits: number;
+    /** Maximum texture size */
+    public maxTextureSize: number;
+    /** Maximum cube texture size */
+    public maxCubemapTextureSize: number;
+    /** Maximum render texture size */
+    public maxRenderTextureSize: number;
+    /** Maximum number of vertex attributes */
+    public maxVertexAttribs: number;
+    /** Maximum number of varyings */
+    public maxVaryingVectors: number;
+    /** Maximum number of uniforms per vertex shader */
+    public maxVertexUniformVectors: number;
+    /** Maximum number of uniforms per fragment shader */
+    public maxFragmentUniformVectors: number;
+    /** Defines if standard derivates (dx/dy) are supported */
+    public standardDerivatives: boolean;
+    /** Defines if s3tc texture compression is supported */
+    public s3tc: Nullable<WEBGL_compressed_texture_s3tc>;
+    /** Defines if pvrtc texture compression is supported */
+    public pvrtc: any; //WEBGL_compressed_texture_pvrtc;
+    /** Defines if etc1 texture compression is supported */
+    public etc1: any; //WEBGL_compressed_texture_etc1;
+    /** Defines if etc2 texture compression is supported */
+    public etc2: any; //WEBGL_compressed_texture_etc;
+    /** Defines if astc texture compression is supported */
+    public astc: any; //WEBGL_compressed_texture_astc;
+    /** Defines if float textures are supported */
+    public textureFloat: boolean;
+    /** Defines if vertex array objects are supported */
+    public vertexArrayObject: boolean;
+    /** Gets the webgl extension for anisotropic filtering (null if not supported) */
+    public textureAnisotropicFilterExtension: Nullable<EXT_texture_filter_anisotropic>;
+    /** Gets the maximum level of anisotropy supported */
+    public maxAnisotropy: number;
+    /** Defines if instancing is supported */
+    public instancedArrays: boolean;
+    /** Defines if 32 bits indices are supported */
+    public uintIndices: boolean;
+    /** Defines if high precision shaders are supported */
+    public highPrecisionShaderSupported: boolean;
+    /** Defines if depth reading in the fragment shader is supported */
+    public fragmentDepthSupported: boolean;
+    /** Defines if float texture linear filtering is supported*/
+    public textureFloatLinearFiltering: boolean;
+    /** Defines if rendering to float textures is supported */
+    public textureFloatRender: boolean;
+    /** Defines if half float textures are supported*/
+    public textureHalfFloat: boolean;
+    /** Defines if half float texture linear filtering is supported*/
+    public textureHalfFloatLinearFiltering: boolean;
+    /** Defines if rendering to half float textures is supported */
+    public textureHalfFloatRender: boolean;
+    /** Defines if textureLOD shader command is supported */
+    public textureLOD: boolean;
+    /** Defines if draw buffers extension is supported */
+    public drawBuffersExtension: boolean;
+    /** Defines if depth textures are supported */
+    public depthTextureExtension: boolean;
+    /** Defines if float color buffer are supported */
+    public colorBufferFloat: boolean;
+    /** Gets disjoint timer query extension (null if not supported) */
+    public timerQuery: EXT_disjoint_timer_query;
+    /** Defines if timestamp can be used with timer query */
+    public canUseTimestampForTimerQuery: boolean;
+    /** Defines if multiview is supported (https://www.khronos.org/registry/webgl/extensions/WEBGL_multiview/) */
+    public multiview: any;
+    /** Function used to let the system compiles shaders in background */
+    public parallelShaderCompile: {
+        COMPLETION_STATUS_KHR: number;
+    };
+    /** Max number of texture samples for MSAA */
+    public maxMSAASamples = 1;
+    /** Defines if the blend min max extension is supported */
+    public blendMinMax: boolean;
+}

+ 3 - 0
src/Engines/index.ts

@@ -1,4 +1,7 @@
 export * from "./constants";
+export * from "./engineCapabilities";
+export * from "./instancingAttributeInfo";
+export * from "./baseEngine";
 export * from "./engine";
 export * from "./engine.backwardCompatibility";
 export * from "./engineStore";

+ 35 - 0
src/Engines/instancingAttributeInfo.ts

@@ -0,0 +1,35 @@
+/**
+ * Interface for attribute information associated with buffer instanciation
+ */
+export class InstancingAttributeInfo {
+    /**
+     * Index/offset of the attribute in the vertex shader
+     */
+    index: number;
+
+    /**
+     * size of the attribute, 1, 2, 3 or 4
+     */
+    attributeSize: number;
+
+    /**
+     * type of the attribute, gl.BYTE, gl.UNSIGNED_BYTE, gl.SHORT, gl.UNSIGNED_SHORT, gl.FIXED, gl.FLOAT.
+     * default is FLOAT
+     */
+    attribyteType: number;
+
+    /**
+     * normalization of fixed-point data. behavior unclear, use FALSE, default is FALSE
+     */
+    normalized: boolean;
+
+    /**
+     * Offset of the data in the Vertex Buffer acting as the instancing buffer
+     */
+    offset: number;
+
+    /**
+     * Name of the GLSL attribute, for debugging purpose only
+     */
+    attributeName: string;
+}

+ 5 - 3
src/Engines/nativeEngine.ts

@@ -1,5 +1,5 @@
 import { Nullable, IndicesArray, DataArray } from "../types";
-import { Engine, EngineCapabilities } from "../Engines/engine";
+import { Engine } from "../Engines/engine";
 import { VertexBuffer } from "../Meshes/buffer";
 import { InternalTexture } from "../Materials/Textures/internalTexture";
 import { IInternalTextureLoader } from "../Materials/Textures/internalTextureLoader";
@@ -20,6 +20,8 @@ import { WebRequest } from '../Misc/webRequest';
 import { NativeShaderProcessor } from './Native/nativeShaderProcessor';
 import { Logger } from "../Misc/logger";
 import { Constants } from './constants';
+import { BaseEngine } from './baseEngine';
+import { EngineCapabilities } from './engineCapabilities';
 
 interface INativeEngine {
     requestAnimationFrame(callback: () => void): void;
@@ -379,8 +381,8 @@ export class NativeEngine extends Engine {
     public createShaderProgram(pipelineContext: IPipelineContext, vertexCode: string, fragmentCode: string, defines: Nullable<string>, context?: WebGLRenderingContext, transformFeedbackVaryings: Nullable<string[]> = null): any {
         this.onBeforeShaderCompilationObservable.notifyObservers(this);
         const program = this._native.createProgram(
-            Engine._concatenateShader(vertexCode, defines),
-            Engine._concatenateShader(fragmentCode, defines)
+            BaseEngine._ConcatenateShader(vertexCode, defines),
+            BaseEngine._ConcatenateShader(fragmentCode, defines)
         );
         this.onAfterShaderCompilationObservable.notifyObservers(this);
         return program;

+ 300 - 7
src/Engines/nullEngine.ts

@@ -1,7 +1,7 @@
 import { Logger } from "../Misc/logger";
 import { Nullable, FloatArray, IndicesArray } from "../types";
 import { Scene } from "../scene";
-import { Engine, EngineCapabilities } from "../Engines/engine";
+import { Engine } from "../Engines/engine";
 import { RenderTargetCreationOptions } from "../Materials/Textures/renderTargetCreationOptions";
 import { VertexBuffer } from "../Meshes/buffer";
 import { InternalTexture } from "../Materials/Textures/internalTexture";
@@ -12,6 +12,7 @@ import { Constants } from "./constants";
 import { IPipelineContext } from './IPipelineContext';
 import { DataBuffer } from '../Meshes/dataBuffer';
 import { IColor4Like, IViewportLike } from '../Maths/math.like';
+import { EngineCapabilities } from './engineCapabilities';
 
 declare const global: any;
 
@@ -54,20 +55,28 @@ export class NullEngine extends Engine {
     private _options: NullEngineOptions;
 
     /**
-     * @see https://doc.babylonjs.com/babylon101/animations#deterministic-lockstep
+     * Gets a boolean indicating that the engine is running in deterministic lock step mode
+     * @see http://doc.babylonjs.com/babylon101/animations#deterministic-lockstep
+     * @returns true if engine is in deterministic lock step mode
      */
     public isDeterministicLockStep(): boolean {
         return this._options.deterministicLockstep;
     }
 
-    /** @see https://doc.babylonjs.com/babylon101/animations#deterministic-lockstep */
+    /**
+     * Gets the max steps when engine is running in deterministic lock step
+     * @see http://doc.babylonjs.com/babylon101/animations#deterministic-lockstep
+     * @returns the max steps
+     */
     public getLockstepMaxSteps(): number {
         return this._options.lockstepMaxSteps;
     }
 
     /**
-     * Sets hardware scaling, used to save performance if needed
-     * @see https://doc.babylonjs.com/how_to/how_to_use_sceneoptimizer
+     * Gets the current hardware scaling level.
+     * By default the hardware scaling level is computed from the window device ratio.
+     * if level = 1 then the engine will render at the exact resolution of the canvas. If level = 0.5 then the engine will render at twice the size of the canvas.
+     * @returns a number indicating the current hardware scaling level
      */
     public getHardwareScalingLevel(): number {
         return 1.0;
@@ -146,21 +155,44 @@ export class NullEngine extends Engine {
         }
     }
 
+    /**
+     * Creates a vertex buffer
+     * @param vertices the data for the vertex buffer
+     * @returns the new WebGL static buffer
+     */
     public createVertexBuffer(vertices: FloatArray): DataBuffer {
         let buffer = new DataBuffer();
         buffer.references = 1;
         return buffer;
     }
 
+    /**
+     * Creates a new index buffer
+     * @param indices defines the content of the index buffer
+     * @param updatable defines if the index buffer must be updatable
+     * @returns a new webGL buffer
+     */
     public createIndexBuffer(indices: IndicesArray): DataBuffer {
         let buffer = new DataBuffer();
         buffer.references = 1;
         return buffer;
     }
 
+    /**
+     * Clear the current render buffer or the current render target (if any is set up)
+     * @param color defines the color to use
+     * @param backBuffer defines if the back buffer must be cleared
+     * @param depth defines if the depth buffer must be cleared
+     * @param stencil defines if the stencil buffer must be cleared
+     */
     public clear(color: IColor4Like, backBuffer: boolean, depth: boolean, stencil: boolean = false): void {
     }
 
+    /**
+     * Gets the current render width
+     * @param useScreen defines if screen size must be used (or the current render target if any)
+     * @returns a number defining the current render width
+     */
     public getRenderWidth(useScreen = false): number {
         if (!useScreen && this._currentRenderTarget) {
             return this._currentRenderTarget.width;
@@ -169,6 +201,11 @@ export class NullEngine extends Engine {
         return this._options.renderWidth;
     }
 
+    /**
+     * Gets the current render height
+     * @param useScreen defines if screen size must be used (or the current render target if any)
+     * @returns a number defining the current render height
+     */
     public getRenderHeight(useScreen = false): number {
         if (!useScreen && this._currentRenderTarget) {
             return this._currentRenderTarget.height;
@@ -177,6 +214,12 @@ export class NullEngine extends Engine {
         return this._options.renderHeight;
     }
 
+    /**
+     * Set the WebGL's viewport
+     * @param viewport defines the viewport element to be used
+     * @param requiredWidth defines the width required for rendering. If not provided the rendering canvas' width is used
+     * @param requiredHeight defines the height required for rendering. If not provided the rendering canvas' height is used
+     */
     public setViewport(viewport: IViewportLike, requiredWidth?: number, requiredHeight?: number): void {
         this._cachedViewport = viewport;
     }
@@ -187,18 +230,38 @@ export class NullEngine extends Engine {
         };
     }
 
+    /**
+     * Gets the list of webGL uniform locations associated with a specific program based on a list of uniform names
+     * @param pipelineContext defines the pipeline context to use
+     * @param uniformsNames defines the list of uniform names
+     * @returns an array of webGL uniform locations
+     */
     public getUniforms(pipelineContext: IPipelineContext, uniformsNames: string[]): Nullable<WebGLUniformLocation>[] {
         return [];
     }
 
+    /**
+     * Gets the lsit of active attributes for a given webGL program
+     * @param pipelineContext defines the pipeline context to use
+     * @param attributesNames defines the list of attribute names to get
+     * @returns an array of indices indicating the offset of each attribute
+     */
     public getAttributes(pipelineContext: IPipelineContext, attributesNames: string[]): number[] {
         return [];
     }
 
+    /**
+     * Binds an effect to the webGL context
+     * @param effect defines the effect to bind
+     */
     public bindSamplers(effect: Effect): void {
         this._currentEffect = null;
     }
 
+    /**
+     * Activates an effect, mkaing it the current one (ie. the one used for rendering)
+     * @param effect defines the effect to activate
+     */
     public enableEffect(effect: Effect): void {
         this._currentEffect = effect;
 
@@ -210,69 +273,188 @@ export class NullEngine extends Engine {
         }
     }
 
+    /**
+     * Set various states to the webGL context
+     * @param culling defines backface culling state
+     * @param zOffset defines the value to apply to zOffset (0 by default)
+     * @param force defines if states must be applied even if cache is up to date
+     * @param reverseSide defines if culling must be reversed (CCW instead of CW and CW instead of CCW)
+     */
     public setState(culling: boolean, zOffset: number = 0, force?: boolean, reverseSide = false): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of int32
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of int32 to store
+     */
     public setIntArray(uniform: WebGLUniformLocation, array: Int32Array): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of int32 (stored as vec2)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of int32 to store
+     */
     public setIntArray2(uniform: WebGLUniformLocation, array: Int32Array): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of int32 (stored as vec3)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of int32 to store
+     */
     public setIntArray3(uniform: WebGLUniformLocation, array: Int32Array): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of int32 (stored as vec4)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of int32 to store
+     */
     public setIntArray4(uniform: WebGLUniformLocation, array: Int32Array): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of float32
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of float32 to store
+     */
     public setFloatArray(uniform: WebGLUniformLocation, array: Float32Array): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of float32 (stored as vec2)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of float32 to store
+     */
     public setFloatArray2(uniform: WebGLUniformLocation, array: Float32Array): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of float32 (stored as vec3)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of float32 to store
+     */
     public setFloatArray3(uniform: WebGLUniformLocation, array: Float32Array): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of float32 (stored as vec4)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of float32 to store
+     */
     public setFloatArray4(uniform: WebGLUniformLocation, array: Float32Array): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of number
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of number to store
+     */
     public setArray(uniform: WebGLUniformLocation, array: number[]): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of number (stored as vec2)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of number to store
+     */
     public setArray2(uniform: WebGLUniformLocation, array: number[]): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of number (stored as vec3)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of number to store
+     */
     public setArray3(uniform: WebGLUniformLocation, array: number[]): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of number (stored as vec4)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param array defines the array of number to store
+     */
     public setArray4(uniform: WebGLUniformLocation, array: number[]): void {
     }
 
+    /**
+     * Set the value of an uniform to an array of float32 (stored as matrices)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param matrices defines the array of float32 to store
+     */
     public setMatrices(uniform: WebGLUniformLocation, matrices: Float32Array): void {
     }
 
+    /**
+     * Set the value of an uniform to a matrix (3x3)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param matrix defines the Float32Array representing the 3x3 matrix to store
+     */
     public setMatrix3x3(uniform: WebGLUniformLocation, matrix: Float32Array): void {
     }
 
+    /**
+     * Set the value of an uniform to a matrix (2x2)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param matrix defines the Float32Array representing the 2x2 matrix to store
+     */
     public setMatrix2x2(uniform: WebGLUniformLocation, matrix: Float32Array): void {
     }
 
+    /**
+     * Set the value of an uniform to a number (float)
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param value defines the float number to store
+     */
     public setFloat(uniform: WebGLUniformLocation, value: number): void {
     }
 
+    /**
+     * Set the value of an uniform to a vec2
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param x defines the 1st component of the value
+     * @param y defines the 2nd component of the value
+     */
     public setFloat2(uniform: WebGLUniformLocation, x: number, y: number): void {
     }
 
+    /**
+     * Set the value of an uniform to a vec3
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param x defines the 1st component of the value
+     * @param y defines the 2nd component of the value
+     * @param z defines the 3rd component of the value
+     */
     public setFloat3(uniform: WebGLUniformLocation, x: number, y: number, z: number): void {
     }
 
+    /**
+     * Set the value of an uniform to a boolean
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param bool defines the boolean to store
+     */
     public setBool(uniform: WebGLUniformLocation, bool: number): void {
     }
 
+    /**
+     * Set the value of an uniform to a vec4
+     * @param uniform defines the webGL uniform location where to store the value
+     * @param x defines the 1st component of the value
+     * @param y defines the 2nd component of the value
+     * @param z defines the 3rd component of the value
+     * @param w defines the 4th component of the value
+     */
     public setFloat4(uniform: WebGLUniformLocation, x: number, y: number, z: number, w: number): void {
     }
 
+    /**
+     * Sets the current alpha mode
+     * @param mode defines the mode to use (one of the Engine.ALPHA_XXX)
+     * @param noDepthWriteChange defines if depth writing state should remains unchanged (false by default)
+     * @see http://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered
+     */
     public setAlphaMode(mode: number, noDepthWriteChange: boolean = false): void {
         if (this._alphaMode === mode) {
             return;
@@ -286,9 +468,22 @@ export class NullEngine extends Engine {
         this._alphaMode = mode;
     }
 
+    /**
+     * Bind webGl buffers directly to the webGL context
+     * @param vertexBuffers defines the vertex buffer to bind
+     * @param indexBuffer defines the index buffer to bind
+     * @param vertexDeclaration defines the vertex declaration to use with the vertex buffer
+     * @param vertexStrideSize defines the vertex stride of the vertex buffer
+     * @param effect defines the effect associated with the vertex buffer
+     */
     public bindBuffers(vertexBuffers: { [key: string]: VertexBuffer; }, indexBuffer: DataBuffer, effect: Effect): void {
     }
 
+    /**
+     * Force the entire cache to be cleared
+     * You should not have to use this function unless your engine needs to share the webGL context with another engine
+     * @param bruteForce defines a boolean to force clearing ALL caches (including stencil, detoh and alpha states)
+     */
     public wipeCaches(bruteForce?: boolean): void {
         if (this.preventCacheWipeBetweenFrames) {
             return;
@@ -309,12 +504,33 @@ export class NullEngine extends Engine {
         this._cachedEffectForVertexBuffers = null;
     }
 
+    /**
+     * Send a draw order
+     * @param useTriangles defines if triangles must be used to draw (else wireframe will be used)
+     * @param indexStart defines the starting index
+     * @param indexCount defines the number of index to draw
+     * @param instancesCount defines the number of instances to draw (if instanciation is enabled)
+     */
     public draw(useTriangles: boolean, indexStart: number, indexCount: number, instancesCount?: number): void {
     }
 
+    /**
+     * Draw a list of indexed primitives
+     * @param fillMode defines the primitive to use
+     * @param indexStart defines the starting index
+     * @param indexCount defines the number of index to draw
+     * @param instancesCount defines the number of instances to draw (if instanciation is enabled)
+     */
     public drawElementsType(fillMode: number, indexStart: number, indexCount: number, instancesCount?: number): void {
     }
 
+    /**
+     * Draw a list of unindexed primitives
+     * @param fillMode defines the primitive to use
+     * @param verticesStart defines the index of first vertex to draw
+     * @param verticesCount defines the count of vertices to draw
+     * @param instancesCount defines the number of instances to draw (if instanciation is enabled)
+     */
     public drawArraysType(fillMode: number, verticesStart: number, verticesCount: number, instancesCount?: number): void {
     }
 
@@ -327,7 +543,29 @@ export class NullEngine extends Engine {
     public _releaseTexture(texture: InternalTexture): void {
     }
 
-    public createTexture(urlArg: string, noMipmap: boolean, invertY: boolean, scene: Scene, samplingMode: number = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, onLoad: Nullable<() => void> = null, onError: Nullable<(message: string, exception: any) => void> = null, buffer: Nullable<ArrayBuffer | HTMLImageElement> = null, fallBack?: InternalTexture, format?: number): InternalTexture {
+    /**
+     * Usually called from Texture.ts.
+     * Passed information to create a WebGLTexture
+     * @param urlArg defines a value which contains one of the following:
+     * * A conventional http URL, e.g. 'http://...' or 'file://...'
+     * * A base64 string of in-line texture data, e.g. 'data:image/jpg;base64,/...'
+     * * An indicator that data being passed using the buffer parameter, e.g. 'data:mytexture.jpg'
+     * @param noMipmap defines a boolean indicating that no mipmaps shall be generated.  Ignored for compressed textures.  They must be in the file
+     * @param invertY when true, image is flipped when loaded.  You probably want true. Certain compressed textures may invert this if their default is inverted (eg. ktx)
+     * @param scene needed for loading to the correct scene
+     * @param samplingMode mode with should be used sample / access the texture (Default: Texture.TRILINEAR_SAMPLINGMODE)
+     * @param onLoad optional callback to be called upon successful completion
+     * @param onError optional callback to be called upon failure
+     * @param buffer a source of a file previously fetched as either a base64 string, an ArrayBuffer (compressed or image format), HTMLImageElement (image format), or a Blob
+     * @param fallBack an internal argument in case the function must be called again, due to etc1 not having alpha capabilities
+     * @param format internal format.  Default: RGB when extension is '.jpg' else RGBA.  Ignored for compressed textures
+     * @param forcedExtension defines the extension to use to pick the right loader
+     * @param excludeLoaders array of texture loaders that should be excluded when picking a loader for the texture (default: empty array)
+     * @returns a InternalTexture for assignment back into BABYLON.Texture
+     */
+    public createTexture(urlArg: string, noMipmap: boolean, invertY: boolean, scene: Scene, samplingMode: number = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,
+        onLoad: Nullable<() => void> = null, onError: Nullable<(message: string, exception: any) => void> = null,
+        buffer: Nullable<ArrayBuffer | HTMLImageElement> = null, fallBack?: InternalTexture, format?: number): InternalTexture {
         var texture = new InternalTexture(this, InternalTexture.DATASOURCE_URL);
         var url = String(urlArg);
 
@@ -354,6 +592,12 @@ export class NullEngine extends Engine {
         return texture;
     }
 
+    /**
+     * Creates a new render target texture
+     * @param size defines the size of the texture
+     * @param options defines the options used to create the texture
+     * @returns a new render target texture stored in an InternalTexture
+     */
     public createRenderTargetTexture(size: any, options: boolean | RenderTargetCreationOptions): InternalTexture {
         let fullOptions = new RenderTargetCreationOptions();
 
@@ -394,10 +638,25 @@ export class NullEngine extends Engine {
         return texture;
     }
 
+    /**
+     * Update the sampling mode of a given texture
+     * @param samplingMode defines the required sampling mode
+     * @param texture defines the texture to update
+     */
     public updateTextureSamplingMode(samplingMode: number, texture: InternalTexture): void {
         texture.samplingMode = samplingMode;
     }
 
+    /**
+     * Binds the frame buffer to the specified texture.
+     * @param texture The texture to render to or null for the default canvas
+     * @param faceIndex The face of the texture to render to in case of cube texture
+     * @param requiredWidth The width of the target to render to
+     * @param requiredHeight The height of the target to render to
+     * @param forceFullscreenViewport Forces the viewport to be the entire texture/screen if true
+     * @param depthStencilTexture The depth stencil texture to use to render
+     * @param lodLevel defines le lod level to bind to the frame buffer
+     */
     public bindFramebuffer(texture: InternalTexture, faceIndex?: number, requiredWidth?: number, requiredHeight?: number, forceFullscreenViewport?: boolean): void {
         if (this._currentRenderTarget) {
             this.unBindFramebuffer(this._currentRenderTarget);
@@ -409,6 +668,12 @@ export class NullEngine extends Engine {
         }
     }
 
+    /**
+     * Unbind the current render target texture from the webGL context
+     * @param texture defines the render target texture to unbind
+     * @param disableGenerateMipMaps defines a boolean indicating that mipmaps must not be generated
+     * @param onBeforeUnbind defines a function which will be called before the effective unbind
+     */
     public unBindFramebuffer(texture: InternalTexture, disableGenerateMipMaps = false, onBeforeUnbind?: () => void): void {
         this._currentRenderTarget = null;
 
@@ -421,6 +686,11 @@ export class NullEngine extends Engine {
         this._currentFramebuffer = null;
     }
 
+    /**
+     * Creates a dynamic vertex buffer
+     * @param vertices the data for the dynamic vertex buffer
+     * @returns the new WebGL dynamic buffer
+     */
     public createDynamicVertexBuffer(vertices: FloatArray): DataBuffer {
         let buffer = new DataBuffer();
         buffer.references = 1;
@@ -428,10 +698,23 @@ export class NullEngine extends Engine {
         return buffer;
     }
 
+    /**
+     * Update the content of a dynamic texture
+     * @param texture defines the texture to update
+     * @param canvas defines the canvas containing the source
+     * @param invertY defines if data must be stored with Y axis inverted
+     * @param premulAlpha defines if alpha is stored as premultiplied
+     * @param format defines the format of the data
+     * @param forceBindTexture if the texture should be forced to be bound eg. after a graphics context loss (Default: false)
+     */
     public updateDynamicTexture(texture: Nullable<InternalTexture>, canvas: HTMLCanvasElement, invertY: boolean, premulAlpha: boolean = false, format?: number): void {
 
     }
 
+    /**
+     * Gets a boolean indicating if all created effects are ready
+     * @returns true if all effects are ready
+     */
     public areAllEffectsReady(): boolean {
         return true;
     }
@@ -455,19 +738,26 @@ export class NullEngine extends Engine {
     public _unpackFlipY(value: boolean) {
     }
 
+    /**
+     * Update a dynamic index buffer
+     * @param indexBuffer defines the target index buffer
+     * @param indices defines the data to update
+     * @param offset defines the offset in the target index buffer where update should start
+     */
     public updateDynamicIndexBuffer(indexBuffer: WebGLBuffer, indices: IndicesArray, offset: number = 0): void {
     }
 
     /**
      * Updates a dynamic vertex buffer.
      * @param vertexBuffer the vertex buffer to update
-     * @param data the data used to update the vertex buffer
+     * @param vertices the data used to update the vertex buffer
      * @param byteOffset the byte offset of the data (optional)
      * @param byteLength the byte length of the data (optional)
      */
     public updateDynamicVertexBuffer(vertexBuffer: WebGLBuffer, vertices: FloatArray, byteOffset?: number, byteLength?: number): void {
     }
 
+    /** @hidden */
     public _bindTextureDirectly(target: number, texture: InternalTexture): boolean {
         if (this._boundTexturesCache[this._activeChannel] !== texture) {
             this._boundTexturesCache[this._activeChannel] = texture;
@@ -488,6 +778,9 @@ export class NullEngine extends Engine {
     protected _deleteBuffer(buffer: WebGLBuffer): void {
     }
 
+    /**
+     * Force the engine to release all cached effects. This means that next effect compilation will have to be done completely even if a similar effect was already compiled
+     */
     public releaseEffects() {
     }
 

+ 4 - 4
src/Materials/Textures/internalTexture.ts

@@ -7,7 +7,7 @@ import { _DepthCullingState, _StencilState, _AlphaState } from "../../States/ind
 import { Constants } from "../../Engines/constants";
 import { _DevTools } from '../../Misc/devTools';
 
-declare type Engine = import("../../Engines/engine").Engine;
+declare type BaseEngine = import("../../Engines/baseEngine").BaseEngine;
 declare type BaseTexture = import("../../Materials/Textures/baseTexture").BaseTexture;
 
 /**
@@ -237,13 +237,13 @@ export class InternalTexture {
     /** @hidden */
     public _references: number = 1;
 
-    private _engine: Engine;
+    private _engine: BaseEngine;
 
     /**
      * Gets the Engine the texture belongs to.
      * @returns The babylon engine
      */
-    public getEngine(): Engine {
+    public getEngine(): BaseEngine {
         return this._engine;
     }
 
@@ -260,7 +260,7 @@ export class InternalTexture {
      * @param dataSource defines the type of data that will be used
      * @param delayAllocation if the texture allocation should be delayed (default: false)
      */
-    constructor(engine: Engine, dataSource: number, delayAllocation = false) {
+    constructor(engine: BaseEngine, dataSource: number, delayAllocation = false) {
         this._engine = engine;
         this._dataSource = dataSource;
 

+ 2 - 1
src/Materials/effect.ts

@@ -8,6 +8,7 @@ import { IPipelineContext } from '../Engines/IPipelineContext';
 import { DataBuffer } from '../Meshes/dataBuffer';
 import { ShaderProcessor } from '../Engines/Processors/shaderProcessor';
 import { IMatrixLike, IVector2Like, IVector3Like, IVector4Like, IColor3Like, IColor4Like } from '../Maths/math.like';
+import { BaseEngine } from '../Engines/baseEngine';
 
 declare type Engine = import("../Engines/engine").Engine;
 declare type InternalTexture = import("../Materials/Textures/internalTexture").InternalTexture;
@@ -289,7 +290,7 @@ export class Effect implements IDisposable {
      * @param onError Callback that will be called if an error occurs during shader compilation.
      * @param indexParameters Parameters to be used with Babylons include syntax to iterate over an array (eg. {lights: 10})
      */
-    constructor(baseName: any, attributesNamesOrOptions: string[] | EffectCreationOptions, uniformsNamesOrEngine: string[] | Engine, samplers: Nullable<string[]> = null, engine?: Engine, defines: Nullable<string> = null,
+    constructor(baseName: any, attributesNamesOrOptions: string[] | EffectCreationOptions, uniformsNamesOrEngine: string[] | BaseEngine, samplers: Nullable<string[]> = null, engine?: BaseEngine, defines: Nullable<string> = null,
         fallbacks: Nullable<EffectFallbacks> = null, onCompiled: Nullable<(effect: Effect) => void> = null, onError: Nullable<(effect: Effect, errors: string) => void> = null, indexParameters?: any) {
         this.name = baseName;
 

+ 13 - 11
src/Misc/basis.ts

@@ -4,6 +4,7 @@ import { Texture } from '../Materials/Textures/texture';
 import { InternalTexture } from '../Materials/Textures/internalTexture';
 import { Scalar } from '../Maths/math.scalar';
 import { Constants } from '../Engines/constants';
+import { Engine } from '../Engines/engine';
 
 /**
  * Info about the .basis files
@@ -180,6 +181,7 @@ export class BasisTools {
      * @param transcodeResult the result of transcoding the basis file to load from
      */
     public static LoadTextureFromTranscodeResult(texture: InternalTexture, transcodeResult: TranscodeResult) {
+        let engine = texture.getEngine() as Engine;
         for (var i = 0; i < transcodeResult.fileInfo.images.length; i++) {
             var rootImage = transcodeResult.fileInfo.images[i].levels[0];
             texture._invertVScale = texture.invertY;
@@ -188,9 +190,9 @@ export class BasisTools {
                 texture.type = Constants.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;
                 texture.format = Constants.TEXTUREFORMAT_RGB;
 
-                if (texture.getEngine().webGLVersion < 2 && (Scalar.Log2(rootImage.width) % 1 !== 0 || Scalar.Log2(rootImage.height) % 1 !== 0)) {
+                if (engine.webGLVersion < 2 && (Scalar.Log2(rootImage.width) % 1 !== 0 || Scalar.Log2(rootImage.height) % 1 !== 0)) {
                     // Create non power of two texture
-                    let source = new InternalTexture(texture.getEngine(), InternalTexture.DATASOURCE_TEMP);
+                    let source = new InternalTexture(engine, InternalTexture.DATASOURCE_TEMP);
 
                     texture._invertVScale = texture.invertY;
                     source.type = Constants.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;
@@ -198,22 +200,22 @@ export class BasisTools {
                     // Fallback requires aligned width/height
                     source.width = (rootImage.width + 3) & ~3;
                     source.height = (rootImage.height + 3) & ~3;
-                    texture.getEngine()._bindTextureDirectly(source.getEngine()._gl.TEXTURE_2D, source, true);
-                    texture.getEngine()._uploadDataToTextureDirectly(source, rootImage.transcodedPixels, i, 0, Constants.TEXTUREFORMAT_RGB, true);
+                    engine._bindTextureDirectly(engine._gl.TEXTURE_2D, source, true);
+                    engine._uploadDataToTextureDirectly(source, rootImage.transcodedPixels, i, 0, Constants.TEXTUREFORMAT_RGB, true);
 
                     // Resize to power of two
-                    source.getEngine()._rescaleTexture(source, texture, texture.getEngine().scenes[0], source.getEngine()._getInternalFormat(Constants.TEXTUREFORMAT_RGB), () => {
-                        source.getEngine()._releaseTexture(source);
-                        source.getEngine()._bindTextureDirectly(source.getEngine()._gl.TEXTURE_2D, texture, true);
+                    engine._rescaleTexture(source, texture, engine.scenes[0], engine._getInternalFormat(Constants.TEXTUREFORMAT_RGB), () => {
+                        engine._releaseTexture(source);
+                        engine._bindTextureDirectly(engine._gl.TEXTURE_2D, texture, true);
                     });
-                }else {
+                } else {
                     // Fallback is already inverted
                     texture._invertVScale = !texture.invertY;
 
                     // Upload directly
                     texture.width = (rootImage.width + 3) & ~3;
                     texture.height = (rootImage.height + 3) & ~3;
-                    texture.getEngine()._uploadDataToTextureDirectly(texture, rootImage.transcodedPixels, i, 0, Constants.TEXTUREFORMAT_RGB, true);
+                    engine._uploadDataToTextureDirectly(texture, rootImage.transcodedPixels, i, 0, Constants.TEXTUREFORMAT_RGB, true);
                 }
 
             }else {
@@ -222,10 +224,10 @@ export class BasisTools {
 
                 // Upload all mip levels in the file
                 transcodeResult.fileInfo.images[i].levels.forEach((level: any, index: number) => {
-                    texture.getEngine()._uploadCompressedDataToTextureDirectly(texture, BasisTools.GetInternalFormatFromBasisFormat(transcodeResult.format!), level.width, level.height, level.transcodedPixels, i, index);
+                    engine._uploadCompressedDataToTextureDirectly(texture, BasisTools.GetInternalFormatFromBasisFormat(transcodeResult.format!), level.width, level.height, level.transcodedPixels, i, index);
                 });
 
-                if (texture.getEngine().webGLVersion < 2 && (Scalar.Log2(texture.width) % 1 !== 0 || Scalar.Log2(texture.height) % 1 !== 0)) {
+                if (engine.webGLVersion < 2 && (Scalar.Log2(texture.width) % 1 !== 0 || Scalar.Log2(texture.height) % 1 !== 0)) {
                     Tools.Warn("Loaded .basis texture width and height are not a power of two. Texture wrapping will be set to Texture.CLAMP_ADDRESSMODE as other modes are not supported with non power of two dimensions in webGL 1.");
                     texture._cachedWrapU = Texture.CLAMP_ADDRESSMODE;
                     texture._cachedWrapV = Texture.CLAMP_ADDRESSMODE;

+ 5 - 5
src/Misc/dds.ts

@@ -1,7 +1,6 @@
 import { Scalar } from "../Maths/math.scalar";
 import { SphericalPolynomial } from "../Maths/sphericalPolynomial";
 import { Constants } from "../Engines/constants";
-import { Engine } from "../Engines/engine";
 import { InternalTexture } from "../Materials/Textures/internalTexture";
 import { Nullable } from "../types";
 import { Logger } from "../Misc/logger";
@@ -10,6 +9,7 @@ import { Scene } from '../scene';
 import { BaseTexture } from '../Materials/Textures/baseTexture';
 
 import "../Engines/Extensions/engine.cubeTexture";
+import { BaseEngine } from '../Engines/baseEngine';
 
 // Based on demo done by Brandon Jones - http://media.tojicode.com/webgl-samples/dds.html
 // All values and structures referenced from:
@@ -445,7 +445,7 @@ export class DDSTools {
      * Uploads DDS Levels to a Babylon Texture
      * @hidden
      */
-    public static UploadDDSLevels(engine: Engine, texture: InternalTexture, arrayBuffer: any, info: DDSInfo, loadMipmaps: boolean, faces: number, lodIndex = -1, currentFace?: number) {
+    public static UploadDDSLevels(engine: BaseEngine, texture: InternalTexture, arrayBuffer: any, info: DDSInfo, loadMipmaps: boolean, faces: number, lodIndex = -1, currentFace?: number) {
         var sphericalPolynomialFaces: Nullable<Array<ArrayBufferView>> = null;
         if (info.sphericalPolynomial) {
             sphericalPolynomialFaces = new Array<ArrayBufferView>();
@@ -661,8 +661,8 @@ export class DDSTools {
     }
 }
 
-declare module "../Engines/engine" {
-    export interface Engine {
+declare module "../Engines/baseEngine" {
+    export interface BaseEngine {
         /**
          * Create a cube texture from prefiltered data (ie. the mipmaps contain ready to use data for PBR reflection)
          * @param rootUrl defines the url where the file to load is located
@@ -697,7 +697,7 @@ declare module "../Engines/engine" {
  * @param createPolynomials defines wheter or not to create polynomails harmonics for the texture
  * @returns the cube texture as an InternalTexture
  */
-Engine.prototype.createPrefilteredCubeTexture = function(rootUrl: string, scene: Nullable<Scene>, lodScale: number, lodOffset: number,
+BaseEngine.prototype.createPrefilteredCubeTexture = function(rootUrl: string, scene: Nullable<Scene>, lodScale: number, lodOffset: number,
     onLoad: Nullable<(internalTexture: Nullable<InternalTexture>) => void> = null,
     onError: Nullable<(message?: string, exception?: any) => void> = null,
     format?: number, forcedExtension: any = null,

+ 3 - 2
src/Misc/environmentTextureTools.ts

@@ -15,6 +15,7 @@ import "../Engines/Extensions/engine.renderTarget";
 
 import "../Shaders/rgbdEncode.fragment";
 import "../Shaders/rgbdDecode.fragment";
+import { Engine } from '../Engines/engine';
 
 /**
  * Raw texture data and descriptor sufficient for WebGL texture upload
@@ -153,7 +154,7 @@ export class EnvironmentTextureTools {
             return Promise.reject("The cube texture is invalid (not prefiltered).");
         }
 
-        let engine = internalTexture.getEngine();
+        let engine = internalTexture.getEngine() as Engine;
         if (engine && engine.premultipliedAlpha) {
             return Promise.reject("Env texture can only be created when the engine is created with the premultipliedAlpha option set to false.");
         }
@@ -393,7 +394,7 @@ export class EnvironmentTextureTools {
         const mipmapsCount = Math.round(Scalar.Log2(texture.width)) + 1;
 
         // Gets everything ready.
-        let engine = texture.getEngine();
+        let engine = texture.getEngine() as Engine;
         let expandTexture = false;
         let generateNonLODTextures = false;
         let rgbdPostProcess: Nullable<PostProcess> = null;

+ 2 - 1
src/Misc/rgbdTextureTools.ts

@@ -1,6 +1,7 @@
 import { Constants } from "../Engines/constants";
 import { PostProcess } from "../PostProcesses/postProcess";
 import "../Shaders/rgbdDecode.fragment";
+import { Engine } from '../Engines/engine';
 
 declare type Texture = import("../Materials/Textures/texture").Texture;
 
@@ -20,7 +21,7 @@ export class RGBDTextureTools {
 
         texture.onLoadObservable.addOnce(() => {
             // Gets everything ready.
-            let engine = internalTexture.getEngine();
+            let engine = internalTexture.getEngine() as Engine;
             let caps = engine.getCaps();
             let expandTexture = false;
 

+ 4 - 0
tests/es6Modules/baseEngineOnly.ts

@@ -0,0 +1,4 @@
+import { BaseEngine } from "@babylonjs/core/Engines/baseEngine";
+
+const canvas = document.getElementById("renderCanvas") as HTMLCanvasElement;
+new BaseEngine(canvas);

+ 1 - 0
tests/es6Modules/webpack.config.js

@@ -4,6 +4,7 @@ const config = require("../../Tools/Config/config");
 module.exports = {
     context: path.resolve(__dirname),
     entry: {
+        baseEngineOnly: path.resolve(__dirname, 'baseEngineOnly.ts'),
         engineOnly: path.resolve(__dirname, 'engineOnly.ts'),
         sceneOnly: path.resolve(__dirname, 'sceneOnly.ts'),
         minGridMaterial: path.resolve(__dirname, 'minGridMaterial.ts'),