var gdjs;(function(a){class i{constructor(e,t){this._timeScale=1;this._defaultZOrder=0;this._rendererEffects={};this._name=e.name,this._hidden=!e.visibility,this._initialEffectsData=e.effects||[],this._runtimeScene=t,this._effectsManager=t.getGame().getEffectsManager(),this._isLightingLayer=e.isLightingLayer,this._followBaseLayerCamera=e.followBaseLayerCamera,this._clearColor=[e.ambientLightColorR/255,e.ambientLightColorG/255,e.ambientLightColorB/255,1],this._renderer=new a.LayerRenderer(this,t.getRenderer(),t.getGame().getRenderer().getPIXIRenderer()),this.show(!this._hidden);for(let r=0;r<e.effects.length;++r)this.addEffect(e.effects[r])}getRenderer(){return this._renderer}getDefaultZOrder(){return this._defaultZOrder}setDefaultZOrder(e){this._defaultZOrder=e}getRuntimeScene(){return this._runtimeScene.getScene()}updatePreRender(e){this._followBaseLayerCamera&&this.followBaseLayer(),this._renderer.updatePreRender(),this._effectsManager.updatePreRender(this._rendererEffects,this)}getName(){return this._name}show(e){this._hidden=!e,this._renderer.updateVisibility(e)}isVisible(){return!this._hidden}getWidth(){return this._runtimeScene.getViewportWidth()}getHeight(){return this._runtimeScene.getViewportHeight()}getInitialEffectsData(){return this._initialEffectsData}addEffect(e){this._effectsManager.addEffect(e,this._rendererEffects,this._renderer.getRendererObject(),this)}removeEffect(e){this._effectsManager.removeEffect(this._rendererEffects,this._renderer.getRendererObject(),e)}setEffectDoubleParameter(e,t,r){this._effectsManager.setEffectDoubleParameter(this._rendererEffects,e,t,r)}setEffectStringParameter(e,t,r){this._effectsManager.setEffectStringParameter(this._rendererEffects,e,t,r)}setEffectBooleanParameter(e,t,r){this._effectsManager.setEffectBooleanParameter(this._rendererEffects,e,t,r)}enableEffect(e,t){this._effectsManager.enableEffect(this._rendererEffects,e,t)}isEffectEnabled(e){return this._effectsManager.isEffectEnabled(this._rendererEffects,e)}hasEffect(e){return this._effectsManager.hasEffect(this._rendererEffects,e)}setTimeScale(e){e>=0&&(this._timeScale=e)}getTimeScale(){return this._timeScale}getElapsedTime(e){return(e||this._runtimeScene).getElapsedTime()*this._timeScale}followBaseLayer(){const e=this._runtimeScene.getLayer("");this.setCameraX(e.getCameraX()),this.setCameraY(e.getCameraY()),this.setCameraRotation(e.getCameraRotation()),this.setCameraZoom(e.getCameraZoom())}getClearColor(){return this._clearColor}setClearColor(e,t,r){this._clearColor[0]=e/255,this._clearColor[1]=t/255,this._clearColor[2]=r/255,this._renderer.updateClearColor()}setFollowBaseLayerCamera(e){this._followBaseLayerCamera=e}isLightingLayer(){return this._isLightingLayer}}a.RuntimeLayer=i})(gdjs||(gdjs={}));
//# sourceMappingURL=RuntimeLayer.js.map
