@openglobus/og 0.28.7 → 1.0.0-rc2

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 (220) hide show
  1. package/LICENSE.md +218 -4
  2. package/README.md +31 -18
  3. package/lib/Deferred.d.ts +2 -2
  4. package/lib/Events.d.ts +1 -1
  5. package/lib/Globe.d.ts +8 -5
  6. package/lib/Object3d.d.ts +17 -14
  7. package/lib/Popup.d.ts +2 -2
  8. package/lib/assets/LabelWorker.worker-DYd7xn3M.js.map +1 -0
  9. package/lib/assets/PlainSegmentWorker.worker-JsKldq-e.js.map +1 -0
  10. package/lib/assets/TerrainWorker.worker-CqUJvMOv.js.map +1 -0
  11. package/lib/bv/index.d.ts +2 -2
  12. package/lib/camera/Camera.d.ts +280 -27
  13. package/lib/camera/Frustum.d.ts +100 -15
  14. package/lib/camera/PlanetCamera.d.ts +93 -8
  15. package/lib/camera/index.d.ts +2 -2
  16. package/lib/control/CameraFrameComposer.d.ts +2 -2
  17. package/lib/control/CameraFrameHandler.d.ts +1 -1
  18. package/lib/control/CompassButton.d.ts +2 -2
  19. package/lib/control/EarthCoordinates.d.ts +5 -2
  20. package/lib/control/FramebufferPreview.d.ts +3 -3
  21. package/lib/control/GeoImageDragControl.d.ts +1 -1
  22. package/lib/control/LayerAnimation.d.ts +2 -2
  23. package/lib/control/LayerSwitcher.d.ts +3 -0
  24. package/lib/control/Lighting.d.ts +4 -2
  25. package/lib/control/Navigation.d.ts +15 -11
  26. package/lib/control/OrthoSwitcher.d.ts +18 -0
  27. package/lib/control/SimpleTouchNavigation.d.ts +44 -0
  28. package/lib/control/Sun.d.ts +4 -2
  29. package/lib/control/TouchNavigation.d.ts +4 -8
  30. package/lib/control/atmosphere/Atmosphere.d.ts +2 -0
  31. package/lib/control/atmosphere/AtmosphereConfig.d.ts +2 -6
  32. package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +17 -3
  33. package/lib/control/cameraDepthHandler/camera_depth.d.ts +2 -2
  34. package/lib/control/drawing/LineStringDrawingScene.d.ts +1 -0
  35. package/lib/control/drawing/PolygonDrawingScene.d.ts +14 -14
  36. package/lib/control/elevationProfile/ElevationProfile.d.ts +1 -1
  37. package/lib/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
  38. package/lib/control/elevationProfile/ElevationProfileScene.d.ts +9 -12
  39. package/lib/control/elevationProfile/ElevationProfileView.d.ts +16 -5
  40. package/lib/control/entityEditor/EntityEditor.d.ts +19 -0
  41. package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorDialog.d.ts} +9 -8
  42. package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +12 -12
  43. package/lib/control/{geoObjectEditor → entityEditor}/colors.d.ts +2 -2
  44. package/lib/control/entityTree/EntityTree.d.ts +46 -0
  45. package/lib/control/entityTree/EntityTreeView.d.ts +24 -0
  46. package/lib/control/heightRuler/HeightRulerScene.d.ts +3 -2
  47. package/lib/control/index.d.ts +5 -3
  48. package/lib/control/ruler/RulerScene.d.ts +8 -8
  49. package/lib/control/selection/SelectionScene.d.ts +6 -6
  50. package/lib/control/timeline/TimelineControl.d.ts +2 -2
  51. package/lib/control/timeline/TimelineModel.d.ts +1 -1
  52. package/lib/control/timeline/TimelineView.d.ts +52 -13
  53. package/lib/control/visibleExtent/segment.d.ts +7 -0
  54. package/lib/ellipsoid/index.d.ts +4 -4
  55. package/lib/entity/Entity.d.ts +114 -100
  56. package/lib/entity/EntityCollection.d.ts +95 -70
  57. package/lib/entity/{BaseBillboard.d.ts → billboard/BaseBillboard.d.ts} +16 -17
  58. package/lib/entity/{BaseBillboardHandler.d.ts → billboard/BaseBillboardHandler.d.ts} +24 -9
  59. package/lib/entity/{Billboard.d.ts → billboard/Billboard.d.ts} +11 -7
  60. package/lib/entity/{BillboardHandler.d.ts → billboard/BillboardHandler.d.ts} +1 -1
  61. package/lib/entity/{GeoObject.d.ts → geoObject/GeoObject.d.ts} +7 -6
  62. package/lib/entity/{GeoObjectHandler.d.ts → geoObject/GeoObjectHandler.d.ts} +29 -11
  63. package/lib/entity/{InstanceData.d.ts → geoObject/InstanceData.d.ts} +18 -13
  64. package/lib/entity/{Geometry.d.ts → geometry/Geometry.d.ts} +10 -10
  65. package/lib/entity/{GeometryHandler.d.ts → geometry/GeometryHandler.d.ts} +7 -7
  66. package/lib/entity/index.d.ts +8 -8
  67. package/lib/entity/{Label.d.ts → label/Label.d.ts} +12 -13
  68. package/lib/entity/{LabelHandler.d.ts → label/LabelHandler.d.ts} +31 -7
  69. package/lib/entity/{LabelWorker.d.ts → label/LabelWorker.d.ts} +3 -3
  70. package/lib/entity/{PointCloud.d.ts → pointCloud/PointCloud.d.ts} +18 -12
  71. package/lib/entity/{PointCloudHandler.d.ts → pointCloud/PointCloudHandler.d.ts} +4 -4
  72. package/lib/entity/polyline/Polyline.d.ts +242 -0
  73. package/lib/entity/polyline/PolylineBatchRenderer.d.ts +443 -0
  74. package/lib/entity/{PolylineHandler.d.ts → polyline/PolylineHandler.d.ts} +19 -7
  75. package/lib/entity/{Ray.d.ts → ray/Ray.d.ts} +27 -9
  76. package/lib/entity/{RayHandler.d.ts → ray/RayHandler.d.ts} +18 -8
  77. package/lib/entity/{Strip.d.ts → strip/Strip.d.ts} +21 -17
  78. package/lib/entity/{StripHandler.d.ts → strip/StripHandler.d.ts} +11 -6
  79. package/lib/index.d.ts +47 -42
  80. package/lib/layer/BaseGeoImage.d.ts +20 -17
  81. package/lib/layer/CanvasTiles.d.ts +14 -12
  82. package/lib/layer/GeoImage.d.ts +1 -1
  83. package/lib/layer/GeoTexture2d.d.ts +2 -2
  84. package/lib/layer/KML.d.ts +19 -18
  85. package/lib/layer/Layer.d.ts +72 -53
  86. package/lib/layer/Vector.d.ts +47 -30
  87. package/lib/layer/WMS.d.ts +1 -1
  88. package/lib/layer/XYZ.d.ts +11 -12
  89. package/lib/layer/index.d.ts +12 -12
  90. package/lib/math/Line2.d.ts +1 -1
  91. package/lib/math/Line3.d.ts +1 -1
  92. package/lib/math/Mat3.d.ts +3 -13
  93. package/lib/math/Mat4.d.ts +16 -10
  94. package/lib/math/Plane.d.ts +1 -1
  95. package/lib/math/Quat.d.ts +14 -12
  96. package/lib/math/Ray.d.ts +4 -3
  97. package/lib/math/Vec2.d.ts +25 -17
  98. package/lib/math/Vec3.d.ts +33 -31
  99. package/lib/math/Vec4.d.ts +1 -1
  100. package/lib/math/coder.d.ts +1 -1
  101. package/lib/math/index.d.ts +13 -14
  102. package/lib/mercator.d.ts +4 -4
  103. package/lib/og.css +1 -1
  104. package/lib/og.es.js +1 -1
  105. package/lib/og.es.js.map +1 -1
  106. package/lib/quadTree/EntityCollectionNode.d.ts +10 -10
  107. package/lib/quadTree/EntityCollectionsTreeStrategy.d.ts +5 -5
  108. package/lib/quadTree/QuadTreeStrategy.d.ts +3 -4
  109. package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
  110. package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +4 -4
  111. package/lib/renderer/AtmosphereDeferredShading.d.ts +12 -0
  112. package/lib/renderer/IDeferredShadingPass.d.ts +8 -0
  113. package/lib/renderer/ITransparencyPass.d.ts +8 -0
  114. package/lib/renderer/PhongDeferredShading.d.ts +16 -0
  115. package/lib/renderer/Renderer.d.ts +166 -99
  116. package/lib/renderer/RendererEvents.d.ts +15 -5
  117. package/lib/renderer/WOITPass.d.ts +14 -0
  118. package/lib/res/fonts/Ephesis-Regular.json +1 -0
  119. package/lib/res/fonts/Ephesis-Regular.png +0 -0
  120. package/lib/res/fonts/Karla-Bold.json +1 -0
  121. package/lib/res/fonts/Karla-Bold.png +0 -0
  122. package/lib/res/fonts/Karla-Italic.json +1 -0
  123. package/lib/res/fonts/Karla-Italic.png +0 -0
  124. package/lib/res/fonts/Karla-Light.json +1 -0
  125. package/lib/res/fonts/Karla-Light.png +0 -0
  126. package/lib/res/fonts/Karla-Medium.json +1 -0
  127. package/lib/res/fonts/Karla-Medium.png +0 -0
  128. package/lib/res/fonts/Roboto-Regular.json +1 -37147
  129. package/lib/res/fonts/Roboto-Regular.png +0 -0
  130. package/lib/res/fonts/arial.json +1 -4321
  131. package/lib/res/fonts/arial.png +0 -0
  132. package/lib/res/night-4326.png +0 -0
  133. package/lib/res/night.png +0 -0
  134. package/lib/scene/AltitudeNearPlaneStrategy.d.ts +17 -0
  135. package/lib/scene/Axes.d.ts +4 -3
  136. package/lib/scene/Planet.d.ts +244 -69
  137. package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +49 -46
  138. package/lib/scene/SkyBox.d.ts +5 -3
  139. package/lib/scene/index.d.ts +2 -2
  140. package/lib/segment/Segment.d.ts +29 -15
  141. package/lib/segment/SegmentLonLat.d.ts +0 -1
  142. package/lib/shadeModeConstants.d.ts +7 -0
  143. package/lib/shaders/applyDeferredDepth.d.ts +2 -0
  144. package/lib/shaders/atmos/atmos.d.ts +3 -3
  145. package/lib/shaders/billboard/billboard.d.ts +4 -3
  146. package/lib/shaders/deferredShading/deferredShading.d.ts +2 -0
  147. package/lib/shaders/deferredShading/deferredShadingAtmos.d.ts +3 -0
  148. package/lib/shaders/depth.d.ts +2 -2
  149. package/lib/shaders/geo_object/geo_object.d.ts +8 -4
  150. package/lib/shaders/label/label.d.ts +4 -4
  151. package/lib/shaders/pointCloud.d.ts +2 -2
  152. package/lib/shaders/polyline/polyline.d.ts +7 -3
  153. package/lib/shaders/ray/ray.d.ts +3 -2
  154. package/lib/shaders/screenFrame.d.ts +2 -2
  155. package/lib/shaders/segment/segment.d.ts +7 -0
  156. package/lib/shaders/skybox.d.ts +2 -2
  157. package/lib/shaders/strip/strip.d.ts +3 -0
  158. package/lib/shaders/tone_mapping/toneMapping.d.ts +2 -2
  159. package/lib/shaders/weightedOITResolve.d.ts +2 -0
  160. package/lib/terrain/BilTerrain.d.ts +1 -1
  161. package/lib/terrain/EmptyTerrain.d.ts +5 -6
  162. package/lib/terrain/GlobusTerrain.d.ts +18 -23
  163. package/lib/terrain/RgbTerrain.d.ts +8 -8
  164. package/lib/terrain/index.d.ts +5 -5
  165. package/lib/tsconfig.tsbuildinfo +1 -1
  166. package/lib/ui/Button.d.ts +7 -5
  167. package/lib/ui/ButtonGroup.d.ts +1 -1
  168. package/lib/ui/Checkbox.d.ts +2 -2
  169. package/lib/ui/Color.d.ts +2 -2
  170. package/lib/ui/Dialog.d.ts +30 -3
  171. package/lib/ui/Input.d.ts +7 -2
  172. package/lib/ui/Slider.d.ts +5 -2
  173. package/lib/ui/ToggleButton.d.ts +2 -2
  174. package/lib/ui/View.d.ts +1 -1
  175. package/lib/ui/icons.d.ts +1 -1
  176. package/lib/ui/index.d.ts +9 -9
  177. package/lib/utils/FontAtlas.d.ts +57 -8
  178. package/lib/utils/GeoImageCreator.d.ts +2 -2
  179. package/lib/utils/ImagesCacheManager.d.ts +3 -3
  180. package/lib/utils/Loader.d.ts +2 -2
  181. package/lib/utils/PlainSegmentWorker.d.ts +2 -2
  182. package/lib/utils/TerrainWorker.d.ts +2 -2
  183. package/lib/utils/TextureAtlas.d.ts +7 -2
  184. package/lib/utils/TextureResourceManager.d.ts +162 -0
  185. package/lib/utils/VectorTileCreator.d.ts +1 -1
  186. package/lib/utils/colorSpace.d.ts +9 -0
  187. package/lib/utils/gltf/gltfParser.d.ts +9 -2
  188. package/lib/utils/gltf/types.d.ts +20 -2
  189. package/lib/utils/shared.d.ts +11 -5
  190. package/lib/utils/textureResourceMeta.d.ts +9 -0
  191. package/lib/webgl/BaseFramebuffer.d.ts +7 -0
  192. package/lib/webgl/Framebuffer.d.ts +9 -6
  193. package/lib/webgl/Handler.d.ts +81 -99
  194. package/lib/webgl/ShaderProgram.d.ts +190 -0
  195. package/lib/webgl/index.d.ts +2 -2
  196. package/lib/webgl/variableHandlers.d.ts +2 -1
  197. package/package.json +77 -76
  198. package/lib/assets/LabelWorker.worker-BT1uJgYn.js.map +0 -1
  199. package/lib/assets/PlainSegmentWorker.worker-CT1cj8jj.js.map +0 -1
  200. package/lib/assets/TerrainWorker.worker-DmikdfB2.js.map +0 -1
  201. package/lib/control/OldMouseNavigation.d.ts +0 -65
  202. package/lib/control/ZoomControl.d.ts +0 -28
  203. package/lib/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
  204. package/lib/control/visibleExtent/drawnode.d.ts +0 -7
  205. package/lib/entity/Polyline.d.ts +0 -417
  206. package/lib/light/LightSource.d.ts +0 -36
  207. package/lib/res/fonts/Roboto-Regular.ttf.cfg +0 -1340
  208. package/lib/res/fonts/Roboto-Regular.ttf.png +0 -0
  209. package/lib/res/fonts/arial.ttf.cfg +0 -1570
  210. package/lib/res/fonts/arial.ttf.png +0 -0
  211. package/lib/scene/BaseNode.d.ts +0 -61
  212. package/lib/shaders/drawnode/drawnode.d.ts +0 -8
  213. package/lib/webgl/Program.d.ts +0 -161
  214. package/lib/webgl/ProgramController.d.ts +0 -87
  215. /package/lib/control/{geoObjectEditor → entityEditor}/ArrowEntity.d.ts +0 -0
  216. /package/lib/control/{geoObjectEditor → entityEditor}/AxisTrackEntity.d.ts +0 -0
  217. /package/lib/control/{geoObjectEditor → entityEditor}/MoveAxisEntity.d.ts +0 -0
  218. /package/lib/control/{geoObjectEditor → entityEditor}/MovePlaneEntity.d.ts +0 -0
  219. /package/lib/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +0 -0
  220. /package/lib/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
