@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
|
Binary file
|
package/lib/res/night-4326.png
CHANGED
|
Binary file
|
package/lib/res/night.png
CHANGED
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PlanetCamera } from "../camera/PlanetCamera";
|
|
2
|
+
export interface INearPlaneStrategy {
|
|
3
|
+
applyNear(camera: PlanetCamera): void;
|
|
4
|
+
}
|
|
5
|
+
export interface IAltitudeNearPlaneRule {
|
|
6
|
+
maxAltitude: number;
|
|
7
|
+
near: number;
|
|
8
|
+
}
|
|
9
|
+
export interface IAltitudeNearPlaneStrategyParams {
|
|
10
|
+
rules?: IAltitudeNearPlaneRule[];
|
|
11
|
+
}
|
|
12
|
+
export declare class AltitudeNearPlaneStrategy implements INearPlaneStrategy {
|
|
13
|
+
protected readonly _rules: IAltitudeNearPlaneRule[];
|
|
14
|
+
constructor(params?: IAltitudeNearPlaneStrategyParams);
|
|
15
|
+
applyNear(camera: PlanetCamera): void;
|
|
16
|
+
protected _resolveNear(altitude: number): number;
|
|
17
|
+
}
|
package/lib/scene/Axes.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Scene } from "./Scene";
|
|
2
2
|
import type { WebGLBufferExt } from "../webgl/Handler";
|
|
3
|
-
declare class Axes extends
|
|
3
|
+
declare class Axes extends Scene {
|
|
4
4
|
size: number;
|
|
5
5
|
axesBuffer: WebGLBufferExt | null;
|
|
6
6
|
axesColorBuffer: WebGLBufferExt | null;
|
|
7
7
|
constructor(size?: number);
|
|
8
8
|
init(): void;
|
|
9
|
-
|
|
9
|
+
onremove(): void;
|
|
10
|
+
forward: () => void;
|
|
10
11
|
createAxesBuffer(gridSize: number): void;
|
|
11
12
|
}
|
|
12
13
|
export { Axes };
|
package/lib/scene/Planet.d.ts
CHANGED
|
@@ -20,17 +20,19 @@ import { IPlanetFlyCartesianParams, PlanetCamera } from "../camera/PlanetCamera"
|
|
|
20
20
|
import { Quat } from "../math/Quat";
|
|
21
21
|
import { QuadTreeStrategy } from "../quadTree/QuadTreeStrategy";
|
|
22
22
|
import { Ray } from "../math/Ray";
|
|
23
|
-
import {
|
|
23
|
+
import { type INearPlaneStrategy } from "./AltitudeNearPlaneStrategy";
|
|
24
|
+
import { Scene } from "./Scene";
|
|
24
25
|
import { Sun } from "../control/Sun";
|
|
25
26
|
import { TerrainWorker } from "../utils/TerrainWorker";
|
|
26
27
|
import { Vec2, Vec3 } from "../math/index";
|
|
27
|
-
import type { NumberArray2,
|
|
28
|
+
import type { NumberArray2, NumberArray4 } from "../math/index";
|
|
28
29
|
import { Vector } from "../layer/Vector";
|
|
29
30
|
import { VectorTileCreator } from "../utils/VectorTileCreator";
|
|
30
31
|
import type { WebGLBufferExt, WebGLTextureExt, IDefaultTextureParams } from "../webgl/Handler";
|
|
31
|
-
import {
|
|
32
|
+
import { ShaderProgram } from "../webgl/ShaderProgram";
|
|
32
33
|
import { Segment } from "../segment/Segment";
|
|
33
34
|
import type { AtmosphereParameters } from "../shaders/atmos/atmos";
|
|
35
|
+
import { type ShadeMode, type ShadeModeInput } from "../shadeModeConstants";
|
|
34
36
|
export interface IPlanetParams {
|
|
35
37
|
name?: string;
|
|
36
38
|
ellipsoid?: Ellipsoid;
|
|
@@ -41,10 +43,6 @@ export interface IPlanetParams {
|
|
|
41
43
|
minEqualZoomAltitude?: number;
|
|
42
44
|
minEqualZoomCameraSlope?: number;
|
|
43
45
|
quadTreeStrategyPrototype?: typeof QuadTreeStrategy;
|
|
44
|
-
ambient?: string | NumberArray3 | Vec3;
|
|
45
|
-
diffuse?: string | NumberArray3 | Vec3;
|
|
46
|
-
specular?: string | NumberArray3 | Vec3;
|
|
47
|
-
shininess?: number;
|
|
48
46
|
nightTextureSrc?: string | null;
|
|
49
47
|
specularTextureSrc?: string | null;
|
|
50
48
|
maxGridSize?: number;
|
|
@@ -53,9 +51,13 @@ export interface IPlanetParams {
|
|
|
53
51
|
transitionOpacityEnabled?: boolean;
|
|
54
52
|
atmosphereParameters?: IAtmosphereParams;
|
|
55
53
|
minDistanceBeforeMemClear?: number;
|
|
54
|
+
disableMemClear?: boolean;
|
|
56
55
|
vectorTileSize?: number;
|
|
57
56
|
maxNodesCount?: number;
|
|
58
57
|
transparentBackground?: boolean;
|
|
58
|
+
nearPlaneStrategy?: INearPlaneStrategy;
|
|
59
|
+
shadeMode?: ShadeModeInput;
|
|
60
|
+
reverseDepth?: boolean;
|
|
59
61
|
}
|
|
60
62
|
export type PlanetEventsList = [
|
|
61
63
|
"draw",
|
|
@@ -71,24 +73,45 @@ type IndexBufferCacheData = {
|
|
|
71
73
|
buffer: WebGLBufferExt | null;
|
|
72
74
|
};
|
|
73
75
|
/**
|
|
74
|
-
* Main class for rendering planet
|
|
76
|
+
* Main class for rendering a planet.
|
|
75
77
|
* @class
|
|
76
|
-
* @extends {
|
|
77
|
-
* @param {
|
|
78
|
-
* @param {
|
|
79
|
-
* @param {
|
|
80
|
-
* @param {
|
|
81
|
-
* @param {
|
|
82
|
-
* @param {
|
|
78
|
+
* @extends {Scene}
|
|
79
|
+
* @param {IPlanetParams} [options={}] - Planet configuration parameters.
|
|
80
|
+
* @param {string} [options.name] - Planet name.
|
|
81
|
+
* @param {Ellipsoid} [options.ellipsoid=wgs84] - Planet ellipsoid.
|
|
82
|
+
* @param {number} [options.minAltitude] - Minimum camera altitude above terrain.
|
|
83
|
+
* @param {number} [options.maxAltitude] - Maximum camera altitude above terrain.
|
|
84
|
+
* @param {Array.<Array.<number>>} [options.frustums] - Planet camera frustum configuration.
|
|
85
|
+
* @param {number} [options.maxGridSize=256] - Maximum terrain segment grid size.
|
|
86
|
+
* @param {number} [options.maxLoadingRequests=12] - Maximum concurrent tile loading requests.
|
|
87
|
+
* @param {number} [options.maxNodesCount=400] - Maximum number of created quadtree nodes.
|
|
88
|
+
* @param {number} [options.maxEqualZoomAltitude=15000000.0] - Max altitude where visible segments keep the same zoom.
|
|
89
|
+
* @param {number} [options.minEqualZoomAltitude=10000.0] - Min altitude where visible segments keep the same zoom.
|
|
90
|
+
* @param {number} [options.minEqualZoomCameraSlope=0.8] - Min camera slope for equal-zoom segment strategy.
|
|
91
|
+
* @param {Function} [options.quadTreeStrategyPrototype=EarthQuadTreeStrategy] - Quadtree strategy class.
|
|
92
|
+
* @param {string|null} [options.nightTextureSrc] - Night lights texture URL (`null` disables texture loading).
|
|
93
|
+
* @param {string|null} [options.specularTextureSrc] - Water/specular mask texture URL (`null` disables texture loading).
|
|
94
|
+
* @param {boolean} [options.atmosphereEnabled=false] - Enables atmosphere rendering.
|
|
95
|
+
* @param {boolean} [options.transitionOpacityEnabled] - Enables terrain transition opacity blending.
|
|
96
|
+
* @param {IAtmosphereParams} [options.atmosphereParameters] - Atmosphere model parameters.
|
|
97
|
+
* @param {number} [options.minDistanceBeforeMemClear] - Camera travel distance threshold before automatic memory cleanup.
|
|
98
|
+
* @param {boolean} [options.disableMemClear=false] - Disables automatic memory cleanup via memClear().
|
|
99
|
+
* @param {number} [options.vectorTileSize] - Vector tile texture size for vector layer baking.
|
|
100
|
+
* @param {boolean} [options.transparentBackground=false] - Enables transparent renderer background.
|
|
101
|
+
* @param {INearPlaneStrategy} [options.nearPlaneStrategy] - Near-plane strategy implementation.
|
|
102
|
+
* @param {number|string} [options.shadeMode=0.5] - Terrain shading mode: `0|none|unlit`, `0.5|phong`, `1|pbr`.
|
|
103
|
+
* @param {boolean} [options.reverseDepth=true] - Enables reverse-Z depth for the default planet camera in perspective mode.
|
|
83
104
|
*
|
|
84
|
-
* @fires
|
|
85
|
-
* @fires
|
|
86
|
-
* @fires
|
|
87
|
-
* @fires
|
|
88
|
-
* @fires
|
|
89
|
-
* @fires
|
|
105
|
+
* @fires draw - Triggered before globe frame begins to render.
|
|
106
|
+
* @fires layeradd - Triggered when a layer is added to the planet.
|
|
107
|
+
* @fires baselayerchange - Triggered when the base layer changes.
|
|
108
|
+
* @fires layerremove - Triggered when a layer is removed from the planet.
|
|
109
|
+
* @fires layervisibilitychange - Triggered when layer visibility changes.
|
|
110
|
+
* @fires rendercompleted - Triggered when all data is loaded.
|
|
111
|
+
* @fires terraincompleted - Triggered when terrain data is loaded.
|
|
112
|
+
* @fires layerloadend - Triggered when layer data finishes loading.
|
|
90
113
|
*/
|
|
91
|
-
export declare class Planet extends
|
|
114
|
+
export declare class Planet extends Scene {
|
|
92
115
|
events: EventsHandler<PlanetEventsList>;
|
|
93
116
|
_createdNodesCount: number;
|
|
94
117
|
/**
|
|
@@ -96,12 +119,6 @@ export declare class Planet extends RenderNode {
|
|
|
96
119
|
* @type {Ellipsoid}
|
|
97
120
|
*/
|
|
98
121
|
ellipsoid: Ellipsoid;
|
|
99
|
-
/**
|
|
100
|
-
* @public
|
|
101
|
-
* @override
|
|
102
|
-
* @type {Boolean}
|
|
103
|
-
*/
|
|
104
|
-
lightEnabled: boolean;
|
|
105
122
|
/**
|
|
106
123
|
* Squared ellipsoid radius.
|
|
107
124
|
* @public
|
|
@@ -158,12 +175,7 @@ export declare class Planet extends RenderNode {
|
|
|
158
175
|
* @type {PlanetCamera}
|
|
159
176
|
*/
|
|
160
177
|
camera: PlanetCamera;
|
|
161
|
-
|
|
162
|
-
* Screen mouse pointer projected to planet cartesian position.
|
|
163
|
-
* @public
|
|
164
|
-
* @type {Vec3}
|
|
165
|
-
*/
|
|
166
|
-
mousePositionOnEarth: Vec3;
|
|
178
|
+
nearPlaneStrategy: INearPlaneStrategy;
|
|
167
179
|
emptyTexture: WebGLTextureExt | null;
|
|
168
180
|
transparentTexture: WebGLTextureExt | null;
|
|
169
181
|
defaultTexture: WebGLTextureExt | null;
|
|
@@ -212,9 +224,6 @@ export declare class Planet extends RenderNode {
|
|
|
212
224
|
* @protected
|
|
213
225
|
*/
|
|
214
226
|
protected _specularTexture: WebGLTextureExt | null;
|
|
215
|
-
_ambient: Float32Array;
|
|
216
|
-
_diffuse: Float32Array;
|
|
217
|
-
_specular: Float32Array;
|
|
218
227
|
protected _maxGridSize: number;
|
|
219
228
|
/**
|
|
220
229
|
* Segment multiple textures size.(4 - convenient value for the most devices)
|
|
@@ -258,10 +267,16 @@ export declare class Planet extends RenderNode {
|
|
|
258
267
|
* @type {number}
|
|
259
268
|
*/
|
|
260
269
|
nightTextureCoefficient: number;
|
|
261
|
-
|
|
262
|
-
|
|
270
|
+
/**
|
|
271
|
+
* Global terrain shading for segment (forward + deferred): 0 unlit, 0.5 Phong, 1 PBR.
|
|
272
|
+
* @public
|
|
273
|
+
*/
|
|
274
|
+
protected _shadeMode: ShadeMode;
|
|
263
275
|
protected _atmosphereEnabled: boolean;
|
|
264
276
|
protected _atmosphereMaxMinOpacity: Float32Array;
|
|
277
|
+
_atmosphereCurrentMaxMinOpacity: Float32Array;
|
|
278
|
+
atmosphereFadeDist: Float32Array;
|
|
279
|
+
protected _atmosphereBottomRadius: number;
|
|
265
280
|
solidTextureOne: WebGLTextureExt | null;
|
|
266
281
|
solidTextureTwo: WebGLTextureExt | null;
|
|
267
282
|
protected _nightTextureSrc: string | null;
|
|
@@ -269,45 +284,146 @@ export declare class Planet extends RenderNode {
|
|
|
269
284
|
transitionTime: number;
|
|
270
285
|
protected _atmosphere: Atmosphere;
|
|
271
286
|
private _minDistanceBeforeMemClear;
|
|
287
|
+
disableMemClear: boolean;
|
|
272
288
|
private _maxNodes;
|
|
273
289
|
protected _transparentBackground: boolean;
|
|
274
290
|
constructor(options?: IPlanetParams);
|
|
275
291
|
/**
|
|
276
|
-
* Returns true if current terrain data set is loaded
|
|
292
|
+
* Returns true if the current terrain data set is loaded
|
|
293
|
+
* @public
|
|
277
294
|
*/
|
|
278
295
|
get terrainReady(): boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Returns max segment grid size used by the quadtree.
|
|
298
|
+
* @public
|
|
299
|
+
* @returns {number} - Max grid size.
|
|
300
|
+
*/
|
|
279
301
|
get maxGridSize(): number;
|
|
302
|
+
/**
|
|
303
|
+
* Returns local north frame rotation for a cartesian point.
|
|
304
|
+
* @public
|
|
305
|
+
* @param {Vec3} cartesian - Cartesian point.
|
|
306
|
+
* @returns {Quat} - Rotation from world frame to local north frame.
|
|
307
|
+
*/
|
|
280
308
|
getNorthFrameRotation(cartesian: Vec3): Quat;
|
|
309
|
+
/**
|
|
310
|
+
* Returns local frame rotation for a cartesian point.
|
|
311
|
+
* @public
|
|
312
|
+
* @param {Vec3} cartesian - Cartesian point.
|
|
313
|
+
* @returns {Quat} - Rotation from world frame to local frame.
|
|
314
|
+
*/
|
|
281
315
|
getFrameRotation(cartesian: Vec3): Quat;
|
|
316
|
+
/**
|
|
317
|
+
* Sets maximum atmosphere opacity.
|
|
318
|
+
* @public
|
|
319
|
+
* @param {number} opacity - Opacity value in range `[0..1]`.
|
|
320
|
+
*/
|
|
282
321
|
set atmosphereMaxOpacity(opacity: number);
|
|
322
|
+
/**
|
|
323
|
+
* Gets maximum atmosphere opacity.
|
|
324
|
+
* @public
|
|
325
|
+
* @returns {number} - Max opacity.
|
|
326
|
+
*/
|
|
283
327
|
get atmosphereMaxOpacity(): number;
|
|
328
|
+
/**
|
|
329
|
+
* Sets minimum atmosphere opacity.
|
|
330
|
+
* @public
|
|
331
|
+
* @param {number} opacity - Opacity value in range `[0..1]`.
|
|
332
|
+
*/
|
|
284
333
|
set atmosphereMinOpacity(opacity: number);
|
|
334
|
+
/**
|
|
335
|
+
* Gets minimum atmosphere opacity.
|
|
336
|
+
* @public
|
|
337
|
+
* @returns {number} - Min opacity.
|
|
338
|
+
*/
|
|
285
339
|
get atmosphereMinOpacity(): number;
|
|
340
|
+
/**
|
|
341
|
+
* Sets atmosphere opacity interpolation curve shift.
|
|
342
|
+
* @public
|
|
343
|
+
* @param {number} curveShift - Curve shift. Zero produces linear interpolation.
|
|
344
|
+
*/
|
|
345
|
+
set atmosphereOpacityCurveShift(curveShift: number);
|
|
346
|
+
/**
|
|
347
|
+
* Gets atmosphere opacity interpolation curve shift.
|
|
348
|
+
* @public
|
|
349
|
+
* @returns {number} - Curve shift.
|
|
350
|
+
*/
|
|
351
|
+
get atmosphereOpacityCurveShift(): number;
|
|
352
|
+
/**
|
|
353
|
+
* Gets target atmosphere opacity parameters `[max, min, curveShift]`.
|
|
354
|
+
* @public
|
|
355
|
+
* @returns {Float32Array} - Opacity parameters at maximum camera altitude.
|
|
356
|
+
*/
|
|
357
|
+
get atmosphereMaxMinOpacity(): Float32Array;
|
|
358
|
+
protected _calcAtmosphereFadeDist(): void;
|
|
359
|
+
protected _updateAtmosphereMaxMinOpacity(): void;
|
|
360
|
+
/**
|
|
361
|
+
* Enables or disables atmosphere rendering and related programs.
|
|
362
|
+
* @public
|
|
363
|
+
* @param {boolean} enabled - Atmosphere activity flag.
|
|
364
|
+
*/
|
|
286
365
|
set atmosphereEnabled(enabled: boolean);
|
|
366
|
+
/**
|
|
367
|
+
* Returns atmosphere activity flag.
|
|
368
|
+
* @public
|
|
369
|
+
* @returns {boolean} - `true` when atmosphere is enabled.
|
|
370
|
+
*/
|
|
287
371
|
get atmosphereEnabled(): boolean;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
372
|
+
/**
|
|
373
|
+
* Returns active terrain shade mode.
|
|
374
|
+
* @public
|
|
375
|
+
* @returns {number} - Shade mode id.
|
|
376
|
+
*/
|
|
377
|
+
get shadeMode(): ShadeMode;
|
|
378
|
+
/**
|
|
379
|
+
* Sets terrain shade mode.
|
|
380
|
+
* @public
|
|
381
|
+
* @param {number|string} m - Shade mode id (`0|0.5|1` or `none|phong|pbr`).
|
|
382
|
+
*/
|
|
383
|
+
set shadeMode(m: ShadeModeInput);
|
|
384
|
+
protected _restoreSurfaceDepthMask(): void;
|
|
385
|
+
protected _enableTransparentSurfaceBlend(): void;
|
|
386
|
+
/**
|
|
387
|
+
* Returns normal-map generator used by the planet.
|
|
388
|
+
* @public
|
|
389
|
+
* @returns {NormalMapCreator} - Normal map creator.
|
|
390
|
+
*/
|
|
292
391
|
get normalMapCreator(): NormalMapCreator;
|
|
392
|
+
/**
|
|
393
|
+
* Returns current layers snapshot.
|
|
394
|
+
* @public
|
|
395
|
+
* @returns {Layer[]} - Layer array copy.
|
|
396
|
+
*/
|
|
293
397
|
get layers(): Layer[];
|
|
398
|
+
/**
|
|
399
|
+
* Returns Sun control instance if attached to the renderer.
|
|
400
|
+
* @public
|
|
401
|
+
* @returns {Sun | undefined} - Sun control.
|
|
402
|
+
*/
|
|
294
403
|
get sun(): Sun | undefined;
|
|
404
|
+
/**
|
|
405
|
+
* Returns current sun world position.
|
|
406
|
+
* @public
|
|
407
|
+
* @returns {Vec3} - Sun position.
|
|
408
|
+
*/
|
|
295
409
|
get sunPos(): Vec3;
|
|
296
410
|
/**
|
|
297
411
|
* Add the given control to the renderer of the planet scene.
|
|
412
|
+
* @public
|
|
298
413
|
* @param {Control} control - Control.
|
|
299
414
|
*/
|
|
300
415
|
addControl(control: Control): void;
|
|
301
416
|
/**
|
|
302
417
|
* Add the given controls array to the renderer of the planet.
|
|
418
|
+
* @public
|
|
303
419
|
* @param {Array.<Control>} cArr - Control array.
|
|
304
420
|
*/
|
|
305
421
|
addControls(cArr: Control[]): void;
|
|
306
422
|
/**
|
|
307
|
-
*
|
|
308
|
-
* @param {string} name -
|
|
423
|
+
* Returns a layer by name.
|
|
424
|
+
* @param {string} name - Layer name.
|
|
309
425
|
* @public
|
|
310
|
-
* @returns {Layer} -
|
|
426
|
+
* @returns {Layer | undefined} -
|
|
311
427
|
*/
|
|
312
428
|
getLayerByName(name: string): Layer | undefined;
|
|
313
429
|
/**
|
|
@@ -335,7 +451,7 @@ export declare class Planet extends RenderNode {
|
|
|
335
451
|
*/
|
|
336
452
|
removeLayer(layer: Layer): void;
|
|
337
453
|
/**
|
|
338
|
-
*
|
|
454
|
+
* Clears material resources related to a layer in quadtree segments.
|
|
339
455
|
* @public
|
|
340
456
|
* @param {Layer} layer - Material layer.
|
|
341
457
|
*/
|
|
@@ -346,35 +462,67 @@ export declare class Planet extends RenderNode {
|
|
|
346
462
|
* @public
|
|
347
463
|
*/
|
|
348
464
|
setBaseLayer(layer: Layer): void;
|
|
465
|
+
protected _applyBaseLayerLighting(layer: Layer): void;
|
|
349
466
|
/**
|
|
350
467
|
* Sets elevation scale. 1.0 is default.
|
|
468
|
+
* @public
|
|
351
469
|
* @param {number} factor - Elevation scale.
|
|
352
470
|
*/
|
|
353
471
|
setHeightFactor(factor: number): void;
|
|
354
472
|
/**
|
|
355
473
|
* Gets elevation scale.
|
|
474
|
+
* @public
|
|
356
475
|
* @returns {number} Terrain elevation scale
|
|
357
476
|
*/
|
|
358
477
|
getHeightFactor(): number;
|
|
478
|
+
/**
|
|
479
|
+
* Sets LOD thresholds for quadtree terrain rendering.
|
|
480
|
+
* Proxy to {@link QuadTreeStrategy.setLodSize}.
|
|
481
|
+
* @public
|
|
482
|
+
* @param {number} currentLodSize - Current LOD size target.
|
|
483
|
+
* @param {number} [minLodSize] - Minimum LOD size.
|
|
484
|
+
* @param {number} [maxLodSize] - Maximum LOD size.
|
|
485
|
+
*/
|
|
486
|
+
setLodSize(currentLodSize: number, minLodSize?: number, maxLodSize?: number): void;
|
|
359
487
|
/**
|
|
360
488
|
* Sets terrain provider
|
|
361
489
|
* @public
|
|
362
490
|
* @param {EmptyTerrain} terrain - Terrain provider.
|
|
363
491
|
*/
|
|
364
492
|
setTerrain(terrain: EmptyTerrain): void;
|
|
493
|
+
/**
|
|
494
|
+
* Reinitializes terrain forward/deferred shaders for atmosphere mode.
|
|
495
|
+
* @public
|
|
496
|
+
* @param {AtmosphereParameters} [atmosParams] - Optional atmosphere shader parameters.
|
|
497
|
+
*/
|
|
365
498
|
initAtmosphereShader(atmosParams?: AtmosphereParameters): void;
|
|
499
|
+
/**
|
|
500
|
+
* Returns atmosphere control instance bound to the planet.
|
|
501
|
+
* @public
|
|
502
|
+
* @returns {Atmosphere} - Atmosphere control.
|
|
503
|
+
*/
|
|
366
504
|
get atmosphereControl(): Atmosphere;
|
|
367
505
|
protected _initializeAtmosphere(): void;
|
|
506
|
+
protected _swapDeferredShadingPass(atmosParams?: AtmosphereParameters): void;
|
|
507
|
+
protected _restoreDefaultDeferredShadingPass(): void;
|
|
368
508
|
protected _initializeShaders(): void;
|
|
369
509
|
protected _onLayerLoadend(layer: Layer): void;
|
|
510
|
+
/**
|
|
511
|
+
* Initializes render resources, workers, shaders, and layer state.
|
|
512
|
+
* @public
|
|
513
|
+
*/
|
|
370
514
|
init(): void;
|
|
515
|
+
/**
|
|
516
|
+
* Reattaches already registered layers to apply initialization logic.
|
|
517
|
+
* @public
|
|
518
|
+
*/
|
|
371
519
|
initLayers(): void;
|
|
372
520
|
protected _clearIndexesCache(): void;
|
|
373
521
|
/**
|
|
374
522
|
* Creates default textures first for the North Pole and whole globe and second for the South Pole.
|
|
375
523
|
* @public
|
|
376
|
-
* @param{IDefaultTextureParams} param0 -
|
|
377
|
-
* @param{IDefaultTextureParams} param1 -
|
|
524
|
+
* @param {IDefaultTextureParams} param0 - Default texture params for the first texture.
|
|
525
|
+
* @param {IDefaultTextureParams} param1 - Default texture params for the second texture.
|
|
378
526
|
*/
|
|
379
527
|
createDefaultTextures(param0: IDefaultTextureParams, param1: IDefaultTextureParams): void;
|
|
380
528
|
protected _getLayerAttributionHTML(layer: Layer): string;
|
|
@@ -383,6 +531,10 @@ export declare class Planet extends RenderNode {
|
|
|
383
531
|
* @public
|
|
384
532
|
*/
|
|
385
533
|
updateAttributionsList(): void;
|
|
534
|
+
/**
|
|
535
|
+
* Schedules visible layers list refresh for the next frame.
|
|
536
|
+
* @public
|
|
537
|
+
*/
|
|
386
538
|
updateVisibleLayers(): void;
|
|
387
539
|
protected _updateVisibleLayers(): void;
|
|
388
540
|
/**
|
|
@@ -395,46 +547,58 @@ export declare class Planet extends RenderNode {
|
|
|
395
547
|
* @protected
|
|
396
548
|
*/
|
|
397
549
|
protected _sortLayers(): void;
|
|
398
|
-
protected
|
|
399
|
-
protected
|
|
550
|
+
protected _renderOpaqueScreenNodesDeferredPASS(): void;
|
|
551
|
+
protected _renderOpaqueScreenNodesForwardPASSNoAtmos(): void;
|
|
552
|
+
protected _renderOpaqueScreenNodesForwardPASSAtmos(): void;
|
|
553
|
+
protected _renderTransparentScreenNodesPASSNoAtmos(): void;
|
|
400
554
|
protected _renderScreenNodesWithHeightPASSNoAtmos(): void;
|
|
555
|
+
protected _renderTransparentScreenNodesPASSAtmos(): void;
|
|
401
556
|
protected _renderScreenNodesWithHeightPASSAtmos(): void;
|
|
402
|
-
protected
|
|
557
|
+
protected onPreDraw: () => void;
|
|
403
558
|
/**
|
|
404
559
|
* Render node callback.
|
|
405
560
|
* @public
|
|
406
561
|
*/
|
|
407
|
-
|
|
562
|
+
onDraw: () => void;
|
|
408
563
|
/**
|
|
409
|
-
*
|
|
410
|
-
* Frame function is called for each renderer activrCamera frustum.
|
|
564
|
+
* Pauses quadtree render-node collection and disables camera terrain collision checks.
|
|
411
565
|
* @public
|
|
412
|
-
* @override
|
|
413
566
|
*/
|
|
414
|
-
frame(): void;
|
|
415
567
|
lockQuadTree(): void;
|
|
568
|
+
applyNear(camera?: PlanetCamera): void;
|
|
569
|
+
/**
|
|
570
|
+
* Resumes quadtree render-node collection and enables camera terrain collision checks.
|
|
571
|
+
* @public
|
|
572
|
+
*/
|
|
416
573
|
unlockQuadTree(): void;
|
|
417
|
-
protected
|
|
418
|
-
protected
|
|
419
|
-
protected
|
|
420
|
-
protected
|
|
574
|
+
protected _setUniformsDeferred(cam: PlanetCamera, program: ShaderProgram): ShaderProgram;
|
|
575
|
+
protected _setUniformsNoAtmos(cam: PlanetCamera, program: ShaderProgram, disableBlend: boolean): ShaderProgram;
|
|
576
|
+
protected _setUniformsAtmos(cam: PlanetCamera, program: ShaderProgram, disableBlend: boolean): ShaderProgram;
|
|
577
|
+
protected _renderingFadingNodes: (camera: PlanetCamera, quadTreeStrategy: QuadTreeStrategy, nodes: Map<number, boolean>, sh: ShaderProgram, currentNode: Node, sl: Layer[], sliceIndex: number, outTransparentSegments?: Segment[], outOpaqueSegments?: Segment[], forcedOpacity?: number, transparentSurface?: boolean) => void;
|
|
421
578
|
protected static __refreshLayersFadingOpacity__(layersRef: Layer[], minCurrZoom: number, maxCurrZoom: number): void;
|
|
422
579
|
/**
|
|
423
580
|
* Drawing nodes
|
|
424
581
|
*/
|
|
425
|
-
protected
|
|
426
|
-
protected
|
|
582
|
+
protected _renderingOpaqueScreenNodes(cam: PlanetCamera, quadTreeStrategy: QuadTreeStrategy, sh: ShaderProgram, renderedNodes: Node[]): void;
|
|
583
|
+
protected _renderingTransparentScreenNodes(camera: PlanetCamera, quadTreeStrategy: QuadTreeStrategy, sh: ShaderProgram): void;
|
|
584
|
+
protected _renderingScreenNodesWithHeight(camera: PlanetCamera, quadTreeStrategy: QuadTreeStrategy, sh: ShaderProgram, renderedNodes: Node[]): void;
|
|
427
585
|
protected _renderColorPickingFramebufferPASS(): void;
|
|
586
|
+
/**
|
|
587
|
+
* Renders terrain depth and frustum id into the depth framebuffer.
|
|
588
|
+
* @public
|
|
589
|
+
* @param {PlanetCamera} cam - Camera used for rendering.
|
|
590
|
+
* @param {QuadTreeStrategy} quadTreeStrategy - Quadtree strategy with rendered node lists.
|
|
591
|
+
*/
|
|
428
592
|
renderDepthFramebuffer(cam: PlanetCamera, quadTreeStrategy: QuadTreeStrategy): void;
|
|
429
593
|
protected _collectVectorLayerCollections(): void;
|
|
430
594
|
/**
|
|
431
|
-
* Starts clear memory thread.
|
|
595
|
+
* Starts a clear memory thread.
|
|
432
596
|
* @public
|
|
433
597
|
*/
|
|
434
|
-
memClear(): void;
|
|
598
|
+
memClear(force?: boolean): void;
|
|
435
599
|
/**
|
|
436
600
|
* Returns ray vector hit ellipsoid coordinates.
|
|
437
|
-
* If the ray doesn't hit ellipsoid it returns 'undefined'.
|
|
601
|
+
* If the ray doesn't hit ellipsoid, it returns 'undefined'.
|
|
438
602
|
* @public
|
|
439
603
|
* @param {Ray} ray - Ray.
|
|
440
604
|
* @returns {Vec3 | undefined} -
|
|
@@ -450,7 +614,7 @@ export declare class Planet extends RenderNode {
|
|
|
450
614
|
/**
|
|
451
615
|
* Project screen coordinates to the planet ellipsoid.
|
|
452
616
|
* @public
|
|
453
|
-
* @param {Vec2
|
|
617
|
+
* @param {Vec2} px - Screen coordinates.
|
|
454
618
|
* @returns {LonLat | undefined} - Geodetic coordinates.
|
|
455
619
|
*/
|
|
456
620
|
getLonLatFromPixelEllipsoid(px: Vec2): LonLat | undefined;
|
|
@@ -464,7 +628,7 @@ export declare class Planet extends RenderNode {
|
|
|
464
628
|
* Returns screen coordinates cartesian coordinates on the current terrain.
|
|
465
629
|
* position or null if input coordinates is outside the planet.
|
|
466
630
|
* @public
|
|
467
|
-
* @param {Vec2} px - Pixel screen 2d coordinates.
|
|
631
|
+
* @param {Vec2 | IBaseInputState} px - Pixel screen 2d coordinates.
|
|
468
632
|
* @returns {Vec3 | undefined} -
|
|
469
633
|
*/
|
|
470
634
|
getCartesianFromPixelTerrain(px: Vec2 | IBaseInputState): Vec3 | undefined;
|
|
@@ -493,15 +657,15 @@ export declare class Planet extends RenderNode {
|
|
|
493
657
|
/**
|
|
494
658
|
* Returns distance from an active (screen) camera to the planet ellipsoid.
|
|
495
659
|
* @public
|
|
496
|
-
* @param {Vec2} px - Screen coordinates.
|
|
497
|
-
* @returns {number} -
|
|
660
|
+
* @param {Vec2 | IBaseInputState} px - Screen coordinates.
|
|
661
|
+
* @returns {number | undefined} -
|
|
498
662
|
*/
|
|
499
663
|
getDistanceFromPixelEllipsoid(px: Vec2 | IBaseInputState): number | undefined;
|
|
500
664
|
/**
|
|
501
665
|
* Returns distance from active (screen) camera to the planet terrain by screen coordinates.
|
|
502
666
|
* @public
|
|
503
667
|
* @param {Vec2 | IBaseInputState} px - Screen coordinates.
|
|
504
|
-
* @returns {number
|
|
668
|
+
* @returns {number} -
|
|
505
669
|
*/
|
|
506
670
|
getDistanceFromPixel(px: Vec2 | IBaseInputState): number;
|
|
507
671
|
/**
|
|
@@ -523,6 +687,11 @@ export declare class Planet extends RenderNode {
|
|
|
523
687
|
* @returns {Extent} -
|
|
524
688
|
*/
|
|
525
689
|
getExtent(): Extent;
|
|
690
|
+
/**
|
|
691
|
+
* Returns currently cached quadtree view extent.
|
|
692
|
+
* @public
|
|
693
|
+
* @returns {Extent} - Cached view extent.
|
|
694
|
+
*/
|
|
526
695
|
getViewExtent(): Extent;
|
|
527
696
|
/**
|
|
528
697
|
* Sets camera to the planet geographical position.
|
|
@@ -559,10 +728,37 @@ export declare class Planet extends RenderNode {
|
|
|
559
728
|
* @public
|
|
560
729
|
*/
|
|
561
730
|
stopFlying(): void;
|
|
731
|
+
/**
|
|
732
|
+
* Refreshes billboard texture coordinates for all visible entity collections.
|
|
733
|
+
* @public
|
|
734
|
+
*/
|
|
562
735
|
updateBillboardsTexCoords(): void;
|
|
736
|
+
/**
|
|
737
|
+
* Finds terrain point under an entity in currently rendered segments.
|
|
738
|
+
* @public
|
|
739
|
+
* @param {Entity} entity - Entity to test.
|
|
740
|
+
* @param {Vec3} res - Output vector for terrain point.
|
|
741
|
+
* @returns {Vec3 | undefined} - Terrain point if found.
|
|
742
|
+
*/
|
|
563
743
|
getEntityTerrainPoint(entity: Entity, res: Vec3): number | undefined;
|
|
744
|
+
/**
|
|
745
|
+
* Returns terrain height at the given coordinates in default terrain datum.
|
|
746
|
+
* @public
|
|
747
|
+
* @param {LonLat} lonLat - Geodetic coordinates.
|
|
748
|
+
* @returns {Promise<number>} - Height value.
|
|
749
|
+
*/
|
|
564
750
|
getHeightDefault(lonLat: LonLat): Promise<number>;
|
|
751
|
+
/**
|
|
752
|
+
* Returns terrain height above ellipsoid at the given coordinates.
|
|
753
|
+
* @public
|
|
754
|
+
* @param {LonLat} lonLat - Geodetic coordinates.
|
|
755
|
+
* @returns {Promise<number>} - Height above ellipsoid.
|
|
756
|
+
*/
|
|
565
757
|
getHeightAboveELL(lonLat: LonLat): Promise<number>;
|
|
758
|
+
/**
|
|
759
|
+
* Handles node detachment and frees runtime terrain data.
|
|
760
|
+
* @public
|
|
761
|
+
*/
|
|
566
762
|
onremove(): void;
|
|
567
763
|
/**
|
|
568
764
|
* Destroy planet.
|