@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.
- package/LICENSE.md +218 -4
- package/README.md +33 -18
- package/lib/Deferred.d.ts +2 -2
- package/lib/Events.d.ts +1 -1
- package/lib/Globe.d.ts +22 -11
- package/lib/Object3d.d.ts +18 -15
- package/lib/Popup.d.ts +2 -2
- package/lib/assets/LabelWorker.worker-C24YLEkW.js.map +1 -0
- package/lib/assets/PlainSegmentWorker.worker-DJHXd0bF.js.map +1 -0
- package/lib/assets/TerrainWorker.worker-B4Gp0jCy.js.map +1 -0
- package/lib/bv/index.d.ts +2 -2
- package/lib/camera/Camera.d.ts +320 -33
- package/lib/camera/Frustum.d.ts +136 -15
- package/lib/camera/PlanetCamera.d.ts +114 -11
- package/lib/camera/index.d.ts +2 -2
- package/lib/control/CompassButton.d.ts +2 -2
- package/lib/control/EarthCoordinates.d.ts +5 -2
- package/lib/control/FramebufferPreview.d.ts +20 -4
- package/lib/control/GeoImageDragControl.d.ts +1 -1
- package/lib/control/LayerAnimation.d.ts +2 -2
- package/lib/control/LayerSwitcher.d.ts +3 -0
- package/lib/control/Lighting.d.ts +7 -2
- package/lib/control/Navigation.d.ts +27 -12
- package/lib/control/OrthoSwitcher.d.ts +18 -0
- package/lib/control/SimpleTouchNavigation.d.ts +44 -0
- package/lib/control/Sun.d.ts +4 -2
- package/lib/control/TouchNavigation.d.ts +4 -8
- package/lib/control/atmosphere/Atmosphere.d.ts +2 -0
- package/lib/control/atmosphere/AtmosphereConfig.d.ts +2 -6
- package/lib/control/depthCamera/DepthCamera.d.ts +118 -0
- package/lib/control/depthCamera/DepthCameraHandler.d.ts +25 -0
- package/lib/control/depthCamera/depth_camera.d.ts +2 -0
- package/lib/control/drawing/LineStringDrawingScene.d.ts +1 -0
- package/lib/control/drawing/PolygonDrawingScene.d.ts +14 -14
- package/lib/control/elevationProfile/ElevationProfile.d.ts +1 -1
- package/lib/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
- package/lib/control/elevationProfile/ElevationProfileScene.d.ts +9 -12
- package/lib/control/elevationProfile/ElevationProfileView.d.ts +16 -5
- package/lib/control/entityEditor/CameraEditorView.d.ts +62 -0
- package/lib/control/entityEditor/EntityEditor.d.ts +20 -0
- package/lib/control/entityEditor/EntityEditorDialog.d.ts +38 -0
- package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +28 -12
- package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorView.d.ts} +22 -23
- package/lib/control/entityEditor/ProjectorEditorView.d.ts +31 -0
- package/lib/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +5 -1
- package/lib/control/{geoObjectEditor → entityEditor}/colors.d.ts +2 -2
- package/lib/control/entityTree/EntityTree.d.ts +46 -0
- package/lib/control/entityTree/EntityTreeView.d.ts +24 -0
- package/lib/control/heightRuler/HeightRulerScene.d.ts +3 -2
- package/lib/control/index.d.ts +7 -6
- package/lib/control/ruler/RulerScene.d.ts +8 -8
- package/lib/control/selection/SelectionScene.d.ts +6 -6
- package/lib/control/timeline/TimelineControl.d.ts +19 -2
- package/lib/control/timeline/TimelineModel.d.ts +1 -1
- package/lib/control/timeline/TimelineView.d.ts +52 -13
- package/lib/control/visibleExtent/segment.d.ts +7 -0
- package/lib/ellipsoid/index.d.ts +4 -4
- package/lib/entity/Entity.d.ts +114 -100
- package/lib/entity/EntityCollection.d.ts +140 -72
- package/lib/entity/{BaseBillboard.d.ts → billboard/BaseBillboard.d.ts} +16 -17
- package/lib/entity/{BaseBillboardHandler.d.ts → billboard/BaseBillboardHandler.d.ts} +24 -9
- package/lib/entity/{Billboard.d.ts → billboard/Billboard.d.ts} +11 -7
- package/lib/entity/{BillboardHandler.d.ts → billboard/BillboardHandler.d.ts} +1 -1
- package/lib/entity/{GeoObject.d.ts → geoObject/GeoObject.d.ts} +7 -6
- package/lib/entity/{GeoObjectHandler.d.ts → geoObject/GeoObjectHandler.d.ts} +32 -11
- package/lib/entity/{InstanceData.d.ts → geoObject/InstanceData.d.ts} +18 -13
- package/lib/entity/{Geometry.d.ts → geometry/Geometry.d.ts} +10 -10
- package/lib/entity/{GeometryHandler.d.ts → geometry/GeometryHandler.d.ts} +7 -7
- package/lib/entity/index.d.ts +8 -8
- package/lib/entity/{Label.d.ts → label/Label.d.ts} +12 -13
- package/lib/entity/{LabelHandler.d.ts → label/LabelHandler.d.ts} +31 -7
- package/lib/entity/{LabelWorker.d.ts → label/LabelWorker.d.ts} +3 -3
- package/lib/entity/{PointCloud.d.ts → pointCloud/PointCloud.d.ts} +18 -12
- package/lib/entity/{PointCloudHandler.d.ts → pointCloud/PointCloudHandler.d.ts} +4 -4
- package/lib/entity/polyline/Polyline.d.ts +242 -0
- package/lib/entity/polyline/PolylineBatchRenderer.d.ts +443 -0
- package/lib/entity/{PolylineHandler.d.ts → polyline/PolylineHandler.d.ts} +19 -7
- package/lib/entity/{Ray.d.ts → ray/Ray.d.ts} +29 -9
- package/lib/entity/{RayHandler.d.ts → ray/RayHandler.d.ts} +18 -8
- package/lib/entity/{Strip.d.ts → strip/Strip.d.ts} +21 -17
- package/lib/entity/{StripHandler.d.ts → strip/StripHandler.d.ts} +11 -6
- package/lib/index.d.ts +59 -42
- package/lib/layer/BaseGeoImage.d.ts +20 -17
- package/lib/layer/BaseTileMaterialLayer.d.ts +36 -0
- package/lib/layer/CanvasTiles.d.ts +20 -22
- package/lib/layer/GeoImage.d.ts +1 -1
- package/lib/layer/GeoTexture2d.d.ts +2 -2
- package/lib/layer/KML.d.ts +19 -18
- package/lib/layer/Layer.d.ts +72 -53
- package/lib/layer/Vector.d.ts +106 -37
- package/lib/layer/WMS.d.ts +1 -1
- package/lib/layer/XYZ.d.ts +14 -31
- package/lib/layer/index.d.ts +12 -12
- package/lib/math/Line2.d.ts +10 -1
- package/lib/math/Line3.d.ts +1 -1
- package/lib/math/Mat3.d.ts +3 -13
- package/lib/math/Mat4.d.ts +16 -10
- package/lib/math/Plane.d.ts +1 -1
- package/lib/math/Quat.d.ts +14 -12
- package/lib/math/Ray.d.ts +4 -3
- package/lib/math/Vec2.d.ts +25 -17
- package/lib/math/Vec3.d.ts +33 -31
- package/lib/math/Vec4.d.ts +1 -1
- package/lib/math/coder.d.ts +1 -1
- package/lib/math/index.d.ts +13 -14
- package/lib/mercator.d.ts +4 -4
- package/lib/og.css +2 -1
- package/lib/og.es.js +1 -1
- package/lib/og.es.js.map +1 -1
- package/lib/quadTree/EntityCollectionNode.d.ts +10 -10
- package/lib/quadTree/EntityCollectionsTreeStrategy.d.ts +8 -5
- package/lib/quadTree/QuadTreeStrategy.d.ts +6 -5
- package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
- package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +7 -4
- package/lib/quadTree/equi/EquiEntityCollectionsTreeStrategy.d.ts +3 -0
- package/lib/renderer/AtmosphereDeferredShading.d.ts +12 -0
- package/lib/renderer/IDeferredShadingPass.d.ts +8 -0
- package/lib/renderer/ITransparencyPass.d.ts +8 -0
- package/lib/renderer/PhongDeferredShading.d.ts +18 -0
- package/lib/renderer/Renderer.d.ts +195 -100
- package/lib/renderer/RendererEvents.d.ts +16 -5
- package/lib/renderer/WOITPass.d.ts +14 -0
- package/lib/renderer/cascadeShadows/CascadeShadowManager.d.ts +34 -0
- package/lib/renderer/cascadeShadows/CascadeShadowMap.d.ts +112 -0
- package/lib/renderer/cascadeShadows/cascade_shadow_depth.d.ts +2 -0
- package/lib/renderer/projectors/Projector.d.ts +66 -0
- package/lib/renderer/projectors/ProjectorManager.d.ts +85 -0
- package/lib/renderer/projectors/ProjectorsPass.d.ts +37 -0
- package/lib/renderer/shadows/ShadowManager.d.ts +40 -0
- package/lib/renderer/shadows/ShadowMap.d.ts +21 -0
- package/lib/renderer/textureUnits.d.ts +6 -0
- package/lib/res/fonts/Ephesis-Regular.json +1 -0
- package/lib/res/fonts/Ephesis-Regular.png +0 -0
- package/lib/res/fonts/Karla-Bold.json +1 -0
- package/lib/res/fonts/Karla-Bold.png +0 -0
- package/lib/res/fonts/Karla-Italic.json +1 -0
- package/lib/res/fonts/Karla-Italic.png +0 -0
- package/lib/res/fonts/Karla-Light.json +1 -0
- package/lib/res/fonts/Karla-Light.png +0 -0
- package/lib/res/fonts/Karla-Medium.json +1 -0
- package/lib/res/fonts/Karla-Medium.png +0 -0
- package/lib/res/fonts/Roboto-Regular.json +1 -37147
- package/lib/res/fonts/Roboto-Regular.png +0 -0
- package/lib/res/fonts/arial.json +1 -4321
- package/lib/res/fonts/arial.png +0 -0
- package/lib/res/night-4326.png +0 -0
- package/lib/res/night.png +0 -0
- package/lib/scene/AltitudeNearPlaneStrategy.d.ts +17 -0
- package/lib/scene/Axes.d.ts +4 -3
- package/lib/scene/Planet.d.ts +268 -72
- package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +47 -51
- package/lib/scene/SkyBox.d.ts +7 -4
- package/lib/scene/index.d.ts +2 -2
- package/lib/segment/Segment.d.ts +38 -15
- package/lib/segment/SegmentLonLat.d.ts +0 -1
- package/lib/shadeModeConstants.d.ts +7 -0
- package/lib/shaders/applyDeferredDepth.d.ts +2 -0
- package/lib/shaders/atmos/atmos.d.ts +3 -3
- package/lib/shaders/billboard/billboard.d.ts +4 -3
- package/lib/shaders/common/uniforms.d.ts +27 -0
- package/lib/shaders/deferredShading/deferredShading.d.ts +2 -0
- package/lib/shaders/deferredShading/deferredShadingAtmos.d.ts +3 -0
- package/lib/shaders/depth.d.ts +2 -2
- package/lib/shaders/geo_object/geo_object.d.ts +9 -4
- package/lib/shaders/label/label.d.ts +4 -4
- package/lib/shaders/pointCloud.d.ts +2 -2
- package/lib/shaders/polyline/polyline.d.ts +7 -3
- package/lib/shaders/projectorsPass/projectorsPass.d.ts +2 -0
- package/lib/shaders/ray/ray.d.ts +3 -2
- package/lib/shaders/screenFrame.d.ts +2 -2
- package/lib/shaders/segment/segment.d.ts +7 -0
- package/lib/shaders/skybox.d.ts +2 -2
- package/lib/shaders/strip/strip.d.ts +3 -0
- package/lib/shaders/tone_mapping/toneMapping.d.ts +2 -2
- package/lib/shaders/varianceBlur.d.ts +2 -0
- package/lib/shaders/weightedOITResolve.d.ts +2 -0
- package/lib/terrain/BilTerrain.d.ts +1 -1
- package/lib/terrain/EmptyTerrain.d.ts +6 -7
- package/lib/terrain/GlobusTerrain.d.ts +18 -23
- package/lib/terrain/MapterhornTerrain.d.ts +10 -0
- package/lib/terrain/RgbTerrain.d.ts +19 -8
- package/lib/terrain/index.d.ts +10 -6
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/ui/Button.d.ts +7 -5
- package/lib/ui/ButtonGroup.d.ts +1 -1
- package/lib/ui/Checkbox.d.ts +2 -2
- package/lib/ui/Color.d.ts +7 -4
- package/lib/ui/Dialog.d.ts +30 -3
- package/lib/ui/Input.d.ts +19 -3
- package/lib/ui/Slider.d.ts +5 -2
- package/lib/ui/TitleBarView.d.ts +21 -0
- package/lib/ui/ToggleButton.d.ts +2 -2
- package/lib/ui/View.d.ts +1 -1
- package/lib/ui/icons.d.ts +1 -1
- package/lib/ui/index.d.ts +10 -9
- package/lib/utils/FontAtlas.d.ts +61 -10
- package/lib/utils/GeoImageCreator.d.ts +2 -2
- package/lib/utils/ImagesCacheManager.d.ts +3 -3
- package/lib/utils/Loader.d.ts +2 -2
- package/lib/utils/PlainSegmentWorker.d.ts +2 -2
- package/lib/utils/TerrainWorker.d.ts +2 -2
- package/lib/utils/TextureAtlas.d.ts +7 -2
- package/lib/utils/TextureResourceManager.d.ts +162 -0
- package/lib/utils/VectorTileCreator.d.ts +1 -1
- package/lib/utils/colorSpace.d.ts +9 -0
- package/lib/utils/gltf/gltfParser.d.ts +9 -2
- package/lib/utils/gltf/types.d.ts +24 -5
- package/lib/utils/shared.d.ts +12 -5
- package/lib/utils/textureResourceMeta.d.ts +9 -0
- package/lib/webgl/BaseFramebuffer.d.ts +35 -0
- package/lib/webgl/Framebuffer.d.ts +14 -13
- package/lib/webgl/Handler.d.ts +94 -99
- package/lib/webgl/ShaderProgram.d.ts +190 -0
- package/lib/webgl/index.d.ts +2 -2
- package/lib/webgl/variableHandlers.d.ts +2 -1
- package/package.json +79 -76
- package/lib/assets/LabelWorker.worker-BT1uJgYn.js.map +0 -1
- package/lib/assets/PlainSegmentWorker.worker-CT1cj8jj.js.map +0 -1
- package/lib/assets/TerrainWorker.worker-DmikdfB2.js.map +0 -1
- package/lib/control/CameraFrameComposer.d.ts +0 -19
- package/lib/control/CameraFrameHandler.d.ts +0 -26
- package/lib/control/OldMouseNavigation.d.ts +0 -65
- package/lib/control/ZoomControl.d.ts +0 -28
- package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +0 -28
- package/lib/control/cameraDepthHandler/camera_depth.d.ts +0 -2
- package/lib/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
- package/lib/control/visibleExtent/drawnode.d.ts +0 -7
- package/lib/entity/Polyline.d.ts +0 -417
- package/lib/light/LightSource.d.ts +0 -36
- package/lib/res/fonts/Roboto-Regular.ttf.cfg +0 -1340
- package/lib/res/fonts/Roboto-Regular.ttf.png +0 -0
- package/lib/res/fonts/arial.ttf.cfg +0 -1570
- package/lib/res/fonts/arial.ttf.png +0 -0
- package/lib/scene/BaseNode.d.ts +0 -61
- package/lib/shaders/drawnode/drawnode.d.ts +0 -8
- package/lib/webgl/Program.d.ts +0 -161
- package/lib/webgl/ProgramController.d.ts +0 -87
- /package/lib/control/{geoObjectEditor → entityEditor}/ArrowEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/AxisTrackEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/MoveAxisEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/MovePlaneEntity.d.ts +0 -0
- /package/lib/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
|
@@ -1,47 +1,51 @@
|
|
|
1
|
-
import { BaseNode } from "./BaseNode";
|
|
2
1
|
import { Renderer } from "../renderer/Renderer";
|
|
3
|
-
import {
|
|
4
|
-
import { EntityCollection } from "../entity/EntityCollection";
|
|
2
|
+
import type { EntityCollection } from "../entity/EntityCollection";
|
|
5
3
|
import { Quat } from "../math/Quat";
|
|
6
4
|
import { Vec3 } from "../math/Vec3";
|
|
7
5
|
/**
|
|
8
6
|
* Render node is a logical part of a render mechanism. Represents scene rendering.
|
|
9
|
-
* For example one scene node for rendering the Earth, another one for rendering the Moon, another node for rendering stars etc.
|
|
10
|
-
* Each render node has own model view space defined with matrices(scale, rotation, translation, transformation).
|
|
11
|
-
* There are collections of light sources, entities and so on in the node.
|
|
12
|
-
* Access to the node is renderer.
|
|
7
|
+
* For example, one scene node for rendering the Earth, another one for rendering the Moon, another node for rendering stars etc.
|
|
8
|
+
* Each render node has its own model view space defined with matrices(scale, rotation, translation, transformation).
|
|
9
|
+
* There are collections of light sources, entities, and so on in the node.
|
|
10
|
+
* Access to the node is renderer.scenes[ "Earth"]
|
|
13
11
|
* @class
|
|
14
|
-
* @extends {BaseNode}
|
|
15
12
|
* @param {string} name - Node name.
|
|
16
13
|
*/
|
|
17
|
-
declare class
|
|
14
|
+
declare class Scene {
|
|
15
|
+
static __counter__: number;
|
|
16
|
+
protected __id: number;
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
18
|
+
* Node name.
|
|
19
|
+
* @protected
|
|
20
|
+
* @type {string}
|
|
21
|
+
*/
|
|
22
|
+
protected _name: string;
|
|
23
|
+
/**
|
|
24
|
+
* Top scene tree node pointer.
|
|
20
25
|
* @public
|
|
21
|
-
* @type {
|
|
26
|
+
* @type {Scene}
|
|
22
27
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
topNode: Scene;
|
|
29
|
+
/**
|
|
30
|
+
* Children nodes.
|
|
26
31
|
* @public
|
|
32
|
+
* @type {Array.<Scene>}
|
|
27
33
|
*/
|
|
28
|
-
|
|
29
|
-
protected _isActive: boolean;
|
|
30
|
-
childNodes: RenderNode[];
|
|
34
|
+
childNodes: Scene[];
|
|
31
35
|
/**
|
|
32
|
-
*
|
|
36
|
+
* Parent node pointer.
|
|
33
37
|
* @public
|
|
34
|
-
* @type {
|
|
38
|
+
* @type {Scene}
|
|
35
39
|
*/
|
|
36
|
-
|
|
40
|
+
parentNode: Scene | null;
|
|
37
41
|
/**
|
|
38
|
-
*
|
|
42
|
+
* Assigned renderer.
|
|
39
43
|
* @public
|
|
40
|
-
* @type {
|
|
44
|
+
* @type {Renderer}
|
|
41
45
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
renderer: Renderer | null;
|
|
47
|
+
drawMode: number;
|
|
48
|
+
protected _isActive: boolean;
|
|
45
49
|
/**
|
|
46
50
|
* Entity collection array.
|
|
47
51
|
* @public
|
|
@@ -51,13 +55,15 @@ declare class RenderNode extends BaseNode {
|
|
|
51
55
|
protected _entityCollectionsByDepthOrder: EntityCollection[][];
|
|
52
56
|
protected _pickingId: number;
|
|
53
57
|
constructor(name?: string);
|
|
58
|
+
protected _onDraw: () => void;
|
|
59
|
+
get name(): string;
|
|
54
60
|
getFrameRotation(cartesian: Vec3): Quat;
|
|
55
61
|
/**
|
|
56
62
|
* Adds node to the current hierarchy.
|
|
57
63
|
* @public
|
|
58
|
-
* @type {
|
|
64
|
+
* @type {Scene}
|
|
59
65
|
*/
|
|
60
|
-
addNode(node:
|
|
66
|
+
addNode(node: Scene): void;
|
|
61
67
|
/**
|
|
62
68
|
* Assign render node with renderer.
|
|
63
69
|
* @public
|
|
@@ -69,11 +75,21 @@ declare class RenderNode extends BaseNode {
|
|
|
69
75
|
onremove(): void;
|
|
70
76
|
remove(): void;
|
|
71
77
|
/**
|
|
72
|
-
*
|
|
78
|
+
* Destroy node.
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
destroy(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Clear current node.
|
|
84
|
+
* @protected
|
|
85
|
+
*/
|
|
86
|
+
protected _clear(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Adds an entity collection.
|
|
73
89
|
* @public
|
|
74
90
|
* @param {EntityCollection} entityCollection - Entity collection.
|
|
75
91
|
* @param {boolean} [isHidden] - If it's true that this collection has specific rendering.
|
|
76
|
-
* @returns {
|
|
92
|
+
* @returns {Scene} -
|
|
77
93
|
*/
|
|
78
94
|
addEntityCollection(entityCollection: EntityCollection, isHidden?: boolean): void;
|
|
79
95
|
/**
|
|
@@ -83,23 +99,6 @@ declare class RenderNode extends BaseNode {
|
|
|
83
99
|
*/
|
|
84
100
|
removeEntityCollection(entityCollection: EntityCollection): void;
|
|
85
101
|
updateEntityCollectionsDepthOrder(): void;
|
|
86
|
-
/**
|
|
87
|
-
* Adds point light source.
|
|
88
|
-
* @public
|
|
89
|
-
* @param {LightSource} light - Light source.
|
|
90
|
-
* @returns {RenderNode}
|
|
91
|
-
*/
|
|
92
|
-
addLight(light: LightSource): RenderNode;
|
|
93
|
-
/**
|
|
94
|
-
* Calls render frame node's callback. Used in renderer.
|
|
95
|
-
* @public
|
|
96
|
-
*/
|
|
97
|
-
preDrawNode(): void;
|
|
98
|
-
/**
|
|
99
|
-
* Calls render frame node's callback. Used in renderer.
|
|
100
|
-
* @public
|
|
101
|
-
*/
|
|
102
|
-
drawNode(): void;
|
|
103
102
|
/**
|
|
104
103
|
* Gets render node activity.
|
|
105
104
|
* @public
|
|
@@ -120,10 +119,6 @@ declare class RenderNode extends BaseNode {
|
|
|
120
119
|
setDrawMode(mode: number): void;
|
|
121
120
|
updateBillboardsTexCoords(): void;
|
|
122
121
|
updateStrokeTexCoords(): void;
|
|
123
|
-
frame(): void;
|
|
124
|
-
preFrame(): void;
|
|
125
|
-
protected _preDrawNodes(): void;
|
|
126
|
-
protected _drawNodes(): void;
|
|
127
122
|
drawEntityCollections(ec: EntityCollection[], depthOrder?: number): void;
|
|
128
123
|
/**
|
|
129
124
|
* Draw entity collections picking frame.
|
|
@@ -132,5 +127,6 @@ declare class RenderNode extends BaseNode {
|
|
|
132
127
|
*/
|
|
133
128
|
drawPickingEntityCollections(ec: EntityCollection[]): void;
|
|
134
129
|
protected _entityCollectionPickingCallback(): void;
|
|
130
|
+
isEqual(node: Scene): boolean;
|
|
135
131
|
}
|
|
136
|
-
export {
|
|
132
|
+
export { Scene };
|
package/lib/scene/SkyBox.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Scene } from "./Scene";
|
|
2
2
|
import type { WebGLBufferExt, WebGLTextureExt, Texture3DParams } from "../webgl/Handler";
|
|
3
|
-
declare class SkyBox extends
|
|
3
|
+
declare class SkyBox extends Scene {
|
|
4
4
|
params: Texture3DParams;
|
|
5
|
+
size: number;
|
|
5
6
|
vertexPositionBuffer: WebGLBufferExt | null;
|
|
6
7
|
texture: WebGLTextureExt | null;
|
|
7
|
-
constructor(params: Texture3DParams);
|
|
8
|
+
constructor(params: Texture3DParams, size?: number);
|
|
8
9
|
static createDefault(RESOURCES_URL: string): SkyBox;
|
|
9
10
|
init(): void;
|
|
10
|
-
|
|
11
|
+
onremove(): void;
|
|
12
|
+
setSize(size: number): void;
|
|
13
|
+
protected _onPredraw: () => void;
|
|
11
14
|
protected _createBuffers(): void;
|
|
12
15
|
}
|
|
13
16
|
export { SkyBox };
|
package/lib/scene/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Axes } from "./Axes";
|
|
2
2
|
import { Planet } from "./Planet";
|
|
3
3
|
import { SkyBox } from "./SkyBox";
|
|
4
|
-
import {
|
|
5
|
-
export { Planet, Axes, SkyBox,
|
|
4
|
+
import { Scene } from "./Scene";
|
|
5
|
+
export { Planet, Axes, SkyBox, Scene };
|
package/lib/segment/Segment.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { Material } from "../layer/Material";
|
|
|
11
11
|
import { Node } from "../quadTree/Node";
|
|
12
12
|
import { Planet } from "../scene/Planet";
|
|
13
13
|
import { PlanetCamera } from "../camera/PlanetCamera";
|
|
14
|
-
import {
|
|
14
|
+
import { ShaderProgram } from "../webgl/ShaderProgram";
|
|
15
15
|
import { Proj } from "../proj/Proj";
|
|
16
16
|
import { Sphere } from "../bv/Sphere";
|
|
17
17
|
import type { NumberArray6 } from "../bv/Sphere";
|
|
@@ -147,7 +147,7 @@ declare class Segment {
|
|
|
147
147
|
*/
|
|
148
148
|
terrainExists: boolean;
|
|
149
149
|
/**
|
|
150
|
-
* Means that tree passage
|
|
150
|
+
* Means that tree passage reaches the segment, and the segment terrain is ready.
|
|
151
151
|
* @type {boolean}
|
|
152
152
|
*/
|
|
153
153
|
passReady: boolean;
|
|
@@ -159,23 +159,25 @@ declare class Segment {
|
|
|
159
159
|
terrainVerticesHigh: Float32Array | null;
|
|
160
160
|
terrainVerticesLow: Float32Array | null;
|
|
161
161
|
noDataVertices: Uint8Array | null;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
renderVertices: Float64Array | null;
|
|
163
|
+
renderVerticesHigh: Float32Array | null;
|
|
164
|
+
renderVerticesLow: Float32Array | null;
|
|
165
165
|
normalMapTexture: WebGLTextureExt | null;
|
|
166
166
|
normalMapTextureBias: Float32Array;
|
|
167
167
|
normalMapVertices: Float64Array | null;
|
|
168
|
-
normalMapVerticesHigh: Float32Array | null;
|
|
169
|
-
normalMapVerticesLow: Float32Array | null;
|
|
170
168
|
normalMapNormals: Float32Array | null;
|
|
171
169
|
vertexNormalBuffer: WebGLBufferExt | null;
|
|
172
170
|
vertexPositionBuffer: WebGLBufferExt | null;
|
|
173
171
|
vertexPositionBufferHigh: WebGLBufferExt | null;
|
|
174
172
|
vertexPositionBufferLow: WebGLBufferExt | null;
|
|
175
173
|
vertexTextureCoordBuffer: WebGLBufferExt | null;
|
|
174
|
+
skirtVertexPositionBufferHigh: WebGLBufferExt | null;
|
|
175
|
+
skirtVertexPositionBufferLow: WebGLBufferExt | null;
|
|
176
|
+
skirtIndexBuffer: WebGLBufferExt | null;
|
|
176
177
|
_globalTextureCoordinates: Float32Array;
|
|
177
178
|
_inTheQueue: boolean;
|
|
178
179
|
_appliedNeighborsZoom: [number, number, number, number];
|
|
180
|
+
_appliedNeighborsZoomNodeId: [number, number, number, number];
|
|
179
181
|
_slices: Slice[];
|
|
180
182
|
_indexBuffer: WebGLBufferExt | null;
|
|
181
183
|
readyToEngage: boolean;
|
|
@@ -184,7 +186,18 @@ declare class Segment {
|
|
|
184
186
|
_transitionOpacity: number;
|
|
185
187
|
_transitionTimestamp: number;
|
|
186
188
|
quadTreeStrategy: QuadTreeStrategy;
|
|
189
|
+
_relativeCenter: Vec3;
|
|
190
|
+
_rtcEyePositionHigh: Float32Array;
|
|
191
|
+
_rtcEyePositionLow: Float32Array;
|
|
192
|
+
__doubleToTwoFloats: (pos: Vec3, highPos: Vec3, lowPos: Vec3) => void;
|
|
187
193
|
constructor(node: Node, quadTreeStrategy: QuadTreeStrategy, tileZoom: number, extent: Extent);
|
|
194
|
+
getRTCPosition(pos: Vec3, rtcPositionHigh: Vec3, rtcPositionLow: Vec3): void;
|
|
195
|
+
static recalcRTCVertices: (relativeCenter: Vec3, vertices: Float64Array, verticesHigh: Float32Array, verticesLow: Float32Array) => void;
|
|
196
|
+
setRelativeCenter(c: Vec3): void;
|
|
197
|
+
updateRTCEyePosition(camera: PlanetCamera): void;
|
|
198
|
+
protected _setRTCEyePositionUniforms(gl: WebGL2RenderingContext, shu: {
|
|
199
|
+
[id: string]: WebGLUniformLocation;
|
|
200
|
+
}): void;
|
|
188
201
|
checkZoom(): boolean;
|
|
189
202
|
/**
|
|
190
203
|
* Returns entity terrain point.
|
|
@@ -226,12 +239,14 @@ declare class Segment {
|
|
|
226
239
|
*/
|
|
227
240
|
elevationsNotExists(): void;
|
|
228
241
|
protected _checkEqualization(neighborSide: number, neigborNode: Node): boolean;
|
|
242
|
+
protected _equalizeSide(side: number): void;
|
|
229
243
|
equalize(): void;
|
|
230
244
|
engage(): void;
|
|
231
245
|
_terrainWorkerCallback(data: ITerrainWorkerData): void;
|
|
232
246
|
_normalMapEdgeEqualize(side: number): void;
|
|
233
247
|
applyTerrain(elevations?: number[] | TypedArray | null): void;
|
|
234
248
|
deleteBuffers(): void;
|
|
249
|
+
protected _deleteSkirtBuffers(): void;
|
|
235
250
|
deleteMaterials(): void;
|
|
236
251
|
deleteElevations(): void;
|
|
237
252
|
clearSegment(): void;
|
|
@@ -266,19 +281,27 @@ declare class Segment {
|
|
|
266
281
|
*/
|
|
267
282
|
getMaterialByLayer(layer: Layer): Material | undefined;
|
|
268
283
|
/**
|
|
269
|
-
*
|
|
284
|
+
* Computes cyclic longitude shift for `sourceExtent` to align it with `targetExtent`
|
|
285
|
+
* in wrapped horizontal coordinate space (for example, Web Mercator world copies).
|
|
270
286
|
* @protected
|
|
271
|
-
*
|
|
272
|
-
* @
|
|
273
|
-
*
|
|
287
|
+
* @param {Extent} sourceExtent - Source extent to shift along longitude.
|
|
288
|
+
* @param {Extent} targetExtent - Target extent used as alignment reference.
|
|
289
|
+
* @param {number} worldWidth - Full world width in projection units.
|
|
290
|
+
* @returns {number} Longitude shift to apply to `sourceExtent`.
|
|
274
291
|
*/
|
|
275
|
-
protected
|
|
292
|
+
protected _getCyclicLonShift(sourceExtent: Extent, targetExtent: Extent, worldWidth: number): number;
|
|
276
293
|
initSlice(sliceIndex: number): Slice;
|
|
277
|
-
screenRendering(sh:
|
|
294
|
+
screenRendering(sh: ShaderProgram, layerSlice: Layer[], sliceIndex: number, defaultTexture?: WebGLTextureExt | null, isOverlay?: boolean, forcedOpacity?: number): void;
|
|
278
295
|
increaseTransitionOpacity(): void;
|
|
279
296
|
fadingTransitionOpacity(): void;
|
|
280
|
-
colorPickingRendering(sh:
|
|
281
|
-
|
|
297
|
+
colorPickingRendering(sh: ShaderProgram, layerSlice: Layer[], sliceIndex: number, defaultTexture?: WebGLTextureExt | null, isOverlay?: boolean): void;
|
|
298
|
+
protected _appendSkirtVertexPair(vertices: Float64Array, verticesHigh: Float32Array, verticesLow: Float32Array, vertexIndex: number, out: number): number;
|
|
299
|
+
protected _ensureSkirtBuffers(): boolean;
|
|
300
|
+
protected _drawSkirts(gl: WebGL2RenderingContext, sha: {
|
|
301
|
+
[id: string]: number;
|
|
302
|
+
}): void;
|
|
303
|
+
depthRendering(sh: ShaderProgram, layerSlice?: Layer[], renderSkirts?: boolean): void;
|
|
304
|
+
ensureIndexBuffer(): void;
|
|
282
305
|
protected _getIndexBuffer(): WebGLBufferExt;
|
|
283
306
|
layerOverlap(layer: Layer): boolean;
|
|
284
307
|
getDefaultTexture(): WebGLTextureExt | null;
|
|
@@ -32,7 +32,6 @@ declare class SegmentLonLat extends Segment {
|
|
|
32
32
|
* @todo simplify layer._extentMerc in layer.getNativeExtent(this)
|
|
33
33
|
*
|
|
34
34
|
*/
|
|
35
|
-
protected _getLayerExtentOffset(layer: Layer): [number, number, number, number];
|
|
36
35
|
layerOverlap(layer: Layer): boolean;
|
|
37
36
|
getDefaultTexture(): WebGLTextureExt | null;
|
|
38
37
|
getExtentLonLat(): Extent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const SHADE_UNLIT = 0;
|
|
2
|
+
export declare const SHADE_PHONG = 0.5;
|
|
3
|
+
export declare const SHADE_PBR = 1;
|
|
4
|
+
export type ShadeMode = typeof SHADE_UNLIT | typeof SHADE_PHONG | typeof SHADE_PBR;
|
|
5
|
+
export type ShadeModeString = "none" | "unlit" | "phong" | "pbr";
|
|
6
|
+
export type ShadeModeInput = ShadeMode | ShadeModeString;
|
|
7
|
+
export declare function normalizeShadeMode(mode: ShadeModeInput): ShadeMode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
2
2
|
export interface AtmosphereParameters {
|
|
3
3
|
ATMOS_HEIGHT: number;
|
|
4
4
|
RAYLEIGH_SCALE: number;
|
|
@@ -22,5 +22,5 @@ export interface AtmosphereParameters {
|
|
|
22
22
|
}
|
|
23
23
|
export declare const DEFAULT_PARAMS: AtmosphereParameters;
|
|
24
24
|
export declare const MARS_PARAMS: AtmosphereParameters;
|
|
25
|
-
export declare function transmittance(atmosParams?: AtmosphereParameters):
|
|
26
|
-
export declare function scattering(atmosParams?: AtmosphereParameters):
|
|
25
|
+
export declare function transmittance(atmosParams?: AtmosphereParameters): ShaderProgram;
|
|
26
|
+
export declare function scattering(atmosParams?: AtmosphereParameters): ShaderProgram;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function billboardPicking():
|
|
3
|
-
export declare function billboard_screen():
|
|
1
|
+
import { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
2
|
+
export declare function billboardPicking(): ShaderProgram;
|
|
3
|
+
export declare function billboard_screen(): ShaderProgram;
|
|
4
|
+
export declare function billboard_screen_woit(): ShaderProgram;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const projectorUniforms: {
|
|
2
|
+
u_projectorCount: string;
|
|
3
|
+
u_projectorLayer: string;
|
|
4
|
+
u_projectorViewProjRTE: string;
|
|
5
|
+
u_projectorEyeRel: string;
|
|
6
|
+
u_projectorColor: string;
|
|
7
|
+
u_projectorParams: string;
|
|
8
|
+
u_projectorDepthArray: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const shadowMapUniforms: {
|
|
11
|
+
u_shadowMapCount: string;
|
|
12
|
+
u_shadowMapLayer: string;
|
|
13
|
+
u_shadowMapViewProjRTE: string;
|
|
14
|
+
u_shadowMapEyeRel: string;
|
|
15
|
+
u_shadowMapParams: string;
|
|
16
|
+
u_shadowMapDepthArray: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const cascadeShadowUniforms: {
|
|
19
|
+
u_cascadeShadowCount: string;
|
|
20
|
+
u_cascadeShadowLayer: string;
|
|
21
|
+
u_cascadeShadowViewProjRTE: string;
|
|
22
|
+
u_cascadeShadowEyeRel: string;
|
|
23
|
+
u_cascadeShadowParams: string;
|
|
24
|
+
u_cascadeShadowSplits: string;
|
|
25
|
+
u_cascadeShadowViewForward: string;
|
|
26
|
+
u_cascadeShadowDepthArray: string;
|
|
27
|
+
};
|
package/lib/shaders/depth.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function depth():
|
|
1
|
+
import { ShaderProgram } from "../webgl/ShaderProgram";
|
|
2
|
+
export declare function depth(): ShaderProgram;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
1
|
+
import { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
2
|
+
import type { AtmosphereParameters } from "../atmos/atmos";
|
|
3
|
+
export declare const geo_object_deferred: () => ShaderProgram;
|
|
4
|
+
export declare const geo_object_forward: () => ShaderProgram;
|
|
5
|
+
export declare const geo_object_woit: () => ShaderProgram;
|
|
6
|
+
export declare function geo_object_woit_atmos(atmosParams?: AtmosphereParameters): ShaderProgram;
|
|
7
|
+
export declare const geo_object_picking: () => ShaderProgram;
|
|
8
|
+
export declare const geo_object_depth: () => ShaderProgram;
|
|
9
|
+
export declare const geo_object_depth_camera: () => ShaderProgram;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function label_webgl2():
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function labelPicking():
|
|
1
|
+
import { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
2
|
+
export declare function label_webgl2(): ShaderProgram;
|
|
3
|
+
export declare function label_woit(): ShaderProgram;
|
|
4
|
+
export declare function labelPicking(): ShaderProgram;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function pointCloud():
|
|
1
|
+
import { ShaderProgram } from "../webgl/ShaderProgram";
|
|
2
|
+
export declare function pointCloud(): ShaderProgram;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function
|
|
1
|
+
import { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
2
|
+
export declare function polylineTex(): ShaderProgram;
|
|
3
|
+
export declare function polylinePlain(): ShaderProgram;
|
|
4
|
+
export declare function polylineTexWoit(): ShaderProgram;
|
|
5
|
+
export declare function polylineWoitTex(): ShaderProgram;
|
|
6
|
+
export declare function polylineWoitPlain(): ShaderProgram;
|
|
7
|
+
export declare function polyline_picking(): ShaderProgram;
|
package/lib/shaders/ray/ray.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function rayScreen():
|
|
1
|
+
import { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
2
|
+
export declare function rayScreen(): ShaderProgram;
|
|
3
|
+
export declare function rayScreenWoit(): ShaderProgram;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function screenFrame():
|
|
1
|
+
import { ShaderProgram } from "../webgl/ShaderProgram";
|
|
2
|
+
export declare function screenFrame(): ShaderProgram;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AtmosphereParameters } from "../atmos/atmos";
|
|
2
|
+
import { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
3
|
+
export declare function segment_screen_deferred(): ShaderProgram;
|
|
4
|
+
export declare function segment_screen_wl_forward_noatmos(): ShaderProgram;
|
|
5
|
+
export declare function segment_screen_wl_forward_atmos(atmosParams?: AtmosphereParameters): ShaderProgram;
|
|
6
|
+
export declare function segment_colorPicking(): ShaderProgram;
|
|
7
|
+
export declare function segment_depth(): ShaderProgram;
|
package/lib/shaders/skybox.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function skybox():
|
|
1
|
+
import { ShaderProgram } from "../webgl/ShaderProgram";
|
|
2
|
+
export declare function skybox(): ShaderProgram;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function
|
|
1
|
+
import { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
2
|
+
export declare function toneMappingProgram(operator?: string): ShaderProgram;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GlobusTerrain } from "./GlobusTerrain";
|
|
2
1
|
import type { IGlobusTerrainParams } from "./GlobusTerrain";
|
|
2
|
+
import { GlobusTerrain } from "./GlobusTerrain";
|
|
3
3
|
import { Segment } from "../segment/Segment";
|
|
4
4
|
import { Extent } from "../Extent";
|
|
5
5
|
import type { TypedArray } from "../utils/shared";
|
|
@@ -18,14 +18,13 @@ export type UrlRewriteFunc = (tileX: number, tileY: number, tileZoom: number, ti
|
|
|
18
18
|
* Class represents terrain provider without elevation data.
|
|
19
19
|
* @param {IEmptyTerrainParams} [options] - Provider options:
|
|
20
20
|
* @param {string} [options.name="empty"] - Provider name.
|
|
21
|
-
* @param {boolean} [options.equalizeVertices] -
|
|
21
|
+
* @param {boolean} [options.equalizeVertices=false] - Enables vertex equalization on tile borders.
|
|
22
22
|
* @param {number} [options.minZoom=2] - Minimal visible zoom index when terrain handler works.
|
|
23
|
-
* @param {number} [options.
|
|
23
|
+
* @param {number} [options.maxZoom=19] - Maximal visible zoom index when terrain handler works.
|
|
24
24
|
* @param {number} [options.maxNativeZoom=19] - Maximal available terrain zoom level.
|
|
25
|
-
* @param {Array.<number>} [options.gridSizeByZoom] -
|
|
26
|
-
* @param {
|
|
27
|
-
* @param {
|
|
28
|
-
* @param {string} [options.geoidSrc] -
|
|
25
|
+
* @param {Array.<number>} [options.gridSizeByZoom] - Segment triangulation grid sizes by zoom index.
|
|
26
|
+
* @param {Geoid} [options.geoid] - Geoid model instance.
|
|
27
|
+
* @param {string} [options.geoidSrc] - URL to geoid model source.
|
|
29
28
|
*/
|
|
30
29
|
declare class EmptyTerrain {
|
|
31
30
|
static __counter__: number;
|
|
@@ -107,7 +106,7 @@ declare class EmptyTerrain {
|
|
|
107
106
|
isReady(): boolean;
|
|
108
107
|
abortLoading(): void;
|
|
109
108
|
clearCache(): void;
|
|
110
|
-
getHeightAsync(lonLat: LonLat, callback: (height: number) => void): boolean;
|
|
109
|
+
getHeightAsync(lonLat: LonLat, callback: (height: number) => void, zoom?: number): boolean;
|
|
111
110
|
loadTerrain(segment: Segment, forceLoading?: boolean): void;
|
|
112
111
|
}
|
|
113
112
|
export { EmptyTerrain };
|
|
@@ -29,22 +29,20 @@ type TileData = {
|
|
|
29
29
|
/**
|
|
30
30
|
* Class that loads segment elevation data, converts it to the array and passes it to the planet segment.
|
|
31
31
|
* @class
|
|
32
|
-
* @extends {
|
|
32
|
+
* @extends {EmptyTerrain}
|
|
33
33
|
* @param {string} [name=""] - Terrain provider name.
|
|
34
34
|
* @param {IGlobusTerrainParams} [options] - Provider options:
|
|
35
35
|
* @param {number} [options.minZoom=3] - Minimal visible zoom index when terrain handler works.
|
|
36
|
-
* @param {number} [options.
|
|
37
|
-
* @param {number} [options.
|
|
38
|
-
* @param {string} [options.url="
|
|
39
|
-
* @param {Array.<number>} [options.gridSizeByZoom] -
|
|
36
|
+
* @param {number} [options.maxZoom=14] - Maximal visible zoom index when terrain handler works.
|
|
37
|
+
* @param {number} [options.maxNativeZoom=14] - Maximal available terrain zoom level.
|
|
38
|
+
* @param {string} [options.url="https://{s}.srtm3.openglobus.org/{z}/{y}/{x}.ddm"] - Terrain source URL template.
|
|
39
|
+
* @param {Array.<number>} [options.gridSizeByZoom] - Segment triangulation grid sizes where array index matches segment zoom index.
|
|
40
40
|
* @param {number} [options.plainGridSize=32] - Elevation grid size. Default is 32x32. Must be power of two.
|
|
41
|
-
* @param {
|
|
42
|
-
* @param {
|
|
43
|
-
* @param {Array.<number>} [gridSizeByZoom] - Array of values, where each value corresponds to the size of a tile(or segment) on the globe. Each value must be power of two.
|
|
44
|
-
* @param {number} [heightFactor=1] - Elevation height multiplier.
|
|
41
|
+
* @param {number} [options.heightFactor=1] - Elevation height multiplier.
|
|
42
|
+
* @param {FetchCache} [options.cache="default"] - Fetch cache mode.
|
|
45
43
|
*
|
|
46
|
-
* @fires
|
|
47
|
-
* @fires
|
|
44
|
+
* @fires load
|
|
45
|
+
* @fires loadend
|
|
48
46
|
*/
|
|
49
47
|
declare class GlobusTerrain extends EmptyTerrain {
|
|
50
48
|
events: GlobusTerrainEvents;
|
|
@@ -88,7 +86,7 @@ declare class GlobusTerrain extends EmptyTerrain {
|
|
|
88
86
|
* @public
|
|
89
87
|
* @param {string} url - Url template.
|
|
90
88
|
* @example <caption>Default openglobus url template:</caption>:
|
|
91
|
-
* "
|
|
89
|
+
* "https://{s}.srtm3.openglobus.org/{z}/{y}/{x}.ddm"
|
|
92
90
|
*/
|
|
93
91
|
setUrl(url: string): void;
|
|
94
92
|
/**
|
|
@@ -101,8 +99,8 @@ declare class GlobusTerrain extends EmptyTerrain {
|
|
|
101
99
|
/**
|
|
102
100
|
* Starts to load segment elevation data.
|
|
103
101
|
* @public
|
|
104
|
-
* @param {Segment} segment - Segment that
|
|
105
|
-
* @param {boolean} [forceLoading] -
|
|
102
|
+
* @param {Segment} segment - Segment that requests terrain data.
|
|
103
|
+
* @param {boolean} [forceLoading=false] - Forces loading even if default filter would skip it.
|
|
106
104
|
*/
|
|
107
105
|
loadTerrain(segment: Segment, forceLoading?: boolean): void;
|
|
108
106
|
protected _getSubdomain(): string;
|
|
@@ -110,15 +108,15 @@ declare class GlobusTerrain extends EmptyTerrain {
|
|
|
110
108
|
/**
|
|
111
109
|
* Creates default query url string.
|
|
112
110
|
* @protected
|
|
113
|
-
* @param {Segment} segment -
|
|
114
|
-
* @returns {string}
|
|
111
|
+
* @param {Segment} segment - Segment to create URL for.
|
|
112
|
+
* @returns {string} URL string.
|
|
115
113
|
*/
|
|
116
114
|
protected _createUrl(segment: Segment): string;
|
|
117
115
|
/**
|
|
118
116
|
* Returns actual url query string.
|
|
119
117
|
* @protected
|
|
120
|
-
* @param {Segment} segment - Segment that loads
|
|
121
|
-
* @returns {string}
|
|
118
|
+
* @param {Segment} segment - Segment that loads terrain data.
|
|
119
|
+
* @returns {string} URL string.
|
|
122
120
|
*/
|
|
123
121
|
protected _getHTTPRequestString(segment: Segment): string;
|
|
124
122
|
/**
|
|
@@ -130,7 +128,7 @@ declare class GlobusTerrain extends EmptyTerrain {
|
|
|
130
128
|
/**
|
|
131
129
|
* Converts loaded data to segment elevation data type(column major elevation data array in meters)
|
|
132
130
|
* @public
|
|
133
|
-
* @returns {Array.<number>} -
|
|
131
|
+
* @returns {Array.<number> | TypedArray} Column-major elevation data array in meters.
|
|
134
132
|
*/
|
|
135
133
|
protected _createHeights(data: any, segment?: Segment | null, tileGroup?: number, x?: number, y?: number, z?: number, extent?: Extent, isMaxZoom?: boolean): TypedArray | number[];
|
|
136
134
|
/**
|
|
@@ -138,9 +136,6 @@ declare class GlobusTerrain extends EmptyTerrain {
|
|
|
138
136
|
*/
|
|
139
137
|
protected _applyElevationsData(segment: Segment, elevations: number[] | TypedArray | null): void;
|
|
140
138
|
}
|
|
141
|
-
type GlobusTerrainEventsList = [
|
|
142
|
-
"load",
|
|
143
|
-
"loadend"
|
|
144
|
-
];
|
|
139
|
+
type GlobusTerrainEventsList = ["load", "loadend"];
|
|
145
140
|
type GlobusTerrainEvents = EventsHandler<GlobusTerrainEventsList>;
|
|
146
141
|
export { GlobusTerrain };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RgbTerrain } from "./RgbTerrain";
|
|
2
|
+
import type { IRgbTerrainParams } from "./RgbTerrain";
|
|
3
|
+
/**
|
|
4
|
+
* Mapterhorn Web Mercator RGB terrain (512px WebP tiles, Terrarium encoding).
|
|
5
|
+
* @class
|
|
6
|
+
* @extends {RgbTerrain}
|
|
7
|
+
*/
|
|
8
|
+
export declare class MapterhornTerrain extends RgbTerrain {
|
|
9
|
+
constructor(name?: string | null, options?: IRgbTerrainParams);
|
|
10
|
+
}
|