@@ -1,10 +1,10 @@
1
- import { Entity } from "./Entity";
2
- import { Extent } from "../Extent";
1
+ import { Entity } from "../Entity";
2
+ import { Extent } from "../../Extent";
3
3
  import { GeometryHandler } from "./GeometryHandler";
4
- import { Vec4 } from "../math/Vec4";
5
- import type { NumberArray4 } from "../math/Vec4";
6
- import type { NumberArray2 } from "../math/Vec2";
7
- import type { NumberArray3 } from "../math/Vec3";
4
+ import { Vec4 } from "../../math/Vec4";
5
+ import type { NumberArray4 } from "../../math/Vec4";
6
+ import type { NumberArray2 } from "../../math/Vec2";
7
+ import type { NumberArray3 } from "../../math/Vec3";
8
8
  export declare enum GeometryTypeEnum {
9
9
  POINT = 1,
10
10
  LINESTRING = 2,
@@ -91,10 +91,10 @@ declare class Geometry {
91
91
  static getType(typeStr: keyof typeof GeometryTypeEnum): GeometryTypeEnum;
92
92
  /**
93
93
  * Returns geometry extent.
94
- @static
95
- @param {IGeometry} geometryObj - GeoJSON style geometry feature.
96
- @param {IGeometryCoordinates} outCoordinates - Geometry feature coordinates clone.
97
- @returns {Extent} -
94
+ * @static
95
+ * @param {IGeometry} geometryObj - GeoJSON-style geometry feature.
96
+ * @param {IGeometryCoordinates} outCoordinates - Cloned geometry coordinates.
97
+ * @returns {Extent} Geometry extent.
98
98
  */
99
99
  static getExtent(geometryObj: IGeometry, outCoordinates: IGeometryCoordinates): Extent;
100
100
  /**
@@ -1,10 +1,10 @@
1
- import { Extent } from "../Extent";
2
- import { Handler } from "../webgl/Handler";
3
- import type { WebGLBufferExt } from "../webgl/Handler";
4
- import { Vector } from "../layer/Vector";
5
- import { Node } from "../quadTree/Node";
6
- import { Vec3 } from "../math/Vec3";
7
- import { Vec4 } from "../math/Vec4";
1
+ import { Extent } from "../../Extent";
2
+ import { Handler } from "../../webgl/Handler";
3
+ import type { WebGLBufferExt } from "../../webgl/Handler";
4
+ import { Vector } from "../../layer/Vector";
5
+ import { Node } from "../../quadTree/Node";
6
+ import { Vec3 } from "../../math/Vec3";
7
+ import { Vec4 } from "../../math/Vec4";
8
8
  import type { CoordinatesType, Geometry } from "./Geometry";
9
9
  declare class GeometryHandler {
10
10
  static __counter__: number;
@@ -1,10 +1,10 @@
1
- export * from "./Billboard";
1
+ export * from "./billboard/Billboard";
2
2
  export * from "./Entity";
3
3
  export * from "./EntityCollection";
4
- export * from "./Geometry";
5
- export * from "./GeoObject";
6
- export * from "./Label";
7
- export * from "./PointCloud";
8
- export * from "./Polyline";
9
- export * from "./Ray";
10
- export * from "./Strip";
4
+ export * from "./geometry/Geometry";
5
+ export * from "./geoObject/GeoObject";
6
+ export * from "./label/Label";
7
+ export * from "./pointCloud/PointCloud";
8
+ export * from "./polyline/Polyline";
9
+ export * from "./ray/Ray";
10
+ export * from "./strip/Strip";
@@ -1,8 +1,8 @@
1
- import { BaseBillboard } from "./BaseBillboard";
2
- import type { IBaseBillboardParams } from "./BaseBillboard";
3
- import { Vec4 } from "../math/Vec4";
4
- import type { NumberArray4 } from "../math/Vec4";
5
- import { FontAtlas } from "../utils/FontAtlas";
1
+ import { BaseBillboard } from "../billboard/BaseBillboard";
2
+ import type { IBaseBillboardParams } from "../billboard/BaseBillboard";
3
+ import { Vec4 } from "../../math/Vec4";
4
+ import type { NumberArray4 } from "../../math/Vec4";
5
+ import { FontAtlas } from "../../utils/FontAtlas";
6
6
  import { LabelHandler } from "./LabelHandler";
7
7
  export interface ILabelParams extends IBaseBillboardParams {
8
8
  text?: string;
@@ -25,7 +25,7 @@ declare const ALIGN: Record<string, number>;
25
25
  * @param {number} [options.rotation] - Screen angle rotation.
26
26
  * @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
27
27
  * @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
28
- * @param {Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
28
+ * @param {Vec2|Array.<number>} [options.offset] - Billboard center screen offset.
29
29
  * @param {boolean} [options.visibility] - Visibility.
30
30
  * @param {string} [options.text] - Text string.
31
31
  * @param {string} [options.face] - HTML5 font face.
@@ -70,8 +70,8 @@ declare class Label extends BaseBillboard {
70
70
  protected _outlineColor: Vec4;
71
71
  /**
72
72
  * Text horizontal align: "left", "right" and "center".
73
- * @private
74
- * @type {Label.ALIGN}
73
+ * @protected
74
+ * @type {number}
75
75
  */
76
76
  protected _align: number;
77
77
  /**
@@ -90,22 +90,21 @@ declare class Label extends BaseBillboard {
90
90
  protected _letterSpacing: number;
91
91
  constructor(options?: ILabelParams);
92
92
  /**
93
- * Set label text.
93
+ * Sets label text.
94
94
  * @public
95
95
  * @param {string} text - Text string.
96
- * It can't be bigger than maximum labelHandler _maxLetters value.
96
+ * Text length cannot exceed the `labelHandler._maxLetters` value.
97
97
  */
98
98
  setText(text: string): void;
99
99
  /**
100
- * Set text letter spacing.
100
+ * Sets text letter spacing.
101
101
  * @public
102
- * @param {number} spacing - Letter spacing.
102
+ * @param {number} letterSpacing - Letter spacing.
103
103
  */
104
104
  setLetterSpacing(letterSpacing: number): void;
105
105
  /**
106
106
  * Returns label text letter spacing.
107
107
  * @public
108
- * @param {number} spacing - Letter spacing.
109
108
  */
110
109
  getLetterSpacing(): number;
111
110
  /**
@@ -1,9 +1,12 @@
1
1
  import { Label } from "./Label";
2
- import { BaseBillboardHandler } from "./BaseBillboardHandler";
3
- import { EntityCollection } from "./EntityCollection";
4
- import type { WebGLBufferExt } from "../webgl/Handler";
5
- import { Vec3 } from "../math/Vec3";
6
- import { Vec4 } from "../math/Vec4";
2
+ import { BaseBillboardHandler } from "../billboard/BaseBillboardHandler";
3
+ import { EntityCollection } from "../EntityCollection";
4
+ import type { WebGLBufferExt } from "../../webgl/Handler";
5
+ import type { ShaderProgram } from "../../webgl/ShaderProgram";
6
+ import { Vec2 } from "../../math/Vec2";
7
+ import { Vec3 } from "../../math/Vec3";
8
+ import { Vec4 } from "../../math/Vec4";
9
+ import { BaseBillboard } from "../billboard/BaseBillboard";
7
10
  type LabelWorkerCallbackData = {
8
11
  vertexArr: Float32Array;
9
12
  texCoordArr: Float32Array;
@@ -19,6 +22,14 @@ type LabelWorkerCallbackData = {
19
22
  outlineColorArr: Float32Array;
20
23
  pickingColorArr: Float32Array;
21
24
  };
25
+ declare class LabelPassHandler {
26
+ protected _owner: LabelHandler;
27
+ protected _isOutlinePass: boolean;
28
+ constructor(owner: LabelHandler, isOutlinePass: boolean);
29
+ drawOpaque(): void;
30
+ drawTransparent(): void;
31
+ drawTransparentForward(): void;
32
+ }
22
33
  declare class LabelHandler extends BaseBillboardHandler {
23
34
  protected _billboards: Label[];
24
35
  protected _gliphParamBuffer: WebGLBufferExt | null;
@@ -29,6 +40,8 @@ declare class LabelHandler extends BaseBillboardHandler {
29
40
  protected _fontIndexArr: Float32Array;
30
41
  protected _outlineArr: Float32Array;
31
42
  protected _outlineColorArr: Float32Array;
43
+ fillLabelHandler: LabelPassHandler;
44
+ outlineLabelHandler: LabelPassHandler;
32
45
  _maxLetters: number;
33
46
  constructor(entityCollection: EntityCollection, maxLetters?: number);
34
47
  initProgram(): void;
@@ -38,16 +51,27 @@ declare class LabelHandler extends BaseBillboardHandler {
38
51
  protected _addLabelToArrays(label: Label): void;
39
52
  assignFontAtlas(label: Label): void;
40
53
  workerCallback(data: LabelWorkerCallbackData, label: Label): void;
54
+ protected _isBillboardOpaque(billboard: BaseBillboard): boolean;
55
+ protected _swapBillboardData(firstIndex: number, secondIndex: number): void;
41
56
  clear(): void;
42
57
  protected _deleteBuffers(): void;
43
- _displayPASS(): void;
58
+ protected _getOpaqueProgram(): ShaderProgram;
59
+ protected _getTransparentProgram(): ShaderProgram;
60
+ drawOpaque(): void;
61
+ drawTransparent(): void;
62
+ drawTransparentForward(): void;
63
+ drawPass(isOutlinePass: boolean, opaquePass: boolean, drawInForward?: boolean): void;
64
+ protected _displayOutlinePASS(startBillboardIndex: number, endBillboardIndex: number, labelProgram: ShaderProgram): void;
65
+ protected _displayFillPASS(startBillboardIndex: number, endBillboardIndex: number, labelProgram: ShaderProgram): void;
66
+ protected _drawLabelPass(startBillboardIndex: number, endBillboardIndex: number, labelProgram: ShaderProgram, isOutlinePass: boolean, depthWrite?: boolean): void;
67
+ protected _displayPASS(startBillboardIndex: number, endBillboardIndex: number, labelProgram: ShaderProgram): void;
44
68
  protected _pickingPASS(): void;
45
69
  protected _removeBillboard(label: Label): void;
46
70
  setText(index: number, text: string, fontIndex: number, align: number, letterSpacing?: number, isRTL?: boolean): void;
47
71
  setPositionArr(index: number, positionHigh: Vec3, positionLow: Vec3): void;
48
72
  setPickingColorArr(index: number, color: Vec3): void;
49
73
  setSizeArr(index: number, size: number): void;
50
- setOffsetArr(index: number, offset: Vec3): void;
74
+ setOffsetArr(index: number, offset: Vec2): void;
51
75
  setRgbaArr(index: number, rgba: Vec4): void;
52
76
  setOutlineColorArr(index: number, rgba: Vec4): void;
53
77
  setOutlineArr(index: number, outline: number): void;
@@ -1,6 +1,6 @@
1
- import { BaseWorker } from "../utils/BaseWorker";
2
- import { Label } from "../entity/Label";
3
- import { LabelHandler } from "../entity/LabelHandler";
1
+ import { BaseWorker } from "../../utils/BaseWorker";
2
+ import { Label } from "./Label";
3
+ import { LabelHandler } from "./LabelHandler";
4
4
  export declare const LOCK_UPDATE = -2;
5
5
  export declare const LOCK_FREE = -1;
6
6
  interface LabelInfo {
@@ -1,10 +1,10 @@
1
- import { Entity } from "./Entity";
1
+ import { Entity } from "../Entity";
2
2
  import { PointCloudHandler } from "./PointCloudHandler";
3
- import { RenderNode } from "../scene/RenderNode";
4
- import { Vec3 } from "../math/Vec3";
5
- import { Vec4 } from "../math/Vec4";
6
- import type { WebGLBufferExt } from "../webgl/Handler";
7
- import { EntityCollection } from "./EntityCollection";
3
+ import { Scene } from "../../scene/Scene";
4
+ import { Vec3 } from "../../math/Vec3";
5
+ import { Vec4 } from "../../math/Vec4";
6
+ import type { WebGLBufferExt } from "../../webgl/Handler";
7
+ import { EntityCollection } from "../EntityCollection";
8
8
  export interface IPointCloudParams {
9
9
  visibility?: boolean;
10
10
  pointSize?: number;
@@ -66,9 +66,9 @@ declare class PointCloud {
66
66
  /**
67
67
  * Parent collection render node.
68
68
  * @protected
69
- * @type {RenderNode | null}
69
+ * @type {Scene | null}
70
70
  */
71
- protected _renderNode: RenderNode | null;
71
+ protected _scene: Scene | null;
72
72
  /**
73
73
  * Entity instance that holds this point cloud.
74
74
  * @public
@@ -124,15 +124,21 @@ declare class PointCloud {
124
124
  */
125
125
  setVisibility(visibility: boolean): void;
126
126
  /**
127
- * @return {boolean} Point cloud visibility.
127
+ * Sets opacity for all points in the cloud.
128
+ * @public
129
+ * @param {number} opacity - Opacity value in range [0..1].
130
+ */
131
+ setOpacity(opacity: number): void;
132
+ /**
133
+ * @returns {boolean} Point cloud visibility.
128
134
  */
129
135
  getVisibility(): boolean;
130
136
  /**
131
137
  * Assign rendering scene node.
132
138
  * @public
133
- * @param {RenderNode} renderNode - Assigned render node.
139
+ * @param {Scene} scene - Assigned render node.
134
140
  */
135
- setRenderNode(renderNode: RenderNode): void;
141
+ bindScene(scene: Scene): void;
136
142
  /**
137
143
  * Removes from entity.
138
144
  * @public
@@ -154,7 +160,7 @@ declare class PointCloud {
154
160
  * Returns specific point by index.
155
161
  * @public
156
162
  * @param {number} index - Point index.
157
- * @return {Poi} Specific point
163
+ * @returns {IPoint} Point at the given index.
158
164
  */
159
165
  getPoint(index: number): IPoint;
160
166
  removePoint(index: number): void;
@@ -1,7 +1,7 @@
1
- import { EntityCollection } from "./EntityCollection";
1
+ import { EntityCollection } from "../EntityCollection";
2
2
  import { PointCloud } from "./PointCloud";
3
- import { Renderer } from "../renderer/Renderer";
4
- import { RenderNode } from "../scene/RenderNode";
3
+ import { Renderer } from "../../renderer/Renderer";
4
+ import { Scene } from "../../scene/Scene";
5
5
  declare class PointCloudHandler {
6
6
  static __counter__: number;
7
7
  protected __id: number;
@@ -31,7 +31,7 @@ declare class PointCloudHandler {
31
31
  protected _pointClouds: PointCloud[];
32
32
  constructor(entityCollection: EntityCollection);
33
33
  protected _initProgram(): void;
34
- setRenderNode(renderNode: RenderNode): void;
34
+ bindScene(scene: Scene): void;
35
35
  add(pointCloud: PointCloud): void;
36
36
  remove(pointCloud: PointCloud): void;
37
37
  protected _reindexPointCloudArray(startIndex: number): void;
@@ -0,0 +1,242 @@
1
+ import { Entity } from "../Entity";
2
+ import { LonLat } from "../../LonLat";
3
+ import { Vec3 } from "../../math/Vec3";
4
+ import type { NumberArray3 } from "../../math/Vec3";
5
+ import type { NumberArray2 } from "../../math/Vec2";
6
+ import type { NumberArray4 } from "../../math/Vec4";
7
+ import type { HTMLImageElementExt } from "../../utils/ImagesCacheManager";
8
+ import { PolylineHandler } from "./PolylineHandler";
9
+ import { PolylineBatchRenderer } from "./PolylineBatchRenderer";
10
+ import { Extent } from "../../Extent";
11
+ export type Geodetic = LonLat | NumberArray2 | NumberArray3;
12
+ export type Cartesian = Vec3 | NumberArray3;
13
+ export type SegmentPath3vExt = Cartesian[];
14
+ export type SegmentPathLonLatExt = Geodetic[];
15
+ export type SegmentPathColor = NumberArray4[];
16
+ export type SegmentPath3v = Vec3[];
17
+ export type SegmentPathLonLat = LonLat[];
18
+ export interface TexParam {
19
+ texOffset: number;
20
+ strokeSize: number;
21
+ texOffsetSpeed: number;
22
+ }
23
+ type StrokeSource = string | HTMLImageElement | null;
24
+ export interface IPolylineParams {
25
+ altitude?: number;
26
+ thickness?: number;
27
+ opacity?: number;
28
+ color?: string | string[];
29
+ visibility?: boolean;
30
+ isClosed?: boolean;
31
+ pathColors?: SegmentPathColor[];
32
+ path3v?: SegmentPath3vExt[];
33
+ pathLonLat?: SegmentPathLonLatExt[];
34
+ src?: StrokeSource;
35
+ texParams?: Partial<TexParam>;
36
+ }
37
+ /**
38
+ * Polyline object.
39
+ * @class
40
+ * @param {Object} [options] - Polyline options:
41
+ * @param {number} [options.thickness] - Thickness in screen pixels 1.5 is default.
42
+ * @param {Number} [options.altitude] - Relative to ground layers altitude value.
43
+ * @param {string|string[]} [options.color] - Default line color or per-segment HTML colors.
44
+ * @param {Boolean} [options.opacity] - Line opacity.
45
+ * @param {Boolean} [options.visibility] - Polyline visibility. True default.
46
+ * @param {Boolean[]} [options.isClosed] - Closed geometry type identification, per-segment.
47
+ * @param {SegmentPathLonLatExt[]} [options.pathLonLat] - Polyline geodetic coordinates array. [[[0,0,0], [1,1,1],...]]
48
+ * @param {SegmentPath3vExt[]} [options.path3v] - LinesString cartesian coordinates array. [[[0,0,0], [1,1,1],...]]
49
+ * @param {SegmentPathColor[]} [options.pathColors] - Coordinates color. [[[1,0,0,1], [0,1,0,1],...]] for right and green colors.
50
+ * @param {TexParam} [options.texParams] - Texture params for all segments: texOffset, strokeSize and texOffsetSpeed.
51
+ */
52
+ declare class Polyline {
53
+ static __counter__: number;
54
+ protected __id: number;
55
+ _entity: Entity | null;
56
+ _extent: Extent;
57
+ _handler: PolylineHandler | null;
58
+ _handlerIndex: number;
59
+ _batchRenderer: PolylineBatchRenderer | null;
60
+ _batchRendererIndexes: number[];
61
+ _path3v: SegmentPath3vExt[];
62
+ protected _pathLonLat: SegmentPathLonLatExt[];
63
+ protected _pathColors: SegmentPathColor[];
64
+ protected _color: string[];
65
+ protected _segmentTexParams: Partial<TexParam> | null;
66
+ protected _src: StrokeSource;
67
+ protected _isClosed: boolean;
68
+ protected _visibility: boolean;
69
+ protected _image: HTMLImageElement | null;
70
+ protected _opacity: number;
71
+ protected _thickness: number;
72
+ protected _altitude: number;
73
+ protected _pickingColor: Vec3 | null;
74
+ constructor(options?: IPolylineParams);
75
+ get _pathLonLatMerc(): LonLat[][];
76
+ protected _pathLonLatMercFromLocal(): LonLat[][];
77
+ set altitude(alt: number);
78
+ get altitude(): number;
79
+ _addToBatchRenderer(): void;
80
+ _removeFromBatchRenderer(): void;
81
+ protected _getDefaultHtmlColor(segmentIndex?: number): string | undefined;
82
+ protected _getDefaultPathColor(segmentIndex?: number): NumberArray4 | undefined;
83
+ protected _applySegmentProps(batchIndex: number, segmentIndex?: number): void;
84
+ protected _tryAddSegmentToBatch(segmentIndex: number): boolean;
85
+ protected _updateExtent(): void;
86
+ getExtent(): Extent;
87
+ getPath3v(): SegmentPath3vExt[];
88
+ getPathLonLat(): SegmentPathLonLatExt[];
89
+ getPathColors(): NumberArray4[][];
90
+ setImage(image: HTMLImageElement): void;
91
+ getImage(): HTMLImageElementExt | null;
92
+ /**
93
+ * Sets stroke source per segment (null = color-only).
94
+ * @public
95
+ */
96
+ setSrc(src: StrokeSource): void;
97
+ getSrc(): StrokeSource;
98
+ /**
99
+ * Sets closed/open state for one path segment.
100
+ * @public
101
+ */
102
+ set isClosed(isClosed: boolean);
103
+ get isClosed(): boolean;
104
+ setTextureDisabled(): void;
105
+ static setPathColors(pathLonLat: SegmentPathLonLatExt[], pathColors: SegmentPathColor[], defaultColor: NumberArray4, outColors: number[]): void;
106
+ setPointLonLat(lonlat: LonLat, index: number, segmentIndex: number): void;
107
+ /**
108
+ * Changes cartesian point coordinates of the path
109
+ * @param {Vec3} coordinates - New coordinates
110
+ * @param {number} [index=0] - Path segment index
111
+ * @param {number} [segmentIndex=0] - Index of the point in the path segment
112
+ * @param {boolean} [skipLonLat=false] - Do not update geodetic coordinates
113
+ */
114
+ setPoint3v(coordinates: Vec3, index?: number, segmentIndex?: number, skipLonLat?: boolean): void;
115
+ /**
116
+ * Remove point from the path
117
+ * @param {number} index - Point index in a path segment
118
+ * @param {number} [segmentIndex=0] - Segment path index
119
+ */
120
+ removePoint(index: number, segmentIndex?: number): void;
121
+ /**
122
+ * Insert point coordinates in a path segment
123
+ * @param {Vec3} point3v - Point coordinates
124
+ * @param {number} [index=0] - Index in the path
125
+ * @param {NumberArray4} [color] - Point color
126
+ * @param {number} [segmentIndex=0] - Path segment index
127
+ */
128
+ insertPoint3v(point3v: Vec3, index?: number, color?: NumberArray4, segmentIndex?: number): void;
129
+ /**
130
+ * Append new point in the end of the path.
131
+ * @public
132
+ * @param {Vec3} point3v - New point coordinates.
133
+ * @param {number} [segmentIndex=0] - Path segment index, first by default.
134
+ * @param {NumberArray4} [color] - Point color
135
+ */
136
+ addPoint3v(point3v: Vec3, segmentIndex?: number, color?: NumberArray4): void;
137
+ /**
138
+ * Append new geodetic point in the end of the path.
139
+ * @public
140
+ * @param {LonLat} lonLat - New coordinate.
141
+ * @param {number} [segmentIndex=0] - Path segment index, first by default.
142
+ * @param {NumberArray4} [color] - Point color.
143
+ */
144
+ addPointLonLat(lonLat: LonLat, segmentIndex?: number, color?: NumberArray4): void;
145
+ /**
146
+ * Change path point color
147
+ * @param {NumberArray4} color - New color
148
+ * @param {number} [index=0] - Point index
149
+ * @param {number} [segmentIndex=0] - Path segment index
150
+ */
151
+ setPointColor(color: NumberArray4, index?: number, segmentIndex?: number): void;
152
+ /**
153
+ * Remove multiline path segment
154
+ * @param {number} index - Segment index in multiline
155
+ */
156
+ removePath(index: number): void;
157
+ appendPath3v(path3v: SegmentPath3vExt, pathColors?: NumberArray4[]): void;
158
+ appendPathLonLat(pathLonLat: SegmentPathLonLatExt): void;
159
+ setPathLonLatFast(pathLonLat: SegmentPathLonLatExt[], pathColors?: (SegmentPathColor | NumberArray4)[] | SegmentPathColor | NumberArray4): void;
160
+ setPath3vFast(path3v: SegmentPath3vExt[], pathColors?: (SegmentPathColor | NumberArray4)[] | SegmentPathColor | NumberArray4): void;
161
+ /**
162
+ * Sets Polyline cartesian coordinates.
163
+ * @public
164
+ * @param {SegmentPath3vExt[]} path3v - Polyline path cartesian coordinates. (exactly 3 entries)
165
+ * @param {SegmentPathColor[]} [pathColors] - Polyline path cartesian coordinates. (exactly 3 entries)
166
+ * @param {Boolean} [forceEqual=false] - Makes assigning faster for size equal coordinates array.
167
+ */
168
+ setPath3v(path3v: SegmentPath3vExt[], pathColors?: (SegmentPathColor | NumberArray4)[], forceEqual?: boolean): void;
169
+ setPath3v(path3v: SegmentPath3vExt, pathColors?: SegmentPathColor | NumberArray4, forceEqual?: boolean, segmentIndex?: number): void;
170
+ /**
171
+ * Sets polyline geodetic coordinates.
172
+ * @public
173
+ * @param {SegmentPathLonLat[]} pathLonLat - Polyline path cartesian coordinates.
174
+ * @param {SegmentPathColor[]} pathColors - Polyline path points colors.
175
+ * @param {Boolean} [forceEqual=false] - OPTIMIZATION FLAG: Makes assigning faster for size equal coordinates array.
176
+ */
177
+ setPathLonLat(pathLonLat: SegmentPathLonLatExt[], pathColors?: (SegmentPathColor | NumberArray4)[], forceEqual?: boolean): void;
178
+ setPathLonLat(pathLonLat: SegmentPathLonLatExt, pathColors?: SegmentPathColor | NumberArray4, forceEqual?: boolean, segmentIndex?: number): void;
179
+ /**
180
+ * Sets polyline opacity.
181
+ * @public
182
+ * @param {number} opacity - Opacity.
183
+ */
184
+ setOpacity(opacity: number): void;
185
+ /**
186
+ * Gets polyline opacity.
187
+ * @public
188
+ */
189
+ getOpacity(): number;
190
+ /**
191
+ * Sets Polyline thickness in screen pixels.
192
+ * @public
193
+ * @param {number} altitude - ALtitude value.
194
+ */
195
+ setAltitude(altitude: number): void;
196
+ /**
197
+ * Sets Polyline thickness in screen pixels.
198
+ * @public
199
+ * @param {number} thickness - Thickness.
200
+ */
201
+ setThickness(thickness: number): void;
202
+ /**
203
+ * Sets polyline segment color.
204
+ * @public
205
+ * @param {string} htmlColor - HTML color.
206
+ */
207
+ setColor(htmlColor: string): void;
208
+ setPathTexOffset(texOffset: number, segmentIndex: number): void;
209
+ setPathStrokeSize(strokeSize: number, segmentIndex: number): void;
210
+ setPathTexOffsetSpeed(texOffsetSpeed: number, segmentIndex: number): void;
211
+ /**
212
+ * Sets visibility.
213
+ * @public
214
+ * @param {boolean} visibility - Polyline visibility.
215
+ */
216
+ setVisibility(visibility: boolean): void;
217
+ /**
218
+ * Gets Polyline visibility.
219
+ * @public
220
+ * @returns {boolean} Polyline visibility.
221
+ */
222
+ getVisibility(): boolean;
223
+ setPickingColor3v(color: Vec3): void;
224
+ setPathColors(pathColors: SegmentPathColor[]): void;
225
+ setPathColors(pathColors: SegmentPathColor, segmentIndex: number): void;
226
+ /**
227
+ * Sets polyline color
228
+ * @param {string} htmlColor - HTML color.
229
+ */
230
+ setColorHTML(htmlColor: string): void;
231
+ /**
232
+ * Clear polyline data.
233
+ * @public
234
+ */
235
+ clear(): void;
236
+ /**
237
+ * Removes from an entity.
238
+ * @public
239
+ */
240
+ remove(): void;
241
+ }
242
+ export { Polyline };