@openglobus/og 0.22.2 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/css/og.css +137 -1
  2. package/lib/@openglobus/js/Globe.d.ts +0 -1
  3. package/lib/@openglobus/js/Object3d.d.ts +20 -10
  4. package/lib/@openglobus/js/camera/Camera.d.ts +57 -15
  5. package/lib/@openglobus/js/camera/Frustum.d.ts +3 -0
  6. package/lib/@openglobus/js/camera/PlanetCamera.d.ts +13 -0
  7. package/lib/@openglobus/js/control/CameraLock.d.ts +38 -0
  8. package/lib/@openglobus/js/control/MouseNavigation.d.ts +62 -51
  9. package/lib/@openglobus/js/control/OldMouseNavigation.d.ts +64 -0
  10. package/lib/@openglobus/js/control/SimpleNavigation.d.ts +27 -10
  11. package/lib/@openglobus/js/control/geoObjectEditor/ArrowEntity.d.ts +15 -0
  12. package/lib/@openglobus/js/control/geoObjectEditor/AxisTrackEntity.d.ts +9 -0
  13. package/lib/@openglobus/js/control/geoObjectEditor/GeoObjectEditor.d.ts +13 -0
  14. package/lib/@openglobus/js/control/geoObjectEditor/GeoObjectEditorDialog.d.ts +69 -0
  15. package/lib/@openglobus/js/control/geoObjectEditor/GeoObjectEditorScene.d.ts +78 -9
  16. package/lib/@openglobus/js/control/geoObjectEditor/MoveAxisEntity.d.ts +17 -0
  17. package/lib/@openglobus/js/control/geoObjectEditor/MovePlaneEntity.d.ts +7 -0
  18. package/lib/@openglobus/js/control/geoObjectEditor/RotateEntity.d.ts +9 -0
  19. package/lib/@openglobus/js/control/geoObjectEditor/colors.d.ts +8 -0
  20. package/lib/@openglobus/js/control/index.d.ts +3 -2
  21. package/lib/@openglobus/js/entity/Entity.d.ts +282 -19
  22. package/lib/@openglobus/js/entity/EntityCollection.d.ts +8 -9
  23. package/lib/@openglobus/js/entity/GeoObject.d.ts +135 -39
  24. package/lib/@openglobus/js/entity/GeoObjectHandler.d.ts +39 -63
  25. package/lib/@openglobus/js/entity/InstanceData.d.ts +76 -0
  26. package/lib/@openglobus/js/entity/Polyline.d.ts +19 -6
  27. package/lib/@openglobus/js/entity/PolylineHandler.d.ts +7 -0
  28. package/lib/@openglobus/js/index.d.ts +2 -1
  29. package/lib/@openglobus/js/input/MouseHandler.d.ts +1 -0
  30. package/lib/@openglobus/js/layer/Vector.d.ts +4 -0
  31. package/lib/@openglobus/js/light/LightSource.d.ts +1 -139
  32. package/lib/@openglobus/js/math/Mat3.d.ts +1 -1
  33. package/lib/@openglobus/js/math/Mat4.d.ts +10 -1
  34. package/lib/@openglobus/js/math/Plane.d.ts +3 -1
  35. package/lib/@openglobus/js/math/Quat.d.ts +47 -33
  36. package/lib/@openglobus/js/math/Ray.d.ts +10 -14
  37. package/lib/@openglobus/js/math/Vec2.d.ts +22 -0
  38. package/lib/@openglobus/js/math/Vec3.d.ts +15 -0
  39. package/lib/@openglobus/js/math.d.ts +2 -2
  40. package/lib/@openglobus/js/quadTree/EntityCollectionNode.d.ts +2 -2
  41. package/lib/@openglobus/js/quadTree/Node.d.ts +1 -1
  42. package/lib/@openglobus/js/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +1 -1
  43. package/lib/@openglobus/js/quadTree/equi/EquiEntityCollectionNodeLonLat.d.ts +1 -1
  44. package/lib/@openglobus/js/renderer/Renderer.d.ts +63 -44
  45. package/lib/@openglobus/js/renderer/RendererEvents.d.ts +2 -0
  46. package/lib/@openglobus/js/scene/Planet.d.ts +15 -7
  47. package/lib/@openglobus/js/scene/RenderNode.d.ts +10 -25
  48. package/lib/@openglobus/js/shaders/drawnode.d.ts +1 -0
  49. package/lib/@openglobus/js/shaders/geoObject.d.ts +1 -0
  50. package/lib/@openglobus/js/shaders/utils.d.ts +1 -1
  51. package/lib/@openglobus/js/ui/Checkbox.d.ts +31 -0
  52. package/lib/@openglobus/js/ui/Dialog.d.ts +3 -0
  53. package/lib/@openglobus/js/ui/Input.d.ts +32 -0
  54. package/lib/@openglobus/js/ui/View.d.ts +3 -1
  55. package/lib/@openglobus/js/utils/objParser.d.ts +44 -12
  56. package/lib/@openglobus/js/utils/shared.d.ts +22 -0
  57. package/lib/@openglobus/js/webgl/BaseFramebuffer.d.ts +0 -1
  58. package/lib/@openglobus/js/webgl/Framebuffer.d.ts +35 -8
  59. package/lib/@openglobus/js/webgl/Handler.d.ts +22 -12
  60. package/lib/@openglobus/og.css +1 -1
  61. package/lib/@openglobus/og.esm.js +1 -1
  62. package/lib/@openglobus/og.esm.js.map +1 -1
  63. package/lib/@openglobus/og.umd.js +1 -1
  64. package/lib/@openglobus/og.umd.js.map +1 -1
  65. package/lib/js/Globe.d.ts +0 -1
  66. package/lib/js/Globe.js +4 -2
  67. package/lib/js/Object3d.d.ts +20 -10
  68. package/lib/js/Object3d.js +124 -48
  69. package/lib/js/Popup.js +1 -1
  70. package/lib/js/camera/Camera.d.ts +57 -15
  71. package/lib/js/camera/Camera.js +109 -29
  72. package/lib/js/camera/Frustum.d.ts +3 -0
  73. package/lib/js/camera/Frustum.js +7 -0
  74. package/lib/js/camera/PlanetCamera.d.ts +13 -0
  75. package/lib/js/camera/PlanetCamera.js +52 -5
  76. package/lib/js/control/Atmosphere.js +10 -6
  77. package/lib/js/control/CameraLock.d.ts +38 -0
  78. package/lib/js/control/CameraLock.js +216 -0
  79. package/lib/js/control/Control.js +1 -1
  80. package/lib/js/control/DebugInfo.js +38 -8
  81. package/lib/js/control/KeyboardNavigation.js +9 -9
  82. package/lib/js/control/MouseNavigation.d.ts +62 -51
  83. package/lib/js/control/MouseNavigation.js +361 -305
  84. package/lib/js/control/MouseWheelZoomControl.d.ts +0 -44
  85. package/lib/js/control/MouseWheelZoomControl.js +270 -181
  86. package/lib/js/control/OldMouseNavigation.d.ts +64 -0
  87. package/lib/js/control/OldMouseNavigation.js +368 -0
  88. package/lib/js/control/ScaleControl.js +11 -5
  89. package/lib/js/control/SimpleNavigation.d.ts +27 -10
  90. package/lib/js/control/SimpleNavigation.js +149 -49
  91. package/lib/js/control/Sun.js +6 -6
  92. package/lib/js/control/TouchNavigation.js +11 -8
  93. package/lib/js/control/elevationProfile/ElevationProfileScene.js +6 -5
  94. package/lib/js/control/geoObjectEditor/ArrowEntity.d.ts +15 -0
  95. package/lib/js/control/geoObjectEditor/ArrowEntity.js +59 -0
  96. package/lib/js/control/geoObjectEditor/AxisTrackEntity.d.ts +9 -0
  97. package/lib/js/control/geoObjectEditor/AxisTrackEntity.js +93 -0
  98. package/lib/js/control/geoObjectEditor/GeoObjectEditor.d.ts +13 -0
  99. package/lib/js/control/geoObjectEditor/GeoObjectEditor.js +30 -0
  100. package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.d.ts +69 -0
  101. package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.js +488 -0
  102. package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.d.ts +78 -9
  103. package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.js +487 -43
  104. package/lib/js/control/geoObjectEditor/MoveAxisEntity.d.ts +17 -0
  105. package/lib/js/control/geoObjectEditor/MoveAxisEntity.js +107 -0
  106. package/lib/js/control/geoObjectEditor/MovePlaneEntity.d.ts +7 -0
  107. package/lib/js/control/geoObjectEditor/MovePlaneEntity.js +31 -0
  108. package/lib/js/control/geoObjectEditor/RotateEntity.d.ts +9 -0
  109. package/lib/js/control/geoObjectEditor/RotateEntity.js +105 -0
  110. package/lib/js/control/geoObjectEditor/colors.d.ts +8 -0
  111. package/lib/js/control/geoObjectEditor/colors.js +8 -0
  112. package/lib/js/control/index.d.ts +3 -2
  113. package/lib/js/control/index.js +3 -2
  114. package/lib/js/control/timeline/TimelineControl.js +2 -0
  115. package/lib/js/control/visibleExtent/Segment.js +4 -4
  116. package/lib/js/entity/Entity.d.ts +282 -19
  117. package/lib/js/entity/Entity.js +497 -62
  118. package/lib/js/entity/EntityCollection.d.ts +8 -9
  119. package/lib/js/entity/EntityCollection.js +48 -45
  120. package/lib/js/entity/GeoObject.d.ts +135 -39
  121. package/lib/js/entity/GeoObject.js +150 -90
  122. package/lib/js/entity/GeoObjectHandler.d.ts +39 -63
  123. package/lib/js/entity/GeoObjectHandler.js +198 -295
  124. package/lib/js/entity/InstanceData.d.ts +76 -0
  125. package/lib/js/entity/InstanceData.js +347 -0
  126. package/lib/js/entity/Polyline.d.ts +19 -6
  127. package/lib/js/entity/Polyline.js +76 -36
  128. package/lib/js/entity/PolylineHandler.d.ts +7 -0
  129. package/lib/js/entity/PolylineHandler.js +26 -1
  130. package/lib/js/index.d.ts +2 -1
  131. package/lib/js/index.js +2 -1
  132. package/lib/js/input/MouseHandler.d.ts +1 -0
  133. package/lib/js/input/MouseHandler.js +12 -1
  134. package/lib/js/layer/Bing.js +2 -2
  135. package/lib/js/layer/Vector.d.ts +4 -0
  136. package/lib/js/layer/Vector.js +16 -0
  137. package/lib/js/light/LightSource.d.ts +1 -139
  138. package/lib/js/light/LightSource.js +21 -227
  139. package/lib/js/math/Mat3.d.ts +1 -1
  140. package/lib/js/math/Mat3.js +1 -1
  141. package/lib/js/math/Mat4.d.ts +10 -1
  142. package/lib/js/math/Mat4.js +17 -1
  143. package/lib/js/math/Plane.d.ts +3 -1
  144. package/lib/js/math/Plane.js +11 -1
  145. package/lib/js/math/Quat.d.ts +47 -33
  146. package/lib/js/math/Quat.js +92 -90
  147. package/lib/js/math/Ray.d.ts +10 -14
  148. package/lib/js/math/Ray.js +56 -33
  149. package/lib/js/math/Vec2.d.ts +22 -0
  150. package/lib/js/math/Vec2.js +32 -0
  151. package/lib/js/math/Vec3.d.ts +15 -0
  152. package/lib/js/math/Vec3.js +30 -1
  153. package/lib/js/math.d.ts +2 -2
  154. package/lib/js/math.js +3 -3
  155. package/lib/js/quadTree/EntityCollectionNode.d.ts +2 -2
  156. package/lib/js/quadTree/EntityCollectionNode.js +8 -8
  157. package/lib/js/quadTree/Node.d.ts +1 -1
  158. package/lib/js/quadTree/Node.js +2 -2
  159. package/lib/js/quadTree/QuadTreeStrategy.js +1 -1
  160. package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +1 -1
  161. package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.js +2 -2
  162. package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.d.ts +1 -1
  163. package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.js +2 -2
  164. package/lib/js/renderer/Renderer.d.ts +63 -44
  165. package/lib/js/renderer/Renderer.js +267 -266
  166. package/lib/js/renderer/RendererEvents.d.ts +2 -0
  167. package/lib/js/renderer/RendererEvents.js +5 -2
  168. package/lib/js/scene/Planet.d.ts +15 -7
  169. package/lib/js/scene/Planet.js +133 -90
  170. package/lib/js/scene/RenderNode.d.ts +10 -25
  171. package/lib/js/scene/RenderNode.js +70 -58
  172. package/lib/js/segment/Segment.js +4 -4
  173. package/lib/js/shaders/depth.js +2 -5
  174. package/lib/js/shaders/drawnode.d.ts +1 -0
  175. package/lib/js/shaders/drawnode.js +51 -52
  176. package/lib/js/shaders/geoObject.d.ts +1 -0
  177. package/lib/js/shaders/geoObject.js +154 -91
  178. package/lib/js/shaders/polyline.js +68 -51
  179. package/lib/js/shaders/utils.d.ts +1 -1
  180. package/lib/js/shaders/utils.js +11 -0
  181. package/lib/js/terrain/GlobusTerrain.js +2 -2
  182. package/lib/js/ui/Checkbox.d.ts +31 -0
  183. package/lib/js/ui/Checkbox.js +110 -0
  184. package/lib/js/ui/Color.js +2 -1
  185. package/lib/js/ui/Dialog.d.ts +3 -0
  186. package/lib/js/ui/Dialog.js +20 -0
  187. package/lib/js/ui/Input.d.ts +32 -0
  188. package/lib/js/ui/Input.js +107 -0
  189. package/lib/js/ui/View.d.ts +3 -1
  190. package/lib/js/ui/View.js +6 -0
  191. package/lib/js/utils/objParser.d.ts +44 -12
  192. package/lib/js/utils/objParser.js +241 -149
  193. package/lib/js/utils/shared.d.ts +22 -0
  194. package/lib/js/utils/shared.js +34 -0
  195. package/lib/js/webgl/BaseFramebuffer.d.ts +0 -1
  196. package/lib/js/webgl/Framebuffer.d.ts +35 -8
  197. package/lib/js/webgl/Framebuffer.js +136 -29
  198. package/lib/js/webgl/Handler.d.ts +22 -12
  199. package/lib/js/webgl/Handler.js +53 -34
  200. package/lib/js/webgl/Program.js +0 -8
  201. package/package.json +5 -3
  202. package/lib/@openglobus/js/control/EarthNavigation.d.ts +0 -50
  203. package/lib/@openglobus/js/control/MouseWheelZoomControl.d.ts +0 -44
  204. package/lib/js/control/EarthNavigation.d.ts +0 -50
  205. package/lib/js/control/EarthNavigation.js +0 -202
