12 |
- var INSPECTOR;!(function(e){var t=(function(){function t(i,n){var r=this;if(this._popupMode=!1,this._scene=i,t.DOCUMENT=window.document,t.WINDOW=window,n)this._buildInspector(n);else{var s=this._scene.getEngine().getRenderingCanvas(),a=s.parentElement,o=t.WINDOW.getComputedStyle(s);this._canvasStyle={width:o.width,height:o.height,position:o.position,padding:o.padding,paddingBottom:o.paddingBottom,paddingLeft:o.paddingLeft,paddingTop:o.paddingTop,paddingRight:o.paddingRight,margin:o.margin,marginBottom:o.marginBottom,marginLeft:o.marginLeft,marginTop:o.marginTop,marginRight:o.marginRight},this._c2diwrapper=e.Helpers.CreateDiv("insp-wrapper");for(var l in this._canvasStyle)this._c2diwrapper.style[l]=this._canvasStyle[l];var p=parseFloat(o.width.substr(0,o.width.length-2))||0,h=parseFloat(o.height.substr(0,o.height.length-2))||0,c=window.innerWidth,u=window.innerHeight,d=p/c*100,_=h/u*100;this._c2diwrapper.style.width=d+"%",this._c2diwrapper.style.height=_+"%",s.style.position="static",s.style.width="100%",s.style.height="100%",s.style.paddingBottom="0",s.style.paddingLeft="0",s.style.paddingTop="0",s.style.paddingRight="0",s.style.margin="0",s.style.marginBottom="0",s.style.marginLeft="0",s.style.marginTop="0",s.style.marginRight="0",a.replaceChild(this._c2diwrapper,s),this._c2diwrapper.appendChild(s);var v=e.Helpers.CreateDiv("insp-right-panel",this._c2diwrapper);Split([s,v],{direction:"horizontal",sizes:[75,25],onDrag:function(){e.Helpers.SEND_EVENT("resize"),r._tabbar&&r._tabbar.updateWidth()}}),this._buildInspector(v),e.Helpers.SEND_EVENT("resize")}this.refresh()}return t.prototype._buildInspector=function(t){this._tabbar=new e.TabBar(this),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){this._tabbar.getActiveTab().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.update(),this._tabPanel.appendChild(t.getPanel()),e.Helpers.SEND_EVENT("resize")},t.prototype.dispose=function(){if(!this._popupMode){var t=this._scene.getEngine().getRenderingCanvas();for(var i in this._canvasStyle)t.style[i]=this._canvasStyle[i];var n=t.parentElement.parentElement;n.appendChild(t),e.Helpers.CleanDiv(this._c2diwrapper),this._c2diwrapper.remove(),e.Helpers.SEND_EVENT("resize")}},t.prototype.openPopup=function(){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 n=t.DOCUMENT.querySelectorAll("style"),r=0;r<n.length;r++)i.document.body.appendChild(n[r].cloneNode(!0));for(var s=document.querySelectorAll("link"),a=0;a<s.length;a++){var o=i.document.createElement("link");o.rel="stylesheet",o.href=s[a].href,i.document.head.appendChild(o)}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);this._buildInspector(l),this.refresh()},t})();e.Inspector=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){e.PROPERTIES={format:function(t){var i=e.Helpers.GET_TYPE(t)||"type_not_defined";return e.PROPERTIES[i]&&e.PROPERTIES[i].format?e.PROPERTIES[i].format(t):e.Helpers.GET_TYPE(t)},type_not_defined:{properties:[],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}},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"]},ArcRotateCamera:{properties:["alpha","beta","radius"]},Scene:{type:BABYLON.Scene,properties:["actionManager","activeCamera","ambientColor","clearColor"]},Mesh:{type:BABYLON.Mesh,properties:["name","position","rotation","rotationQuaternion","absolutePosition","material"],format:function(e){return e.name}},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}},PrimitiveAlignment:{type:BABYLON.PrimitiveAlignment,properties:["horizontal","vertical"]},PrimitiveThickness:{type:BABYLON.PrimitiveThickness,properties:["topPixels","leftPixels","rightPixels","bottomPixels"]},BoundingInfo2D:{type:BABYLON.BoundingInfo2D,properties:["radius","center","extent"]},SolidColorBrush2D:{type:BABYLON.SolidColorBrush2D,properties:["color"]},GradientColorBrush2D:{type:BABYLON.GradientColorBrush2D,properties:["color1","color2","translation","rotation","scale"]},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"]}}})(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}),e.prototype.highlight=function(e){},e._name=BABYLON.Geometry.RandomId(),e})();e.Adapter=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e){t.call(this,e)}return __extends(i,t),i.prototype.id=function(){var e="";return this._obj.id&&(e=this._obj.id),e},i.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},i.prototype.getProperties=function(){var t=this,i=[];if(this._obj.propDic){var n=this._obj.propDic;n.forEach((function(n,r){var s=new e.Property(n,t.actualObject);i.push(new e.PropertyLine(s))}))}for(var r=["actualZOffset","isSizeAuto","layoutArea","layoutAreaPos","contentArea","marginOffset","paddingOffset","isPickable","isContainer","boundingInfo","levelBoundingInfo","isSizedByContent","isPositionAuto","actualScale","layoutBoundingInfo"],s=0,a=r;s<a.length;s++){var o=a[s],l=new e.Property(o,this.actualObject);i.push(new e.PropertyLine(l))}return i},i.prototype.getTools=function(){var t=[];return t.push(new e.Checkbox(this)),t.push(new e.DebugArea(this)),t},i.prototype.setVisible=function(e){this._obj.levelVisible=e},i.prototype.isVisible=function(){return this._obj.levelVisible},i.prototype.debug=function(e){this._obj.displayDebugAreas=e},i.prototype.highlight=function(e){},i})(e.Adapter);e.Canvas2DAdapter=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e){t.call(this,e)}return __extends(i,t),i.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},i.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},i.prototype.getProperties=function(){for(var t=[],n=0,r=i._PROPERTIES;n<r.length;n++){var s=r[n],a=new e.Property(s,this._obj);t.push(new e.PropertyLine(a))}return t},i.prototype.getTools=function(){var t=[];return t.push(new e.Checkbox(this)),t},i.prototype.setVisible=function(e){this._obj.setEnabled(e)},i.prototype.isVisible=function(){return this._obj.isEnabled()},i.prototype.highlight=function(e){this.actualObject.renderOutline=e,this.actualObject.outlineWidth=.25,this.actualObject.outlineColor=BABYLON.Color3.Yellow()},i._PROPERTIES=["position","diffuse","intensity","radius","range","specular"],i})(e.Adapter);e.LightAdapter=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e){t.call(this,e)}return __extends(i,t),i.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},i.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},i.prototype.getProperties=function(){var t=[],i=[];this._obj instanceof BABYLON.StandardMaterial?i=e.PROPERTIES.StandardMaterial.properties:this._obj instanceof BABYLON.PBRMaterial&&(i=e.PROPERTIES.PBRMaterial.properties);for(var n=0,r=i;n<r.length;n++){var s=r[n],a=new e.Property(s,this._obj);t.push(new e.PropertyLine(a))}return t},i.prototype.getTools=function(){return[]},i.prototype.highlight=function(e){for(var t=this.actualObject,i=t.getBindedMeshes(),n=0,r=i;n<r.length;n++){var s=r[n];s.renderOutline=e,s.outlineWidth=.25,s.outlineColor=BABYLON.Color3.Yellow()}},i})(e.Adapter);e.MaterialAdapter=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e){t.call(this,e),this._axis=[]}return __extends(i,t),i.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},i.prototype.type=function(){return e.Helpers.GET_TYPE(this._obj)},i.prototype.getProperties=function(){for(var t=[],i=0,n=e.PROPERTIES.Mesh.properties;i<n.length;i++){var r=n[i],s=new e.Property(r,this._obj);t.push(new e.PropertyLine(s))}return t},i.prototype.getTools=function(){var t=[];return t.push(new e.Checkbox(this)),t.push(new e.DebugArea(this)),t.push(new e.BoundingBox(this)),t.push(new e.Info(this)),t},i.prototype.setVisible=function(e){this._obj.setEnabled(e),this._obj.isVisible=e},i.prototype.isVisible=function(){return this._obj.isEnabled()&&this._obj.isVisible},i.prototype.isBoxVisible=function(){return this._obj.showBoundingBox},i.prototype.setBoxVisible=function(e){return this._obj.showBoundingBox=e},i.prototype.debug=function(e){0==this._axis.length&&this._drawAxis();for(var t=0,i=this._axis;t<i.length;t++){var n=i[t];n.setEnabled(e)}},i.prototype.getInfo=function(){return this._obj.getTotalVertices()+" vertices"},i.prototype.highlight=function(e){this.actualObject.renderOutline=e,this.actualObject.outlineWidth=.25,this.actualObject.outlineColor=BABYLON.Color3.Yellow()},i.prototype._drawAxis=function(){var e=this;this._obj.computeWorldMatrix();var t=this._obj.getWorldMatrix(),i=new BABYLON.Vector3(8,0,0),n=new BABYLON.Vector3(0,8,0),r=new BABYLON.Vector3(0,0,8),s=function(t,i,n){var r=BABYLON.Mesh.CreateLines("###axis###",[i,n],e._obj.getScene());return r.color=t,r.renderingGroupId=1,r},a=s(BABYLON.Color3.Red(),this._obj.getAbsolutePosition(),BABYLON.Vector3.TransformCoordinates(i,t));a.position.subtractInPlace(this._obj.position),a.parent=this._obj,this._axis.push(a);var o=s(BABYLON.Color3.Green(),this._obj.getAbsolutePosition(),BABYLON.Vector3.TransformCoordinates(n,t));o.parent=this._obj,o.position.subtractInPlace(this._obj.position),this._axis.push(o);var l=s(BABYLON.Color3.Blue(),this._obj.getAbsolutePosition(),BABYLON.Vector3.TransformCoordinates(r,t));l.parent=this._obj,l.position.subtractInPlace(this._obj.position),this._axis.push(l)},i})(e.Adapter);e.MeshAdapter=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e){t.call(this),this._detailRows=[],this._sortDirection={},this._build(),e&&(this._detailRows=e,this.update())}return __extends(i,t),Object.defineProperty(i.prototype,"details",{set:function(e){this.clean(),this._detailRows=e,this.update()},enumerable:!0,configurable:!0}),i.prototype._build=function(){var t=this;this._div.className="insp-details",this._div.id="insp-details",this._createHeaderRow(),this._div.appendChild(this._headerRow),e.Inspector.WINDOW.addEventListener("resize",(function(e){t._headerRow.style.maxWidth=t._headerRow.parentElement.clientWidth+"px"}))},i.prototype.update=function(){this._sortDetails("name",1),this._addDetails()},i.prototype._addDetails=function(){for(var t=e.Helpers.CreateDiv("details",this._div),i=0,n=this._detailRows;i<n.length;i++){var r=n[i];t.appendChild(r.toHtml())}},i.prototype._sortDetails=function(t,i){for(var n=e.Inspector.DOCUMENT.querySelectorAll(".sort-direction"),r=0;r<n.length;r++)n[r].classList.remove("fa-chevron-up"),n[r].classList.remove("fa-chevron-down");i||!this._sortDirection[t]?this._sortDirection[t]=i||1:this._sortDirection[t]*=-1;var s=this._sortDirection[t];1==s?(this._headerRow.querySelector("#sort-direction-"+t).classList.remove("fa-chevron-down"),this._headerRow.querySelector("#sort-direction-"+t).classList.add("fa-chevron-up")):(this._headerRow.querySelector("#sort-direction-"+t).classList.remove("fa-chevron-up"),this._headerRow.querySelector("#sort-direction-"+t).classList.add("fa-chevron-down"));var a=function(e){return"string"==typeof e||e instanceof String};this._detailRows.sort((function(e,i){var n=String(e[t]),r=String(i[t]);return a(n)||(n=e[t].toString()),a(r)||(r=i[t].toString()),n.localeCompare(r,[],{numeric:!0})*s}))},i.prototype.clean=function(){for(var t=0,i=this._detailRows;t<i.length;t++){var n=i[t];n.dispose()}e.Helpers.CleanDiv(this._div),this._div.appendChild(this._headerRow)},i.prototype.dispose=function(){for(var e=0,t=this._detailRows;e<t.length;e++){var i=t[e];i.dispose()}},i.prototype._createHeaderRow=function(){var t=this;this._headerRow=e.Helpers.CreateDiv("header-row");var i=function(i,n){var r=e.Helpers.CreateDiv(n+" header-col"),s=e.Inspector.DOCUMENT.createElement("span");s.textContent=i.charAt(0).toUpperCase()+i.slice(1);var a=e.Inspector.DOCUMENT.createElement("i");return a.className="sort-direction fa",a.id="sort-direction-"+i,r.appendChild(s),r.appendChild(a),r.addEventListener("click",(function(e){t._sortDetails(i),t._addDetails()})),r};this._headerRow.appendChild(i("name","prop-name")),this._headerRow.appendChild(i("value","prop-value"))},i})(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){var i=e[t];if(BABYLON.PrimitiveAlignment&&e instanceof BABYLON.PrimitiveAlignment)if("horizontal"===t)switch(i){case BABYLON.PrimitiveAlignment.AlignLeft:return"left";case BABYLON.PrimitiveAlignment.AlignRight:return"right";case BABYLON.PrimitiveAlignment.AlignCenter:return"center";case BABYLON.PrimitiveAlignment.AlignStretch:return"stretch"}else if("vertical"===t)switch(i){case BABYLON.PrimitiveAlignment.AlignTop:return"top";case BABYLON.PrimitiveAlignment.AlignBottom:return"bottom";case BABYLON.PrimitiveAlignment.AlignCenter:return"center";case BABYLON.PrimitiveAlignment.AlignStretch:return"stretch"}return i},e})();e.PropertyFormatter=t;var i=(function(){function i(t,i,n){void 0===n&&(n=0),this._children=[],this._elements=[],this._property=t,this._level=n,this._parent=i,this._div=e.Helpers.CreateDiv("row"),this._div.style.marginLeft=this._level+"px";var r=e.Helpers.CreateDiv("prop-name",this._div);r.textContent=""+this.name,this._valueDiv=e.Helpers.CreateDiv("prop-value",this._div),this._valueDiv.textContent=this._displayValueContent()||"-",this._createElements();for(var s=0,a=this._elements;s<a.length;s++){var o=a[s];this._valueDiv.appendChild(o.toHtml())}this._updateValue(),this._isSimple()?(this._initInput(),this._valueDiv.addEventListener("click",this._displayInputHandler),this._input.addEventListener("keypress",this._validateInputHandler)):(this._valueDiv.classList.add("clickable"),this._valueDiv.addEventListener("click",this._addDetails.bind(this))),e.Scheduler.getInstance().add(this)}return i.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)},i.prototype._validateInput=function(t){if(13==t.keyCode){var i=this._input.value;this.updateObject(),this._property.value=i,this.update(),e.Scheduler.getInstance().pause=!1}else 27==t.keyCode&&this.update()},i.prototype._removeInputWithoutValidating=function(){e.Helpers.CleanDiv(this._valueDiv),this._valueDiv.textContent="-";for(var t=0,i=this._elements;t<i.length;t++){var n=i[t];this._valueDiv.appendChild(n.toHtml())}this._valueDiv.addEventListener("click",this._displayInputHandler)},i.prototype._displayInput=function(t){this._valueDiv.removeEventListener("click",this._displayInputHandler);var i=this._valueDiv.textContent;this._valueDiv.textContent="",this._input.value=i,this._valueDiv.appendChild(this._input),e.Scheduler.getInstance().pause=!0},i.prototype.updateObject=function(){return this._parent?void(this._property.obj=this._parent.updateObject()):this._property.value},Object.defineProperty(i.prototype,"name",{get:function(){return this._property.name},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return t.format(this._property.obj,this._property.name)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"type",{get:function(){return this._property.type},enumerable:!0,configurable:!0}),i.prototype._createElements=function(){"Color3"!=this.type&&"Color4"!=this.type||this._elements.push(new e.ColorElement(this.value)),"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))},i.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)},i.prototype.dispose=function(){e.Scheduler.getInstance().remove(this);for(var t=0,i=this._children;t<i.length;t++){var n=i[t];e.Scheduler.getInstance().remove(n)}for(var r=0,s=this._elements;r<s.length;r++){var a=s[r];a.dispose()}this._elements=[]},i.prototype._updateValue=function(){this.updateObject(),this._valueDiv.childNodes[0].nodeValue=this._displayValueContent();for(var e=0,t=this._elements;e<t.length;e++){var i=t[e];i.update(this.value)}},i.prototype.update=function(){this._removeInputWithoutValidating(),this._updateValue()},i._IS_TYPE_SIMPLE=function(t){var n=e.Helpers.GET_TYPE(t);return i._SIMPLE_TYPE.indexOf(n)!=-1},i.prototype._isSimple=function(){return null==this.value||"type_not_defined"===this.type||i._SIMPLE_TYPE.indexOf(this.type)!=-1},i.prototype.toHtml=function(){return this._div},i.prototype._addDetails=function(){if(this._div.classList.contains("unfolded")){this._div.classList.remove("unfolded");for(var t=0,n=this._children;t<n.length;t++){var r=n[t];this._div.parentNode.removeChild(r.toHtml())}}else{if(this._div.classList.toggle("unfolded"),0==this._children.length)for(var s=this.value,a=e.PROPERTIES[e.Helpers.GET_TYPE(s)].properties.reverse(),o=0,l=a;o<l.length;o++){var p=l[o],h=new e.Property(p,this._property.value),r=new i(h,this,this._level+i._MARGIN_LEFT);this._children.push(r)}for(var c=0,u=this._children;c<u.length;c++){var r=u[c];this._div.parentNode.insertBefore(r.toHtml(),this._div.nextSibling)}}},i._SIMPLE_TYPE=["number","string","boolean"],i._MARGIN_LEFT=15,i})();e.PropertyLine=i})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(e){function t(t){e.call(this),this._div.className="color-element",this._div.style.backgroundColor=this._toRgba(t)}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,i=255*e.g|0,n=255*e.b|0,r=1;if(e instanceof BABYLON.Color4){e.a}return"rgba("+t+", "+i+", "+n+", "+r+")"}return""},t})(e.BasicElement);e.ColorElement=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(i){t.call(this),this._pause=!1,this._div.className="fa fa-search texture-element",this._textureDiv=e.Helpers.CreateDiv("texture-viewer",this._div),this._canvas=e.Helpers.CreateElement("canvas","texture-viewer-img",this._textureDiv),i&&(this._textureUrl=i.name),this._div.addEventListener("mouseover",this._showViewer.bind(this,"flex")),this._div.addEventListener("mouseout",this._showViewer.bind(this,"none"))}return __extends(i,t),i.prototype.update=function(e){e&&e.url===this._textureUrl||(e&&(this._textureUrl=e.name),this._engine?(this._cube.material.dispose(!0,!0),this._cube.dispose()):this._initEngine(),this._populateScene())},i.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 i=new BABYLON.StandardMaterial("skyBox",this._scene);i.backFaceCulling=!1,i.reflectionTexture=t,i.reflectionTexture.coordinatesMode=BABYLON.Texture.SKYBOX_MODE,i.disableLighting=!0,this._cube.material=i,this._cube.registerBeforeRender((function(){e._cube.rotation.y+=.01}))},i.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);new BABYLON.FreeCamera("cam",new BABYLON.Vector3(0,0,(-20)),this._scene),new BABYLON.HemisphericLight("",new BABYLON.Vector3(0,1,0),this._scene);this._engine.runRenderLoop((function(){e._pause||e._scene.render()})),this._canvas.setAttribute("width","110"),this._canvas.setAttribute("height","110")},i.prototype._showViewer=function(e){"none"!=e?(this._engine||(this._initEngine(),this._populateScene()),this._pause=!1):this._pause=!0,this._textureDiv.style.display=e},i.prototype.dispose=function(){this._engine&&(this._engine.dispose(),this._engine=null)},i})(e.BasicElement);e.CubeTextureElement=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(e){function t(t){e.call(this,t)}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 i=new BABYLON.PBRMaterial("skyBox",this._scene);i.backFaceCulling=!1,i.reflectionTexture=t,i.microSurface=1,i.disableLighting=!0,this._cube.material=i,this._cube.registerBeforeRender((function(){e._cube.rotation.y+=.01}))},t})(e.CubeTextureElement);e.HDRCubeTextureElement=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(i){var n=this;t.call(this),this._tab=i,this._div.classList.add("searchbar");var r=e.Inspector.DOCUMENT.createElement("i");r.className="fa fa-search",this._div.appendChild(r),this._inputElement=e.Inspector.DOCUMENT.createElement("input"),this._inputElement.placeholder="Filter by name...",this._div.appendChild(this._inputElement),this._inputElement.addEventListener("keyup",(function(e){var t=n._inputElement.value;n._tab.filter(t)}))}return __extends(i,t),i.prototype.reset=function(){this._inputElement.value=""},i.prototype.update=function(){},i})(e.BasicElement);e.SearchBar=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(i){t.call(this),this._div.className="fa fa-search texture-element",this._textureDiv=e.Helpers.CreateDiv("texture-viewer",this._div);var n=e.Helpers.CreateDiv("texture-viewer-img",this._textureDiv),r=e.Helpers.CreateDiv(null,this._textureDiv);i&&(r.textContent=i.getBaseSize().width+"px x "+i.getBaseSize().height+"px",n.style.backgroundImage="url('"+i.url+"')",n.style.width=i.getBaseSize().width+"px",n.style.height=i.getBaseSize().height+"px"),this._div.addEventListener("mouseover",this._showViewer.bind(this,"flex")),this._div.addEventListener("mouseout",this._showViewer.bind(this,"none"))}return __extends(i,t),i.prototype.update=function(e){},i.prototype._showViewer=function(e){this._textureDiv.style.display=e},i})(e.BasicElement);e.TextureElement=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(){function t(t,i){var n=this;this._elem=t,this._infoDiv=e.Helpers.CreateDiv("tooltip",this._elem.parentElement),this._elem.addEventListener("mouseover",(function(){n._infoDiv.textContent=i,n._infoDiv.style.display="block"})),this._elem.addEventListener("mouseout",(function(){n._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(null!=e&&void 0!=e){var t=BABYLON.Tools.getClassName(e);return t&&"object"!==t||(t=e.constructor.name,t||(t=this._GetFnName(e.constructor))),this._CheckIfTypeExists(t)?t:this._GetTypeFor(e)}return"type_not_defined"},t._CheckIfTypeExists=function(t){var i=e.PROPERTIES[t];return!!i},t._GetTypeFor=function(t){for(var i in e.PROPERTIES){var n=e.PROPERTIES[i];if(n.type&&t instanceof n.type)return i}return"type_not_defined"},t._GetFnName=function(e){var t="function"==typeof e,i=t&&(e.name&&["",e.name]||e.toString().match(/function ([^\(]+)/));return!t&&"not a function"||i&&i[1]||"anonymous"},t.SEND_EVENT=function(t){var i;e.Inspector.DOCUMENT.createEvent?(i=e.Inspector.DOCUMENT.createEvent("HTMLEvents"),i.initEvent(t,!0,!0)):i=new Event(t),window.dispatchEvent(i)},t.Trunc=function(e){return Math.round(e)!==e?e.toFixed(2):e},t.CreateDiv=function(e,i){return t.CreateElement("div",e,i)},t.CreateElement=function(t,i,n){var r=e.Inspector.DOCUMENT.createElement(t);return i&&(r.className=i),n&&n.appendChild(r),r},t.CleanDiv=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},t.LoadScript=function(){BABYLON.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js",(function(i){var n=t.CreateElement("script","",e.Inspector.DOCUMENT.body);n.textContent=i,BABYLON.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/languages/glsl.min.js",(function(i){var n=t.CreateElement("script","",e.Inspector.DOCUMENT.body);n.textContent=i,BABYLON.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/styles/zenburn.min.css",(function(i){var n=t.CreateElement("style","",e.Inspector.DOCUMENT.body);n.textContent=i}))}),null,null,null,(function(){console.log("erreur")}))}),null,null,null,(function(){console.log("erreur")}))},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,console.log("create ")),e._instance},e.prototype.add=function(e){this._updatableProperties.push(e)},e.prototype.remove=function(e){var t=this._updatableProperties.indexOf(e);t!=-1&&this._updatableProperties.splice(t,1)},e.prototype._update=function(){if(!this.pause)for(var e=0,t=this._updatableProperties;e<t.length;e++){var i=t[e];i.update()}},e.REFRESH_TIME=250,e})();e.Scheduler=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e,i){t.call(this),this._isActive=!1,this._tabbar=e,this.name=i,this._build()}return __extends(i,t),i.prototype.isActive=function(){return this._isActive},i.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)}))},i.prototype.active=function(e){e?this._div.classList.add("active"):this._div.classList.remove("active"),this._isActive=e},i.prototype.update=function(){},i.prototype.getPanel=function(){return this._panel},i.prototype.filter=function(e){},i.prototype.getPixelWidth=function(){var t=e.Inspector.WINDOW.getComputedStyle(this._div),i=parseFloat(t.marginLeft.substr(0,t.marginLeft.length-2))||0,n=parseFloat(t.marginRight.substr(0,t.marginRight.length-2))||0;return(this._div.clientWidth||0)+i+n},i})(e.BasicElement);e.Tab=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(i,n,r){t.call(this,i,n),this._treeItems=[],this._inspector=r,this._panel=e.Helpers.CreateDiv("tab-panel"),this._searchBar=new e.SearchBar(this),this._panel.appendChild(this._searchBar.toHtml()),this._treePanel=e.Helpers.CreateDiv("insp-tree",this._panel),this._detailsPanel=new e.DetailPanel,this._panel.appendChild(this._detailsPanel.toHtml()),Split([this._treePanel,this._detailsPanel.toHtml()],{direction:"vertical"}),this.update()}return __extends(i,t),i.prototype.dispose=function(){this._detailsPanel.dispose()},i.prototype.update=function(t){var i;t?i=t:(this._treeItems=this._getTree(),i=this._treeItems),e.Helpers.CleanDiv(this._treePanel),this._detailsPanel.clean(),i.sort((function(e,t){return e.compareTo(t)}));for(var n=0,r=i;n<r.length;n++){var s=r[n];this._treePanel.appendChild(s.toHtml())}},i.prototype.displayDetails=function(e){this.activateNode(e),this._detailsPanel.details=e.getDetails()},i.prototype.select=function(e){this.highlightNode(),this.activateNode(e),this.displayDetails(e)},i.prototype.highlightNode=function(e){if(this._treeItems)for(var t=0,i=this._treeItems;t<i.length;t++){var n=i[t];n.highlight(!1)}e&&e.highlight(!0)},i.prototype.activateNode=function(e){if(this._treeItems)for(var t=0,i=this._treeItems;t<i.length;t++){var n=i[t];n.active(!1)}e.active(!0)},i.prototype.getItemFor=function(e){for(var t=e,i=0,n=this._treeItems;i<n.length;i++){var r=n[i];if(r.correspondsTo(t))return r}return null},i.prototype.filter=function(e){for(var t=[],i=0,n=this._treeItems;i<n.length;i++){var r=n[i];r.id.toLowerCase().indexOf(e.toLowerCase())!=-1&&t.push(r)}this.update(t)},i})(e.Tab);e.PropertyTab=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e,i){t.call(this,e,"Canvas2D",i)}return __extends(i,t),i.prototype._getTree=function(){for(var t=this,i=[],n=BABYLON.Canvas2D.instances||[],r=function(e){return e.id&&0==e.id.indexOf("###")&&0===e.id.lastIndexOf("###",0)},s=function(i){if(i.children&&i.children.length>0){for(var n=new e.TreeItem(t,new e.Canvas2DAdapter(i)),a=0,o=i.children;a<o.length;a++){var l=o[a];if(!r(l)){var p=s(l);n.add(p)}}return n.update(),n}return new e.TreeItem(t,new e.Canvas2DAdapter(i));
- },a=0,o=n;a<o.length;a++){var l=o[a],p=l,h=s(p);i.push(h)}return i},i})(e.PropertyTab);e.Canvas2DTab=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e,i){t.call(this,e,"Light",i)}return __extends(i,t),i.prototype._getTree=function(){for(var t=[],i=this._inspector.scene,n=0,r=i.lights;n<r.length;n++){var s=r[n];t.push(new e.TreeItem(this,new e.LightAdapter(s)))}return t},i})(e.PropertyTab);e.LightTab=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e,i){t.call(this,e,"Material",i)}return __extends(i,t),i.prototype._getTree=function(){for(var t=[],i=this._inspector.scene,n=0,r=i.materials;n<r.length;n++){var s=r[n];t.push(new e.TreeItem(this,new e.MaterialAdapter(s)))}return t},i})(e.PropertyTab);e.MaterialTab=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e,i){t.call(this,e,"Mesh",i)}return __extends(i,t),i.prototype._getTree=function(){for(var t=[],i=function(e){return e.name&&0==e.name.indexOf("###")&&0===e.name.lastIndexOf("###",0)},n=this._inspector.scene,r=0,s=n.meshes;r<s.length;r++){var a=s[r];i(a)||t.push(new e.TreeItem(this,new e.MeshAdapter(a)))}return t},i})(e.PropertyTab);e.MeshTab=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(i,n){var r=this;t.call(this,i,"Scene"),this._skeletonViewers=[],this._inspector=n,this._panel=e.Helpers.CreateDiv("tab-panel"),this._actions=e.Helpers.CreateDiv("scene-actions",this._panel),this._detailsPanel=new e.DetailPanel,this._panel.appendChild(this._detailsPanel.toHtml());for(var s=[],a=0,o=e.PROPERTIES.Scene.properties;a<o.length;a++){var l=o[a];s.push(new e.PropertyLine(new e.Property(l,this._inspector.scene)))}this._detailsPanel.details=s,Split([this._actions,this._detailsPanel.toHtml()],{sizes:[50,50],direction:"vertical"});var p=e.Helpers.CreateDiv("actions-title",this._actions);p.textContent="Rendering mode";var h=e.Helpers.CreateDiv("action-radio",this._actions),c=e.Helpers.CreateDiv("action-radio",this._actions),u=e.Helpers.CreateDiv("action-radio",this._actions);h.textContent="Point",c.textContent="Wireframe",u.textContent="Solid",this._inspector.scene.forcePointsCloud?h.classList.add("active"):this._inspector.scene.forceWireframe?c.classList.add("active"):u.classList.add("active"),this._generateRadioAction([h,c,u]),h.addEventListener("click",(function(){r._inspector.scene.forcePointsCloud=!0,r._inspector.scene.forceWireframe=!1})),c.addEventListener("click",(function(){r._inspector.scene.forcePointsCloud=!1,r._inspector.scene.forceWireframe=!0})),u.addEventListener("click",(function(){r._inspector.scene.forcePointsCloud=!1,r._inspector.scene.forceWireframe=!1})),p=e.Helpers.CreateDiv("actions-title",this._actions),p.textContent="Textures channels",this._generateActionLine("Diffuse Texture",BABYLON.StandardMaterial.DiffuseTextureEnabled,(function(e){BABYLON.StandardMaterial.DiffuseTextureEnabled=e})),this._generateActionLine("Ambient Texture",BABYLON.StandardMaterial.AmbientTextureEnabled,(function(e){BABYLON.StandardMaterial.AmbientTextureEnabled=e})),this._generateActionLine("Specular Texture",BABYLON.StandardMaterial.SpecularTextureEnabled,(function(e){BABYLON.StandardMaterial.SpecularTextureEnabled=e})),this._generateActionLine("Emissive Texture",BABYLON.StandardMaterial.EmissiveTextureEnabled,(function(e){BABYLON.StandardMaterial.EmissiveTextureEnabled=e})),this._generateActionLine("Bump Texture",BABYLON.StandardMaterial.BumpTextureEnabled,(function(e){BABYLON.StandardMaterial.BumpTextureEnabled=e})),this._generateActionLine("Opacity Texture",BABYLON.StandardMaterial.OpacityTextureEnabled,(function(e){BABYLON.StandardMaterial.OpacityTextureEnabled=e})),this._generateActionLine("Reflection Texture",BABYLON.StandardMaterial.ReflectionTextureEnabled,(function(e){BABYLON.StandardMaterial.ReflectionTextureEnabled=e})),this._generateActionLine("Refraction Texture",BABYLON.StandardMaterial.RefractionTextureEnabled,(function(e){BABYLON.StandardMaterial.RefractionTextureEnabled=e})),this._generateActionLine("ColorGrading",BABYLON.StandardMaterial.ColorGradingTextureEnabled,(function(e){BABYLON.StandardMaterial.ColorGradingTextureEnabled=e})),this._generateActionLine("Lightmap Texture",BABYLON.StandardMaterial.LightmapTextureEnabled,(function(e){BABYLON.StandardMaterial.LightmapTextureEnabled=e})),this._generateActionLine("Fresnel",BABYLON.StandardMaterial.FresnelEnabled,(function(e){BABYLON.StandardMaterial.FresnelEnabled=e})),p=e.Helpers.CreateDiv("actions-title",this._actions),p.textContent="Options",this._generateActionLine("Animations",this._inspector.scene.animationsEnabled,(function(e){r._inspector.scene.animationsEnabled=e})),this._generateActionLine("Collisions",this._inspector.scene.collisionsEnabled,(function(e){r._inspector.scene.collisionsEnabled=e})),this._generateActionLine("Fog",this._inspector.scene.fogEnabled,(function(e){r._inspector.scene.fogEnabled=e})),this._generateActionLine("Lens flares",this._inspector.scene.lensFlaresEnabled,(function(e){r._inspector.scene.lensFlaresEnabled=e})),this._generateActionLine("Lights",this._inspector.scene.lightsEnabled,(function(e){r._inspector.scene.lightsEnabled=e})),this._generateActionLine("Particles",this._inspector.scene.particlesEnabled,(function(e){r._inspector.scene.particlesEnabled=e})),this._generateActionLine("Post-processes",this._inspector.scene.postProcessesEnabled,(function(e){r._inspector.scene.postProcessesEnabled=e})),this._generateActionLine("Probes",this._inspector.scene.probesEnabled,(function(e){r._inspector.scene.probesEnabled=e})),this._generateActionLine("Procedural textures",this._inspector.scene.proceduralTexturesEnabled,(function(e){r._inspector.scene.proceduralTexturesEnabled=e})),this._generateActionLine("Render targets",this._inspector.scene.renderTargetsEnabled,(function(e){r._inspector.scene.renderTargetsEnabled=e})),this._generateActionLine("Shadows",this._inspector.scene.shadowsEnabled,(function(e){r._inspector.scene.shadowsEnabled=e})),this._generateActionLine("Skeletons",this._inspector.scene.skeletonsEnabled,(function(e){r._inspector.scene.skeletonsEnabled=e})),this._generateActionLine("Sprites",this._inspector.scene.spritesEnabled,(function(e){r._inspector.scene.spritesEnabled=e})),this._generateActionLine("Textures",this._inspector.scene.texturesEnabled,(function(e){r._inspector.scene.texturesEnabled=e})),p=e.Helpers.CreateDiv("actions-title",this._actions),p.textContent="Audio";var d=e.Helpers.CreateDiv("action-radio",this._actions),_=e.Helpers.CreateDiv("action-radio",this._actions);this._generateActionLine("Disable audio",!this._inspector.scene.audioEnabled,(function(e){r._inspector.scene.audioEnabled=!e})),d.textContent="Headphones",_.textContent="Normal speakers",this._generateRadioAction([d,_]),this._inspector.scene.headphone?d.classList.add("active"):_.classList.add("active"),d.addEventListener("click",(function(){r._inspector.scene.headphone=!0})),_.addEventListener("click",(function(){r._inspector.scene.headphone=!1})),p=e.Helpers.CreateDiv("actions-title",this._actions),p.textContent="Viewer",this._generateActionLine("Skeletons",!1,(function(e){if(e)for(var t=0;t<r._inspector.scene.meshes.length;t++){var i=r._inspector.scene.meshes[t];if(i.skeleton){for(var n=!1,s=0;s<r._skeletonViewers.length;s++)if(r._skeletonViewers[s].skeleton===i.skeleton){n=!0;break}if(n)continue;var a=new BABYLON.Debug.SkeletonViewer(i.skeleton,i,r._inspector.scene);a.isEnabled=!0,r._skeletonViewers.push(a)}}else{for(var t=0;t<r._skeletonViewers.length;t++)r._skeletonViewers[t].dispose();r._skeletonViewers=[]}}))}return __extends(i,t),i.prototype.dispose=function(){this._detailsPanel.dispose()},i.prototype._generateActionLine=function(t,i,n){var r=e.Helpers.CreateDiv("scene-actions",this._actions);r.textContent=t,r.classList.add("action"),i&&r.classList.add("active"),r.addEventListener("click",(function(e){r.classList.toggle("active");var t=r.classList.contains("active");n(t)}))},i.prototype._generateRadioAction=function(e){for(var t=function(t,i){for(var n=0,r=e;n<r.length;n++){var s=r[n];s.classList.remove("active")}t.classList.add("active")},i=0,n=e;i<n.length;i++){var r=n[i];r.addEventListener("click",t.bind(this,r))}},i})(e.Tab);e.SceneTab=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(i,n){t.call(this,i,"Shader"),this._inspector=n,this._panel=e.Helpers.CreateDiv("tab-panel");var r=e.Helpers.CreateDiv("shader-tree-panel");this._vertexPanel=e.Helpers.CreateDiv("shader-panel"),this._fragmentPanel=e.Helpers.CreateDiv("shader-panel"),this._panel.appendChild(r),this._panel.appendChild(this._vertexPanel),this._panel.appendChild(this._fragmentPanel),e.Helpers.LoadScript(),Split([this._vertexPanel,this._fragmentPanel],{sizes:[50,50],direction:"vertical"});var s=e.Helpers.CreateElement("select","",r);s.addEventListener("change",this._selectShader.bind(this));var a=e.Helpers.CreateElement("option","",s);a.textContent="Select a shader",a.setAttribute("value",""),a.setAttribute("disabled","true"),a.setAttribute("selected","true");for(var o=0,l=this._inspector.scene.materials;o<l.length;o++){var p=l[o];if(p instanceof BABYLON.ShaderMaterial){var h=e.Helpers.CreateElement("option","",s);h.setAttribute("value",p.id),h.textContent=p.name+" - "+p.id}}}return __extends(i,t),i.prototype._selectShader=function(t){var i=t.target.value,n=this._inspector.scene.getMaterialByID(i);e.Helpers.CleanDiv(this._vertexPanel);var r=e.Helpers.CreateDiv("shader-panel-title",this._vertexPanel);r.textContent="Vertex shader";var s=e.Helpers.CreateElement("code","glsl",e.Helpers.CreateElement("pre","",this._vertexPanel));s.textContent=this._beautify(n.getEffect().getVertexShaderSource()),e.Helpers.CleanDiv(this._fragmentPanel),r=e.Helpers.CreateDiv("shader-panel-title",this._fragmentPanel),r.textContent="Frgament shader",s=e.Helpers.CreateElement("code","glsl",e.Helpers.CreateElement("pre","",this._fragmentPanel)),s.textContent=this._beautify(n.getEffect().getFragmentShaderSource());var a=e.Helpers.CreateElement("script","",e.Inspector.DOCUMENT.body);a.textContent="hljs.initHighlighting();"},i.prototype.dispose=function(){},i.prototype._getBracket=function(e){for(var t=e.indexOf("{"),i=e.substr(t+1).split(""),n=1,r=t,s=0,a=0,o=i;a<o.length;a++){var l=o[a];if(r++,"{"===l&&n++,"}"===l&&n--,0==n){s=r;break}}return{firstBracket:t,lastBracket:s}},i.prototype._beautify=function(e,t){void 0===t&&(t=0);for(var i=this._getBracket(e),n=i.firstBracket,r=i.lastBracket,s="",a=0;a<t;a++)s+=" ";if(n==-1)return e=s+e,e=e.replace(/;./g,(function(e){return"\n"+e.substr(1)})),e=e.replace(/=/g," = "),e=e.replace(/\n/g,"\n"+s);var o=e.substr(0,n),l=e.substr(r+1,e.length),p=e.substr(n+1,r-n-1);return p=this._beautify(p,t+1),this._beautify(o,t)+"{\n"+p+"\n"+s+"}\n"+this._beautify(l,t)},i})(e.Tab);e.ShaderTab=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(i,n){var r=this;t.call(this,i,"Stats"),this._updatableProperties=[],this._inspector=n,this._scene=this._inspector.scene,this._engine=this._scene.getEngine(),this._glInfo=this._engine.getGlInfo(),this._panel=e.Helpers.CreateDiv("tab-panel"),this._panel.classList.add("stats-panel");var s=e.Helpers.CreateDiv("stat-title1",this._panel);s.innerHTML="Babylon.js v"+BABYLON.Engine.Version+" - <b>"+BABYLON.Tools.Format(this._inspector.scene.getEngine().getFps(),0)+" fps</b>",this._updateLoopHandler=this._update.bind(this),s=e.Helpers.CreateDiv("stat-title2",this._panel),s.textContent="Count";var a=this._createStatLabel("Total meshes",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel);this._updatableProperties.push({elem:o,updateFct:function(){return r._scene.meshes.length.toString()}}),a=this._createStatLabel("Draw calls",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.drawCalls.toString()}}),a=this._createStatLabel("Total lights",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._scene.lights.length.toString()}}),a=this._createStatLabel("Total lights",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._scene.lights.length.toString()}}),a=this._createStatLabel("Total vertices",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._scene.getTotalVertices().toString()}}),a=this._createStatLabel("Total materials",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._scene.materials.length.toString()}}),a=this._createStatLabel("Total textures",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._scene.textures.length.toString()}}),a=this._createStatLabel("Active meshes",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._scene.getActiveMeshes().length.toString()}}),a=this._createStatLabel("Active indices",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._scene.getActiveIndices().toString()}}),a=this._createStatLabel("Active bones",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._scene.getActiveBones().toString()}}),a=this._createStatLabel("Active particles",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._scene.getActiveParticles().toString()}}),s=e.Helpers.CreateDiv("stat-title2",this._panel),s.textContent="Duration";var a=this._createStatLabel("Meshes selection",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel);this._updatableProperties.push({elem:o,updateFct:function(){return BABYLON.Tools.Format(r._scene.getEvaluateActiveMeshesDuration())}}),a=this._createStatLabel("Render targets",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return BABYLON.Tools.Format(r._scene.getRenderTargetsDuration())}}),a=this._createStatLabel("Particles",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return BABYLON.Tools.Format(r._scene.getParticlesDuration())}}),a=this._createStatLabel("Sprites",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return BABYLON.Tools.Format(r._scene.getSpritesDuration())}}),a=this._createStatLabel("Render",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return BABYLON.Tools.Format(r._scene.getRenderDuration())}}),a=this._createStatLabel("Frame",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return BABYLON.Tools.Format(r._scene.getLastFrameDuration())}}),a=this._createStatLabel("Potential FPS",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return BABYLON.Tools.Format(1e3/r._scene.getLastFrameDuration(),0)}}),a=this._createStatLabel("Resolution",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getRenderWidth()+"x"+r._engine.getRenderHeight()}}),s=e.Helpers.CreateDiv("stat-title2",this._panel),s.textContent="Extensions";var a=this._createStatLabel("Std derivatives",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel);this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getCaps().standardDerivatives?"Yes":"No"}}),a=this._createStatLabel("Compressed textures",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getCaps().s3tc?"Yes":"No"}}),a=this._createStatLabel("Hardware instances",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getCaps().instancedArrays?"Yes":"No"}}),a=this._createStatLabel("Texture float",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getCaps().textureFloat?"Yes":"No"}}),a=this._createStatLabel("32bits indices",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getCaps().uintIndices?"Yes":"No"}}),a=this._createStatLabel("Fragment depth",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getCaps().fragmentDepthSupported?"Yes":"No"}}),a=this._createStatLabel("High precision shaders",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getCaps().highPrecisionShaderSupported?"Yes":"No"}}),a=this._createStatLabel("Draw buffers",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getCaps().drawBuffersExtension?"Yes":"No"}}),s=e.Helpers.CreateDiv("stat-title2",this._panel),s.textContent="Caps.";var a=this._createStatLabel("Stencil",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel);this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.isStencilEnable?"Enabled":"Disabled"}}),a=this._createStatLabel("Max textures units",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getCaps().maxTexturesImageUnits.toString()}}),a=this._createStatLabel("Max textures size",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getCaps().maxTextureSize.toString()}}),a=this._createStatLabel("Max anisotropy",this._panel),o=e.Helpers.CreateDiv("stat-value",this._panel),this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.getCaps().maxAnisotropy.toString()}}),s=e.Helpers.CreateDiv("stat-title2",this._panel),s.textContent="Info";var o=e.Helpers.CreateDiv("stat-infos",this._panel);this._updatableProperties.push({elem:o,updateFct:function(){return r._engine.webGLVersion+" - "+r._glInfo.version+" - "+r._glInfo.renderer}}),this._scene.registerAfterRender(this._updateLoopHandler)}return __extends(i,t),i.prototype._createStatLabel=function(t,i){var n=e.Helpers.CreateDiv("stat-label",i);return n.textContent=t,n},i.prototype._update=function(){for(var e=0,t=this._updatableProperties;e<t.length;e++){var i=t[e];i.elem.textContent=i.updateFct()}},i.prototype.dispose=function(){this._scene.unregisterAfterRender(this._updateLoopHandler)},i})(e.Tab);e.StatsTab=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(i){t.call(this),this._tabs=[],this._invisibleTabs=[],this._visibleTabs=[],this._inspector=i,this._tabs.push(new e.SceneTab(this,this._inspector)),this._tabs.push(new e.StatsTab(this,this._inspector)),this._meshTab=new e.MeshTab(this,this._inspector),this._tabs.push(this._meshTab),this._tabs.push(new e.ShaderTab(this,this._inspector)),this._tabs.push(new e.LightTab(this,this._inspector)),BABYLON.Canvas2D&&this._tabs.push(new e.Canvas2DTab(this,this._inspector)),this._tabs.push(new e.MaterialTab(this,this._inspector)),this._toolBar=new e.Toolbar(this._inspector),this._build(),this._tabs[0].active(!0);for(var n=0,r=this._tabs;n<r.length;n++){var s=r[n];this._visibleTabs.push(s)}}return __extends(i,t),i.prototype.update=function(){},i.prototype._build=function(){var t=this;this._div.className="tabbar",this._div.appendChild(this._toolBar.toHtml());for(var i=0,n=this._tabs;i<n.length;i++){var r=n[i];this._div.appendChild(r.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 i=t._div.parentNode;i.contains(t._moreTabsPanel)||i.appendChild(t._moreTabsPanel),e.Helpers.CleanDiv(t._moreTabsPanel);for(var n=0,r=t._invisibleTabs;n<r.length;n++){var s=r[n];t._addInvisibleTabToPanel(s)}t._moreTabsPanel.style.display="flex"}}))},i.prototype._addInvisibleTabToPanel=function(t){var i=this,n=e.Helpers.CreateDiv("invisible-tab",this._moreTabsPanel);n.textContent=t.name,n.addEventListener("click",(function(){i._moreTabsPanel.style.display="none",i.switchTab(t)}))},i.prototype.switchTab=function(e){this.getActiveTab().dispose();for(var t=0,i=this._tabs;t<i.length;t++){var n=i[t];n.active(!1)}e.active(!0),this._inspector.refresh()},i.prototype.switchMeshTab=function(e){if(this.switchTab(this._meshTab),e){var t=this._meshTab.getItemFor(e);this._meshTab.select(t)}},i.prototype.getActiveTab=function(){for(var e=0,t=this._tabs;e<t.length;e++){var i=t[e];if(i.isActive())return i}},Object.defineProperty(i.prototype,"inspector",{get:function(){return this._inspector},enumerable:!0,configurable:!0}),i.prototype.getPixelWidth=function(){for(var e=0,t=0,i=this._visibleTabs;t<i.length;t++){var n=i[t];e+=n.getPixelWidth()}return e+=this._toolBar.getPixelWidth(),this._div.contains(this._moreTabsIcon)&&(e+=30),e},i.prototype.updateWidth=function(){for(var e=this._div.parentElement.clientWidth,t=75,i=this.getPixelWidth();this._visibleTabs.length>0&&i>e;){var n=this._visibleTabs.pop();this._invisibleTabs.push(n),this._div.removeChild(n.toHtml()),i=this.getPixelWidth()+t}if(this._invisibleTabs.length>0&&i+t<e){var r=this._invisibleTabs.pop();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)},i})(e.BasicElement);e.TabBar=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(){function t(t,i,n,r){var s=this;this._inspector=n,this._elem=e.Inspector.DOCUMENT.createElement("i"),this._elem.className="tool fa "+t,i.appendChild(this._elem),this._elem.addEventListener("click",(function(e){s.action()})),new e.Tooltip(this._elem,r)}return t.prototype.toHtml=function(){return this._elem},t.prototype.getPixelWidth=function(){var t=e.Inspector.WINDOW.getComputedStyle(this._elem),i=parseFloat(t.marginLeft.substr(0,t.marginLeft.length-2))||0,n=parseFloat(t.marginRight.substr(0,t.marginRight.length-2))||0;return(this._elem.clientWidth||0)+i+n},t.prototype._updateIcon=function(e){this._elem.className="tool fa "+e},t})();e.AbstractTool=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e,i){t.call(this,"fa-pause",e,i,"Pause the automatic update of properties"),this._isPause=!1}return __extends(i,t),i.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},i})(e.AbstractTool);e.PauseScheduleTool=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(e){function t(t,i){e.call(this,"fa-mouse-pointer",t,i,"Select a mesh in the scene"),this._isActive=!1,this._pickHandler=this._pickMesh.bind(this)}return __extends(t,e),t.prototype.action=function(){this._isActive?this._deactivate():(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),i=this._inspector.scene.pick(t.x,t.y,(function(e){return!0}));i.pickedMesh&&(console.log(i.pickedMesh.name),this._inspector.displayObjectDetails(i.pickedMesh)),this._deactivate()},t.prototype._updatePointerPosition=function(e){var t=this._inspector.scene.getEngine().getRenderingCanvasClientRect(),i=e.clientX-t.left,n=e.clientY-t.top;return{x:i,y:n}},t})(e.AbstractTool);e.PickTool=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(e){function t(t,i){e.call(this,"fa-external-link",t,i,"Open the inspector in a popup")}return __extends(t,e),t.prototype.action=function(){this._inspector.openPopup()},t})(e.AbstractTool);e.PopupTool=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(e){function t(t,i){e.call(this,"fa-refresh",t,i,"Refresh the current tab")}return __extends(t,e),t.prototype.action=function(){this._inspector.refresh()},t})(e.AbstractTool);e.RefreshTool=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e){t.call(this),this._tools=[],this._inspector=e,this._build(),this._addTools()}return __extends(i,t),i.prototype.update=function(){},i.prototype._build=function(){this._div.className="toolbar"},i.prototype._addTools=function(){this._tools.push(new e.RefreshTool(this._div,this._inspector)),this._tools.push(new e.PickTool(this._div,this._inspector)),this._inspector.popupMode||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))},i.prototype.getPixelWidth=function(){for(var e=0,t=0,i=this._tools;t<i.length;t++){var n=i[t];e+=n.getPixelWidth()}return e},i})(e.BasicElement);e.Toolbar=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(e){function t(t,i){e.call(this,"fa-times",t,i,"Close the inspector panel")}return __extends(t,e),t.prototype.action=function(){this._inspector.dispose()},t})(e.AbstractTool);e.DisposeTool=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(t){function i(e,i){t.call(this),this._children=[],this._tab=e,this._adapter=i,this._tools=this._adapter.getTools(),this._build()}return __extends(i,t),Object.defineProperty(i.prototype,"id",{get:function(){return this._adapter.id()},enumerable:!0,configurable:!0}),i.prototype.add=function(e){this._children.push(e),this.update()},i.prototype.compareTo=function(e){var t=this.id,i=e.id;return t.localeCompare(i,[],{numeric:!0})},i.prototype.correspondsTo=function(e){return this._adapter.correspondsTo(e)},i.prototype.fold=function(){if(this._children.length>0){for(var e=0,t=this._children;e<t.length;e++){var i=t[e];i.toHtml().style.display="none"}this._div.classList.add("folded"),this._div.classList.remove("unfolded")}},i.prototype.unfold=function(){if(this._children.length>0){for(var e=0,t=this._children;e<t.length;e++){var i=t[e];i.toHtml().style.display="block"}this._div.classList.add("unfolded"),this._div.classList.remove("folded")}},i.prototype._build=function(){this._div.className="line";for(var t=0,i=this._tools;t<i.length;t++){var n=i[t];this._div.appendChild(n.toHtml())}var r=e.Inspector.DOCUMENT.createElement("span");r.textContent=this._adapter.id(),this._div.appendChild(r);var s=e.Inspector.DOCUMENT.createElement("span");s.className="property-type","type_not_defined"!==this._adapter.type()&&(s.textContent=" - "+this._adapter.type()),this._div.appendChild(s),this._lineContent=e.Helpers.CreateDiv("line-content",this._div),this._addEvent()},i.prototype.getDetails=function(){return this._adapter.getProperties()},i.prototype.update=function(){e.Helpers.CleanDiv(this._lineContent);for(var t=0,i=this._children;t<i.length;t++){var n=i[t],r=n.toHtml();this._lineContent.appendChild(r)}this._children.length>0&&(this._div.classList.contains("folded")||this._div.classList.contains("unfolded")||this._div.classList.add("folded")),this.fold()},i.prototype._addEvent=function(){var e=this;this._div.addEventListener("click",(function(t){e._tab.select(e),e._isFolded()?e.unfold():e.fold(),t.stopPropagation()})),this._div.addEventListener("mouseover",(function(t){e._tab.highlightNode(e),t.stopPropagation()})),this._div.addEventListener("mouseout",(function(t){e._tab.highlightNode()}))},i.prototype.highlight=function(e){if(!e)for(var t=0,i=this._children;t<i.length;t++){var n=i[t];n._adapter.highlight(e)}this._adapter.highlight(e)},i.prototype._isFolded=function(){return!this._div.classList.contains("unfolded")},i.prototype.active=function(e){this._div.classList.remove("active");for(var t=0,i=this._children;t<i.length;t++){var n=i[t];n.active(!1)}e&&this._div.classList.add("active")},i})(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 INSPECTOR;!(function(e){var t=(function(e){function t(t){e.call(this),this._obj=t,this._elem.classList.add("fa-square-o"),this._on=this._obj.isBoxVisible(),this._check()}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 INSPECTOR;!(function(e){var t=(function(e){function t(t){e.call(this),this._obj=t,this._elem.classList.add("fa-eye"),this._on=this._obj.isVisible(),this._check()}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("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")),this._obj.setVisible(this._on)},t})(e.AbstractTreeTool);e.Checkbox=t})(INSPECTOR||(INSPECTOR={}));var INSPECTOR;!(function(e){var t=(function(e){function t(t){e.call(this),this._obj=t,this._elem.classList.add("fa-wrench")}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 INSPECTOR;!(function(e){var t=(function(t){function i(i){t.call(this),this._obj=i,this._elem.classList.add("fa-info-circle"),this._tooltip=new e.Tooltip(this._elem,this._obj.getInfo())}return __extends(i,t),i.prototype.action=function(){t.prototype.action.call(this)},i})(e.AbstractTreeTool);e.Info=t})(INSPECTOR||(INSPECTOR={}));
|