@openglobus/og 0.28.7 → 1.0.0-rc10

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 (242) hide show
  1. package/LICENSE.md +218 -4
  2. package/README.md +33 -18
  3. package/lib/Deferred.d.ts +2 -2
  4. package/lib/Events.d.ts +1 -1
  5. package/lib/Globe.d.ts +22 -11
  6. package/lib/Object3d.d.ts +18 -15
  7. package/lib/Popup.d.ts +2 -2
  8. package/lib/assets/LabelWorker.worker-C24YLEkW.js.map +1 -0
  9. package/lib/assets/PlainSegmentWorker.worker-DJHXd0bF.js.map +1 -0
  10. package/lib/assets/TerrainWorker.worker-B4Gp0jCy.js.map +1 -0
  11. package/lib/bv/index.d.ts +2 -2
  12. package/lib/camera/Camera.d.ts +320 -33
  13. package/lib/camera/Frustum.d.ts +136 -15
  14. package/lib/camera/PlanetCamera.d.ts +114 -11
  15. package/lib/camera/index.d.ts +2 -2
  16. package/lib/control/CompassButton.d.ts +2 -2
  17. package/lib/control/EarthCoordinates.d.ts +5 -2
  18. package/lib/control/FramebufferPreview.d.ts +20 -4
  19. package/lib/control/GeoImageDragControl.d.ts +1 -1
  20. package/lib/control/LayerAnimation.d.ts +2 -2
  21. package/lib/control/LayerSwitcher.d.ts +3 -0
  22. package/lib/control/Lighting.d.ts +7 -2
  23. package/lib/control/Navigation.d.ts +27 -12
  24. package/lib/control/OrthoSwitcher.d.ts +18 -0
  25. package/lib/control/SimpleTouchNavigation.d.ts +44 -0
  26. package/lib/control/Sun.d.ts +4 -2
  27. package/lib/control/TouchNavigation.d.ts +4 -8
  28. package/lib/control/atmosphere/Atmosphere.d.ts +2 -0
  29. package/lib/control/atmosphere/AtmosphereConfig.d.ts +2 -6
  30. package/lib/control/depthCamera/DepthCamera.d.ts +118 -0
  31. package/lib/control/depthCamera/DepthCameraHandler.d.ts +25 -0
  32. package/lib/control/depthCamera/depth_camera.d.ts +2 -0
  33. package/lib/control/drawing/LineStringDrawingScene.d.ts +1 -0
  34. package/lib/control/drawing/PolygonDrawingScene.d.ts +14 -14
  35. package/lib/control/elevationProfile/ElevationProfile.d.ts +1 -1
  36. package/lib/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
  37. package/lib/control/elevationProfile/ElevationProfileScene.d.ts +9 -12
  38. package/lib/control/elevationProfile/ElevationProfileView.d.ts +16 -5
  39. package/lib/control/entityEditor/CameraEditorView.d.ts +62 -0
  40. package/lib/control/entityEditor/EntityEditor.d.ts +20 -0
  41. package/lib/control/entityEditor/EntityEditorDialog.d.ts +38 -0
  42. package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +28 -12
  43. package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorView.d.ts} +22 -23
  44. package/lib/control/entityEditor/ProjectorEditorView.d.ts +31 -0
  45. package/lib/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +5 -1
  46. package/lib/control/{geoObjectEditor → entityEditor}/colors.d.ts +2 -2
  47. package/lib/control/entityTree/EntityTree.d.ts +46 -0
  48. package/lib/control/entityTree/EntityTreeView.d.ts +24 -0
  49. package/lib/control/heightRuler/HeightRulerScene.d.ts +3 -2
  50. package/lib/control/index.d.ts +7 -6
  51. package/lib/control/ruler/RulerScene.d.ts +8 -8
  52. package/lib/control/selection/SelectionScene.d.ts +6 -6
  53. package/lib/control/timeline/TimelineControl.d.ts +19 -2
  54. package/lib/control/timeline/TimelineModel.d.ts +1 -1
  55. package/lib/control/timeline/TimelineView.d.ts +52 -13
  56. package/lib/control/visibleExtent/segment.d.ts +7 -0
  57. package/lib/ellipsoid/index.d.ts +4 -4
  58. package/lib/entity/Entity.d.ts +114 -100
  59. package/lib/entity/EntityCollection.d.ts +140 -72
  60. package/lib/entity/{BaseBillboard.d.ts → billboard/BaseBillboard.d.ts} +16 -17
  61. package/lib/entity/{BaseBillboardHandler.d.ts → billboard/BaseBillboardHandler.d.ts} +24 -9
  62. package/lib/entity/{Billboard.d.ts → billboard/Billboard.d.ts} +11 -7
  63. package/lib/entity/{BillboardHandler.d.ts → billboard/BillboardHandler.d.ts} +1 -1
  64. package/lib/entity/{GeoObject.d.ts → geoObject/GeoObject.d.ts} +7 -6
  65. package/lib/entity/{GeoObjectHandler.d.ts → geoObject/GeoObjectHandler.d.ts} +32 -11
  66. package/lib/entity/{InstanceData.d.ts → geoObject/InstanceData.d.ts} +18 -13
  67. package/lib/entity/{Geometry.d.ts → geometry/Geometry.d.ts} +10 -10
  68. package/lib/entity/{GeometryHandler.d.ts → geometry/GeometryHandler.d.ts} +7 -7
  69. package/lib/entity/index.d.ts +8 -8
  70. package/lib/entity/{Label.d.ts → label/Label.d.ts} +12 -13
  71. package/lib/entity/{LabelHandler.d.ts → label/LabelHandler.d.ts} +31 -7
  72. package/lib/entity/{LabelWorker.d.ts → label/LabelWorker.d.ts} +3 -3
  73. package/lib/entity/{PointCloud.d.ts → pointCloud/PointCloud.d.ts} +18 -12
  74. package/lib/entity/{PointCloudHandler.d.ts → pointCloud/PointCloudHandler.d.ts} +4 -4
  75. package/lib/entity/polyline/Polyline.d.ts +242 -0
  76. package/lib/entity/polyline/PolylineBatchRenderer.d.ts +443 -0
  77. package/lib/entity/{PolylineHandler.d.ts → polyline/PolylineHandler.d.ts} +19 -7
  78. package/lib/entity/{Ray.d.ts → ray/Ray.d.ts} +29 -9
  79. package/lib/entity/{RayHandler.d.ts → ray/RayHandler.d.ts} +18 -8
  80. package/lib/entity/{Strip.d.ts → strip/Strip.d.ts} +21 -17
  81. package/lib/entity/{StripHandler.d.ts → strip/StripHandler.d.ts} +11 -6
  82. package/lib/index.d.ts +59 -42
  83. package/lib/layer/BaseGeoImage.d.ts +20 -17
  84. package/lib/layer/BaseTileMaterialLayer.d.ts +36 -0
  85. package/lib/layer/CanvasTiles.d.ts +20 -22
  86. package/lib/layer/GeoImage.d.ts +1 -1
  87. package/lib/layer/GeoTexture2d.d.ts +2 -2
  88. package/lib/layer/KML.d.ts +19 -18
  89. package/lib/layer/Layer.d.ts +72 -53
  90. package/lib/layer/Vector.d.ts +106 -37
  91. package/lib/layer/WMS.d.ts +1 -1
  92. package/lib/layer/XYZ.d.ts +14 -31
  93. package/lib/layer/index.d.ts +12 -12
  94. package/lib/math/Line2.d.ts +10 -1
  95. package/lib/math/Line3.d.ts +1 -1
  96. package/lib/math/Mat3.d.ts +3 -13
  97. package/lib/math/Mat4.d.ts +16 -10
  98. package/lib/math/Plane.d.ts +1 -1
  99. package/lib/math/Quat.d.ts +14 -12
  100. package/lib/math/Ray.d.ts +4 -3
  101. package/lib/math/Vec2.d.ts +25 -17
  102. package/lib/math/Vec3.d.ts +33 -31
  103. package/lib/math/Vec4.d.ts +1 -1
  104. package/lib/math/coder.d.ts +1 -1
  105. package/lib/math/index.d.ts +13 -14
  106. package/lib/mercator.d.ts +4 -4
  107. package/lib/og.css +2 -1
  108. package/lib/og.es.js +1 -1
  109. package/lib/og.es.js.map +1 -1
  110. package/lib/quadTree/EntityCollectionNode.d.ts +10 -10
  111. package/lib/quadTree/EntityCollectionsTreeStrategy.d.ts +8 -5
  112. package/lib/quadTree/QuadTreeStrategy.d.ts +6 -5
  113. package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
  114. package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +7 -4
  115. package/lib/quadTree/equi/EquiEntityCollectionsTreeStrategy.d.ts +3 -0
  116. package/lib/renderer/AtmosphereDeferredShading.d.ts +12 -0
  117. package/lib/renderer/IDeferredShadingPass.d.ts +8 -0
  118. package/lib/renderer/ITransparencyPass.d.ts +8 -0
  119. package/lib/renderer/PhongDeferredShading.d.ts +18 -0
  120. package/lib/renderer/Renderer.d.ts +195 -100
  121. package/lib/renderer/RendererEvents.d.ts +16 -5
  122. package/lib/renderer/WOITPass.d.ts +14 -0
  123. package/lib/renderer/cascadeShadows/CascadeShadowManager.d.ts +34 -0
  124. package/lib/renderer/cascadeShadows/CascadeShadowMap.d.ts +112 -0
  125. package/lib/renderer/cascadeShadows/cascade_shadow_depth.d.ts +2 -0
  126. package/lib/renderer/projectors/Projector.d.ts +66 -0
  127. package/lib/renderer/projectors/ProjectorManager.d.ts +85 -0
  128. package/lib/renderer/projectors/ProjectorsPass.d.ts +37 -0
  129. package/lib/renderer/shadows/ShadowManager.d.ts +40 -0
  130. package/lib/renderer/shadows/ShadowMap.d.ts +21 -0
  131. package/lib/renderer/textureUnits.d.ts +6 -0
  132. package/lib/res/fonts/Ephesis-Regular.json +1 -0
  133. package/lib/res/fonts/Ephesis-Regular.png +0 -0
  134. package/lib/res/fonts/Karla-Bold.json +1 -0
  135. package/lib/res/fonts/Karla-Bold.png +0 -0
  136. package/lib/res/fonts/Karla-Italic.json +1 -0
  137. package/lib/res/fonts/Karla-Italic.png +0 -0
  138. package/lib/res/fonts/Karla-Light.json +1 -0
  139. package/lib/res/fonts/Karla-Light.png +0 -0
  140. package/lib/res/fonts/Karla-Medium.json +1 -0
  141. package/lib/res/fonts/Karla-Medium.png +0 -0
  142. package/lib/res/fonts/Roboto-Regular.json +1 -37147
  143. package/lib/res/fonts/Roboto-Regular.png +0 -0
  144. package/lib/res/fonts/arial.json +1 -4321
  145. package/lib/res/fonts/arial.png +0 -0
  146. package/lib/res/night-4326.png +0 -0
  147. package/lib/res/night.png +0 -0
  148. package/lib/scene/AltitudeNearPlaneStrategy.d.ts +17 -0
  149. package/lib/scene/Axes.d.ts +4 -3
  150. package/lib/scene/Planet.d.ts +268 -72
  151. package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +47 -51
  152. package/lib/scene/SkyBox.d.ts +7 -4
  153. package/lib/scene/index.d.ts +2 -2
  154. package/lib/segment/Segment.d.ts +38 -15
  155. package/lib/segment/SegmentLonLat.d.ts +0 -1
  156. package/lib/shadeModeConstants.d.ts +7 -0
  157. package/lib/shaders/applyDeferredDepth.d.ts +2 -0
  158. package/lib/shaders/atmos/atmos.d.ts +3 -3
  159. package/lib/shaders/billboard/billboard.d.ts +4 -3
  160. package/lib/shaders/common/uniforms.d.ts +27 -0
  161. package/lib/shaders/deferredShading/deferredShading.d.ts +2 -0
  162. package/lib/shaders/deferredShading/deferredShadingAtmos.d.ts +3 -0
  163. package/lib/shaders/depth.d.ts +2 -2
  164. package/lib/shaders/geo_object/geo_object.d.ts +9 -4
  165. package/lib/shaders/label/label.d.ts +4 -4
  166. package/lib/shaders/pointCloud.d.ts +2 -2
  167. package/lib/shaders/polyline/polyline.d.ts +7 -3
  168. package/lib/shaders/projectorsPass/projectorsPass.d.ts +2 -0
  169. package/lib/shaders/ray/ray.d.ts +3 -2
  170. package/lib/shaders/screenFrame.d.ts +2 -2
  171. package/lib/shaders/segment/segment.d.ts +7 -0
  172. package/lib/shaders/skybox.d.ts +2 -2
  173. package/lib/shaders/strip/strip.d.ts +3 -0
  174. package/lib/shaders/tone_mapping/toneMapping.d.ts +2 -2
  175. package/lib/shaders/varianceBlur.d.ts +2 -0
  176. package/lib/shaders/weightedOITResolve.d.ts +2 -0
  177. package/lib/terrain/BilTerrain.d.ts +1 -1
  178. package/lib/terrain/EmptyTerrain.d.ts +6 -7
  179. package/lib/terrain/GlobusTerrain.d.ts +18 -23
  180. package/lib/terrain/MapterhornTerrain.d.ts +10 -0
  181. package/lib/terrain/RgbTerrain.d.ts +19 -8
  182. package/lib/terrain/index.d.ts +10 -6
  183. package/lib/tsconfig.tsbuildinfo +1 -1
  184. package/lib/ui/Button.d.ts +7 -5
  185. package/lib/ui/ButtonGroup.d.ts +1 -1
  186. package/lib/ui/Checkbox.d.ts +2 -2
  187. package/lib/ui/Color.d.ts +7 -4
  188. package/lib/ui/Dialog.d.ts +30 -3
  189. package/lib/ui/Input.d.ts +19 -3
  190. package/lib/ui/Slider.d.ts +5 -2
  191. package/lib/ui/TitleBarView.d.ts +21 -0
  192. package/lib/ui/ToggleButton.d.ts +2 -2
  193. package/lib/ui/View.d.ts +1 -1
  194. package/lib/ui/icons.d.ts +1 -1
  195. package/lib/ui/index.d.ts +10 -9
  196. package/lib/utils/FontAtlas.d.ts +61 -10
  197. package/lib/utils/GeoImageCreator.d.ts +2 -2
  198. package/lib/utils/ImagesCacheManager.d.ts +3 -3
  199. package/lib/utils/Loader.d.ts +2 -2
  200. package/lib/utils/PlainSegmentWorker.d.ts +2 -2
  201. package/lib/utils/TerrainWorker.d.ts +2 -2
  202. package/lib/utils/TextureAtlas.d.ts +7 -2
  203. package/lib/utils/TextureResourceManager.d.ts +162 -0
  204. package/lib/utils/VectorTileCreator.d.ts +1 -1
  205. package/lib/utils/colorSpace.d.ts +9 -0
  206. package/lib/utils/gltf/gltfParser.d.ts +9 -2
  207. package/lib/utils/gltf/types.d.ts +24 -5
  208. package/lib/utils/shared.d.ts +12 -5
  209. package/lib/utils/textureResourceMeta.d.ts +9 -0
  210. package/lib/webgl/BaseFramebuffer.d.ts +35 -0
  211. package/lib/webgl/Framebuffer.d.ts +14 -13
  212. package/lib/webgl/Handler.d.ts +94 -99
  213. package/lib/webgl/ShaderProgram.d.ts +190 -0
  214. package/lib/webgl/index.d.ts +2 -2
  215. package/lib/webgl/variableHandlers.d.ts +2 -1
  216. package/package.json +79 -76
  217. package/lib/assets/LabelWorker.worker-BT1uJgYn.js.map +0 -1
  218. package/lib/assets/PlainSegmentWorker.worker-CT1cj8jj.js.map +0 -1
  219. package/lib/assets/TerrainWorker.worker-DmikdfB2.js.map +0 -1
  220. package/lib/control/CameraFrameComposer.d.ts +0 -19
  221. package/lib/control/CameraFrameHandler.d.ts +0 -26
  222. package/lib/control/OldMouseNavigation.d.ts +0 -65
  223. package/lib/control/ZoomControl.d.ts +0 -28
  224. package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +0 -28
  225. package/lib/control/cameraDepthHandler/camera_depth.d.ts +0 -2
  226. package/lib/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
  227. package/lib/control/visibleExtent/drawnode.d.ts +0 -7
  228. package/lib/entity/Polyline.d.ts +0 -417
  229. package/lib/light/LightSource.d.ts +0 -36
  230. package/lib/res/fonts/Roboto-Regular.ttf.cfg +0 -1340
  231. package/lib/res/fonts/Roboto-Regular.ttf.png +0 -0
  232. package/lib/res/fonts/arial.ttf.cfg +0 -1570
  233. package/lib/res/fonts/arial.ttf.png +0 -0
  234. package/lib/scene/BaseNode.d.ts +0 -61
  235. package/lib/shaders/drawnode/drawnode.d.ts +0 -8
  236. package/lib/webgl/Program.d.ts +0 -161
  237. package/lib/webgl/ProgramController.d.ts +0 -87
  238. /package/lib/control/{geoObjectEditor → entityEditor}/ArrowEntity.d.ts +0 -0
  239. /package/lib/control/{geoObjectEditor → entityEditor}/AxisTrackEntity.d.ts +0 -0
  240. /package/lib/control/{geoObjectEditor → entityEditor}/MoveAxisEntity.d.ts +0 -0
  241. /package/lib/control/{geoObjectEditor → entityEditor}/MovePlaneEntity.d.ts +0 -0
  242. /package/lib/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