@@ -0,0 +1,107 @@
1
+ import { Entity } from "../../entity/Entity";
2
+ import { Vec3 } from "../../math/Vec3";
3
+ import { SEL_X_COLOR, SEL_Y_COLOR, SEL_Z_COLOR, X_COLOR, Y_COLOR, Z_COLOR } from "./colors";
4
+ import { ArrowEntity } from "./ArrowEntity";
5
+ import { RADIANS } from "../../math";
6
+ export class MoveAxisEntity extends Entity {
7
+ constructor(params = {}) {
8
+ super(params);
9
+ this._size = params.size != undefined ? params.size : 1.0;
10
+ this.childEntities = [];
11
+ this._init();
12
+ }
13
+ _init() {
14
+ let arrowX = new ArrowEntity({
15
+ color: X_COLOR,
16
+ yaw: 0,
17
+ pitch: 0,
18
+ roll: 90 * RADIANS,
19
+ properties: {
20
+ opName: "move_x",
21
+ noEdit: true,
22
+ style: {
23
+ color: X_COLOR,
24
+ selectColor: SEL_X_COLOR
25
+ }
26
+ }
27
+ });
28
+ let arrowY = new ArrowEntity({
29
+ color: Y_COLOR,
30
+ yaw: 0,
31
+ pitch: 0,
32
+ roll: 0,
33
+ properties: {
34
+ opName: "move_y",
35
+ noEdit: true,
36
+ style: {
37
+ color: Y_COLOR,
38
+ selectColor: SEL_Y_COLOR
39
+ }
40
+ }
41
+ });
42
+ let arrowZ = new ArrowEntity({
43
+ color: Z_COLOR,
44
+ yaw: 0,
45
+ pitch: 90 * RADIANS,
46
+ roll: 0,
47
+ properties: {
48
+ opName: "move_z",
49
+ noEdit: true,
50
+ style: {
51
+ color: Z_COLOR,
52
+ selectColor: SEL_Z_COLOR
53
+ }
54
+ }
55
+ });
56
+ this.appendChild(arrowX);
57
+ this.appendChild(arrowY);
58
+ this.appendChild(arrowZ);
59
+ this.setSize(this._size);
60
+ }
61
+ setSize(size) {
62
+ this.childEntities[0].setSize(size);
63
+ this.childEntities[1].setSize(size);
64
+ this.childEntities[2].setSize(size);
65
+ }
66
+ setPitch(a) {
67
+ let line = this.childEntities[0];
68
+ let tip = line.childEntities[0];
69
+ line.setPitch(a);
70
+ tip.setPitch(a);
71
+ line = this.childEntities[1];
72
+ tip = line.childEntities[0];
73
+ line.setPitch(a);
74
+ tip.setPitch(a);
75
+ line = this.childEntities[2];
76
+ tip = line.childEntities[0];
77
+ line.setPitch(a + 90);
78
+ tip.setPitch(a + 90);
79
+ }
80
+ setYaw(a) {
81
+ let line = this.childEntities[0];
82
+ let tip = line.childEntities[0];
83
+ line.setYaw(a);
84
+ tip.setYaw(a);
85
+ line = this.childEntities[1];
86
+ tip = line.childEntities[0];
87
+ line.setYaw(a);
88
+ tip.setYaw(a);
89
+ line = this.childEntities[2];
90
+ tip = line.childEntities[0];
91
+ line.setYaw(a);
92
+ tip.setYaw(a);
93
+ }
94
+ setRoll(a) {
95
+ let line = this.childEntities[0];
96
+ let tip = line.childEntities[0];
97
+ line.setRoll(a + 90);
98
+ tip.setRoll(a + 90);
99
+ line = this.childEntities[1];
100
+ tip = line.childEntities[0];
101
+ line.setRoll(a);
102
+ tip.setRoll(a);
103
+ }
104
+ getY() {
105
+ return this.childEntities[1].getAbsoluteRotation().mulVec3(Vec3.UP).normalize();
106
+ }
107
+ }
@@ -0,0 +1,7 @@
1
+ import { Entity, IEntityParams } from "../../entity/Entity";
2
+ export interface IMovePlaneEntityParams extends IEntityParams {
3
+ }
4
+ export declare class MovePlaneEntity extends Entity {
5
+ constructor(params?: IMovePlaneEntityParams);
6
+ private _init;
7
+ }
@@ -0,0 +1,31 @@
1
+ import { Entity } from "../../entity/Entity";
2
+ import { Object3d } from "../../Object3d";
3
+ import { SEL_XZ_COLOR, XZ_COLOR } from "./colors";
4
+ const planeObj = Object3d.createPlane(1, 1, -0.5, 0, 0.5);
5
+ export class MovePlaneEntity extends Entity {
6
+ constructor(params = {}) {
7
+ super(params);
8
+ this._init();
9
+ }
10
+ _init() {
11
+ let planeXZ = new Entity({
12
+ independentPicking: true,
13
+ scale: 0.025,
14
+ forceGlobalPosition: true,
15
+ geoObject: {
16
+ color: XZ_COLOR,
17
+ tag: "plane",
18
+ object3d: planeObj
19
+ },
20
+ properties: {
21
+ opName: "move_xz",
22
+ noEdit: true,
23
+ style: {
24
+ color: XZ_COLOR,
25
+ selectColor: SEL_XZ_COLOR
26
+ }
27
+ }
28
+ });
29
+ this.appendChild(planeXZ);
30
+ }
31
+ }
@@ -0,0 +1,9 @@
1
+ import { Entity, IEntityParams } from "../../entity/Entity";
2
+ import { Vec3 } from "../../math/Vec3";
3
+ export interface IRotationEntityParams extends IEntityParams {
4
+ }
5
+ export declare class RotateEntity extends Entity {
6
+ constructor(params?: IRotationEntityParams);
7
+ private _init;
8
+ setCartesian3v(cart: Vec3, yaw?: number): void;
9
+ }
@@ -0,0 +1,105 @@
1
+ import { Entity } from "../../entity/Entity";
2
+ import { Vec3 } from "../../math/Vec3";
3
+ import { RADIANS } from "../../math";
4
+ import { Quat } from "../../math/Quat";
5
+ import { SEL_X_COLOR, SEL_Y_COLOR, SEL_Z_COLOR, X_COLOR, Y_COLOR, Z_COLOR } from "./colors";
6
+ const SEG_SIZE = 360;
7
+ const VISIBLESPHERE_DOT_THRESHOLD = 0.95;
8
+ const pitchCoords = new Array(SEG_SIZE);
9
+ const yawCoords = new Array(SEG_SIZE);
10
+ const rollCoords = new Array(SEG_SIZE);
11
+ export class RotateEntity extends Entity {
12
+ constructor(params = {}) {
13
+ super(params);
14
+ this._init();
15
+ }
16
+ _init() {
17
+ const length = SEG_SIZE;
18
+ let pitch = new Entity({
19
+ independentPicking: true,
20
+ polyline: {
21
+ path3v: [Array.from({ length }, (_, i) => new Vec3())],
22
+ thickness: 3.1,
23
+ color: X_COLOR,
24
+ isClosed: true
25
+ },
26
+ properties: {
27
+ opName: "rotate_pitch",
28
+ noEdit: true,
29
+ style: {
30
+ color: X_COLOR,
31
+ selectColor: SEL_X_COLOR
32
+ }
33
+ }
34
+ });
35
+ let yaw = new Entity({
36
+ independentPicking: true,
37
+ polyline: {
38
+ path3v: [Array.from({ length }, (_, i) => new Vec3())],
39
+ thickness: 2.5,
40
+ color: Y_COLOR,
41
+ isClosed: true
42
+ },
43
+ properties: {
44
+ opName: "rotate_yaw",
45
+ noEdit: true,
46
+ style: {
47
+ color: Y_COLOR,
48
+ selectColor: SEL_Y_COLOR
49
+ }
50
+ }
51
+ });
52
+ let roll = new Entity({
53
+ independentPicking: true,
54
+ polyline: {
55
+ path3v: [Array.from({ length }, (_, i) => new Vec3())],
56
+ thickness: 2.5,
57
+ color: Z_COLOR,
58
+ isClosed: true
59
+ },
60
+ properties: {
61
+ opName: "rotate_roll",
62
+ noEdit: true,
63
+ style: {
64
+ color: Z_COLOR,
65
+ selectColor: SEL_Z_COLOR
66
+ }
67
+ }
68
+ });
69
+ this.appendChild(pitch);
70
+ this.appendChild(yaw);
71
+ this.appendChild(roll);
72
+ }
73
+ setCartesian3v(cart, yaw = 0) {
74
+ super.setCartesian3v(cart);
75
+ if (this._entityCollection && this._entityCollection.renderNode) {
76
+ let rn = this._entityCollection.renderNode;
77
+ let cam = rn.renderer.activeCamera;
78
+ let qNorthFrame = rn.getFrameRotation(cart).conjugate();
79
+ let r = cam.eye.distance(cart) * 0.15;
80
+ let qp = Quat.xRotation(0);
81
+ let qy = Quat.yRotation(yaw);
82
+ let qr = Quat.zRotation(0);
83
+ let qRot = qr.mul(qp).mul(qy).mul(rn.getFrameRotation(cart)).conjugate();
84
+ for (let i = 0, j = 0, step = 360 / SEG_SIZE; i < SEG_SIZE; i += step, j++) {
85
+ let a = i * RADIANS, cos_a = Math.cos(a), sin_a = Math.sin(a);
86
+ let pitch_p = qRot.mulVec3(new Vec3(0, sin_a, cos_a)).normalize().scale(r).add(cart);
87
+ let yaw_p = qNorthFrame.mulVec3(new Vec3(cos_a, 0, sin_a)).normalize().scale(r).add(cart);
88
+ let roll_p = qRot.mulVec3(new Vec3(cos_a, sin_a, 0)).normalize().scale(r).add(cart);
89
+ pitchCoords[j] = pitch_p;
90
+ yawCoords[j] = yaw_p;
91
+ rollCoords[j] = roll_p;
92
+ }
93
+ this.childEntities[0].polyline.setPath3v([pitchCoords], undefined, true);
94
+ this.childEntities[1].polyline.setPath3v([yawCoords], undefined, true);
95
+ this.childEntities[2].polyline.setPath3v([rollCoords], undefined, true);
96
+ // Gets whole circle visibility
97
+ let dir_pitch = qRot.mulVec3(new Vec3(1, 0, 0)).normalize();
98
+ let dir_yaw = qNorthFrame.mulVec3(new Vec3(0, 1, 0)).normalize();
99
+ let dir_roll = qRot.mulVec3(new Vec3(0, 0, 1)).normalize();
100
+ this.childEntities[0].polyline.setVisibleSphere(cart, Math.abs(dir_pitch.dot(cam.getForward())) > VISIBLESPHERE_DOT_THRESHOLD ? 0.0 : r);
101
+ this.childEntities[1].polyline.setVisibleSphere(cart, Math.abs(dir_yaw.dot(cam.getForward())) > VISIBLESPHERE_DOT_THRESHOLD ? 0.0 : r);
102
+ this.childEntities[2].polyline.setVisibleSphere(cart, Math.abs(dir_roll.dot(cam.getForward())) > VISIBLESPHERE_DOT_THRESHOLD ? 0.0 : r);
103
+ }
104
+ }
105
+ }
@@ -0,0 +1,8 @@
1
+ export declare const X_COLOR = "rgb(253,77,77)";
2
+ export declare const SEL_X_COLOR = "rgb(248,115,115)";
3
+ export declare const Y_COLOR = "rgb(73,73,239)";
4
+ export declare const SEL_Y_COLOR = "rgb(90,90,253)";
5
+ export declare const Z_COLOR = "rgb(26,122,26)";
6
+ export declare const SEL_Z_COLOR = "rgb(55,191,55)";
7
+ export declare const XZ_COLOR = "rgba(255,255,255,0.8)";
8
+ export declare const SEL_XZ_COLOR = "rgba(255,255,255,1.0)";
@@ -0,0 +1,8 @@
1
+ export const X_COLOR = "rgb(253,77,77)";
2
+ export const SEL_X_COLOR = "rgb(248,115,115)";
3
+ export const Y_COLOR = "rgb(73,73,239)";
4
+ export const SEL_Y_COLOR = "rgb(90,90,253)";
5
+ export const Z_COLOR = "rgb(26,122,26)";
6
+ export const SEL_Z_COLOR = "rgb(55,191,55)";
7
+ export const XZ_COLOR = "rgba(255,255,255,0.8)";
8
+ export const SEL_XZ_COLOR = "rgba(255,255,255,1.0)";
@@ -3,14 +3,13 @@ export * from "./Control";
3
3
  export * from "./DebugInfo";
