var gdjs;(function(g){let R;(function(m){const y=45;let d;(function(o){o.getCameraZ=(r,e,t)=>{const n=r.getLayer(e),a=n.getRenderer().getThreeCamera(),i=a?a instanceof THREE.OrthographicCamera?null:a.fov:y;return n.getCameraZ(i,t)},o.setCameraZ=(r,e,t,n)=>{const s=r.getLayer(t),i=s.getRenderer().getThreeCamera(),l=i?i instanceof THREE.OrthographicCamera?null:i.fov:y;s.setCameraZ(e,l,n)},o.getCameraRotationX=(r,e,t)=>{const a=r.getLayer(e).getRenderer().getThreeCamera();return a?g.toDegrees(a.rotation.x):0},o.setCameraRotationX=(r,e,t,n)=>{const i=r.getLayer(t).getRenderer().getThreeCamera();!i||(i.rotation.x=g.toRad(e))},o.getCameraRotationY=(r,e,t)=>{const a=r.getLayer(e).getRenderer().getThreeCamera();return a?g.toDegrees(a.rotation.y):0},o.setCameraRotationY=(r,e,t,n)=>{const i=r.getLayer(t).getRenderer().getThreeCamera();!i||(i.rotation.y=g.toRad(e))},o.turnCameraTowardObject=(r,e,t,n,s)=>{if(!e)return;const a=r.getLayer(t),l=a.getRenderer().getThreeCamera();!l||(s?l.up.set(0,1,0):l.up.set(0,0,1),l.lookAt(e.getCenterXInScene(),-e.getCenterYInScene(),e.getZ?e.getZ():0),a.setCameraRotation(g.toDegrees(-l.rotation.z)))},o.turnCameraTowardPosition=(r,e,t,n,s,a,i)=>{const l=r.getLayer(s),c=l.getRenderer().getThreeCamera();!c||(i?c.up.set(0,1,0):c.up.set(0,0,1),c.lookAt(e,-t,n),l.setCameraRotation(g.toDegrees(-c.rotation.z)))},o.getNearPlane=(r,e,t)=>r.getLayer(e).getCamera3DNearPlaneDistance(),o.setNearPlane=(r,e,t,n)=>{r.getLayer(t).setCamera3DNearPlaneDistance(e)},o.getFarPlane=(r,e,t)=>r.getLayer(e).getCamera3DFarPlaneDistance(),o.setFarPlane=(r,e,t,n)=>{r.getLayer(t).setCamera3DFarPlaneDistance(e)},o.getFov=(r,e,t)=>r.getLayer(e).getCamera3DFieldOfView(),o.setFov=(r,e,t,n)=>{r.getLayer(t).setCamera3DFieldOfView(e)}})(d=m.camera||(m.camera={}))})(R=g.scene3d||(g.scene3d={}))})(gdjs||(gdjs={}));
//# sourceMappingURL=Scene3DTools.js.map