@@ -23,7 +23,7 @@ export interface ILayerParams {
23
23
  fading?: boolean;
24
24
  height?: number;
25
25
  textureFilter?: string;
26
- isSRGB?: boolean;
26
+ colorSpace?: string | number;
27
27
  pickingEnabled?: boolean;
28
28
  preLoadZoomLevels?: number[];
29
29
  extent?: Extent | [[number, number], [number, number]];
@@ -33,51 +33,67 @@ export interface ILayerParams {
33
33
  shininess?: number;
34
34
  nightTextureCoefficient?: number;
35
35
  iconSrc?: string | null;
36
+ waitForParentMaterial?: boolean;
36
37
  }
37
38
  /**
38
39
  * @class
39
40
  * Base class; normally only used for creating subclasses and not instantiated in apps.
40
41
  * A visual representation of raster or vector map data well known as a layer.
41
42
  * @class
42
- * @param {String} [name="noname"] - Layer name.
43
- * @param {Object} [options] - Layer options:
43
+ * @param {string|null} [name="noname"] - Layer name.
44
+ * @param {ILayerParams} [options={}] - Layer options.
45
+ * @param {*} [options.properties={}] - Custom user properties.
46
+ * @param {number} [options.labelMaxLetters] - Label max letters (reserved for specific layer implementations).
47
+ * @param {boolean} [options.hideInLayerSwitcher=false] - Presence in LayerSwitcher control.
44
48
  * @param {number} [options.opacity=1.0] - Layer opacity.
45
49
  * @param {number} [options.minZoom=0] - Minimal visibility zoom level.
46
- * @param {number} [options.maxZoom=0] - Maximal visibility zoom level.
47
- * @param {string} [options.attribution] - Layer attribution that displayed in the attribution area on the screen.
48
- * @param {boolean} [options.isBaseLayer=false] - This is a base layer.
50
+ * @param {number} [options.maxZoom=50] - Maximal visibility zoom level.
51
+ * @param {string} [options.attribution=""] - Layer attribution shown in the attribution area.
52
+ * @param {number} [options.zIndex=0] - Layer z-index.
53
+ * @param {boolean} [options.isBaseLayer=false] - Base layer flag.
54
+ * @param {Array.<IDefaultTextureParams>} [options.defaultTextures=[null, null]] - Default textures.
49
55
  * @param {boolean} [options.visibility=true] - Layer visibility.
50
- * @param {boolean} [options.hideInLayerSwitcher=false] - Presence of layer in dialog window of LayerSwitcher control.
51
- * @param {boolean} [options.isSRGB=false] - Layer image webgl internal format.
52
- * @param {Extent} [options.extent=[[-180.0, -90.0], [180.0, 90.0]]] - Visible extent.
53
- * @param {string} [options.textureFilter="anisotropic"] - Image texture filter. Available values: "nearest", "linear", "mipmap" and "anisotropic".
54
- * @param {string} [options.icon] - Icon for LayerSwitcher
55
- * @fires EventsHandler<LayerEventsList>#visibilitychange
56
- * @fires EventsHandler<LayerEventsList>#add
57
- * @fires EventsHandler<LayerEventsList>#remove
58
- * @fires EventsHandler<LayerEventsList>#mousemove
59
- * @fires EventsHandler<LayerEventsList>#mouseenter
60
- * @fires EventsHandler<LayerEventsList>#mouseleave
61
- * @fires EventsHandler<LayerEventsList>#lclick
62
- * @fires EventsHandler<LayerEventsList>#rclick
63
- * @fires EventsHandler<LayerEventsList>#mclick
64
- * @fires EventsHandler<LayerEventsList>#ldblclick
65
- * @fires EventsHandler<LayerEventsList>#rdblclick
66
- * @fires EventsHandler<LayerEventsList>#mdblclick
67
- * @fires EventsHandler<LayerEventsList>#lup
68
- * @fires EventsHandler<LayerEventsList>#rup
69
- * @fires EventsHandler<LayerEventsList>#mup
70
- * @fires EventsHandler<LayerEventsList>#ldown
71
- * @fires EventsHandler<LayerEventsList>#rdown
72
- * @fires EventsHandler<LayerEventsList>#mdown
73
- * @fires EventsHandler<LayerEventsList>#lhold
74
- * @fires EventsHandler<LayerEventsList>#rhold
75
- * @fires EventsHandler<LayerEventsList>#mhold
76
- * @fires EventsHandler<LayerEventsList>#mousewheel
77
- * @fires EventsHandler<LayerEventsList>#touchmove
78
- * @fires EventsHandler<LayerEventsList>#touchstart
79
- * @fires EventsHandler<LayerEventsList>#touchend
80
- * @fires EventsHandler<LayerEventsList>#doubletouch
56
+ * @param {boolean} [options.fading=false] - Enables fade-in/fade-out opacity transitions.
57
+ * @param {number} [options.height=0] - Height over the ground.
58
+ * @param {string} [options.textureFilter="mipmap"] - Image texture filter. Available values: "nearest", "linear", "mipmap" and "anisotropic".
59
+ * @param {string|number} [options.colorSpace="srgb"] - Layer color space. Available values: "linear", "srgb", 0, 1.
60
+ * @param {boolean} [options.pickingEnabled=true] - Enables layer picking.
61
+ * @param {number[]} [options.preLoadZoomLevels=[0, 1]] - Zoom levels to preload when layer becomes visible.
62
+ * @param {Extent|Array.<Array.<number>>} [options.extent=[[-180.0, -90.0], [180.0, 90.0]]] - Visible extent.
63
+ * @param {string|NumberArray3|Vec3} [options.ambient] - Ambient color.
64
+ * @param {string|NumberArray3|Vec3} [options.diffuse] - Diffuse color.
65
+ * @param {string|NumberArray3|Vec3} [options.specular] - Specular color.
66
+ * @param {number} [options.shininess=20.0] - Specular shininess coefficient.
67
+ * @param {number} [options.nightTextureCoefficient=1.0] - Night texture blending coefficient.
68
+ * @param {string|null} [options.iconSrc=null] - Icon for LayerSwitcher.
69
+ * @param {boolean} [options.waitForParentMaterial=true] - Wait for parent material while loading current tile material.
70
+ * @fires visibilitychange
71
+ * @fires baselayerchange
72
+ * @fires add
73
+ * @fires remove
74
+ * @fires mousemove
75
+ * @fires mouseenter
76
+ * @fires mouseleave
77
+ * @fires lclick
78
+ * @fires rclick
79
+ * @fires mclick
80
+ * @fires ldblclick
81
+ * @fires rdblclick
82
+ * @fires mdblclick
83
+ * @fires lup
84
+ * @fires rup
85
+ * @fires mup
86
+ * @fires ldown
87
+ * @fires rdown
88
+ * @fires mdown
89
+ * @fires lhold
90
+ * @fires rhold
91
+ * @fires mhold
92
+ * @fires mousewheel
93
+ * @fires touchmove
94
+ * @fires touchstart
95
+ * @fires touchend
96
+ * @fires doubletouch
81
97
  */
82
98
  declare class Layer {
83
99
  static __counter__: number;
@@ -163,7 +179,7 @@ declare class Layer {
163
179
  */
164
180
  _height: number;
165
181
  protected _textureFilter: string;
166
- protected _isSRGB: boolean;
182
+ protected _colorSpace: number;
167
183
  _internalFormat: number | null;
168
184
  /**
169
185
  * Visible degrees extent.
@@ -191,7 +207,9 @@ declare class Layer {
191
207
  _specular: Float32Array | null;
192
208
  isVector: boolean;
193
209
  protected _iconSrc: string | null;
210
+ waitForParentMaterial: boolean;
194
211
  constructor(name?: string | null, options?: ILayerParams);
212
+ static getColorSpace(colorSpace?: string | number): number;
195
213
  get iconSrc(): string | null;
196
214
  set iconSrc(src: string | null);
197
215
  set diffuse(rgb: string | NumberArray3 | Vec3 | null | undefined);
@@ -213,13 +231,13 @@ declare class Layer {
213
231
  * Returns true if a layer has imagery tiles.
214
232
  * @public
215
233
  * @virtual
216
- * @returns {boolean} - Imagery tiles flag.
234
+ * @returns {boolean} Imagery tiles flag.
217
235
  */
218
236
  hasImageryTiles(): boolean;
219
237
  /**
220
238
  * Gets layer identifier.
221
239
  * @public
222
- * @returns {string} - Layer object id.
240
+ * @returns {number} Layer object id.
223
241
  */
224
242
  getID(): number;
225
243
  get id(): number;
@@ -231,7 +249,7 @@ declare class Layer {
231
249
  * Compares layers instances.
232
250
  * @public
233
251
  * @param {Layer} layer - Layer instance to compare.
234
- * @returns {boolean} - Returns true if the layers is the same instance of the input.
252
+ * @returns {boolean} Returns true if the layer is the same instance as the input.
235
253
  */
236
254
  isEqual(layer: Layer): boolean;
237
255
  /**
@@ -255,9 +273,9 @@ declare class Layer {
255
273
  */
256
274
  addTo(planet: Planet): void;
257
275
  /**
258
- * Removes from planet.
276
+ * Removes from a planet.
259
277
  * @public
260
- * @returns {Layer} -This layer.
278
+ * @returns {Layer} This layer.
261
279
  */
262
280
  remove(): this;
263
281
  /**
@@ -272,13 +290,13 @@ declare class Layer {
272
290
  /**
273
291
  * Sets layer attribution text.
274
292
  * @public
275
- * @param {string} html - HTML code that represents layer attribution, it could be just a text.
293
+ * @param {string} html - HTML string that represents layer attribution.
276
294
  */
277
295
  setAttribution(html: string): void;
278
296
  /**
279
297
  * Gets layer attribution.
280
298
  * @public
281
- * @returns {string} Layer attribution
299
+ * @returns {string} Layer attribution.
282
300
  */
283
301
  getAttribution(): string;
284
302
  /**
@@ -290,7 +308,7 @@ declare class Layer {
290
308
  /**
291
309
  * Gets layer height.
292
310
  * @public
293
- * @returns {number} -
311
+ * @returns {number}
294
312
  */
295
313
  getHeight(): number;
296
314
  /**
@@ -302,22 +320,22 @@ declare class Layer {
302
320
  /**
303
321
  * Gets z-index.
304
322
  * @public
305
- * @returns {number} -
323
+ * @returns {number}
306
324
  */
307
325
  getZIndex(): number;
308
326
  /**
309
- * Set zIndex to the maximal value depend on other layers on the planet.
327
+ * Sets z-index to the maximum value relative to other layers on the planet.
310
328
  * @public
311
329
  */
312
330
  bringToFront(): void;
313
331
  /**
314
332
  * Returns true if the layer is a base.
315
333
  * @public
316
- * @returns {boolean} - Base layer flag.
334
+ * @returns {boolean} Base layer flag.
317
335
  */
318
336
  isBaseLayer(): boolean;
319
337
  /**
320
- * Sets base layer type true.
338
+ * Sets base layer type flag.
321
339
  * @public
322
340
  * @param {boolean} isBaseLayer -
323
341
  */
@@ -338,7 +356,7 @@ declare class Layer {
338
356
  /**
339
357
  * Gets layer visibility.
340
358
  * @public
341
- * @returns {boolean} - Layer visibility.
359
+ * @returns {boolean} Layer visibility.
342
360
  */
343
361
  getVisibility(): boolean;
344
362
  /**
@@ -350,13 +368,13 @@ declare class Layer {
350
368
  /**
351
369
  * Gets layer extent.
352
370
  * @public
353
- * @return {Extent} - Layer geodetic extent.
371
+ * @returns {Extent} Layer geodetic extent.
354
372
  */
355
373
  getExtent(): Extent;
356
374
  /**
357
375
  * Gets layer web-mercator extent.
358
376
  * @public
359
- * @return {Extent} - Layer extent.
377
+ * @returns {Extent} Layer extent.
360
378
  */
361
379
  getExtentMerc(): Extent;
362
380
  /**
@@ -384,6 +402,7 @@ declare class Layer {
384
402
  }
385
403
  export type LayerEventsList = [
386
404
  "visibilitychange",
405
+ "baselayerchange",
387
406
  "add",
388
407
  "remove",
389
408
  "mousemove",
@@ -3,16 +3,19 @@ import type { IEntityParams } from "../entity/Entity";
3
3
  import { EntityCollection } from "../entity/EntityCollection";
4
4
  import { EntityCollectionsTreeStrategy } from "../quadTree/EntityCollectionsTreeStrategy";
5
5
  import type { EventsHandler } from "../Events";
6
- import { GeometryHandler } from "../entity/GeometryHandler";
7
- import { Layer } from "./Layer";
8
- import type { ILayerParams, LayerEventsList } from "./Layer";
6
+ import { GeometryHandler } from "../entity/geometry/GeometryHandler";
7
+ import { BaseTileMaterialLayer } from "./BaseTileMaterialLayer";
8
+ import type { IBaseTileMaterialLayerParams } from "./BaseTileMaterialLayer";
9
+ import type { LayerEventsList } from "./Layer";
9
10
  import type { NumberArray3 } from "../math/Vec3";
10
11
  import { Planet } from "../scene/Planet";
11
12
  import { Material } from "./Material";
13
+ import { Segment } from "../segment/Segment";
12
14
  import type { NumberArray4 } from "../math/Vec4";
13
- export interface IVectorParams extends ILayerParams {
15
+ import { type ShadeMode, type ShadeModeInput } from "../shadeModeConstants";
16
+ export interface IVectorParams extends IBaseTileMaterialLayerParams {
14
17
  entities?: Entity[] | IEntityParams[];
15
- polygonOffsetUnits?: number;
18
+ depthOffset?: number;
16
19
  nodeCapacity?: number;
17
20
  relativeToGround?: boolean;
18
21
  clampToGround?: boolean;
@@ -20,8 +23,12 @@ export interface IVectorParams extends ILayerParams {
20
23
  pickingScale?: number | NumberArray3;
21
24
  scaleByDistance?: NumberArray3;
22
25
  labelMaxLetters?: number;
23
- useLighting?: boolean;
26
+ shadeMode?: ShadeModeInput;
24
27
  depthOrder?: number;
28
+ disableCullFace?: boolean;
29
+ receiveProjectors?: boolean;
30
+ receiveFrameTransparency?: boolean;
31
+ receiveShadows?: boolean;
25
32
  }
26
33
  type VectorEventsList = [
27
34
  "draw",
@@ -30,39 +37,52 @@ type VectorEventsList = [
30
37
  ];
31
38
  export type VectorEventsType = EventsHandler<VectorEventsList> & EventsHandler<LayerEventsList>;
32
39
  /**
33
- * Vector layer represents alternative entities store. Used for geospatial data rendering like
34
- * points, lines, polygons, geometry objects etc.
40
+ * Vector layer is an alternative entity storage. Used for geospatial data rendering like
41
+ * points, lines, polygons, geometry objects, etc.
35
42
  * @class
36
43
  * @extends {Layer}
37
44
  * @param {string} [name="noname"] - Layer name.
38
45
  * @param {IVectorParams} [options] - Layer options:
39
- * @param {number} [options.minZoom=0] - Minimal visible zoom. 0 is default
40
- * @param {number} [options.maxZoom=50] - Maximal visible zoom. 50 is default.
46
+ * @param {number} [options.minZoom=0] - Minimal visible zoom.
47
+ * @param {number} [options.maxZoom=50] - Maximal visible zoom.
41
48
  * @param {string} [options.attribution] - Layer attribution.
42
- * @param {string} [options.zIndex=0] - Layer Z-order index. 0 is default.
43
- * @param {boolean} [options.visibility=true] - Layer visibility. True is default.
44
- * @param {boolean} [options.isBaseLayer=false] - Layer base layer. False is default.
45
- * @param {Array.<Entity>} [options.entities] - Entities array.
49
+ * @param {number} [options.zIndex=0] - Layer Z-order index.
50
+ * @param {boolean} [options.visibility=true] - Layer visibility.
51
+ * @param {boolean} [options.isBaseLayer=false] - Layer base layer.
52
+ * @param {number} [options.opacity=1.0] - Layer opacity.
53
+ * @param {boolean} [options.pickingEnabled=true] - Enables/disables picking.
54
+ * @param {boolean} [options.fading=false] - Enables layer fade-in/fade-out transition logic.
55
+ * @param {number} [options.height=0] - Layer height level used for rendering order.
56
+ * @param {Array.<Entity|IEntityParams>} [options.entities] - Entities array or entity init params.
46
57
  * @param {Array.<number>} [options.scaleByDistance] - Scale by distance parameters. (exactly 3 entries)
47
58
  * First index - near distance to the entity, after entity becomes full scale.
48
59
  * Second index - far distance to the entity, when entity becomes zero scale.
49
60
  * Third index - far distance to the entity, when entity becomes invisible.
50
- * Use [1.0, 1.0, 1.0] for real sized objects
51
- * @param {number} [options.nodeCapacity=30] - Maximum entities quantity in the tree node. Rendering optimization parameter. 30 is default.
52
- * @param {boolean} [options.async=true] - Asynchronous vector data handling before rendering. True for optimization huge data.
53
- * @param {boolean} [options.clampToGround = false] - Clamp vector data to the ground.
54
- * @param {boolean} [options.relativeToGround = false] - Place vector data relative to the ground relief.
55
- * @param {Number} [options.polygonOffsetUnits=0.0] - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset.
61
+ * Default is `[MAX32, MAX32, MAX32]` (no distance scaling).
62
+ * @param {number|Array.<number>} [options.pickingScale=[1,1,1]] - Picking scale value or xyz scale array.
63
+ * @param {number} [options.nodeCapacity=60] - Maximum entities quantity in a quadtree node.
64
+ * @param {boolean} [options.async=true] - Asynchronous vector data handling before rendering.
65
+ * @param {boolean} [options.clampToGround=false] - Clamp vector data to the ground.
66
+ * @param {boolean} [options.relativeToGround=false] - Place vector data relative to the ground relief.
67
+ * @param {number} [options.labelMaxLetters=24] - Maximum label letters per line for label entities.
68
+ * @param {Number} [options.depthOffset=0.0] - Signed world-space depth offset along the camera ray.
69
+ * Negative values move geometry closer to the camera, positive values move it farther.
70
+ * @param {number|string} [options.shadeMode=1] - Geo object shading: 0/none unlit, 0.5/phong, 1/pbr.
71
+ * @param {number} [options.depthOrder=0] - Rendering order group for vector collections.
72
+ * @param {boolean} [options.disableCullFace=false] - Disables back-face culling for geo object rendering.
73
+ * @param {boolean} [options.receiveProjectors=true] - Enables/disables projector effect reception for this layer entities.
74
+ * @param {boolean} [options.receiveFrameTransparency=false] - Enables/disables frame transparency reception for this layer entities.
75
+ * @param {boolean} [options.receiveShadows=true] - Enables/disables shadow map reception for this layer entities.
56
76
  *
57
- * //@fires EventsHandler<VectorEventsList>#entitymove
58
- * @fires EventsHandler<VectorEventsList>#draw
59
- * @fires EventsHandler<VectorEventsList>#add
60
- * @fires EventsHandler<VectorEventsList>#remove
61
- * @fires EventsHandler<VectorEventsList>#entityadd
62
- * @fires EventsHandler<VectorEventsList>#entityremove
63
- * @fires EventsHandler<VectorEventsList>#visibilitychange
77
+ * //@fires entitymove
78
+ * @fires draw
79
+ * @fires add
80
+ * @fires remove
81
+ * @fires entityadd
82
+ * @fires entityremove
83
+ * @fires visibilitychange
64
84
  */
65
- declare class Vector extends Layer {
85
+ declare class Vector extends BaseTileMaterialLayer {
66
86
  events: VectorEventsType;
67
87
  protected _depthOrder: number;
68
88
  /**
@@ -105,22 +125,67 @@ declare class Vector extends Layer {
105
125
  /** todo: combine into one */
106
126
  protected _stripEntityCollection: EntityCollection;
107
127
  protected _polylineEntityCollection: EntityCollection;
108
- protected _geoObjectEntityCollection: EntityCollection;
128
+ _geoObjectEntityCollection: EntityCollection;
109
129
  _geometryHandler: GeometryHandler;
110
130
  protected _entityCollectionsTreeStrategy: EntityCollectionsTreeStrategy | null;
111
131
  /**
112
- * Specifies the scale Units for gl.polygonOffset function to calculate depth values, 0.0 is default.
132
+ * Signed world-space depth offset along the camera ray.
133
+ * Negative values move geometry closer to the camera, positive values move it farther.
134
+ * 0.0 means no offset.
113
135
  * @public
114
136
  * @type {Number}
115
137
  */
116
- polygonOffsetUnits: number;
138
+ depthOffset: number;
117
139
  protected _labelMaxLetters: number;
118
- protected _useLighting: boolean;
140
+ protected _shadeMode: ShadeMode;
141
+ protected _disableCullFace: boolean;
142
+ protected _receiveProjectors: boolean;
143
+ protected _receiveFrameTransparency: boolean;
144
+ protected _receiveShadows: boolean;
119
145
  constructor(name?: string | null, options?: IVectorParams);
120
146
  get depthOrder(): number;
121
147
  set depthOrder(d: number);
122
- get useLighting(): boolean;
123
- set useLighting(f: boolean);
148
+ get shadeMode(): ShadeMode;
149
+ set shadeMode(m: ShadeModeInput);
150
+ get disableCullFace(): boolean;
151
+ set disableCullFace(v: boolean);
152
+ /**
153
+ * Gets projector effect reception state for this vector layer entities.
154
+ * @public
155
+ * @returns {boolean}
156
+ */
157
+ get receiveProjectors(): boolean;
158
+ /**
159
+ * Enables/disables projector effect reception for this vector layer entities.
160
+ * @public
161
+ * @param {boolean} v - `true` to receive projector effects, `false` to ignore them.
162
+ */
163
+ set receiveProjectors(v: boolean);
164
+ /**
165
+ * Gets frame transparency reception state for this vector layer entities.
166
+ * @public
167
+ * @returns {boolean}
168
+ */
169
+ get receiveFrameTransparency(): boolean;
170
+ /**
171
+ * Enables/disables frame transparency reception for this vector layer entities.
172
+ * @public
173
+ * @param {boolean} v - `true` to receive frame transparency, `false` to ignore it.
174
+ */
175
+ set receiveFrameTransparency(v: boolean);
176
+ /**
177
+ * Gets shadow map reception state for this vector layer entities.
178
+ * @public
179
+ * @returns {boolean}
180
+ */
181
+ get receiveShadows(): boolean;
182
+ /**
183
+ * Enables/disables shadow map reception for this vector layer entities.
184
+ * Stored in the same material flags channel as projectors and frame transparency.
185
+ * @public
186
+ * @param {boolean} v - `true` to receive shadow map effects, `false` to ignore them.
187
+ */
188
+ set receiveShadows(v: boolean);
124
189
  get labelMaxLetters(): number;
125
190
  get instanceName(): string;
126
191
  protected _bindPicking(): void;
@@ -134,7 +199,7 @@ declare class Vector extends Layer {
134
199
  /**
135
200
  * Returns stored entities.
136
201
  * @public
137
- * @returns {Array.<Entity>} -
202
+ * @returns {Array.<Entity>} Stored entities.
138
203
  */
139
204
  getEntities(): Entity[];
140
205
  /**
@@ -169,7 +234,7 @@ declare class Vector extends Layer {
169
234
  */
170
235
  removeEntity(entity: Entity): this;
171
236
  /**
172
- * Set layer picking events active.
237
+ * Sets layer picking events active.
173
238
  * @public
174
239
  * @param {boolean} picking - Picking enable flag.
175
240
  */
@@ -221,7 +286,7 @@ declare class Vector extends Layer {
221
286
  * @virtual
222
287
  * @param {Material} material - Current material.
223
288
  */
224
- loadMaterial(material: Material): void;
289
+ loadMaterial(material: Material, _forceLoading?: boolean): void;
225
290
  /**
226
291
  * Abort exact material loading.
227
292
  * @public
@@ -230,6 +295,10 @@ declare class Vector extends Layer {
230
295
  */
231
296
  abortMaterialLoading(material: Material): void;
232
297
  applyMaterial(material: Material): NumberArray4;
298
+ protected _allowsLoadWithoutPassReady(): boolean;
299
+ protected _hasParentMaterial(psegm: Material): boolean;
300
+ protected _onParentMaterialApplied(material: Material, psegm: Material): void;
301
+ protected _applyNoParentMaterial(material: Material, segment: Segment): void;
233
302
  clearMaterial(material: Material): void;
234
303
  update(): void;
235
304
  }
@@ -18,7 +18,7 @@ interface IWMSParams extends IXYZParams {
18
18
  * @param {number} [options.opacity=1.0] - Layer opacity.
19
19
  * @param {number} [options.minZoom=0] - Minimal visibility zoom level.
20
20
  * @param {number} [options.maxZoom=0] - Maximal visibility zoom level.
21
- * @param {string} [options.attribution] - Layer attribution that displayed in the attribution area on the screen.
21
+ * @param {string} [options.attribution] - Layer attribution shown in the attribution area.
22
22
  * @param {boolean} [options.isBaseLayer=false] - Base layer flag.
23
23
  * @param {boolean} [options.visibility=true] - Layer visibility.
24
24
  * @param {string} options.url - WMS url source.
@@ -1,11 +1,11 @@
1
- import { Layer } from "./Layer";
2
- import type { ILayerParams, LayerEventsList } from "./Layer";
1
+ import { BaseTileMaterialLayer } from "./BaseTileMaterialLayer";
2
+ import type { IBaseTileMaterialLayerParams } from "./BaseTileMaterialLayer";
3
+ import type { LayerEventsList } from "./Layer";
3
4
  import { Segment } from "../segment/Segment";
4
5
  import type { EventsHandler } from "../Events";
5
6
  import { Material } from "./Material";
6
- import type { NumberArray4 } from "../math/Vec4";
7
7
  import type { FetchCache } from "../utils/Loader";
8
- export interface IXYZParams extends ILayerParams {
8
+ export interface IXYZParams extends IBaseTileMaterialLayerParams {
9
9
  url?: string;
10
10
  subdomains?: string[];
11
11
  minNativeZoom?: number;
@@ -18,10 +18,7 @@ export interface IXYZParams extends ILayerParams {
18
18
  */
19
19
  cache?: FetchCache;
20
20
  }
21
- type XYZEventsList = [
22
- "load",
23
- "loadend"
24
- ];
21
+ type XYZEventsList = ["load", "loadend"];
25
22
  type XYZEventsType = EventsHandler<XYZEventsList> & EventsHandler<LayerEventsList>;
26
23
  /**
27
24
  * Represents an imagery tiles source provider.
@@ -35,16 +32,16 @@ type XYZEventsType = EventsHandler<XYZEventsList> & EventsHandler<LayerEventsLis
35
32
  * @param {number} [options.maxZoom=0] - Maximal visibility zoom level.
36
33
  * @param {number} [options.minNativeZoom=0] - Minimal available zoom level.
37
34
  * @param {number} [options.maxNativeZoom=19] - Maximal available zoom level.
38
- * @param {string} [options.attribution] - Layer attribution that displayed in the attribution area on the screen.
35
+ * @param {string} [options.attribution] - Layer attribution shown in the attribution area.
39
36
  * @param {boolean} [options.isBaseLayer=false] - Base layer flag.
40
37
  * @param {boolean} [options.visibility=true] - Layer visibility.
41
38
  * @param {string} [options.crossOrigin=true] - If true, all tiles will have their crossOrigin attribute set to ''.
42
39
  * @param {string} options.url - Tile url source template(see example below).
43
- * @param {string} options.textureFilter - texture gl filter. NEAREST, LINEAR, MIPMAP, ANISOTROPIC.
44
- * @param {Function} options.urlRewrite - Url rewrite function.
40
+ * @param {string} options.textureFilter - Texture WebGL filter: NEAREST, LINEAR, MIPMAP, ANISOTROPIC.
41
+ * @param {Function} options.urlRewrite - URL rewrite function.
45
42
  *
46
- * @fires EventsHandler<XYZEventsList>#load
47
- * @fires EventsHandler<XYZEventsList>#loadend
43
+ * @fires load
44
+ * @fires loadend
48
45
  *
49
46
  * @example <caption>Creates OpenStreetMap base tile layer</caption>
50
47
  * new og.layer.XYZ("OpenStreetMap", {
@@ -54,7 +51,7 @@ type XYZEventsType = EventsHandler<XYZEventsList> & EventsHandler<LayerEventsLis
54
51
  * attribution: 'Data @ <a href="http://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="http://www.openstreetmap.org/copyright">ODbL</a>'
55
52
  * });
56
53
  */
57
- export declare class XYZ extends Layer {
54
+ export declare class XYZ extends BaseTileMaterialLayer {
58
55
  events: XYZEventsType;
59
56
  /**
60
57
  * Tile url source template.
@@ -66,24 +63,12 @@ export declare class XYZ extends Layer {
66
63
  * @protected
67
64
  */
68
65
  protected _s: string[];
69
- /**
70
- * Minimal native zoom level when tiles are available.
71
- * @public
72
- * @type {number}
73
- */
74
- minNativeZoom: number;
75
- /**
76
- * Maximal native zoom level when tiles are available.
77
- * @public
78
- * @type {number}
79
- */
80
- maxNativeZoom: number;
81
66
  /**
82
67
  * Rewrites imagery tile url query.
83
68
  * @private
84
69
  * @param {Segment} segment - Segment to load.
85
70
  * @param {string} url - Created url.
86
- * @returns {string} - Url query string.
71
+ * @returns {string} URL query string.
87
72
  */
88
73
  protected _urlRewriteCallback: Function | null;
89
74
  protected _requestsPeerSubdomains: number;
@@ -130,7 +115,7 @@ export declare class XYZ extends Layer {
130
115
  * @protected
131
116
  * @virtual
132
117
  * @param {Segment} segment - Creates specific url for current segment.
133
- * @returns {string} - Returns url string.
118
+ * @returns {string} URL string.
134
119
  */
135
120
  protected _createUrl(segment: Segment): string;
136
121
  protected _getSubdomain(): string;
@@ -138,7 +123,7 @@ export declare class XYZ extends Layer {
138
123
  * Returns actual url query string.
139
124
  * @protected
140
125
  * @param {Segment} segment - Segment that loads image data.
141
- * @returns {string} - Url string.
126
+ * @returns {string} URL string.
142
127
  */
143
128
  protected _getHTTPRequestString(segment: Segment): any;
144
129
  /**
@@ -147,8 +132,6 @@ export declare class XYZ extends Layer {
147
132
  * @param {Function} ur - The callback that returns tile custom created url.
148
133
  */
149
134
  setUrlRewriteCallback(ur: Function): void;
150
- applyMaterial(material: Material, forceLoading?: boolean): NumberArray4;
151
- clearMaterial(material: Material): void;
152
135
  /**
153
136
  * @protected
154
137
  */
@@ -1,12 +1,12 @@
1
- export * from './CanvasTiles';
2
- export * from './GeoImage';
3
- export * from './GeoTexture2d';
4
- export * from './GeoVideo';
5
- export * from './KML';
6
- export * from './Layer';
7
- export * from './Vector';
8
- export * from './WMS';
9
- export * from './XYZ';
10
- export * from './Material';
11
- export * from './OpenStreetMap';
12
- export * from './Bing';
1
+ export * from "./CanvasTiles";
2
+ export * from "./GeoImage";
3
+ export * from "./GeoTexture2d";
4
+ export * from "./GeoVideo";
5
+ export * from "./KML";
6
+ export * from "./Layer";
7
+ export * from "./Vector";
8
+ export * from "./WMS";
9
+ export * from "./XYZ";
10
+ export * from "./Material";
11
+ export * from "./OpenStreetMap";
12
+ export * from "./Bing";
@@ -1,4 +1,4 @@
1
- import { Vec2 } from './Vec2';
1
+ import { Vec2 } from "./Vec2";
2
2
  export declare class Line2 {
3
3
  a: number;
4
4
  b: number;
@@ -7,5 +7,14 @@ export declare class Line2 {
7
7
  static get(p0: Vec2, p1: Vec2): Line2;
8
8
  static getParallel(l: Line2, p: Vec2): Line2;
9
9
  static getIntersection(L0: Line2, L1: Line2): Vec2;
10
+ static getSegmentCircleIntersectionInto(p0: Vec2, p1: Vec2, center: Vec2, radius: number, out0: Vec2, out1: Vec2): 0 | 1 | 2;
11
+ static getSegmentCircleIntersection(p0: Vec2, p1: Vec2, center: Vec2, radius: number): [] | [Vec2] | [Vec2, Vec2];
10
12
  intersects(l: Line2): Vec2;
13
+ /**
14
+ * Finds the intersection of the line with a circle.
15
+ * @param {Vec2} center - Circle center.
16
+ * @param {number} radius - Circle radius.
17
+ * @returns {[Vec2] | [Vec2, Vec2] | []}
18
+ */
19
+ getCircleIntersection(center: Vec2, radius: number): [] | [Vec2] | [Vec2, Vec2];
11
20
  }
@@ -1,5 +1,5 @@
1
1
  import { Sphere } from "../bv/Sphere";
2
- import { Vec3 } from './Vec3';
2
+ import { Vec3 } from "./Vec3";
3
3
  /**
4
4
  * @todo: write tests
5
5
  * @class Line3