4
4
  export * from "./DrawingSwitcher";
5
5
  export * from "./EarthCoordinates";
6
- export * from "./EarthNavigation";
7
6
  export * from "./GeoImageDragControl";
8
7
  export * from "./KeyboardNavigation";
9
8
  export * from "./LayerAnimation";
10
9
  export * from "./LayerSwitcher";
11
10
  export * from "./Lighting";
11
+ export * from "./OldMouseNavigation";
12
12
  export * from "./MouseNavigation";
13
- export * from "./MouseWheelZoomControl";
14
13
  export * from "./RulerSwitcher";
15
14
  export * from "./ScaleControl";
16
15
  export * from "./ShowFps";
@@ -27,3 +26,5 @@ export * from "./selection/Selection";
27
26
  export * from "./timeline/TimelineControl";
28
27
  export * from "./elevationProfile/ElevationProfileControl";
29
28
  export * from "./AtmosphereConfig";
29
+ export * from "./geoObjectEditor/GeoObjectEditor";
30
+ export * from "./CameraLock";
@@ -3,14 +3,13 @@ export * from "./Control";
3
3
  export * from "./DebugInfo";
4
4
  export * from "./DrawingSwitcher";
5
5
  export * from "./EarthCoordinates";
6
- export * from "./EarthNavigation";
7
6
  export * from "./GeoImageDragControl";
