123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424 |
- var INSPECTOR =
- /******/ (function(modules) { // webpackBootstrap
- /******/ // The module cache
- /******/ var installedModules = {};
- /******/ // The require function
- /******/ function __webpack_require__(moduleId) {
- /******/ // Check if module is in cache
- /******/ if(installedModules[moduleId])
- /******/ return installedModules[moduleId].exports;
- /******/ // Create a new module (and put it into the cache)
- /******/ var module = installedModules[moduleId] = {
- /******/ exports: {},
- /******/ id: moduleId,
- /******/ loaded: false
- /******/ };
- /******/ // Execute the module function
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- /******/ // Flag the module as loaded
- /******/ module.loaded = true;
- /******/ // Return the exports of the module
- /******/ return module.exports;
- /******/ }
- /******/ // expose the modules object (__webpack_modules__)
- /******/ __webpack_require__.m = modules;
- /******/ // expose the module cache
- /******/ __webpack_require__.c = installedModules;
- /******/ // __webpack_public_path__
- /******/ __webpack_require__.p = "";
- /******/ // Load entry module and return exports
- /******/ return __webpack_require__(0);
- /******/ })
- /************************************************************************/
- /******/ ([
- /* 0 */
- /***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(1);
- module.exports = __webpack_require__(5);
- /***/ }),
- /* 1 */
- /***/ (function(module, exports, __webpack_require__) {
- // style-loader: Adds some css to the DOM by adding a <style> tag
- // load the styles
- var content = __webpack_require__(2);
- if(typeof content === 'string') content = [[module.id, content, '']];
- // add the styles to the DOM
- var update = __webpack_require__(4)(content, {});
- if(content.locals) module.exports = content.locals;
- // Hot Module Replacement
- if(false) {
- // When the styles change, update the <style> tags
- if(!content.locals) {
- module.hot.accept("!!../../../Tools/Gulp/node_modules/css-loader/index.js!./babylon.inspector.css", function() {
- var newContent = require("!!../../../Tools/Gulp/node_modules/css-loader/index.js!./babylon.inspector.css");
- if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
- update(newContent);
- });
- }
- // When the module is disposed, remove the <style> tags
- module.hot.dispose(function() { update(); });
- }
- /***/ }),
- /* 2 */
- /***/ (function(module, exports, __webpack_require__) {
- exports = module.exports = __webpack_require__(3)();
- // imports
- exports.push([module.id, "@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css);", ""]);
- exports.push([module.id, "@import url(https://fonts.googleapis.com/css?family=Inconsolata);", ""]);
- // module
- exports.push([module.id, ".insp-wrapper {\n user-select: none;\n display: flex;\n font-size: 0.9em;\n font-family: \"Inconsolata\", sans-serif;\n background-color: #242424;\n /**\r\n * A tool contained in the tree panel (available for each item of the tree)\r\n */\n /**\r\n * The toolbar contains : \r\n * - a refresh tool - refresh the whole panel\r\n * - a popup tool - Open the inspector in a new panel\r\n * ...\r\n */\n /*\r\n* 1. Set to 0 height and width, and remove border for a slider without a thumb\r\n*/ }\n .insp-wrapper .gutter {\n background-color: #2c2c2c; }\n .insp-wrapper .gutter.gutter-vertical:not(.blocked) {\n cursor: ns-resize; }\n .insp-wrapper .gutter.gutter-horizontal:not(.blocked) {\n cursor: ew-resize; }\n .insp-wrapper .insp-right-panel {\n width: 750px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n flex-shrink: 0; }\n .insp-wrapper .insp-right-panel.popupmode {\n width: 100% !important; }\n .insp-wrapper .insp-right-panel .top-panel {\n width: 100%;\n height: 100%;\n position: relative;\n background-color: #242424;\n color: #ccc;\n font-size: 1em; }\n .insp-wrapper .insp-right-panel .top-panel .tab-panel-content {\n width: 100%;\n height: calc(100% - 32px); }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel {\n position: absolute;\n z-index: 10;\n top: 32px;\n right: 0;\n width: 100px;\n display: none;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border: 1px solid #454545;\n background-color: #242424; }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel .invisible-tab {\n height: 25px;\n width: 100%;\n line-height: 25px;\n text-align: center;\n background-color: #2c2c2c;\n cursor: pointer; }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel .invisible-tab:hover {\n background-color: #383838; }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel .invisible-tab:active {\n background-color: #454545; }\n .insp-wrapper .tooltip {\n position: absolute;\n top: 32px;\n right: 0;\n color: #f29766;\n display: none;\n z-index: 4;\n font-family: \"Inconsolata\", sans-serif;\n padding: 2px;\n background-color: #242424;\n border: 1px solid #454545; }\n .insp-wrapper .treeTool {\n margin: 3px 8px 3px 3px;\n cursor: pointer;\n position: relative; }\n .insp-wrapper .treeTool:hover {\n color: #5db0d7; }\n .insp-wrapper .treeTool.active {\n color: #5db0d7; }\n .insp-wrapper .tab-panel {\n height: 100%; }\n .insp-wrapper .tab-panel.searchable {\n height: calc(100% - 30px - 10px); }\n .insp-wrapper .tab-panel .texture-image {\n max-height: 400px; }\n .insp-wrapper .tab-panel .scene-actions {\n overflow-y: auto;\n padding-left: 5px; }\n .insp-wrapper .tab-panel .scene-actions .actions-title {\n font-size: 1.1em;\n padding-bottom: 10px;\n border-bottom: 1px solid #5db0d7;\n margin: 10px 0 10px 0; }\n .insp-wrapper .tab-panel .scene-actions .defaut-action, .insp-wrapper .tab-panel .scene-actions .action-radio, .insp-wrapper .tab-panel .scene-actions .action {\n height: 20px;\n line-height: 20px;\n width: 100%;\n cursor: pointer; }\n .insp-wrapper .tab-panel .scene-actions .defaut-action:hover, .insp-wrapper .tab-panel .scene-actions .action-radio:hover, .insp-wrapper .tab-panel .scene-actions .action:hover {\n background-color: #2c2c2c; }\n .insp-wrapper .tab-panel .scene-actions .defaut-action:active, .insp-wrapper .tab-panel .scene-actions .action-radio:active, .insp-wrapper .tab-panel .scene-actions .action:active {\n background-color: #383838; }\n .insp-wrapper .tab-panel .scene-actions .action-radio:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: 'FontAwesome', sans-serif;\n content: \"\\F10C\";\n margin-right: 10px; }\n .insp-wrapper .tab-panel .scene-actions .action-radio.active:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: 'FontAwesome', sans-serif;\n content: \"\\F192\";\n color: #5db0d7;\n margin-right: 10px; }\n .insp-wrapper .tab-panel .scene-actions .action:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: 'FontAwesome', sans-serif;\n content: \"\\F096\";\n margin-right: 10px; }\n .insp-wrapper .tab-panel .scene-actions .action.active:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: 'FontAwesome', sans-serif;\n content: \"\\F14A\";\n color: #5db0d7;\n margin-right: 10px; }\n .insp-wrapper .tab-panel .shader-tree-panel {\n height: 30px; }\n .insp-wrapper .tab-panel .shader-tree-panel select {\n height: 30px;\n background-color: transparent;\n color: #ccc;\n height: 30px;\n width: 100%;\n max-width: 300px;\n padding-left: 15px;\n border: 1px solid #2c2c2c;\n outline: 1px solid #454545; }\n .insp-wrapper .tab-panel .shader-tree-panel select option {\n padding: 5px;\n color: gray; }\n .insp-wrapper .tab-panel .shader-panel {\n min-height: 100px;\n user-select: text;\n box-sizing: border-box;\n padding: 0 15px; }\n .insp-wrapper .tab-panel .shader-panel pre {\n margin: 0;\n white-space: pre-wrap; }\n .insp-wrapper .tab-panel .shader-panel pre code {\n background-color: #242424 !important;\n padding: 0;\n margin: 0; }\n .insp-wrapper .tab-panel .shader-panel .shader-panel-title {\n height: 25px;\n border-bottom: 1px solid #383838;\n text-transform: uppercase;\n line-height: 25px;\n margin-bottom: 10px; }\n .insp-wrapper .tab-panel .console-panel {\n min-height: 100px;\n user-select: text;\n box-sizing: border-box;\n padding: 0 15px; }\n .insp-wrapper .tab-panel .console-panel .console-panel-title {\n height: 25px;\n border-bottom: 1px solid #383838;\n text-transform: uppercase;\n line-height: 25px;\n margin-bottom: 10px; }\n .insp-wrapper .tab-panel .console-panel .console-panel-content {\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 30px); }\n .insp-wrapper .tab-panel .console-panel .defaut-line, .insp-wrapper .tab-panel .console-panel .log, .insp-wrapper .tab-panel .console-panel .warn, .insp-wrapper .tab-panel .console-panel .error, .insp-wrapper .tab-panel .console-panel .object {\n word-wrap: break-word;\n padding: 3px 0 3px 5px; }\n .insp-wrapper .tab-panel .console-panel .caller {\n padding: 3px 0 3px 0;\n color: #349ccd; }\n .insp-wrapper .tab-panel .console-panel .log {\n color: white; }\n .insp-wrapper .tab-panel .console-panel .warn {\n color: orange; }\n .insp-wrapper .tab-panel .console-panel .error {\n color: orangered; }\n .insp-wrapper .tab-panel .console-panel .object {\n color: #5db0d7; }\n .insp-wrapper .tab-panel.stats-panel {\n overflow-y: auto; }\n .insp-wrapper .tab-panel .stats-fps {\n font-weight: 600;\n color: #f29766; }\n .insp-wrapper .tab-panel .stat-title1 {\n font-size: 1.1em;\n padding: 10px; }\n .insp-wrapper .tab-panel .stat-title2 {\n margin: 10px 0 10px 0;\n font-size: 1.05em;\n border-bottom: 1px solid #5db0d7;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .stat-label {\n display: inline-block;\n width: 80%;\n padding: 2px;\n background-color: #2c2c2c;\n border-bottom: 1px solid #242424;\n border-top: 1px solid #242424;\n height: 30px;\n line-height: 30px;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .stat-value {\n display: inline-block;\n width: 20%;\n padding: 2px;\n background-color: #2c2c2c;\n border-top: 1px solid #242424;\n border-bottom: 1px solid #242424;\n height: 30px;\n line-height: 30px;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .stat-infos {\n width: 100%;\n padding: 4px; }\n .insp-wrapper .property-type {\n color: #5db0d7; }\n .insp-wrapper .property-name, .insp-wrapper .insp-details .base-row .prop-name, .insp-wrapper .insp-details .row .prop-name, .insp-wrapper .insp-details .header-row .prop-name {\n color: #f29766; }\n .insp-wrapper .insp-tree {\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(50% - 32px - 30px); }\n .insp-wrapper .insp-tree .line {\n padding: 3px;\n cursor: pointer; }\n .insp-wrapper .insp-tree .line:hover {\n background-color: #2c2c2c; }\n .insp-wrapper .insp-tree .line.active {\n background-color: #454545; }\n .insp-wrapper .insp-tree .line.active .line-content {\n background-color: #242424; }\n .insp-wrapper .insp-tree .line.unfolded:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: 'FontAwesome', sans-serif;\n content: \"\\F078\"; }\n .insp-wrapper .insp-tree .line.folded:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: 'FontAwesome', sans-serif;\n content: \"\\F054\"; }\n .insp-wrapper .insp-tree .line .line-content {\n padding-left: 15px; }\n .insp-wrapper .insp-tree .line .line-content:hover {\n background-color: #242424; }\n .insp-wrapper .insp-tree .line .line-content .line:hover:first-child {\n background-color: #383838; }\n .insp-wrapper .insp-details {\n background-color: #242424;\n overflow-y: auto;\n overflow-x: auto;\n color: #ccc;\n font-family: \"Inconsolata\", sans-serif; }\n .insp-wrapper .insp-details .details {\n padding-left: 5px; }\n .insp-wrapper .insp-details .base-row, .insp-wrapper .insp-details .row, .insp-wrapper .insp-details .header-row {\n display: flex;\n width: 100%; }\n .insp-wrapper .insp-details .base-row .base-property, .insp-wrapper .insp-details .row .base-property, .insp-wrapper .insp-details .header-row .base-property, .insp-wrapper .insp-details .base-row .prop-name, .insp-wrapper .insp-details .row .prop-name, .insp-wrapper .insp-details .header-row .prop-name, .insp-wrapper .insp-details .base-row .prop-value, .insp-wrapper .insp-details .row .prop-value, .insp-wrapper .insp-details .header-row .prop-value {\n word-wrap: break-word;\n padding: 2px 0 2px 0; }\n .insp-wrapper .insp-details .base-row .prop-name, .insp-wrapper .insp-details .row .prop-name, .insp-wrapper .insp-details .header-row .prop-name {\n width: 35%; }\n .insp-wrapper .insp-details .base-row .prop-value, .insp-wrapper .insp-details .row .prop-value, .insp-wrapper .insp-details .header-row .prop-value {\n width: 59%;\n padding-left: 10px; }\n .insp-wrapper .insp-details .base-row .prop-value.clickable, .insp-wrapper .insp-details .row .prop-value.clickable, .insp-wrapper .insp-details .header-row .prop-value.clickable {\n cursor: pointer; }\n .insp-wrapper .insp-details .base-row .prop-value.clickable:hover, .insp-wrapper .insp-details .row .prop-value.clickable:hover, .insp-wrapper .insp-details .header-row .prop-value.clickable:hover {\n background-color: #383838; }\n .insp-wrapper .insp-details .base-row .prop-value.clickable:after, .insp-wrapper .insp-details .row .prop-value.clickable:after, .insp-wrapper .insp-details .header-row .prop-value.clickable:after {\n font-family: 'FontAwesome', sans-serif;\n content: \"\\A0 \\A0 \\A0 \\F054\"; }\n .insp-wrapper .insp-details .row:nth-child(even) {\n background-color: #2c2c2c; }\n .insp-wrapper .insp-details .row.unfolded .prop-value.clickable:after {\n font-family: 'FontAwesome', sans-serif;\n content: \"\\A0 \\A0 \\A0 \\F078\"; }\n .insp-wrapper .insp-details .header-row {\n background-color: #2c2c2c;\n color: #ccc;\n width: 100%;\n max-width: 100%; }\n .insp-wrapper .insp-details .header-row > * {\n color: #ccc !important;\n padding: 5px 0 5px 5px !important;\n cursor: pointer; }\n .insp-wrapper .insp-details .header-row > *:hover {\n background-color: #383838; }\n .insp-wrapper .insp-details .header-row .header-col {\n display: flex;\n justify-content: space-between;\n align-items: center; }\n .insp-wrapper .insp-details .header-row .header-col .sort-direction {\n margin-right: 5px; }\n .insp-wrapper .insp-details .element-viewer, .insp-wrapper .insp-details .color-element, .insp-wrapper .insp-details .texture-element {\n position: relative;\n width: 10px;\n height: 10px;\n display: inline-block;\n margin-left: 5px; }\n .insp-wrapper .insp-details .color-element {\n top: 2px; }\n .insp-wrapper .insp-details .texture-element {\n color: #f29766;\n margin-left: 10px; }\n .insp-wrapper .insp-details .texture-element .texture-viewer {\n color: #ccc;\n position: absolute;\n z-index: 10;\n bottom: 0;\n right: 0;\n display: block;\n width: 150px;\n height: 150px;\n border: 1px solid #454545;\n background-color: #242424;\n transform: translateX(100%) translateY(100%);\n display: none;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center; }\n .insp-wrapper .insp-details .texture-element .texture-viewer .texture-viewer-img {\n margin: 10px 0 10px 0;\n max-width: 110px;\n max-height: 110px; }\n .insp-wrapper .tabbar {\n height: 32px;\n display: flex;\n align-items: center;\n border-bottom: 1px solid #383838;\n width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n box-sizing: border-box; }\n .insp-wrapper .tabbar .tab {\n height: calc(32px - 2px);\n width: auto;\n padding: 0 10px 0 10px;\n color: #ccc;\n line-height: 32px;\n text-align: center;\n cursor: pointer;\n margin: 0 5px 0 5px;\n box-sizing: border-box; }\n .insp-wrapper .tabbar .tab:hover {\n border-bottom: 1px solid #f29766;\n background-color: #2c2c2c; }\n .insp-wrapper .tabbar .tab:active {\n background-color: #383838; }\n .insp-wrapper .tabbar .tab.active {\n border-bottom: 1px solid #f29766; }\n .insp-wrapper .tabbar .more-tabs {\n width: 32px;\n height: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: relative;\n border-right: 1px solid #383838; }\n .insp-wrapper .tabbar .more-tabs:hover {\n background-color: #383838; }\n .insp-wrapper .tabbar .more-tabs:active {\n color: #f29766;\n background-color: #454545; }\n .insp-wrapper .tabbar .more-tabs.active {\n color: #f29766; }\n .insp-wrapper .toolbar {\n display: flex; }\n .insp-wrapper .toolbar .tool {\n width: 32px;\n height: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: relative;\n border-right: 1px solid #383838; }\n .insp-wrapper .toolbar .tool:hover {\n background-color: #383838; }\n .insp-wrapper .toolbar .tool:active {\n color: #f29766;\n background-color: #454545; }\n .insp-wrapper .toolbar .tool.active {\n color: #f29766; }\n .insp-wrapper .searchbar {\n border: 1px solid #2c2c2c;\n margin-bottom: 5px;\n display: flex;\n align-items: center;\n color: #b3b3b3; }\n .insp-wrapper .searchbar input {\n background-color: #242424;\n border: none;\n width: 100%;\n outline: none;\n font-family: \"Inconsolata\", sans-serif;\n color: #b3b3b3;\n padding: 3px 0 3px 10px;\n margin: 6px 0 6px 0; }\n .insp-wrapper input[type=\"range\"] {\n margin: auto;\n -webkit-appearance: none;\n position: relative;\n overflow: hidden;\n height: 15px;\n width: 50%;\n cursor: pointer;\n border-radius: 0;\n /* iOS */ }\n .insp-wrapper ::-webkit-slider-runnable-track {\n background: #ddd; }\n .insp-wrapper ::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 20px;\n /* 1 */\n height: 15px;\n /* 1 */\n background: #fff;\n box-shadow: -100vw 0 0 100vw dodgerblue;\n border: 0px solid #999;\n /* 1 */ }\n .insp-wrapper ::-moz-range-track {\n height: 15px;\n background: #ddd; }\n .insp-wrapper ::-moz-range-thumb {\n background: #fff;\n height: 15px;\n width: 20px;\n border: 0px solid #999;\n border-radius: 0 !important;\n box-shadow: -100vw 0 0 100vw dodgerblue;\n box-sizing: border-box; }\n .insp-wrapper ::-ms-fill-lower {\n background: dodgerblue; }\n .insp-wrapper ::-ms-thumb {\n background: #fff;\n border: 0px solid #999;\n height: 15px;\n width: 20px;\n box-sizing: border-box; }\n .insp-wrapper ::-ms-ticks-after {\n display: none; }\n .insp-wrapper ::-ms-ticks-before {\n display: none; }\n .insp-wrapper ::-ms-track {\n background: #ddd;\n color: transparent;\n height: 15px;\n border: none; }\n .insp-wrapper ::-ms-tooltip {\n display: none; }\n", ""]);
- // exports
- /***/ }),
- /* 3 */
- /***/ (function(module, exports) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- // css base code, injected by the css-loader
- module.exports = function() {
- var list = [];
- // return the list of modules as css string
- list.toString = function toString() {
- var result = [];
- for(var i = 0; i < this.length; i++) {
- var item = this[i];
- if(item[2]) {
- result.push("@media " + item[2] + "{" + item[1] + "}");
- } else {
- result.push(item[1]);
- }
- }
- return result.join("");
- };
- // import a list of modules into the list
- list.i = function(modules, mediaQuery) {
- if(typeof modules === "string")
- modules = [[null, modules, ""]];
- var alreadyImportedModules = {};
- for(var i = 0; i < this.length; i++) {
- var id = this[i][0];
- if(typeof id === "number")
- alreadyImportedModules[id] = true;
- }
- for(i = 0; i < modules.length; i++) {
- var item = modules[i];
- // skip already imported module
- // this implementation is not 100% perfect for weird media query combinations
- // when a module is imported multiple times with different media queries.
- // I hope this will never occur (Hey this way we have smaller bundles)
- if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
- if(mediaQuery && !item[2]) {
- item[2] = mediaQuery;
- } else if(mediaQuery) {
- item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
- }
- list.push(item);
- }
- }
- };
- return list;
- };
- /***/ }),
- /* 4 */
- /***/ (function(module, exports, __webpack_require__) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- var stylesInDom = {},
- memoize = function(fn) {
- var memo;
- return function () {
- if (typeof memo === "undefined") memo = fn.apply(this, arguments);
- return memo;
- };
- },
- isOldIE = memoize(function() {
- return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase());
- }),
- getHeadElement = memoize(function () {
- return document.head || document.getElementsByTagName("head")[0];
- }),
- singletonElement = null,
- singletonCounter = 0,
- styleElementsInsertedAtTop = [];
- module.exports = function(list, options) {
- if(false) {
- if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
- }
- options = options || {};
- // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
- // tags it will allow on a page
- if (typeof options.singleton === "undefined") options.singleton = isOldIE();
- // By default, add <style> tags to the bottom of <head>.
- if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
- var styles = listToStyles(list);
- addStylesToDom(styles, options);
- return function update(newList) {
- var mayRemove = [];
- for(var i = 0; i < styles.length; i++) {
- var item = styles[i];
- var domStyle = stylesInDom[item.id];
- domStyle.refs--;
- mayRemove.push(domStyle);
- }
- if(newList) {
- var newStyles = listToStyles(newList);
- addStylesToDom(newStyles, options);
- }
- for(var i = 0; i < mayRemove.length; i++) {
- var domStyle = mayRemove[i];
- if(domStyle.refs === 0) {
- for(var j = 0; j < domStyle.parts.length; j++)
- domStyle.parts[j]();
- delete stylesInDom[domStyle.id];
- }
- }
- };
- }
- function addStylesToDom(styles, options) {
- for(var i = 0; i < styles.length; i++) {
- var item = styles[i];
- var domStyle = stylesInDom[item.id];
- if(domStyle) {
- domStyle.refs++;
- for(var j = 0; j < domStyle.parts.length; j++) {
- domStyle.parts[j](item.parts[j]);
- }
- for(; j < item.parts.length; j++) {
- domStyle.parts.push(addStyle(item.parts[j], options));
- }
- } else {
- var parts = [];
- for(var j = 0; j < item.parts.length; j++) {
- parts.push(addStyle(item.parts[j], options));
- }
- stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
- }
- }
- }
- function listToStyles(list) {
- var styles = [];
- var newStyles = {};
- for(var i = 0; i < list.length; i++) {
- var item = list[i];
- var id = item[0];
- var css = item[1];
- var media = item[2];
- var sourceMap = item[3];
- var part = {css: css, media: media, sourceMap: sourceMap};
- if(!newStyles[id])
- styles.push(newStyles[id] = {id: id, parts: [part]});
- else
- newStyles[id].parts.push(part);
- }
- return styles;
- }
- function insertStyleElement(options, styleElement) {
- var head = getHeadElement();
- var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
- if (options.insertAt === "top") {
- if(!lastStyleElementInsertedAtTop) {
- head.insertBefore(styleElement, head.firstChild);
- } else if(lastStyleElementInsertedAtTop.nextSibling) {
- head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
- } else {
- head.appendChild(styleElement);
- }
- styleElementsInsertedAtTop.push(styleElement);
- } else if (options.insertAt === "bottom") {
- head.appendChild(styleElement);
- } else {
- throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
- }
- }
- function removeStyleElement(styleElement) {
- styleElement.parentNode.removeChild(styleElement);
- var idx = styleElementsInsertedAtTop.indexOf(styleElement);
- if(idx >= 0) {
- styleElementsInsertedAtTop.splice(idx, 1);
- }
- }
- function createStyleElement(options) {
- var styleElement = document.createElement("style");
- styleElement.type = "text/css";
- insertStyleElement(options, styleElement);
- return styleElement;
- }
- function createLinkElement(options) {
- var linkElement = document.createElement("link");
- linkElement.rel = "stylesheet";
- insertStyleElement(options, linkElement);
- return linkElement;
- }
- function addStyle(obj, options) {
- var styleElement, update, remove;
- if (options.singleton) {
- var styleIndex = singletonCounter++;
- styleElement = singletonElement || (singletonElement = createStyleElement(options));
- update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
- remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
- } else if(obj.sourceMap &&
- typeof URL === "function" &&
- typeof URL.createObjectURL === "function" &&
- typeof URL.revokeObjectURL === "function" &&
- typeof Blob === "function" &&
- typeof btoa === "function") {
- styleElement = createLinkElement(options);
- update = updateLink.bind(null, styleElement);
- remove = function() {
- removeStyleElement(styleElement);
- if(styleElement.href)
- URL.revokeObjectURL(styleElement.href);
- };
- } else {
- styleElement = createStyleElement(options);
- update = applyToTag.bind(null, styleElement);
- remove = function() {
- removeStyleElement(styleElement);
- };
- }
- update(obj);
- return function updateStyle(newObj) {
- if(newObj) {
- if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
- return;
- update(obj = newObj);
- } else {
- remove();
- }
- };
- }
- var replaceText = (function () {
- var textStore = [];
- return function (index, replacement) {
- textStore[index] = replacement;
- return textStore.filter(Boolean).join('\n');
- };
- })();
- function applyToSingletonTag(styleElement, index, remove, obj) {
- var css = remove ? "" : obj.css;
- if (styleElement.styleSheet) {
- styleElement.styleSheet.cssText = replaceText(index, css);
- } else {
- var cssNode = document.createTextNode(css);
- var childNodes = styleElement.childNodes;
- if (childNodes[index]) styleElement.removeChild(childNodes[index]);
- if (childNodes.length) {
- styleElement.insertBefore(cssNode, childNodes[index]);
- } else {
- styleElement.appendChild(cssNode);
- }
- }
- }
- function applyToTag(styleElement, obj) {
- var css = obj.css;
- var media = obj.media;
- if(media) {
- styleElement.setAttribute("media", media)
- }
- if(styleElement.styleSheet) {
- styleElement.styleSheet.cssText = css;
- } else {
- while(styleElement.firstChild) {
- styleElement.removeChild(styleElement.firstChild);
- }
- styleElement.appendChild(document.createTextNode(css));
- }
- }
- function updateLink(linkElement, obj) {
- var css = obj.css;
- var sourceMap = obj.sourceMap;
- if(sourceMap) {
- // http://stackoverflow.com/a/26603875
- css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
- }
- var blob = new Blob([css], { type: "text/css" });
- var oldSrc = linkElement.href;
- linkElement.href = URL.createObjectURL(blob);
- if(oldSrc)
- URL.revokeObjectURL(oldSrc);
- }
- /***/ }),
- /* 5 */
- /***/ (function(module, exports, __webpack_require__) {
- /*** IMPORTS FROM imports-loader ***/
- var Split = __webpack_require__(6);
- var INSPECTOR;!(function(e){var t=(function(){function t(n,r,i,o,s){void 0===i&&(i=0),void 0===o&&(o=null);var a=this;if(this._popupMode=!1,BABYLON.GUI?e.loadGUIProperties():BABYLON.Tools.LoadScript("https://preview.babylonjs.com/gui/babylon.gui.js",(function(){e.loadGUIProperties()}),(function(){console.warn("Please add script https://preview.babylonjs.com/gui/babylon.gui.js to the HTML file")})),this._initialTab=i,this._parentElement=o,this._scene=n,t.DOCUMENT=window.document,t.WINDOW=window,r)this.openPopup(!0);else{var p=this._scene.getEngine().getRenderingCanvas(),c=p.parentElement,l=t.WINDOW.getComputedStyle(p);if(this._canvasStyle={width:e.Helpers.Css(p,"width"),height:e.Helpers.Css(p,"height"),position:l.position,top:l.top,bottom:l.bottom,left:l.left,right:l.right,padding:l.padding,paddingBottom:l.paddingBottom,paddingLeft:l.paddingLeft,paddingTop:l.paddingTop,paddingRight:l.paddingRight,margin:l.margin,marginBottom:l.marginBottom,marginLeft:l.marginLeft,marginTop:l.marginTop,marginRight:l.marginRight},this._parentElement){this._c2diwrapper=e.Helpers.CreateDiv("insp-wrapper",this._parentElement),this._c2diwrapper.style.width="100%",this._c2diwrapper.style.height="100%",this._c2diwrapper.style.paddingLeft="5px";var u=e.Helpers.CreateDiv("insp-right-panel",this._c2diwrapper);u.style.width="100%",u.style.height="100%",this._buildInspector(u)}else{this._c2diwrapper=e.Helpers.CreateDiv("insp-wrapper");for(var _ in this._canvasStyle)this._c2diwrapper.style[_]=this._canvasStyle[_];if(!l.width||!l.height||!l.left)return;var h=parseFloat(l.width.substr(0,l.width.length-2))||0,d=parseFloat(l.height.substr(0,l.height.length-2))||0;if("absolute"===l.position||"relative"===l.position){var f=parseFloat(l.left.substr(0,l.left.length-2))||0;h+f>=t.WINDOW.innerWidth&&(this._c2diwrapper.style.maxWidth=h-f+"px")}var v=this._getRelativeParent(p),y=v.clientWidth,b=v.clientHeight,m=h/y*100,g=d/b*100;this._c2diwrapper.style.width=m+"%",this._c2diwrapper.style.height=g+"%",p.style.position="static",p.style.width="100%",p.style.height="100%",p.style.paddingBottom="0",p.style.paddingLeft="0",p.style.paddingTop="0",p.style.paddingRight="0",p.style.margin="0",p.style.marginBottom="0",p.style.marginLeft="0",p.style.marginTop="0",p.style.marginRight="0",c&&c.replaceChild(this._c2diwrapper,p),this._c2diwrapper.appendChild(p);var u=e.Helpers.CreateDiv("insp-right-panel",this._c2diwrapper);this._parentElement||Split([p,u],{direction:"horizontal",sizes:[75,25],onDrag:function(){e.Helpers.SEND_EVENT("resize"),a._tabbar&&a._tabbar.updateWidth()}}),this._buildInspector(u)}e.Helpers.SEND_EVENT("resize"),this._tabbar.updateWidth()}if(e.Helpers.IsBrowserEdge()||this.refresh(),s)for(var C=s.backgroundColor||"#242424",T=s.backgroundColorLighter||"#2c2c2c",O=s.backgroundColorLighter2||"#383838",P=s.backgroundColorLighter3||"#454545",E=s.color||"#ccc",x=s.colorTop||"#f29766",S=s.colorBot||"#5db0d7",I=t.DOCUMENT.querySelectorAll("style"),L=0;L<I.length;L++){var w=I[L];-1!=w.innerHTML.indexOf("insp-wrapper")&&(I[L].innerHTML=I[L].innerHTML.replace(/#242424/g,C).replace(/#2c2c2c/g,T).replace(/#383838/g,O).replace(/#454545/g,P).replace(/#ccc/g,E).replace(/#f29766/g,x).replace(/#5db0d7/g,S))}}return t.prototype._getRelativeParent=function(e,n){if(!e.parentElement)return e;var r=t.WINDOW.getComputedStyle(e);return n?"relative"===r.position||"absolute"===r.position?e:this._getRelativeParent(e.parentElement,!0):"static"==r.position?e.parentElement:this._getRelativeParent(e.parentElement,!0)},t.prototype._buildInspector=function(t){this._tabbar=new e.TabBar(this,this._initialTab),this._topPanel=e.Helpers.CreateDiv("top-panel",t),this._topPanel.appendChild(this._tabbar.toHtml()),this._tabbar.updateWidth(),this._tabPanel=e.Helpers.CreateDiv("tab-panel-content",this._topPanel)},Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"popupMode",{get:function(){return this._popupMode},enumerable:!0,configurable:!0}),t.prototype.filterItem=function(e){var t=this._tabbar.getActiveTab();t&&t.filter(e)},t.prototype.displayObjectDetails=function(e){this._tabbar.switchMeshTab(e)},t.prototype.refresh=function(){e.Helpers.CleanDiv(this._tabPanel);var t=this._tabbar.getActiveTab();t&&(t.update(),this._tabPanel.appendChild(t.getPanel()),e.Helpers.SEND_EVENT("resize"))},t.prototype.dispose=function(){if(!this._popupMode){var t=this._tabbar.getActiveTab();t&&t.dispose();var n=this._scene.getEngine().getRenderingCanvas();for(var r in this._canvasStyle)n.style[r]=this._canvasStyle[r];if(n.parentElement){var i=n.parentElement.parentElement;i&&(i.insertBefore(n,this._c2diwrapper),e.Helpers.CleanDiv(this._c2diwrapper),this._c2diwrapper.remove(),e.Helpers.SEND_EVENT("resize"))}}},t.prototype.openPopup=function(n){var r=this;if(e.Helpers.IsBrowserEdge())console.warn("Inspector - Popup mode is disabled in Edge, as the popup DOM cannot be updated from the main window for security reasons");else{var i=window.open("","Babylon.js INSPECTOR","toolbar=no,resizable=yes,menubar=no,width=750,height=1000");i.document.title="Babylon.js INSPECTOR";for(var o=t.DOCUMENT.querySelectorAll("style"),s=0;s<o.length;s++)i.document.body.appendChild(o[s].cloneNode(!0));for(var a=document.querySelectorAll("link"),p=0;p<a.length;p++){var c=i.document.createElement("link");c.rel="stylesheet",c.href=a[p].href,i.document.head.appendChild(c)}n||this.dispose(),this._popupMode=!0,t.DOCUMENT=i.document,t.WINDOW=i,this._c2diwrapper=e.Helpers.CreateDiv("insp-wrapper",i.document.body);var l=e.Helpers.CreateDiv("insp-right-panel",this._c2diwrapper);l.classList.add("popupmode"),this._buildInspector(l),this.refresh(),i.addEventListener("resize",(function(){r._tabbar&&r._tabbar.updateWidth()}))}},t.prototype.getActiveTabIndex=function(){return this._tabbar.getActiveTabIndex()},t})();e.Inspector=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){e.PROPERTIES={format:function(t){var n=e.Helpers.GET_TYPE(t)||"type_not_defined";return e.PROPERTIES[n]&&e.PROPERTIES[n].format?e.PROPERTIES[n].format(t):e.Helpers.GET_TYPE(t)},type_not_defined:{properties:new Array,format:function(){return""}},Vector2:{type:BABYLON.Vector2,properties:["x","y"],format:function(t){return"x:"+e.Helpers.Trunc(t.x)+", y:"+e.Helpers.Trunc(t.y)}},Vector3:{type:BABYLON.Vector3,properties:["x","y","z"],format:function(t){return"x:"+e.Helpers.Trunc(t.x)+", y:"+e.Helpers.Trunc(t.y)+", z:"+e.Helpers.Trunc(t.z)}},Color3:{type:BABYLON.Color3,properties:["r","g","b"],format:function(e){return"R:"+e.r+", G:"+e.g+", B:"+e.b},slider:{r:{min:0,max:1,step:.01},g:{min:0,max:1,step:.01},b:{min:0,max:1,step:.01}}},Color4:{type:BABYLON.Color4,properties:["r","g","b"],format:function(e){return"R:"+e.r+", G:"+e.g+", B:"+e.b},slider:{r:{min:0,max:1,step:.01},g:{min:0,max:1,step:.01},b:{min:0,max:1,step:.01}}},Quaternion:{type:BABYLON.Quaternion,properties:["x","y","z","w"]},Size:{type:BABYLON.Size,properties:["width","height"],format:function(t){return"Size - w:"+e.Helpers.Trunc(t.width)+", h:"+e.Helpers.Trunc(t.height)}},Texture:{type:BABYLON.Texture,properties:["hasAlpha","level","name","wrapU","wrapV","uScale","vScale","uAng","vAng","wAng","uOffset","vOffset"],format:function(e){return e.name}},RenderTargetTexture:{type:BABYLON.RenderTargetTexture},DynamicTexture:{type:BABYLON.DynamicTexture},BaseTexture:{type:BABYLON.BaseTexture},CubeTexture:{type:BABYLON.CubeTexture},HDRCubeTexture:{type:BABYLON.HDRCubeTexture},Sound:{type:BABYLON.Sound,properties:["name","autoplay","loop","useCustomAttenuation","soundTrackId","spatialSound","refDistance","rolloffFactor","maxDistance","distanceModel","isPlaying","isPaused"]},ArcRotateCamera:{type:BABYLON.ArcRotateCamera,properties:["position","alpha","beta","radius","angularSensibilityX","angularSensibilityY","target","lowerAlphaLimit","lowerBetaLimit","upperAlphaLimit","upperBetaLimit","lowerRadiusLimit","upperRadiusLimit","pinchPrecision","wheelPrecision","allowUpsideDown","checkCollisions"],slider:{alpha:{min:0,max:2*Math.PI,step:.01},beta:{min:-Math.PI,max:Math.PI,step:.01},fov:{min:0,max:180,step:1}}},FreeCamera:{type:BABYLON.FreeCamera,properties:["position","rotation","rotationQuaternion","cameraDirection","cameraRotation","ellipsoid","applyGravity","angularSensibility","keysUp","keysDown","keysLeft","keysRight","checkCollisions","speed","lockedTarget","noRotationConstraint","fov","inertia","minZ","maxZ","layerMask","mode","orthoBottom","orthoTop","orthoLeft","orthoRight"],slider:{fov:{min:0,max:180,step:1}}},Scene:{type:BABYLON.Scene,properties:["actionManager","activeCamera","ambientColor","clearColor","forceWireframe","forcePointsCloud","forceShowBoundingBoxes","useRightHandedSystem","hoverCursor","cameraToUseForPointers","fogEnabled","fogColor","fogDensity","fogStart","fogEnd","shadowsEnabled","lightsEnabled","collisionsEnabled","gravity","meshUnderPointer","pointerX","pointerY","uid"]},Mesh:{type:BABYLON.Mesh,properties:["name","position","rotation","rotationQuaternion","absolutePosition","material","actionManager","visibility","isVisible","isPickable","renderingGroupId","receiveShadows","renderOutline","outlineColor","outlineWidth","renderOverlay","overlayColor","overlayAlpha","hasVertexAlpha","useVertexColors","layerMask","alwaysSelectAsActiveMesh","ellipsoid","ellipsoidOffset","edgesWidth","edgesColor","checkCollisions","hasLODLevels"],format:function(e){return e.name},slider:{visibility:{min:0,max:1,step:.1}}},StandardMaterial:{type:BABYLON.StandardMaterial,properties:["name","alpha","alphaMode","wireframe","isFrozen","zOffset","ambientColor","emissiveColor","diffuseColor","specularColor","specularPower","useAlphaFromDiffuseTexture","linkEmissiveWithDiffuse","useSpecularOverAlpha","diffuseFresnelParameters","opacityFresnelParameters","reflectionFresnelParameters","refractionFresnelParameters","emissiveFresnelParameters","diffuseTexture","emissiveTexture","specularTexture","ambientTexture","bumpTexture","lightMapTexture","opacityTexture","reflectionTexture","refractionTexture"],format:function(e){return e.name},slider:{alpha:{min:0,max:1,step:.01}}},PBRMaterial:{type:BABYLON.PBRMaterial,properties:["name","albedoColor","albedoTexture","opacityTexture","reflectionTexture","emissiveTexture","bumpTexture","lightmapTexture","opacityFresnelParameters","emissiveFresnelParameters","linkEmissiveWithAlbedo","useLightmapAsShadowmap","useAlphaFromAlbedoTexture","useSpecularOverAlpha","useAutoMicroSurfaceFromReflectivityMap","useLogarithmicDepth","reflectivityColor","reflectivityTexture","reflectionTexture","reflectionColor","alpha","linkRefractionWithTransparency","indexOfRefraction","microSurface","useMicroSurfaceFromReflectivityMapAlpha","directIntensity","emissiveIntensity","specularIntensity","environmentIntensity","cameraExposure","cameraContrast","cameraColorGradingTexture","cameraColorCurves"],slider:{alpha:{min:0,max:1,step:.01}}},PhysicsImpostor:{type:BABYLON.PhysicsImpostor,properties:["friction","mass","restitution"]}}})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){function t(){var t={ValueAndUnit:{type:BABYLON.GUI.ValueAndUnit,properties:["_value","unit"],format:function(e){return e}},Control:{type:BABYLON.GUI.Control,properties:["_alpha","_fontFamily","_color","_scaleX","_scaleY","_rotation","_currentMeasure","_width","_height","_left","_top","_linkedMesh","isHitTestVisible","isPointerBlocker"],format:function(e){return e.name}},Button:{type:BABYLON.GUI.Button,properties:new Array,format:function(e){return e.name}},ColorPicker:{type:BABYLON.GUI.ColorPicker,properties:["_value"],format:function(e){return e.name}},Checkbox:{type:BABYLON.GUI.Checkbox,properties:["_isChecked","_background"],format:function(e){return e.name}},Ellipse:{type:BABYLON.GUI.Ellipse,properties:["_thickness"],format:function(e){return e.name}},Image:{type:BABYLON.GUI.Image,properties:["_imageWidth","_imageHeight","_loaded","_source"],format:function(e){return e.name}},Line:{type:BABYLON.GUI.Line,properties:["_lineWidth","_background","_x1","_y1","_x2","_y2"],format:function(e){return e.name}},RadioButton:{type:BABYLON.GUI.RadioButton,properties:["_isChecked","_background"],format:function(e){return e.name}},Rectangle:{type:BABYLON.GUI.Rectangle,properties:["_thickness","_cornerRadius"],format:function(e){return e.name}},Slider:{type:BABYLON.GUI.Slider,properties:["_minimum","_maximum","_value","_background","_borderColor"],format:function(e){return e.name}},StackPanel:{type:BABYLON.GUI.StackPanel,properties:["_isVertical"],format:function(e){return e.name}},TextBlock:{type:BABYLON.GUI.TextBlock,properties:["_text","_textWrapping"],format:function(e){return e.name}},Container:{type:BABYLON.GUI.Container,properties:["_background"],format:function(e){return e.name}}};for(var n in t)e.PROPERTIES[n]=t[n]}e.loadGUIProperties=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(){function t(){this._div=e.Helpers.CreateDiv()}return t.prototype.toHtml=function(){return this._div},t.prototype._build=function(){},t.prototype.dispose=function(){},t})();e.BasicElement=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(){function e(e){this._obj=e}return Object.defineProperty(e.prototype,"actualObject",{get:function(){return this._obj},enumerable:!0,configurable:!0}),e.prototype.correspondsTo=function(e){return e===this._obj},Object.defineProperty(e.prototype,"name",{get:function(){return e._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"object",{get:function(){return this._obj},enumerable:!0,configurable:!0}),e._name=BABYLON.Geometry.RandomId(),e})();e.Adapter=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e){return t.call(this,e)||this}return __extends(n,t),n.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},n.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},n.prototype.getProperties=function(){return e.Helpers.GetAllLinesProperties(this._obj)},n.prototype.getTools=function(){var t=[];return t.push(new e.CameraPOV(this)),t},n.prototype.setPOV=function(){this._obj.getScene().activeCamera=this._obj},n})(e.Adapter);e.CameraAdapter=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){var r=t.call(this,e)||this;return r._isVisible=!1,r._viewer=n,r}return __extends(n,t),n.prototype.id=function(){var e="",t=this._obj;return t&&t.object&&(e=t.object.name),e},n.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},n.prototype.getProperties=function(){return e.Helpers.GetAllLinesProperties(this._obj)},n.prototype.getTools=function(){var t=[];return t.push(new e.Checkbox(this)),t},n.prototype.setVisible=function(e){this._isVisible=e,e?this._viewer.showImpostor(this._obj):this._viewer.hideImpostor(this._obj)},n.prototype.isVisible=function(){return this._isVisible},n})(e.Adapter);e.PhysicsImpostorAdapter=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e){return t.call(this,e)||this}return __extends(n,t),n.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},n.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},n.prototype.getProperties=function(){return e.Helpers.GetAllLinesProperties(this._obj)},n.prototype.getTools=function(){var t=[];return t.push(new e.Checkbox(this)),t},n.prototype.setVisible=function(e){this._obj.isVisible=e},n.prototype.isVisible=function(){return this._obj.isVisible},n})(e.Adapter);e.GUIAdapter=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e){return t.call(this,e)||this}return __extends(n,t),n.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},n.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},n.prototype.getProperties=function(){return e.Helpers.GetAllLinesProperties(this._obj)},n.prototype.getTools=function(){var t=[];return t.push(new e.SoundInteractions(this)),t},n.prototype.setPlaying=function(e){this._obj.isPlaying?this._obj.pause():this._obj.play(),this._obj.onended=function(){e()}},n})(e.Adapter);e.SoundAdapter=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e){return t.call(this,e)||this}return __extends(n,t),n.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},n.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},n.prototype.getProperties=function(){return[]},n.prototype.getTools=function(){return new Array},n})(e.Adapter);e.TextureAdapter=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e){return t.call(this,e)||this}return __extends(n,t),n.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},n.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},n.prototype.getProperties=function(){return e.Helpers.GetAllLinesProperties(this._obj)},n.prototype.getTools=function(){var t=[];return t.push(new e.Checkbox(this)),t},n.prototype.setVisible=function(e){this._obj.setEnabled(e)},n.prototype.isVisible=function(){return this._obj.isEnabled()},n})(e.Adapter);e.LightAdapter=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e){return t.call(this,e)||this}return __extends(n,t),n.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},n.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},n.prototype.getProperties=function(){return e.Helpers.GetAllLinesProperties(this._obj)},n.prototype.getTools=function(){return[]},n})(e.Adapter);e.MaterialAdapter=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e){return t.call(this,e)||this}return __extends(n,t),n.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},n.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},n.prototype.getProperties=function(){return e.Helpers.GetAllLinesProperties(this._obj)},n.prototype.getTools=function(){var t=[];return t.push(new e.Checkbox(this)),t.push(new e.DebugArea(this)),this._obj.getTotalVertices()>0&&t.push(new e.BoundingBox(this)),t.push(new e.Info(this)),t},n.prototype.setVisible=function(e){this._obj.setEnabled(e),this._obj.isVisible=e},n.prototype.isVisible=function(){return this._obj.isEnabled()&&this._obj.isVisible},n.prototype.isBoxVisible=function(){return this._obj.showBoundingBox},n.prototype.setBoxVisible=function(e){return this._obj.showBoundingBox=e},n.prototype.debug=function(e){this._axesViewer||this._drawAxis(),!e&&this._axesViewer&&(this._axesViewer.dispose(),this._axesViewer=null)},n.prototype.getInfo=function(){return this._obj.getTotalVertices()+" vertices"},n.prototype._drawAxis=function(){this._obj.computeWorldMatrix();var e=new BABYLON.Vector3(8/this._obj.scaling.x,0,0),t=new BABYLON.Vector3(0,8/this._obj.scaling.y,0),n=new BABYLON.Vector3(0,0,8/this._obj.scaling.z);this._axesViewer=new BABYLON.Debug.AxesViewer(this._obj.getScene()),this._axesViewer.update(this._obj.position,e,t,n)},n})(e.Adapter);e.MeshAdapter=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e){var n=t.call(this)||this;return n._detailRows=[],n._sortDirection={},n._build(),e&&(n._detailRows=e,n.update()),n}return __extends(n,t),Object.defineProperty(n.prototype,"details",{set:function(e){this.clean(),this._detailRows=e,this.update()},enumerable:!0,configurable:!0}),n.prototype._build=function(){this._div.className="insp-details",this._div.id="insp-details",this._createHeaderRow(),this._div.appendChild(this._headerRow)},n.prototype.update=function(){this._sortDetails("name",1),this._addDetails()},n.prototype._addDetails=function(){for(var t=e.Helpers.CreateDiv("details",this._div),n=0,r=this._detailRows;n<r.length;n++){var i=r[n];t.appendChild(i.toHtml())}},n.prototype._sortDetails=function(t,n){for(var r=e.Inspector.DOCUMENT.querySelectorAll(".sort-direction"),i=0;i<r.length;i++)r[i].classList.remove("fa-chevron-up"),r[i].classList.remove("fa-chevron-down");n||!this._sortDirection[t]?this._sortDirection[t]=n||1:this._sortDirection[t]*=-1;var o=this._sortDirection[t],s=this._headerRow.querySelector("#sort-direction-"+t);s&&(1==o?(s.classList.remove("fa-chevron-down"),s.classList.add("fa-chevron-up")):(s.classList.remove("fa-chevron-up"),s.classList.add("fa-chevron-down")));var a=function(e){return"string"==typeof e||e instanceof String};this._detailRows.forEach((function(e){e.closeDetails()})),this._detailRows.sort((function(e,n){var r=String(e[t]),i=String(n[t]);return a(r)||(r=e[t].toString()),a(i)||(i=n[t].toString()),r.localeCompare(i,[],{numeric:!0})*o}))},n.prototype.clean=function(){for(var t=0,n=this._detailRows;t<n.length;t++){n[t].dispose()}e.Helpers.CleanDiv(this._div),this._div.appendChild(this._headerRow)},n.prototype.dispose=function(){for(var e=0,t=this._detailRows;e<t.length;e++){t[e].dispose()}},n.prototype._createHeaderRow=function(){var t=this;this._headerRow=e.Helpers.CreateDiv("header-row");var n=function(n,r){var i=e.Helpers.CreateDiv(r+" header-col"),o=e.Inspector.DOCUMENT.createElement("span");o.textContent=n.charAt(0).toUpperCase()+n.slice(1);var s=e.Inspector.DOCUMENT.createElement("i");return s.className="sort-direction fa",s.id="sort-direction-"+n,i.appendChild(o),i.appendChild(s),i.addEventListener("click",(function(e){t._sortDetails(n),t._addDetails()})),i};this._headerRow.appendChild(n("name","prop-name")),this._headerRow.appendChild(n("value","prop-value"))},n})(e.BasicElement);e.DetailPanel=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(){function t(e,t){this._property=e,this._obj=t}return Object.defineProperty(t.prototype,"name",{get:function(){return this._property},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._obj[this._property]},set:function(e){this._obj[this._property]=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return e.Helpers.GET_TYPE(this.value)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"obj",{get:function(){return this._obj},set:function(e){this._obj=e},enumerable:!0,configurable:!0}),t})();e.Property=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(){function e(){}return e.format=function(e,t){return e[t]},e})();e.PropertyFormatter=t;var n=(function(){function n(t,n,r){void 0===n&&(n=null),void 0===r&&(r=0),this._children=[],this._elements=[],this._property=t,this._level=r,this._parent=n,this._div=e.Helpers.CreateDiv("row"),this._div.style.marginLeft=this._level+"px",e.Helpers.CreateDiv("prop-name",this._div).textContent=""+this.name,this._valueDiv=e.Helpers.CreateDiv("prop-value",this._div),"boolean"==typeof this.value||this._isSliderType()||(this._valueDiv.textContent=this._displayValueContent()||"-"),this._createElements();for(var i=0,o=this._elements;i<o.length;i++){var s=o[i];this._valueDiv.appendChild(s.toHtml())}this._updateValue(),"boolean"==typeof this.value?this._checkboxInput():this._isSliderType()?this._rangeInput():this._isSimple()?(this._initInput(),this._valueDiv.addEventListener("click",this._displayInputHandler),this._input.addEventListener("focusout",this._focusOutInputHandler),this._input.addEventListener("keydown",this._validateInputHandler),this._input.addEventListener("keydown",this._escapeInputHandler)):(this._valueDiv.classList.add("clickable"),this._valueDiv.addEventListener("click",this._addDetails.bind(this))),e.Scheduler.getInstance().add(this)}return n.prototype._initInput=function(){this._input=document.createElement("input"),this._input.setAttribute("type","text"),this._displayInputHandler=this._displayInput.bind(this),this._validateInputHandler=this._validateInput.bind(this),this._escapeInputHandler=this._escapeInput.bind(this),this._focusOutInputHandler=this.update.bind(this),this._onMouseDownHandler=this._onMouseDown.bind(this),this._onMouseDragHandler=this._onMouseDrag.bind(this),this._onMouseUpHandler=this._onMouseUp.bind(this)},n.prototype._validateInput=function(e){this._input.removeEventListener("focusout",this._focusOutInputHandler),13==e.keyCode?this.validateInput(this._input.value):9==e.keyCode?(e.preventDefault(),this.validateInput(this._input.value)):27==e.keyCode&&this.update()},n.prototype.validateInput=function(t,n){void 0===n&&(n=!0),this.updateObject(),"number"==typeof this._property.value?this._property.value=parseFloat(t):this._property.value=t,n&&(this.update(),e.Scheduler.getInstance().pause=!1)},n.prototype._escapeInput=function(e){this._input.removeEventListener("focusout",this._focusOutInputHandler),27==e.keyCode&&this.update()},n.prototype._removeInputWithoutValidating=function(){e.Helpers.CleanDiv(this._valueDiv),"boolean"==typeof this.value||this._isSliderType()||(this._valueDiv.textContent="-");for(var t=0,n=this._elements;t<n.length;t++){var r=n[t];this._valueDiv.appendChild(r.toHtml())}"boolean"==typeof this.value||this._isSliderType()||this._valueDiv.addEventListener("click",this._displayInputHandler)},n.prototype._displayInput=function(t){this._valueDiv.removeEventListener("click",this._displayInputHandler);var n=this._valueDiv.textContent;this._valueDiv.textContent="",this._input.value=n||"",this._valueDiv.appendChild(this._input),this._input.focus(),"boolean"==typeof this.value||this._isSliderType()?"number"==typeof this.value&&this._input.addEventListener("mousedown",this._onMouseDownHandler):this._input.addEventListener("focusout",this._focusOutInputHandler),e.Scheduler.getInstance().pause=!0},n.prototype.updateObject=function(){return this._parent&&(this._property.obj=this._parent.updateObject()),this._property.value},Object.defineProperty(n.prototype,"name",{get:function(){return this._property.name},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return t.format(this._property.obj,this._property.name)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this._property.type},enumerable:!0,configurable:!0}),n.prototype._createElements=function(){"Color3"!=this.type&&"Color4"!=this.type||this._elements.push(new e.ColorPickerElement(this.value,this)),"Texture"==this.type&&this._elements.push(new e.TextureElement(this.value)),"HDRCubeTexture"==this.type&&this._elements.push(new e.HDRCubeTextureElement(this.value)),"CubeTexture"==this.type&&this._elements.push(new e.CubeTextureElement(this.value))},n.prototype._displayValueContent=function(){var t=this.value;return"number"==typeof t?e.Helpers.Trunc(t):"string"==typeof t||"boolean"==typeof t?t:e.PROPERTIES.format(t)},n.prototype.dispose=function(){e.Scheduler.getInstance().remove(this);for(var t=0,n=this._children;t<n.length;t++){var r=n[t];e.Scheduler.getInstance().remove(r)}for(var i=0,o=this._elements;i<o.length;i++){o[i].dispose()}this._elements=[]},n.prototype._updateValue=function(){this.updateObject(),"boolean"==typeof this.value?this._checkboxInput():this._isSliderType()?this._rangeInput():this._valueDiv.childNodes[0].nodeValue=this._displayValueContent();for(var e=0,t=this._elements;e<t.length;e++){t[e].update(this.value)}},n.prototype.update=function(){this._removeInputWithoutValidating(),this._updateValue()},n.prototype._isSimple=function(){return null==this.value||"type_not_defined"===this.type||-1!=n._SIMPLE_TYPE.indexOf(this.type)},n.prototype.toHtml=function(){return this._div},n.prototype.closeDetails=function(){if(this._div.classList.contains("unfolded")&&(this._div.classList.remove("unfolded"),this._div.parentNode))for(var e=0,t=this._children;e<t.length;e++){var n=t[e];this._div.parentNode.removeChild(n.toHtml())}},n.prototype._addDetails=function(){if(this._div.classList.contains("unfolded")){if(this._div.classList.remove("unfolded"),this._div.parentNode)for(var t=0,r=this._children;t<r.length;t++){var i=r[t];this._div.parentNode.removeChild(i.toHtml())}}else{if(this._div.classList.toggle("unfolded"),0==this._children.length)for(var o=this.value,s=e.PROPERTIES[e.Helpers.GET_TYPE(o)].properties.slice().reverse(),a=0,p=s;a<p.length;a++){var c=p[a],l=new e.Property(c,this._property.value),i=new n(l,this,this._level+n._MARGIN_LEFT);this._children.push(i)}if(this._div.parentNode)for(var u=0,_=this._children;u<_.length;u++){var i=_[u];this._div.parentNode.insertBefore(i.toHtml(),this._div.nextSibling)}}},n.prototype._onMouseDrag=function(e){var t=this._prevY-e.clientY;this._input.value=(this._preValue+t).toString()},n.prototype._onMouseUp=function(e){window.removeEventListener("mousemove",this._onMouseDragHandler),window.removeEventListener("mouseup",this._onMouseUpHandler),this._prevY=e.clientY},n.prototype._onMouseDown=function(e){this._prevY=e.clientY,this._preValue=this.value,window.addEventListener("mousemove",this._onMouseDragHandler),window.addEventListener("mouseup",this._onMouseUpHandler)},n.prototype._checkboxInput=function(){var t=this;this._valueDiv.childElementCount<1&&(this._input=e.Helpers.CreateInput("checkbox-element",this._valueDiv),
- this._input.type="checkbox",this._input.checked=this.value,this._input.addEventListener("change",(function(){e.Scheduler.getInstance().pause=!0,t.validateInput(!t.value)})))},n.prototype._rangeInput=function(){this._valueDiv.childElementCount<1&&(this._input=e.Helpers.CreateInput("slider-element",this._valueDiv),this._input.type="range",this._input.style.display="inline-block",this._input.min=this._getSliderProperty().min,this._input.max=this._getSliderProperty().max,this._input.step=this._getSliderProperty().step,this._input.value=this.value,this._validateInputHandler=this._rangeHandler.bind(this),this._input.addEventListener("input",this._validateInputHandler),this._input.addEventListener("change",(function(){e.Scheduler.getInstance().pause=!1})),this._textValue=e.Helpers.CreateDiv("value-text",this._valueDiv),this._textValue.innerText=e.Helpers.Trunc(this.value).toString(),this._textValue.style.paddingLeft="10px",this._textValue.style.display="inline-block")},n.prototype._rangeHandler=function(){e.Scheduler.getInstance().pause=!0,this._textValue.innerText=this._input.value,this.validateInput(this._input.value,!1)},n.prototype._isSliderType=function(){return this._property&&e.PROPERTIES.hasOwnProperty(this._property.obj.constructor.name)&&e.PROPERTIES[this._property.obj.constructor.name].hasOwnProperty("slider")&&e.PROPERTIES[this._property.obj.constructor.name].slider.hasOwnProperty(this.name)},n.prototype._getSliderProperty=function(){return e.PROPERTIES[this._property.obj.constructor.name].slider[this.name]},n._SIMPLE_TYPE=["number","string","boolean"],n._MARGIN_LEFT=15,n})();e.PropertyLine=n})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(e){function t(t){var n=e.call(this)||this;return n._div.className="color-element",n._div.style.backgroundColor=n._toRgba(t),n}return __extends(t,e),t.prototype.update=function(e){e&&(this._div.style.backgroundColor=this._toRgba(e))},t.prototype._toRgba=function(e){if(e){var t=255*e.r|0,n=255*e.g|0,r=255*e.b|0,i=1;return e instanceof BABYLON.Color4&&(i=e.a),"rgba("+t+", "+n+", "+r+", "+i+")"}return""},t})(e.BasicElement);e.ColorElement=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(n,r){var i=t.call(this)||this,o=e.Scheduler.getInstance();return i._div.className="color-element",i._div.style.backgroundColor=i._toRgba(n),i.pline=r,i._input=e.Helpers.CreateInput(),i._input.type="color",i._input.style.opacity="0",i._input.style.width="10px",i._input.style.height="15px",i._input.value=n.toHexString(),i._input.addEventListener("input",(function(e){var t=BABYLON.Color3.FromHexString(i._input.value);t.r=parseFloat(t.r.toPrecision(2)),t.g=parseFloat(t.g.toPrecision(2)),t.b=parseFloat(t.b.toPrecision(2)),i.pline.validateInput(t),o.pause=!1})),i._div.appendChild(i._input),i._input.addEventListener("click",(function(e){o.pause=!0})),i}return __extends(n,t),n.prototype.update=function(e){e&&(this._div.style.backgroundColor=this._toRgba(e),this._input.value=e.toHexString())},n.prototype._toRgba=function(e){if(e){var t=255*e.r|0,n=255*e.g|0,r=255*e.b|0,i=1;return e instanceof BABYLON.Color4&&(i=e.a),"rgba("+t+", "+n+", "+r+", "+i+")"}return""},n})(e.BasicElement);e.ColorPickerElement=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(n){var r=t.call(this)||this;return r._pause=!1,r._div.className="fa fa-search texture-element",r._textureDiv=e.Helpers.CreateDiv("texture-viewer",r._div),r._canvas=e.Helpers.CreateElement("canvas","texture-viewer-img",r._textureDiv),n&&(r._textureUrl=n.name),r._div.addEventListener("mouseover",r._showViewer.bind(r,"flex")),r._div.addEventListener("mouseout",r._showViewer.bind(r,"none")),r}return __extends(n,t),n.prototype.update=function(e){e&&e.url===this._textureUrl||(e&&(this._textureUrl=e.name),this._engine?(this._cube.material&&this._cube.material.dispose(!0,!0),this._cube.dispose()):this._initEngine(),this._populateScene())},n.prototype._populateScene=function(){var e=this,t=new BABYLON.CubeTexture(this._textureUrl,this._scene);t.coordinatesMode=BABYLON.Texture.SKYBOX_MODE,this._cube=BABYLON.Mesh.CreateBox("hdrSkyBox",10,this._scene);var n=new BABYLON.StandardMaterial("skyBox",this._scene);n.backFaceCulling=!1,n.reflectionTexture=t,n.reflectionTexture.coordinatesMode=BABYLON.Texture.SKYBOX_MODE,n.disableLighting=!0,this._cube.material=n,this._cube.registerBeforeRender((function(){e._cube.rotation.y+=.01}))},n.prototype._initEngine=function(){var e=this;this._engine=new BABYLON.Engine(this._canvas),this._scene=new BABYLON.Scene(this._engine),this._scene.clearColor=new BABYLON.Color4(0,0,0,0),this._engine.runRenderLoop((function(){e._pause||e._scene.render()})),this._canvas.setAttribute("width","110"),this._canvas.setAttribute("height","110")},n.prototype._showViewer=function(e){"none"!=e?(this._engine||(this._initEngine(),this._populateScene()),this._pause=!1):this._pause=!0,this._textureDiv.style.display=e},n.prototype.dispose=function(){this._engine&&(this._engine.dispose(),this._engine=null)},n})(e.BasicElement);e.CubeTextureElement=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype._populateScene=function(){var e=this,t=new BABYLON.HDRCubeTexture(this._textureUrl,this._scene,512);t.coordinatesMode=BABYLON.Texture.SKYBOX_MODE,this._cube=BABYLON.Mesh.CreateBox("hdrSkyBox",10,this._scene);var n=new BABYLON.PBRMaterial("skyBox",this._scene);n.backFaceCulling=!1,n.reflectionTexture=t,n.microSurface=1,n.disableLighting=!0,this._cube.material=n,this._cube.registerBeforeRender((function(){e._cube.rotation.y+=.01}))},t})(e.CubeTextureElement);e.HDRCubeTextureElement=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(n){var r=t.call(this)||this;r._tab=n,r._div.classList.add("searchbar");var i=e.Inspector.DOCUMENT.createElement("i");return i.className="fa fa-search",r._div.appendChild(i),r._inputElement=e.Inspector.DOCUMENT.createElement("input"),r._inputElement.placeholder="Filter by name...",r._div.appendChild(r._inputElement),r._inputElement.addEventListener("keyup",(function(e){var t=r._inputElement.value;r._tab.filter(t)})),r}return __extends(n,t),n.prototype.reset=function(){this._inputElement.value=""},n.prototype.update=function(){},n})(e.BasicElement);e.SearchBar=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(n){var r=t.call(this)||this;r._div.className="fa fa-search texture-element",r._textureDiv=e.Helpers.CreateDiv("texture-viewer",r._div);var i=e.Helpers.CreateDiv("texture-viewer-img",r._textureDiv),o=e.Helpers.CreateDiv(null,r._textureDiv);return n&&(o.textContent=n.getBaseSize().width+"px x "+n.getBaseSize().height+"px",i.style.backgroundImage="url('"+n.url+"')",i.style.width=n.getBaseSize().width+"px",i.style.height=n.getBaseSize().height+"px"),r._div.addEventListener("mouseover",r._showViewer.bind(r,"flex")),r._div.addEventListener("mouseout",r._showViewer.bind(r,"none")),r}return __extends(n,t),n.prototype.update=function(e){},n.prototype._showViewer=function(e){this._textureDiv.style.display=e},n})(e.BasicElement);e.TextureElement=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(){function t(t,n,r){void 0===r&&(r=null);var i=this;this._elem=t,r||(r=this._elem.parentElement),this._infoDiv=e.Helpers.CreateDiv("tooltip",r),this._elem.addEventListener("mouseover",(function(){i._infoDiv.textContent=n,i._infoDiv.style.display="block"})),this._elem.addEventListener("mouseout",(function(){i._infoDiv.style.display="none"}))}return t})();e.Tooltip=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(){function t(){}return t.GET_TYPE=function(e){if("boolean"==typeof e)return"boolean";if(null!=e&&void 0!=e){var t=BABYLON.Tools.GetClassName(e);return t&&"object"!==t||(t=e.constructor.name)||(t=this._GetFnName(e.constructor)),this._CheckIfTypeExists(t)?t:this._GetTypeFor(e)}return"type_not_defined"},t._CheckIfTypeExists=function(t){return!!e.PROPERTIES[t]},t.IsBrowserEdge=function(){return/Edge/.test(navigator.userAgent)},t._GetTypeFor=function(t){for(var n in e.PROPERTIES){var r=e.PROPERTIES[n];if(r.type&&t instanceof r.type)return n}return"type_not_defined"},t._GetFnName=function(e){var t="function"==typeof e,n=t&&(e.name&&["",e.name]||e.toString().match(/function ([^\(]+)/));return!t&&"not a function"||n&&n[1]||"anonymous"},t.SEND_EVENT=function(t){var n;e.Inspector.DOCUMENT.createEvent?(n=e.Inspector.DOCUMENT.createEvent("HTMLEvents"),n.initEvent(t,!0,!0)):n=new Event(t),window.dispatchEvent(n)},t.Trunc=function(e){return Math.round(e)!==e?e.toFixed(2):e},t.CreateDiv=function(e,n){return void 0===e&&(e=null),t.CreateElement("div",e,n)},t.CreateInput=function(e,n){return t.CreateElement("input",e,n)},t.CreateElement=function(t,n,r){void 0===n&&(n=null);var i=e.Inspector.DOCUMENT.createElement(t);return n&&(i.className=n),r&&r.appendChild(i),i},t.CleanDiv=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},t.Css=function(n,r){var i=n.cloneNode(!0),o=t.CreateDiv("",e.Inspector.DOCUMENT.body);o.style.display="none",o.appendChild(i);var s=e.Inspector.WINDOW.getComputedStyle(i)[r];return o.parentNode&&o.parentNode.removeChild(o),s},t.LoadScript=function(){BABYLON.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js",(function(n){t.CreateElement("script","",e.Inspector.DOCUMENT.body).textContent=n,BABYLON.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/languages/glsl.min.js",(function(n){t.CreateElement("script","",e.Inspector.DOCUMENT.body).textContent=n,BABYLON.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/styles/zenburn.min.css",(function(n){t.CreateElement("style","",e.Inspector.DOCUMENT.body).textContent=n}))}),void 0,void 0,void 0,(function(){console.log("erreur")}))}),void 0,void 0,void 0,(function(){console.log("erreur")}))},t.IsSystemName=function(e){return null!=e&&(0===e.indexOf("###")&&e.lastIndexOf("###")===e.length-3)},t.GetAllLinesProperties=function(t){var n=[];for(var r in t)if("_"!==r.substring(0,1)&&"function"!=typeof t[r]){var i=new e.Property(r,t);n.push(new e.PropertyLine(i))}return n},t.Capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t})();e.Helpers=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(){function e(){this.pause=!1,this._updatableProperties=[],this._timer=setInterval(this._update.bind(this),e.REFRESH_TIME)}return e.getInstance=function(){return e._instance||(e._instance=new e),e._instance},e.prototype.add=function(e){this._updatableProperties.push(e)},e.prototype.remove=function(e){var t=this._updatableProperties.indexOf(e);-1!=t&&this._updatableProperties.splice(t,1)},e.prototype._update=function(){if(!this.pause)for(var e=0,t=this._updatableProperties;e<t.length;e++){var n=t[e];n.update()}},e.REFRESH_TIME=250,e})();e.Scheduler=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){var r=t.call(this)||this;return r._isActive=!1,r._tabbar=e,r.name=n,r._build(),r}return __extends(n,t),n.prototype.isActive=function(){return this._isActive},n.prototype._build=function(){var e=this;this._div.className="tab",this._div.textContent=this.name,this._div.addEventListener("click",(function(t){e._tabbar.switchTab(e)}))},n.prototype.active=function(e){e?this._div.classList.add("active"):this._div.classList.remove("active"),this._isActive=e},n.prototype.update=function(){},n.prototype.getPanel=function(){return this._panel},n.prototype.filter=function(e){},n.prototype.select=function(e){},n.prototype.getPixelWidth=function(){var t=e.Inspector.WINDOW.getComputedStyle(this._div);if(!t.marginLeft||!t.marginRight)return 0;var n=parseFloat(t.marginLeft.substr(0,t.marginLeft.length-2))||0,r=parseFloat(t.marginRight.substr(0,t.marginRight.length-2))||0;return(this._div.clientWidth||0)+n+r},n})(e.BasicElement);e.Tab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(n,r,i){var o=t.call(this,n,r)||this;return o._treeItems=[],o._inspector=i,o._panel=e.Helpers.CreateDiv("tab-panel"),o._panel.classList.add("searchable"),o._searchBar=new e.SearchBar(o),o._panel.appendChild(o._searchBar.toHtml()),o._treePanel=e.Helpers.CreateDiv("insp-tree",o._panel),o._detailsPanel=new e.DetailPanel,o._panel.appendChild(o._detailsPanel.toHtml()),Split([o._treePanel,o._detailsPanel.toHtml()],{blockDrag:o._inspector.popupMode,direction:"vertical"}),o.update(),o}return __extends(n,t),n.prototype.dispose=function(){this._detailsPanel.dispose()},n.prototype.update=function(t){var n;t?n=t:(this._treeItems=this._getTree(),n=this._treeItems),e.Helpers.CleanDiv(this._treePanel),this._detailsPanel.clean(),n.sort((function(e,t){return e.compareTo(t)}));for(var r=0,i=n;r<i.length;r++){var o=i[r];this._treePanel.appendChild(o.toHtml())}},n.prototype.displayDetails=function(e){this.activateNode(e),this._detailsPanel.details=e.getDetails()},n.prototype.select=function(e){this.activateNode(e),this.displayDetails(e)},n.prototype.activateNode=function(e){if(this._treeItems)for(var t=0,n=this._treeItems;t<n.length;t++){var r=n[t];r.active(!1)}e.getDiv().scrollIntoView(),e.active(!0)},n.prototype.getItemFor=function(e){for(var t=e,n=function(e,r){if(r.correspondsTo(e))return r;if(!(r.children.length>0))return null;for(var i=0,o=r.children;i<o.length;i++){var s=o[i],a=n(t,s);if(a)return a}return null},r=0,i=this._treeItems;r<i.length;r++){var o=i[r],s=n(t,o);if(s)return s}return null},n.prototype.filter=function(e){for(var t=[],n=0,r=this._treeItems;n<r.length;n++){var i=r[n];-1!=i.id.toLowerCase().indexOf(e.toLowerCase())&&t.push(i);for(var o=0,s=i.children;o<s.length;o++){-1!=s[o].id.toLowerCase().indexOf(e.toLowerCase())&&t.push(i)}}this.update(t)},n})(e.Tab);e.PropertyTab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){return t.call(this,e,"Camera",n)||this}return __extends(n,t),n.prototype._getTree=function(){for(var t=[],n=this._inspector.scene,r=0,i=n.cameras;r<i.length;r++){var o=i[r];t.push(new e.TreeItem(this,new e.CameraAdapter(o)))}return t},n})(e.PropertyTab);e.CameraTab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){return t.call(this,e,"GUI",n)||this}return __extends(n,t),n.prototype._getTree=function(){for(var t=this,n=[],r=function(n){var i=n.children;if(i&&i.length>0){for(var o=new e.TreeItem(t,new e.GUIAdapter(n)),s=0,a=i;s<a.length;s++){var p=a[s],c=r(p);o.add(c)}return o.update(),o}return new e.TreeItem(t,new e.GUIAdapter(n))},i=this._inspector.scene,o=0,s=i.textures;o<s.length;o++){var a=s[o];if(a instanceof BABYLON.GUI.AdvancedDynamicTexture){var p=r(a._rootContainer);n.push(p)}}return n},n})(e.PropertyTab);e.GUITab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){return t.call(this,e,"Physics",n)||this}return __extends(n,t),n.prototype._getTree=function(){var t=new Array,n=this._inspector.scene;if(!n.isPhysicsEnabled())return t;this.viewer||(this.viewer=new BABYLON.Debug.PhysicsViewer(n));for(var r=0,i=n.meshes;r<i.length;r++){var o=i[r];o.physicsImpostor&&t.push(new e.TreeItem(this,new e.PhysicsImpostorAdapter(o.physicsImpostor,this.viewer)))}return t},n})(e.PropertyTab);e.PhysicsTab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){return t.call(this,e,"Audio",n)||this}return __extends(n,t),n.prototype._getTree=function(){for(var t=this,n=new Array,r=this._inspector.scene,i=0,o=r.soundTracks;i<o.length;i++){o[i].soundCollection.forEach((function(r){n.push(new e.TreeItem(t,new e.SoundAdapter(r)))}))}return n},n})(e.PropertyTab);e.SoundTab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(n,r){var i=t.call(this,n,"Textures")||this;return i._treeItems=[],i._inspector=r,i._panel=e.Helpers.CreateDiv("tab-panel"),i._treePanel=e.Helpers.CreateDiv("insp-tree",i._panel),i._imagePanel=e.Helpers.CreateDiv("insp-details",i._panel),Split([i._treePanel,i._imagePanel],{blockDrag:i._inspector.popupMode,direction:"vertical"}),i.update(),i}return __extends(n,t),n.prototype.dispose=function(){},n.prototype.update=function(t){var n;t?n=t:(this._treeItems=this._getTree(),n=this._treeItems),e.Helpers.CleanDiv(this._treePanel),e.Helpers.CleanDiv(this._imagePanel),n.sort((function(e,t){return e.compareTo(t)}));for(var r=0,i=n;r<i.length;r++){var o=i[r];this._treePanel.appendChild(o.toHtml())}},n.prototype._getTree=function(){for(var t=[],n=this._inspector.scene,r=0,i=n.textures;r<i.length;r++){var o=i[r];t.push(new e.TreeItem(this,new e.TextureAdapter(o)))}return t},n.prototype.displayDetails=function(t){this.activateNode(t),e.Helpers.CleanDiv(this._imagePanel);var n=t.adapter.object,r=[],i=e.Helpers.CreateElement("img","texture-image",this._imagePanel);r.push(i);for(var o=0;o<5;o++)r.push(e.Helpers.CreateElement("img","texture-image",this._imagePanel));if(n instanceof BABYLON.RenderTargetTexture){var s=this._inspector.scene,a=s.getEngine(),p=n.getSize(),c=n.clone();c.activeCamera=n.activeCamera,c.onBeforeRender=n.onBeforeRender,c.onAfterRender=n.onAfterRender,c.onBeforeRenderObservable=n.onBeforeRenderObservable,c.onAfterRenderObservable.add((function(e){BABYLON.Tools.DumpFramebuffer(p.width,p.height,a,(function(t){return r[e].src=t}))})),s.incrementRenderId(),s.resetCachedMaterial(),c.render(),c.dispose()}else if(n instanceof BABYLON.CubeTexture){var l=n.readPixels(),u=document.createElement("canvas");u.id="MyCanvas",i.parentElement&&i.parentElement.appendChild(u);var _=u.getContext("2d"),h=n.getSize(),d=l.buffer.slice(0,h.height*h.width*4),f=new Uint8ClampedArray(d),v=new ImageData(6*h.width,h.height);v.data.set(f);var y=_.createImageData(6*h.width,h.height);y.data.set(f),_.putImageData(y,0,0)}else if(n._canvas){var b=n._canvas.toDataURL("image/png");i.src=b}else if(n.url){var l=n.readPixels(),u=document.createElement("canvas");u.id="MyCanvas",i.parentElement&&i.parentElement.appendChild(u);var _=u.getContext("2d"),h=n.getSize(),y=_.createImageData(h.width,h.height);y.data.set(l),_.putImageData(y,0,0)}},n.prototype.select=function(e){this.activateNode(e),this.displayDetails(e)},n.prototype.activateNode=function(e){if(this._treeItems)for(var t=0,n=this._treeItems;t<n.length;t++){var r=n[t];r.active(!1)}e.active(!0)},n})(e.Tab);e.TextureTab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){return t.call(this,e,"Light",n)||this}return __extends(n,t),n.prototype._getTree=function(){for(var t=[],n=this._inspector.scene,r=0,i=n.lights;r<i.length;r++){var o=i[r];t.push(new e.TreeItem(this,new e.LightAdapter(o)))}return t},n})(e.PropertyTab);e.LightTab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){return t.call(this,e,"Material",n)||this}return __extends(n,t),n.prototype._getTree=function(){for(var t=[],n=this._inspector.scene,r=0,i=n.materials;r<i.length;r++){var o=i[r];t.push(new e.TreeItem(this,new e.MaterialAdapter(o)))}return t},n})(e.PropertyTab);e.MaterialTab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){return t.call(this,e,"Mesh",n)||this}return __extends(n,t),n.prototype._getTree=function(){for(var t=this,n=new Array,r=new Array,i=function(o){var s=o.getDescendants(!0),a=new e.TreeItem(t,new e.MeshAdapter(o));if(s.length>0){for(var p=0,c=s;p<c.length;p++){var l=c[p];if(l instanceof BABYLON.AbstractMesh&&!e.Helpers.IsSystemName(l.name)){var u=i(l);a.add(u)}}a.update()}if(null!=o.parent&&-1!=r.indexOf(o))for(var _=0,h=!0;_<n.length&&h;)o.name===n[_].id&&(n.splice(_,1),h=!1),_++;return r.push(o),a},o=this._inspector.scene,s=0,a=o.meshes;s<a.length;s++){var p=a[s];if(-1==r.indexOf(p)&&!e.Helpers.IsSystemName(p.name)){var c=i(p);n.push(c)}}return n},n})(e.PropertyTab);e.MeshTab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(n,r){var i=t.call(this,n,"Scene")||this;i._skeletonViewers=[],i._inspector=r,i._panel=e.Helpers.CreateDiv("tab-panel"),i._actions=e.Helpers.CreateDiv("scene-actions",i._panel),i._detailsPanel=new e.DetailPanel,i._panel.appendChild(i._detailsPanel.toHtml());for(var o=[],s=0,a=e.PROPERTIES.Scene.properties;s<a.length;s++){var p=a[s];o.push(new e.PropertyLine(new e.Property(p,i._inspector.scene)))}i._detailsPanel.details=o,Split([i._actions,i._detailsPanel.toHtml()],{blockDrag:i._inspector.popupMode,sizes:[50,50],direction:"vertical"});var c=e.Helpers.CreateDiv("actions-title",i._actions);c.textContent="Rendering mode";var l=e.Helpers.CreateDiv("action-radio",i._actions),u=e.Helpers.CreateDiv("action-radio",i._actions),_=e.Helpers.CreateDiv("action-radio",i._actions);l.textContent="Point",u.textContent="Wireframe",_.textContent="Solid",i._inspector.scene.forcePointsCloud?l.classList.add("active"):i._inspector.scene.forceWireframe?u.classList.add("active"):_.classList.add("active"),i._generateRadioAction([l,u,_]),l.addEventListener("click",(function(){i._inspector.scene.forcePointsCloud=!0,i._inspector.scene.forceWireframe=!1})),u.addEventListener("click",(function(){i._inspector.scene.forcePointsCloud=!1,i._inspector.scene.forceWireframe=!0})),_.addEventListener("click",(function(){i._inspector.scene.forcePointsCloud=!1,i._inspector.scene.forceWireframe=!1})),c=e.Helpers.CreateDiv("actions-title",i._actions),c.textContent="Textures channels",i._generateActionLine("Diffuse Texture",BABYLON.StandardMaterial.DiffuseTextureEnabled,(function(e){BABYLON.StandardMaterial.DiffuseTextureEnabled=e})),i._generateActionLine("Ambient Texture",BABYLON.StandardMaterial.AmbientTextureEnabled,(function(e){BABYLON.StandardMaterial.AmbientTextureEnabled=e})),i._generateActionLine("Specular Texture",BABYLON.StandardMaterial.SpecularTextureEnabled,(function(e){BABYLON.StandardMaterial.SpecularTextureEnabled=e})),i._generateActionLine("Emissive Texture",BABYLON.StandardMaterial.EmissiveTextureEnabled,(function(e){BABYLON.StandardMaterial.EmissiveTextureEnabled=e})),i._generateActionLine("Bump Texture",BABYLON.StandardMaterial.BumpTextureEnabled,(function(e){BABYLON.StandardMaterial.BumpTextureEnabled=e})),i._generateActionLine("Opacity Texture",BABYLON.StandardMaterial.OpacityTextureEnabled,(function(e){BABYLON.StandardMaterial.OpacityTextureEnabled=e})),i._generateActionLine("Reflection Texture",BABYLON.StandardMaterial.ReflectionTextureEnabled,(function(e){BABYLON.StandardMaterial.ReflectionTextureEnabled=e})),i._generateActionLine("Refraction Texture",BABYLON.StandardMaterial.RefractionTextureEnabled,(function(e){BABYLON.StandardMaterial.RefractionTextureEnabled=e})),i._generateActionLine("ColorGrading",BABYLON.StandardMaterial.ColorGradingTextureEnabled,(function(e){BABYLON.StandardMaterial.ColorGradingTextureEnabled=e})),i._generateActionLine("Lightmap Texture",BABYLON.StandardMaterial.LightmapTextureEnabled,(function(e){BABYLON.StandardMaterial.LightmapTextureEnabled=e})),i._generateActionLine("Fresnel",BABYLON.StandardMaterial.FresnelEnabled,(function(e){BABYLON.StandardMaterial.FresnelEnabled=e})),c=e.Helpers.CreateDiv("actions-title",i._actions),c.textContent="Options",i._generateActionLine("Animations",i._inspector.scene.animationsEnabled,(function(e){i._inspector.scene.animationsEnabled=e})),i._generateActionLine("Collisions",i._inspector.scene.collisionsEnabled,(function(e){i._inspector.scene.collisionsEnabled=e})),i._generateActionLine("Fog",i._inspector.scene.fogEnabled,(function(e){i._inspector.scene.fogEnabled=e})),i._generateActionLine("Lens flares",i._inspector.scene.lensFlaresEnabled,(function(e){i._inspector.scene.lensFlaresEnabled=e})),i._generateActionLine("Lights",i._inspector.scene.lightsEnabled,(function(e){i._inspector.scene.lightsEnabled=e})),i._generateActionLine("Particles",i._inspector.scene.particlesEnabled,(function(e){i._inspector.scene.particlesEnabled=e})),i._generateActionLine("Post-processes",i._inspector.scene.postProcessesEnabled,(function(e){i._inspector.scene.postProcessesEnabled=e})),i._generateActionLine("Probes",i._inspector.scene.probesEnabled,(function(e){i._inspector.scene.probesEnabled=e})),i._generateActionLine("Procedural textures",i._inspector.scene.proceduralTexturesEnabled,(function(e){i._inspector.scene.proceduralTexturesEnabled=e})),i._generateActionLine("Render targets",i._inspector.scene.renderTargetsEnabled,(function(e){i._inspector.scene.renderTargetsEnabled=e})),i._generateActionLine("Shadows",i._inspector.scene.shadowsEnabled,(function(e){i._inspector.scene.shadowsEnabled=e})),i._generateActionLine("Skeletons",i._inspector.scene.skeletonsEnabled,(function(e){i._inspector.scene.skeletonsEnabled=e})),i._generateActionLine("Sprites",i._inspector.scene.spritesEnabled,(function(e){i._inspector.scene.spritesEnabled=e})),i._generateActionLine("Textures",i._inspector.scene.texturesEnabled,(function(e){i._inspector.scene.texturesEnabled=e})),c=e.Helpers.CreateDiv("actions-title",i._actions),c.textContent="Audio";var h=e.Helpers.CreateDiv("action-radio",i._actions),d=e.Helpers.CreateDiv("action-radio",i._actions);return i._generateActionLine("Disable audio",!i._inspector.scene.audioEnabled,(function(e){i._inspector.scene.audioEnabled=!e})),h.textContent="Headphones",d.textContent="Normal speakers",i._generateRadioAction([h,d]),i._inspector.scene.headphone?h.classList.add("active"):d.classList.add("active"),h.addEventListener("click",(function(){i._inspector.scene.headphone=!0})),d.addEventListener("click",(function(){i._inspector.scene.headphone=!1})),c=e.Helpers.CreateDiv("actions-title",i._actions),c.textContent="Viewer",i._generateActionLine("Skeletons",!1,(function(e){if(e)for(var t=0;t<i._inspector.scene.meshes.length;t++){var n=i._inspector.scene.meshes[t];if(n.skeleton){for(var r=!1,o=0;o<i._skeletonViewers.length;o++)if(i._skeletonViewers[o].skeleton===n.skeleton){r=!0;break}if(r)continue;var s=new BABYLON.Debug.SkeletonViewer(n.skeleton,n,i._inspector.scene);s.isEnabled=!0,i._skeletonViewers.push(s)}}else{for(var t=0;t<i._skeletonViewers.length;t++)i._skeletonViewers[t].dispose();i._skeletonViewers=[]}})),i}return __extends(n,t),n.prototype.dispose=function(){this._detailsPanel.dispose()},n.prototype._generateActionLine=function(t,n,r){var i=e.Helpers.CreateDiv("scene-actions",this._actions);i.textContent=t,i.classList.add("action"),n&&i.classList.add("active"),i.addEventListener("click",(function(e){
- i.classList.toggle("active");var t=i.classList.contains("active");r(t)}))},n.prototype._generateRadioAction=function(e){for(var t=function(t,n){for(var r=0,i=e;r<i.length;r++){i[r].classList.remove("active")}t.classList.add("active")},n=0,r=e;n<r.length;n++){var i=r[n];i.addEventListener("click",t.bind(this,i))}},n})(e.Tab);e.SceneTab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(n,r){var i=t.call(this,n,"Console")||this;i._inspector=r,i._panel=e.Helpers.CreateDiv("tab-panel");var o=e.Helpers.CreateDiv("console-panel"),s=e.Helpers.CreateDiv("console-panel");i._panel.appendChild(o),i._panel.appendChild(s),Split([o,s],{blockDrag:i._inspector.popupMode,sizes:[50,50],direction:"vertical"});var a=e.Helpers.CreateDiv("console-panel-title",o);return a.textContent="Console logs",a=e.Helpers.CreateDiv("console-panel-title",s),a.textContent="Babylon.js logs",i._consolePanelContent=e.Helpers.CreateDiv("console-panel-content",o),i._bjsPanelContent=e.Helpers.CreateDiv("console-panel-content",s),i._bjsPanelContent.innerHTML=BABYLON.Tools.LogCache,BABYLON.Tools.OnNewCacheEntry=function(e){i._bjsPanelContent.innerHTML+=e,i._bjsPanelContent.scrollTop=i._bjsPanelContent.scrollHeight},i}return __extends(n,t),n.prototype.dispose=function(){console.log=this._oldConsoleLog,console.warn=this._oldConsoleWarn,console.error=this._oldConsoleError},n.prototype.active=function(e){t.prototype.active.call(this,e),e&&(this._oldConsoleLog=console.log,this._oldConsoleWarn=console.warn,this._oldConsoleError=console.error,console.log=this._addConsoleLog.bind(this),console.warn=this._addConsoleWarn.bind(this),console.error=this._addConsoleError.bind(this))},n.prototype._message=function(t,n,r){e.Helpers.CreateDiv("caller",this._consolePanelContent).textContent=r,e.Helpers.CreateDiv(t,this._consolePanelContent).textContent+=n,this._consolePanelContent.scrollTop=this._consolePanelContent.scrollHeight},n.prototype._addConsoleLog=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=this._addConsoleLog.caller,i=null==r?"Window":"Function "+r.name+": ",o=0;o<t.length;o++)this._message("log",t[o],i),e.Helpers.IsBrowserEdge()||this._oldConsoleLog(t[o])},n.prototype._addConsoleWarn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=this._addConsoleLog.caller,i=null==r?"Window":r.name,o=0;o<t.length;o++)this._message("warn",t[o],i),e.Helpers.IsBrowserEdge()||this._oldConsoleWarn(t[o])},n.prototype._addConsoleError=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=this._addConsoleLog.caller,i=null==r?"Window":r.name,o=0;o<t.length;o++)this._message("error",t[o],i),e.Helpers.IsBrowserEdge()||this._oldConsoleError(t[o])},n})(e.Tab);e.ConsoleTab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(n,r){var i=t.call(this,n,"Stats")||this;i._updatableProperties=[],i._inspector=r,i._scene=i._inspector.scene,i._engine=i._scene.getEngine(),i._glInfo=i._engine.getGlInfo(),i._panel=e.Helpers.CreateDiv("tab-panel"),i._panel.classList.add("stats-panel");var o=e.Helpers.CreateDiv("stat-title1",i._panel),s=e.Helpers.CreateElement("span","stats-fps");i._updatableProperties.push({elem:s,updateFct:function(){return BABYLON.Tools.Format(i._inspector.scene.getEngine().getFps(),0)+" fps"}});var a=e.Helpers.CreateElement("span");a.textContent="Babylon.js v"+BABYLON.Engine.Version+" - ",o.appendChild(a),o.appendChild(s),i._updateLoopHandler=i._update.bind(i),o=e.Helpers.CreateDiv("stat-title2",i._panel),o.textContent="Count";var p=(i._createStatLabel("Total meshes",i._panel),e.Helpers.CreateDiv("stat-value",i._panel));i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.meshes.length.toString()}}),i._createStatLabel("Draw calls",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.drawCalls.toString()}}),i._createStatLabel("Total lights",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.lights.length.toString()}}),i._createStatLabel("Total vertices",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.getTotalVertices().toString()}}),i._createStatLabel("Total materials",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.materials.length.toString()}}),i._createStatLabel("Total textures",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.textures.length.toString()}}),i._createStatLabel("Active meshes",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.getActiveMeshes().length.toString()}}),i._createStatLabel("Active indices",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.getActiveIndices().toString()}}),i._createStatLabel("Active bones",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.getActiveBones().toString()}}),i._createStatLabel("Active particles",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.getActiveParticles().toString()}}),o=e.Helpers.CreateDiv("stat-title2",i._panel),o.textContent="Duration";var p=(i._createStatLabel("Meshes selection",i._panel),e.Helpers.CreateDiv("stat-value",i._panel));i._updatableProperties.push({elem:p,updateFct:function(){return BABYLON.Tools.Format(i._scene.getEvaluateActiveMeshesDuration())}}),i._createStatLabel("Render targets",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return BABYLON.Tools.Format(i._scene.getRenderTargetsDuration())}}),i._createStatLabel("Particles",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return BABYLON.Tools.Format(i._scene.getParticlesDuration())}}),i._createStatLabel("Sprites",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return BABYLON.Tools.Format(i._scene.getSpritesDuration())}}),i._createStatLabel("Render",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return BABYLON.Tools.Format(i._scene.getRenderDuration())}}),i._createStatLabel("Frame",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return BABYLON.Tools.Format(i._scene.getLastFrameDuration())}}),i._createStatLabel("Inter-frame",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return BABYLON.Tools.Format(i._scene.getInterFramePerfCounter())}}),i._createStatLabel("Potential FPS",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return BABYLON.Tools.Format(1e3/i._scene.getLastFrameDuration(),0)}}),i._createStatLabel("Resolution",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getRenderWidth()+"x"+i._engine.getRenderHeight()}}),o=e.Helpers.CreateDiv("stat-title2",i._panel),o.textContent="Extensions";var p=(i._createStatLabel("Std derivatives",i._panel),e.Helpers.CreateDiv("stat-value",i._panel));i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().standardDerivatives?"Yes":"No"}}),i._createStatLabel("Compressed textures",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().s3tc?"Yes":"No"}}),i._createStatLabel("Hardware instances",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().instancedArrays?"Yes":"No"}}),i._createStatLabel("Texture float",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().textureFloat?"Yes":"No"}}),i._createStatLabel("32bits indices",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().uintIndices?"Yes":"No"}}),i._createStatLabel("Fragment depth",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().fragmentDepthSupported?"Yes":"No"}}),i._createStatLabel("High precision shaders",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().highPrecisionShaderSupported?"Yes":"No"}}),i._createStatLabel("Draw buffers",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().drawBuffersExtension?"Yes":"No"}}),i._createStatLabel("Vertex array object",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().vertexArrayObject?"Yes":"No"}}),o=e.Helpers.CreateDiv("stat-title2",i._panel),o.textContent="Caps.";var p=(i._createStatLabel("Stencil",i._panel),e.Helpers.CreateDiv("stat-value",i._panel));i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.isStencilEnable?"Enabled":"Disabled"}}),i._createStatLabel("Max textures units",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().maxTexturesImageUnits.toString()}}),i._createStatLabel("Max textures size",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().maxTextureSize.toString()}}),i._createStatLabel("Max anisotropy",i._panel),p=e.Helpers.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().maxAnisotropy.toString()}}),o=e.Helpers.CreateDiv("stat-title2",i._panel),o.textContent="Info";var p=e.Helpers.CreateDiv("stat-infos",i._panel);return i._updatableProperties.push({elem:p,updateFct:function(){return"WebGL v"+i._engine.webGLVersion+" - "+i._glInfo.version+" - "+i._glInfo.renderer}}),i}return __extends(n,t),n.prototype._createStatLabel=function(t,n){var r=e.Helpers.CreateDiv("stat-label",n);return r.textContent=t,r},n.prototype._update=function(){for(var e=0,t=this._updatableProperties;e<t.length;e++){var n=t[e];n.elem.textContent=n.updateFct()}},n.prototype.dispose=function(){this._scene.unregisterAfterRender(this._updateLoopHandler)},n.prototype.active=function(e){t.prototype.active.call(this,e),e&&this._scene.registerAfterRender(this._updateLoopHandler)},n})(e.Tab);e.StatsTab=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(n,r){var i=t.call(this)||this;i._tabs=[],i._invisibleTabs=[],i._visibleTabs=[],i._inspector=n,i._tabs.push(new e.SceneTab(i,i._inspector)),i._tabs.push(new e.ConsoleTab(i,i._inspector)),i._tabs.push(new e.StatsTab(i,i._inspector)),i._meshTab=new e.MeshTab(i,i._inspector),i._tabs.push(new e.TextureTab(i,i._inspector)),i._tabs.push(i._meshTab),i._tabs.push(new e.LightTab(i,i._inspector)),i._tabs.push(new e.MaterialTab(i,i._inspector)),BABYLON.GUI&&i._tabs.push(new e.GUITab(i,i._inspector)),i._tabs.push(new e.PhysicsTab(i,i._inspector)),i._tabs.push(new e.CameraTab(i,i._inspector)),i._tabs.push(new e.SoundTab(i,i._inspector)),i._toolBar=new e.Toolbar(i._inspector),i._build(),(!r||r<0||r>=i._tabs.length)&&(r=0),i._tabs[r].active(!0);for(var o=0,s=i._tabs;o<s.length;o++){var a=s[o];i._visibleTabs.push(a)}return i}return __extends(n,t),n.prototype.update=function(){},n.prototype._build=function(){var t=this;this._div.className="tabbar",this._div.appendChild(this._toolBar.toHtml());for(var n=0,r=this._tabs;n<r.length;n++){var i=r[n];this._div.appendChild(i.toHtml())}this._moreTabsIcon=e.Helpers.CreateElement("i","fa fa-angle-double-right more-tabs"),this._moreTabsPanel=e.Helpers.CreateDiv("more-tabs-panel"),this._moreTabsIcon.addEventListener("click",(function(){if("flex"==t._moreTabsPanel.style.display)t._moreTabsPanel.style.display="none";else{var n=t._div.parentNode;n.contains(t._moreTabsPanel)||n.appendChild(t._moreTabsPanel),e.Helpers.CleanDiv(t._moreTabsPanel);for(var r=0,i=t._invisibleTabs;r<i.length;r++){var o=i[r];t._addInvisibleTabToPanel(o)}t._moreTabsPanel.style.display="flex"}}))},n.prototype._addInvisibleTabToPanel=function(t){var n=this,r=e.Helpers.CreateDiv("invisible-tab",this._moreTabsPanel);r.textContent=t.name,r.addEventListener("click",(function(){n._moreTabsPanel.style.display="none",n.switchTab(t)}))},n.prototype.switchTab=function(e){var t=this.getActiveTab();t&&t.dispose();for(var n=0,r=this._tabs;n<r.length;n++){r[n].active(!1)}e.active(!0),this._inspector.refresh()},n.prototype.switchMeshTab=function(e){if(this.switchTab(this._meshTab),e){var t=this._meshTab.getItemFor(e);t&&this._meshTab.select(t)}},n.prototype.getActiveTab=function(){for(var e=0,t=this._tabs;e<t.length;e++){var n=t[e];if(n.isActive())return n}return null},n.prototype.getActiveTabIndex=function(){for(var e=0;e<this._tabs.length;e++)if(this._tabs[e].isActive())return e;return 0},Object.defineProperty(n.prototype,"inspector",{get:function(){return this._inspector},enumerable:!0,configurable:!0}),n.prototype.getPixelWidth=function(){for(var e=0,t=0,n=this._visibleTabs;t<n.length;t++){e+=n[t].getPixelWidth()}return e+=this._toolBar.getPixelWidth(),this._div.contains(this._moreTabsIcon)&&(e+=30),e},n.prototype.updateWidth=function(){if(this._div.parentElement){for(var e=this._div.parentElement.clientWidth,t=this.getPixelWidth();this._visibleTabs.length>0&&t>e;){var n=this._visibleTabs.pop();if(!n)break;this._invisibleTabs.push(n),this._div.removeChild(n.toHtml()),t=this.getPixelWidth()+75}if(this._invisibleTabs.length>0&&t+75<e){var r=this._invisibleTabs.pop();r&&(this._div.appendChild(r.toHtml()),this._visibleTabs.push(r)),this._div.contains(this._moreTabsIcon)&&this._div.removeChild(this._moreTabsIcon)}this._invisibleTabs.length>0&&!this._div.contains(this._moreTabsIcon)&&this._div.appendChild(this._moreTabsIcon)}},n})(e.BasicElement);e.TabBar=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(){function t(t,n,r,i){var o=this;this._inspector=r,this._elem=e.Inspector.DOCUMENT.createElement("i"),this._elem.className="tool fa "+t,n.appendChild(this._elem),this._elem.addEventListener("click",(function(e){o.action()})),new e.Tooltip(this._elem,i)}return t.prototype.toHtml=function(){return this._elem},t.prototype.getPixelWidth=function(){var t=e.Inspector.WINDOW.getComputedStyle(this._elem);if(!t.marginLeft||!t.marginRight)return 0;var n=parseFloat(t.marginLeft.substr(0,t.marginLeft.length-2))||0,r=parseFloat(t.marginRight.substr(0,t.marginRight.length-2))||0;return(this._elem.clientWidth||0)+n+r},t.prototype._updateIcon=function(e){this._elem.className="tool fa "+e},t})();e.AbstractTool=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){var r=t.call(this,"fa-pause",e,n,"Pause the automatic update of properties")||this;return r._isPause=!1,r}return __extends(n,t),n.prototype.action=function(){this._isPause?(e.Scheduler.getInstance().pause=!1,this._updateIcon("fa-pause")):(e.Scheduler.getInstance().pause=!0,this._updateIcon("fa-play")),this._isPause=!this._isPause},n})(e.AbstractTool);e.PauseScheduleTool=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(e){function t(t,n){var r=e.call(this,"fa-mouse-pointer",t,n,"Select a mesh in the scene")||this;return r._isActive=!1,r._pickHandler=r._pickMesh.bind(r),r}return __extends(t,e),t.prototype.action=function(){if(this._isActive)this._deactivate();else{this.toHtml().classList.add("active");this._inspector.scene.getEngine().getRenderingCanvas().addEventListener("click",this._pickHandler),this._isActive=!0}},t.prototype._deactivate=function(){this.toHtml().classList.remove("active"),this._inspector.scene.getEngine().getRenderingCanvas().removeEventListener("click",this._pickHandler),this._isActive=!1},t.prototype._pickMesh=function(e){var t=this._updatePointerPosition(e),n=this._inspector.scene.pick(t.x,t.y,(function(e){return!0}));n&&n.pickedMesh&&this._inspector.displayObjectDetails(n.pickedMesh),this._deactivate()},t.prototype._updatePointerPosition=function(e){var t=this._inspector.scene.getEngine().getRenderingCanvasClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},t})(e.AbstractTool);e.PickTool=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(e){function t(t,n){return e.call(this,"fa-external-link",t,n,"Open the inspector in a popup")||this}return __extends(t,e),t.prototype.action=function(){this._inspector.openPopup()},t})(e.AbstractTool);e.PopupTool=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(e){function t(t,n){return e.call(this,"fa-refresh",t,n,"Refresh the current tab")||this}return __extends(t,e),t.prototype.action=function(){this._inspector.refresh()},t})(e.AbstractTool);e.RefreshTool=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){var r=t.call(this,"fa-tags",e,n,"Display mesh names on the canvas")||this;return r._isDisplayed=!1,r._advancedTexture=null,r._labelInitialized=!1,r._scene=null,r._guiLoaded=!1,r._scene=n.scene,r}return __extends(n,t),n.prototype.dispose=function(){this._advancedTexture&&this._advancedTexture.dispose()},n.prototype._checkGUILoaded=function(){return!0===this._guiLoaded||(BABYLON.GUI&&(this._guiLoaded=!0),this._guiLoaded)},n.prototype._initializeLabels=function(){var e=this;if(!this._labelInitialized&&this._scene&&this._checkGUILoaded()){this._advancedTexture=BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");for(var t=0,n=this._scene.meshes;t<n.length;t++){var r=n[t];this._createLabel(r)}this._scene.onNewMeshAddedObservable.add((function(t,n){e._createLabel(t)})),this._scene.onMeshRemovedObservable.add((function(t,n){e._removeLabel(t)})),this._labelInitialized=!0}},n.prototype._createLabel=function(t){var n=t.name;if(!e.Helpers.IsSystemName(n)&&t&&this._advancedTexture){var r=new BABYLON.GUI.Rectangle;r.width=4+10*n.length+"px",r.height="22px",r.background="rgba(0,0,0,0.6)",r.color="black",this._advancedTexture.addControl(r);var i=new BABYLON.GUI.TextBlock;i.text=n,i.fontSize=12,r.addControl(i),r.linkWithMesh(t)}},n.prototype._removeLabel=function(e){if(this._advancedTexture)for(var t=0,n=this._advancedTexture._rootContainer.children;t<n.length;t++){var r=n[t],i=r._linkedMesh;if(i===e){this._advancedTexture.removeControl(r);break}}},n.prototype.action=function(){this._checkGUILoaded()&&this._advancedTexture&&(this._isDisplayed=!this._isDisplayed,this._isDisplayed?(this._initializeLabels(),this._advancedTexture._rootContainer.isVisible=!0):this._advancedTexture._rootContainer.isVisible=!1)},n})(e.AbstractTool);e.LabelTool=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e){var n=t.call(this)||this;return n._tools=[],n._inspector=e,n._build(),n._addTools(),n}return __extends(n,t),n.prototype.update=function(){},n.prototype._build=function(){this._div.className="toolbar"},n.prototype._addTools=function(){this._tools.push(new e.RefreshTool(this._div,this._inspector)),this._tools.push(new e.LabelTool(this._div,this._inspector)),this._tools.push(new e.PickTool(this._div,this._inspector)),this._inspector.popupMode||e.Helpers.IsBrowserEdge()||this._tools.push(new e.PopupTool(this._div,this._inspector)),this._tools.push(new e.PauseScheduleTool(this._div,this._inspector)),this._tools.push(new e.DisposeTool(this._div,this._inspector))},n.prototype.getPixelWidth=function(){for(var e=0,t=0,n=this._tools;t<n.length;t++){e+=n[t].getPixelWidth()}return e},n})(e.BasicElement);e.Toolbar=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(e){function t(t,n){return e.call(this,"fa-times",t,n,"Close the inspector panel")||this}return __extends(t,e),t.prototype.action=function(){this._inspector.dispose()},t})(e.AbstractTool);e.DisposeTool=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e,n){var r=t.call(this)||this;return r.children=[],r._tab=e,r._adapter=n,r._tools=r._adapter.getTools(),r._build(),r}return __extends(n,t),Object.defineProperty(n.prototype,"id",{get:function(){return this._adapter.id()},enumerable:!0,configurable:!0}),n.prototype.add=function(e){this.children.push(e),this.update()},Object.defineProperty(n.prototype,"adapter",{get:function(){return this._adapter},enumerable:!0,configurable:!0}),n.prototype.compareTo=function(e){var t=this.id,n=e.id;return t.localeCompare(n,[],{numeric:!0})},n.prototype.correspondsTo=function(e){return this._adapter.correspondsTo(e)},n.prototype.fold=function(){if(this.children.length>0){for(var e=0,t=this.children;e<t.length;e++){t[e].toHtml().style.display="none"}this._div.classList.add("folded"),this._div.classList.remove("unfolded")}},n.prototype.unfold=function(){if(this.children.length>0){for(var e=0,t=this.children;e<t.length;e++){t[e].toHtml().style.display="block"}this._div.classList.add("unfolded"),this._div.classList.remove("folded")}},n.prototype._build=function(){this._div.className="line";for(var t=0,n=this._tools;t<n.length;t++){var r=n[t];this._div.appendChild(r.toHtml())}var i=e.Inspector.DOCUMENT.createElement("span");i.textContent=this._adapter.id(),this._div.appendChild(i);var o=e.Inspector.DOCUMENT.createElement("span");o.className="property-type","type_not_defined"!==this._adapter.type()&&(o.textContent=" - "+this._adapter.type()),this._div.appendChild(o),this._lineContent=e.Helpers.CreateDiv("line-content",this._div),this._addEvent()},n.prototype.getDetails=function(){return this._adapter.getProperties()},n.prototype.update=function(){e.Helpers.CleanDiv(this._lineContent);for(var t=0,n=this.children;t<n.length;t++){var r=n[t],i=r.toHtml();this._lineContent.appendChild(i)}this.children.length>0&&(this._div.classList.contains("folded")||this._div.classList.contains("unfolded")||this._div.classList.add("folded")),this.fold()},n.prototype._addEvent=function(){var e=this;this._div.addEventListener("click",(function(t){e._tab.select(e),e._isFolded()?e.unfold():e.fold(),t.stopPropagation()}))},n.prototype._isFolded=function(){return!this._div.classList.contains("unfolded")},n.prototype.active=function(e){this._div.classList.remove("active");for(var t=0,n=this.children;t<n.length;t++){n[t].active(!1)}e&&this._div.classList.add("active")},n.prototype.getDiv=function(){return this._div},n})(e.BasicElement);e.TreeItem=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(){function t(){this._on=!1,this._elem=e.Inspector.DOCUMENT.createElement("i"),this._elem.className="treeTool fa",this._addEvents()}return t.prototype.toHtml=function(){return this._elem},t.prototype._addEvents=function(){var e=this;this._elem.addEventListener("click",(function(t){e.action(),t.stopPropagation()}))},t.prototype.action=function(){this._on=!this._on},t})();e.AbstractTreeTool=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(e){function t(t){var n=e.call(this)||this;return n._obj=t,n._elem.classList.add("fa-square-o"),n._on=n._obj.isBoxVisible(),n._check(),n}return __extends(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._check()},t.prototype._check=function(){this._on?this._elem.classList.add("active"):this._elem.classList.remove("active"),this._obj.setBoxVisible(this._on)},t})(e.AbstractTreeTool);e.BoundingBox=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(e){var n=t.call(this)||this;return n.cameraPOV=e,n._elem.classList.add("fa-video-camera"),n}return __extends(n,t),n.prototype.action=function(){t.prototype.action.call(this),this._gotoPOV()},n.prototype._gotoPOV=function(){var t=e.Inspector.DOCUMENT.querySelectorAll(".fa-video-camera.active");console.log(t);for(var n=0;n<t.length;n++)t[n].classList.remove("active");this._elem.classList.add("active"),this.cameraPOV.setPOV()},n})(e.AbstractTreeTool);e.CameraPOV=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(e){function t(t){var n=e.call(this)||this;return n.playSound=t,n.b=!1,n._elem.classList.add("fa-play"),n}return __extends(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._playSound()},t.prototype._playSound=function(){var e=this;this._elem.classList.contains("fa-play")?(this._elem.classList.remove("fa-play"),this._elem.classList.add("fa-pause")):(this._elem.classList.remove("fa-pause"),this._elem.classList.add("fa-play")),this.playSound.setPlaying((function(){e._elem.classList.remove("fa-pause"),e._elem.classList.add("fa-play")}))},t})(e.AbstractTreeTool);e.SoundInteractions=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(e){function t(t){var n=e.call(this)||this;return n._obj=t,n._elem.classList.add("fa-eye"),n._on=n._obj.isVisible(),n._check(!0),n}return __extends(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._check()},t.prototype._check=function(e){this._on?(this._elem.classList.add("fa-eye"),this._elem.classList.add("active"),this._elem.classList.remove("fa-eye-slash")):(this._elem.classList.remove("fa-eye"),this._elem.classList.remove("active"),this._elem.classList.add("fa-eye-slash")),e||this._obj.setVisible(this._on)},t})(e.AbstractTreeTool);e.Checkbox=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(e){function t(t){var n=e.call(this)||this;return n._obj=t,n._elem.classList.add("fa-wrench"),n}return __extends(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._on?this._elem.classList.add("active"):this._elem.classList.remove("active"),this._obj.debug(this._on)},t})(e.AbstractTreeTool);e.DebugArea=t})(INSPECTOR||(INSPECTOR={}));var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}})(),INSPECTOR;!(function(e){var t=(function(t){function n(n){var r=t.call(this)||this;return r._obj=n,
- r._elem.classList.add("fa-info-circle"),r._tooltip=new e.Tooltip(r._elem,r._obj.getInfo(),r._elem),r}return __extends(n,t),n.prototype.action=function(){t.prototype.action.call(this)},n})(e.AbstractTreeTool);e.Info=t})(INSPECTOR||(INSPECTOR={}));
- /*** EXPORTS FROM exports-loader ***/
- module.exports = INSPECTOR;
- /***/ }),
- /* 6 */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict"; (function () { var t = this, e = t.attachEvent && !t[r], i = t.document, r = "addEventListener", s = "removeEventListener", n = "getBoundingClientRect", o = function () { for (var t, e = ["", "-webkit-", "-moz-", "-o-"], r = 0; r < e.length; r++)if (t = i.createElement("div"), t.style.cssText = "width:" + e[r] + "calc(9px)", t.style.length) return e[r] + "calc" }(), a = function (t) { return "string" == typeof t || t instanceof String ? i.querySelector(t) : t }, l = function (l, c) { var u, g, h, p, d, z, S, f, v = []; c = void 0 !== c ? c : {}, void 0 === c.gutterSize && (c.gutterSize = 10), void 0 === c.minSize && (c.minSize = 100), void 0 === c.snapOffset && (c.snapOffset = 30), void 0 === c.direction && (c.direction = "horizontal"), "horizontal" == c.direction ? (u = "width", h = "clientWidth", p = "clientX", d = "left", z = "gutter gutter-horizontal", S = "paddingLeft", f = "paddingRight", c.cursor || (c.cursor = "ew-resize")) : "vertical" == c.direction && (u = "height", h = "clientHeight", p = "clientY", d = "top", z = "gutter gutter-vertical", S = "paddingTop", f = "paddingBottom", c.cursor || (c.cursor = "ns-resize")), c.blockDrag && (z += " blocked"); var y = function (e) { if (!c.blockDrag) { var i = this, s = i.a, n = i.b; !i.dragging && c.onDragStart && c.onDragStart(), e.preventDefault(), i.dragging = !0, i.move = b.bind(i), i.stop = m.bind(i), t[r]("mouseup", i.stop), t[r]("touchend", i.stop), t[r]("touchcancel", i.stop), i.parent[r]("mousemove", i.move), i.parent[r]("touchmove", i.move), s[r]("selectstart", E), s[r]("dragstart", E), n[r]("selectstart", E), n[r]("dragstart", E), s.style.userSelect = "none", s.style.webkitUserSelect = "none", s.style.MozUserSelect = "none", s.style.pointerEvents = "none", n.style.userSelect = "none", n.style.webkitUserSelect = "none", n.style.MozUserSelect = "none", n.style.pointerEvents = "none", i.gutter.style.cursor = c.cursor, i.parent.style.cursor = c.cursor, G.call(i) } }, m = function () { if (!c.blockDrag) { var e = this, i = e.a, r = e.b; e.dragging && c.onDragEnd && c.onDragEnd(), e.dragging = !1, t[s]("mouseup", e.stop), t[s]("touchend", e.stop), t[s]("touchcancel", e.stop), e.parent[s]("mousemove", e.move), e.parent[s]("touchmove", e.move), delete e.stop, delete e.move, i[s]("selectstart", E), i[s]("dragstart", E), r[s]("selectstart", E), r[s]("dragstart", E), i.style.userSelect = "", i.style.webkitUserSelect = "", i.style.MozUserSelect = "", i.style.pointerEvents = "", r.style.userSelect = "", r.style.webkitUserSelect = "", r.style.MozUserSelect = "", r.style.pointerEvents = "", e.gutter.style.cursor = "", e.parent.style.cursor = "" } }, b = function (t) { var e; this.dragging && (e = "touches" in t ? t.touches[0][p] - this.start : t[p] - this.start, e > this.aMin + c.snapOffset + this.aGutterSize ? e < this.size - (this.bMin + c.snapOffset + this.bGutterSize) || (e = this.size - (this.bMin + this.bGutterSize)) : e = this.aMin + this.aGutterSize, w.call(this, e), c.onDrag && c.onDrag()) }, G = function () { var e = t.getComputedStyle(this.parent), i = this.parent[h] - parseFloat(e[S]) - parseFloat(e[f]); this.size = this.a[n]()[u] + this.b[n]()[u] + this.aGutterSize + this.bGutterSize, this.percentage = Math.min(this.size / i * 100, 100), this.start = this.a[n]()[d] }, w = function (t) { this.a.style[u] = o + "(" + t / this.size * this.percentage + "% - " + this.aGutterSize + "px)", this.b.style[u] = o + "(" + (this.percentage - t / this.size * this.percentage) + "% - " + this.bGutterSize + "px)" }, x = function (t, i, r) { "string" == typeof i || i instanceof String || (i = e ? c.sizes[g] + "%" : o + "(" + i + "% - " + r + "px)"), t.style[u] = i }, E = function () { return !1 }, M = a(l[0]).parentNode; if (!c.sizes) { var D = 100 / l.length; for (c.sizes = [], g = 0; g < l.length; g++)c.sizes.push(D) } if (!Array.isArray(c.minSize)) { var k = []; for (g = 0; g < l.length; g++)k.push(c.minSize); c.minSize = k } for (g = 0; g < l.length; g++) { var U, L = a(l[g]), O = 1 == g, B = g == l.length - 1, C = c.sizes[g], F = c.gutterSize; if (g > 0 && (U = { a: a(l[g - 1]), b: L, aMin: c.minSize[g - 1], bMin: c.minSize[g], dragging: !1, parent: M, isFirst: O, isLast: B, direction: c.direction }, U.aGutterSize = c.gutterSize, U.bGutterSize = c.gutterSize, O && (U.aGutterSize = c.gutterSize / 2), B && (U.bGutterSize = c.gutterSize / 2)), !e) { if (g > 0) { var A = i.createElement("div"); A.className = z, A.style[u] = c.gutterSize + "px", A[r]("mousedown", y.bind(U)), A[r]("touchstart", y.bind(U)), M.insertBefore(A, L), U.gutter = A } (0 === g || g == l.length - 1) && (F = c.gutterSize / 2) } x(L, C, F), g > 0 && v.push(U) } return { setSizes: function (t) { for (var e = 0; e < t.length; e++)if (e > 0) { var i = v[e - 1]; x(i.a, t[e - 1], i.aGutterSize), x(i.b, t[e], i.bGutterSize) } }, collapse: function (t) { var e; t === v.length ? (e = v[t - 1], G.call(e), w.call(e, e.size - e.bGutterSize)) : (e = v[t], G.call(e), w.call(e, e.aGutterSize)) }, destroy: function () { for (var t = 0; t < v.length; t++)v[t].parent.removeChild(v[t].gutter), v[t].a.style[u] = "", v[t].b.style[u] = "" } } }; true ? ("undefined" != typeof module && module.exports && (exports = module.exports = l), exports.Split = l) : t.Split = l }).call(window);
- /***/ })
- /******/ ]);
|