var gdjs;(function(i){i.PixiFiltersTools.registerFilterCreator("Scene3D::HemisphereLight",new class{makeFilter(o,r){return typeof THREE=="undefined"?new i.PixiFiltersTools.EmptyFilter:new class{constructor(){this._isEnabled=!1;this.top="Y-";this.elevation=45;this.rotation=0;this.light=new THREE.HemisphereLight,this.light.position.set(1,0,0),this.rotationObject=new THREE.Group,this.rotationObject.add(this.light),this.updateRotation()}isEnabled(t){return this._isEnabled}setEnabled(t,e){return this._isEnabled===e?!0:e?this.applyEffect(t):this.removeEffect(t)}applyEffect(t){const e=t.get3DRendererObject();return e?(e.add(this.rotationObject),this._isEnabled=!0,!0):!1}removeEffect(t){const e=t.get3DRendererObject();return e?(e.remove(this.rotationObject),this._isEnabled=!1,!0):!1}updatePreRender(t){}updateDoubleParameter(t,e){t==="intensity"?this.light.intensity=e:t==="elevation"?(this.elevation=e,this.updateRotation()):t==="rotation"&&(this.rotation=e,this.updateRotation())}getDoubleParameter(t){return t==="intensity"?this.light.intensity:t==="elevation"?this.elevation:t==="rotation"?this.rotation:0}updateStringParameter(t,e){t==="skyColor"&&(this.light.color=new THREE.Color(i.rgbOrHexStringToNumber(e))),t==="groundColor"&&(this.light.groundColor=new THREE.Color(i.rgbOrHexStringToNumber(e))),t==="top"&&(this.top=e,this.updateRotation())}updateColorParameter(t,e){t==="skyColor"&&this.light.color.setHex(e),t==="groundColor"&&this.light.groundColor.setHex(e)}getColorParameter(t){return t==="skyColor"?this.light.color.getHex():t==="groundColor"?this.light.groundColor.getHex():0}updateBooleanParameter(t,e){}updateRotation(){this.top==="Z+"?(this.rotationObject.rotation.z=i.toRad(this.rotation),this.rotationObject.rotation.y=-i.toRad(this.elevation)):(this.rotationObject.rotation.y=i.toRad(this.rotation-90),this.rotationObject.rotation.z=-i.toRad(this.elevation))}getNetworkSyncData(){return{i:this.light.intensity,sc:this.light.color.getHex(),gc:this.light.groundColor.getHex(),e:this.elevation,r:this.rotation,t:this.top}}updateFromNetworkSyncData(t){this.light.intensity=t.i,this.light.color.setHex(t.sc),this.light.groundColor.setHex(t.gc),this.elevation=t.e,this.rotation=t.r,this.top=t.t,this.updateRotation()}}}})})(gdjs||(gdjs={})); //# sourceMappingURL=HemisphereLight.js.map