8
7
  export * from "./KeyboardNavigation";
9
8
  export * from "./LayerAnimation";
10
9
  export * from "./LayerSwitcher";
11
10
  export * from "./Lighting";
11
+ export * from "./OldMouseNavigation";
12
12
  export * from "./MouseNavigation";
13
- export * from "./MouseWheelZoomControl";
14
13
  export * from "./RulerSwitcher";
15
14
  export * from "./ScaleControl";
16
15
  export * from "./ShowFps";
@@ -27,3 +26,5 @@ export * from "./selection/Selection";
27
26
  export * from "./timeline/TimelineControl";
28
27
  export * from "./elevationProfile/ElevationProfileControl";
29
28
  export * from "./AtmosphereConfig";
29
+ export * from "./geoObjectEditor/GeoObjectEditor";
30
+ export * from "./CameraLock";
@@ -63,12 +63,14 @@ class TimelineControl extends Control {
63
63
  this.renderer && this.renderer.handler.defaultClock.setDate(d);
64
64
  });
65
65
  this._timelineView.events.on("startdrag", () => {
66
+ this.planet?.sun.stop();
66
67
  this.renderer && this.renderer.controls.mouseNavigation.deactivate();
67
68
  });
68
69
  this._timelineView.events.on("stopdrag", () => {
69
70
  this.renderer && this.renderer.controls.mouseNavigation.activate();
70
71
  });
