var babylonDependency;try{babylonDependency=BABYLON||"undefined"!=typeof require&&require("../babylon.max")}catch(e){babylonDependency=BABYLON||"undefined"!=typeof require&&require("babylonjs")}var BABYLON=babylonDependency,__decorate=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},__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 i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}})(),BABYLON;!(function(e){var t=(function(t){function n(n,i,o,r){void 0===r&&(r=null);var a=t.call(this,r)||this;if(!(r=a.getScene()))return a;a.name=n,a._text,a._font,a.wrapU=e.Texture.CLAMP_ADDRESSMODE,a.wrapV=e.Texture.CLAMP_ADDRESSMODE;var l=a.getFontHeight(i),c=a.getFontWidth(i);a._charSize=Math.max(l.height,c);var f=Math.ceil(a._charSize*o.length),s=a._charSize;a._texture=r.getEngine().createDynamicTexture(f,s,!1,e.Texture.NEAREST_SAMPLINGMODE);var g=a.getSize(),u=document.createElement("canvas");u.width=g.width,u.height=g.height;var h=u.getContext("2d");h.textBaseline="top",h.font=i,h.fillStyle="white",h.imageSmoothingEnabled=!1;for(var d=0;d