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._top="Z+";this._elevation=90;this._rotation=0;this._isEnabled=!1;this._light=new THREE.HemisphereLight,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._light),this._isEnabled=!0,!0):!1}removeEffect(t){const e=t.get3DRendererObject();return e?(e.remove(this._light),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==="Y-"?this._light.position.set(Math.cos(i.toRad(-this._rotation+90))*Math.cos(i.toRad(this._elevation)),-Math.sin(i.toRad(this._elevation)),Math.sin(i.toRad(-this._rotation+90))*Math.cos(i.toRad(this._elevation))):this._light.position.set(Math.cos(i.toRad(this._rotation))*Math.cos(i.toRad(this._elevation)),Math.sin(i.toRad(this._rotation))*Math.cos(i.toRad(this._elevation)),Math.sin(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