71
72
  this._timelineView.events.on("startdragcurrent", () => {
73
+ this.planet?.sun.stop();
72
74
  this.renderer && this.renderer.controls.mouseNavigation.deactivate();
73
75
  });
74
76
  this._timelineView.events.on("stopdragcurrent", () => {
@@ -240,25 +240,25 @@ class Segment {
240
240
  _v0.set(verts[ind_v0], verts[ind_v0 + 1], verts[ind_v0 + 2]);
241
241
  _v1.set(verts[ind_v0 + 3], verts[ind_v0 + 4], verts[ind_v0 + 5]);
242
242
  _v2.set(verts[ind_v2], verts[ind_v2 + 1], verts[ind_v2 + 2]);
243
- let d = _ray.hitTriangle(_v0, _v1, _v2, res);
243
+ let d = _ray.hitTriangleRes(_v0, _v1, _v2, res);
244
244
  if (d === Ray.INSIDE) {
245
245
  return xyz.distance(res);
246
246
  }
247
247
  else if (d === Ray.AWAY) {
248
248
  _rayEx.set(xyz, norm);
249
- let d = _rayEx.hitTriangle(_v0, _v1, _v2, res);
249
+ let d = _rayEx.hitTriangleRes(_v0, _v1, _v2, res);
250
250
  if (d === Ray.INSIDE) {
251
251
  return -xyz.distance(res);
252
252
  }
253
253
  }
254
254
  _v3.set(verts[ind_v2 + 3], verts[ind_v2 + 4], verts[ind_v2 + 5]);
255
- d = _ray.hitTriangle(_v1, _v3, _v2, res);
255
+ d = _ray.hitTriangleRes(_v1, _v3, _v2, res);
256
256
  if (d === Ray.INSIDE) {
257
257
  return xyz.distance(res);
258
258
  }
259
259
  else if (d === Ray.AWAY) {
260
260
  _rayEx.set(xyz, norm);
261
- let d = _rayEx.hitTriangle(_v1, _v3, _v2, res);
261
+ let d = _rayEx.hitTriangleRes(_v1, _v3, _v2, res);
262
262
  if (d === Ray.INSIDE) {
263
263
  return -xyz.distance(res);
264
264
  }