var gdjs;(function(n){let r;(function(t){t[t.TWO_D=0]="TWO_D",t[t.THREE_D=1]="THREE_D",t[t.TWO_D_PLUS_THREE_D=2]="TWO_D_PLUS_THREE_D"})(r=n.RuntimeLayerRenderingType||(n.RuntimeLayerRenderingType={}));const s=i=>i==="3d"?1:i==="2d+3d"||i===""?2:0;class o{constructor(e,a){this._timeScale=1;this._defaultZOrder=0;this._rendererEffects={};this._name=e.name,this._renderingType=s(e.renderingType),this._hidden=!e.visibility,this._initialCamera3DFieldOfView=e.camera3DFieldOfView||45,this._initialCamera3DFarPlaneDistance=e.camera3DFarPlaneDistance||.1,this._initialCamera3DNearPlaneDistance=e.camera3DNearPlaneDistance||2e3,this._initialEffectsData=e.effects||[],this._runtimeScene=a,this._effectsManager=a.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 n.LayerRenderer(this,a.getRenderer(),a.getGame().getRenderer()),this.show(!this._hidden);for(let t=0;t=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,a,t){this._clearColor[0]=e/255,this._clearColor[1]=a/255,this._clearColor[2]=t/255,this._renderer.updateClearColor()}setFollowBaseLayerCamera(e){this._followBaseLayerCamera=e}isLightingLayer(){return this._isLightingLayer}}n.RuntimeLayer=o})(gdjs||(gdjs={})); //# sourceMappingURL=RuntimeLayer.js.map