window.es={};vartransform,__awaiter=this&&this.__awaiter||function(t,e,n,i){returnnew(n||(n=Promise))(function(r,o){functions(t){try{c(i.next(t))}catch(t){o(t)}}functiona(t){try{c(i.throw(t))}catch(t){o(t)}}functionc(t){t.done?r(t.value):newn(function(e){e(t.value)}).then(s,a)}c((i=i.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){varn,i,r,o,s={label:0,sent:function(){if(1&r[0])throwr[1];returnr[1]},trys:[],ops:[]};returno={next:a(0),throw:a(1),return:a(2)},"function"==typeofSymbol&&(o[Symbol.iterator]=function(){returnthis}),o;functiona(o){returnfunction(a){returnfunction(o){if(n)thrownewTypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)returnr;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case0:case1:r=o;break;case4:returns.label++,{value:o[1],done:!1};case5:s.label++,i=o[1],o=[0];continue;case7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=(r=s.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throwo[1];return{value:o[0]?o[1]:void0,done:!0}}([o,a])}}};window.__extends=this&&this.__extends||function(){vart=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(t,e){t.__proto__=e}||function(t,e){for(varnine)e.hasOwnProperty(n)&&(t[n]=e[n])};returnfunction(e,n){functioni(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,newi)}}(),function(t){vare=function(){functiont(){this.updateInterval=1,this._enabled=!0,this._updateOrder=0}returnObject.defineProperty(t.prototype,"transform",{get:function(){returnthis.entity.transform},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){returnthis.entity?this.entity.enabled&&this._enabled:this._enabled},set:function(t){this.setEnabled(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"updateOrder",{get:function(){returnthis._updateOrder},set:function(t){this.setUpdateOrder(t)},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){},t.prototype.onAddedToEntity=function(){},t.prototype.onRemovedFromEntity=function(){},t.prototype.onEntityTransformChanged=function(t){},t.prototype.onEnabled=function(){},t.prototype.onDisabled=function(){},t.prototype.setEnabled=function(t){returnthis._enabled!=t&&(this._enabled=t,this._enabled?this.onEnabled():this.onDisabled()),this},t.prototype.setUpdateOrder=function(t){returnthis._updateOrder!=t&&(this._updateOrder=t),this},t}();t.Component=e}(es||(es={})),function(t){vare=function(){functione(n,i,r){void0===r&&(r=!0),this._globalManagers=newt.FastList,this._timerManager=newt.TimerManager,this._frameCounterElapsedTime=0,this._frameCounter=0,this._totalMemory=0,this.width=n,this.height=i,e._instance=this,e.emitter=newt.Emitter,e.emitter.addObserver(t.CoreEvents.FrameUpdated,this.update,this),e.registerGlobalManager(this._timerManager),e.entitySystemsEnabled=r,this.initialize()}returnObject.defineProperty(e,"Instance",{get:function(){returnthis._instance},enumerable:!0,configurable:!0}),Object.defineProperty(e,"scene",{get:function(){returnthis._instance?this._instance._scene:null},set:function(t){t?null==this._instance._scene?(this._instance._scene=t,this._instance._scene.begin(),e.Instance.onSceneChanged()):this._instance._nextScene=t:console.error("场景不能为空")},enumerable:!0,configurable:!0}),e.registerGlobalManager=function(t){this._instance._globalManagers.add(t),t.enabled=!0},e.unregisterGlobalManager=function(t){this._instance._globalManagers.remove(t),t.enabled=!1},e.getGlobalManager=function(t){for(vare=0;e<this._instance._globalManagers.length;e++)if(this._instance._globalManagers.buffer[e]instanceoft)returnthis._instance._globalManagers.buffer[e];r