@openglobus/og 0.28.7 → 1.0.0-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +218 -4
- package/README.md +31 -18
- package/lib/Deferred.d.ts +2 -2
- package/lib/Events.d.ts +1 -1
- package/lib/Globe.d.ts +8 -5
- package/lib/Object3d.d.ts +17 -14
- package/lib/Popup.d.ts +2 -2
- package/lib/assets/LabelWorker.worker-DYd7xn3M.js.map +1 -0
- package/lib/assets/PlainSegmentWorker.worker-JsKldq-e.js.map +1 -0
- package/lib/assets/TerrainWorker.worker-CqUJvMOv.js.map +1 -0
- package/lib/bv/index.d.ts +2 -2
- package/lib/camera/Camera.d.ts +280 -27
- package/lib/camera/Frustum.d.ts +100 -15
- package/lib/camera/PlanetCamera.d.ts +93 -8
- package/lib/camera/index.d.ts +2 -2
- package/lib/control/CameraFrameComposer.d.ts +2 -2
- package/lib/control/CameraFrameHandler.d.ts +1 -1
- package/lib/control/CompassButton.d.ts +2 -2
- package/lib/control/EarthCoordinates.d.ts +5 -2
- package/lib/control/FramebufferPreview.d.ts +3 -3
- 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 +4 -2
- package/lib/control/Navigation.d.ts +15 -11
- 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/cameraDepthHandler/CameraDepthHandler.d.ts +17 -3
- package/lib/control/cameraDepthHandler/camera_depth.d.ts +2 -2
- 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/EntityEditor.d.ts +19 -0
- package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorDialog.d.ts} +9 -8
- package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +12 -12
- 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 +5 -3
- 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 +2 -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 +95 -70
- 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} +29 -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} +27 -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 +47 -42
- package/lib/layer/BaseGeoImage.d.ts +20 -17
- package/lib/layer/CanvasTiles.d.ts +14 -12
- 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 +47 -30
- package/lib/layer/WMS.d.ts +1 -1
- package/lib/layer/XYZ.d.ts +11 -12
- package/lib/layer/index.d.ts +12 -12
- package/lib/math/Line2.d.ts +1 -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 +1 -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 +5 -5
- package/lib/quadTree/QuadTreeStrategy.d.ts +3 -4
- package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
- package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +4 -4
- 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 +16 -0
- package/lib/renderer/Renderer.d.ts +166 -99
- package/lib/renderer/RendererEvents.d.ts +15 -5
- package/lib/renderer/WOITPass.d.ts +14 -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 +244 -69
- package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +49 -46
- package/lib/scene/SkyBox.d.ts +5 -3
- package/lib/scene/index.d.ts +2 -2
- package/lib/segment/Segment.d.ts +29 -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/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 +8 -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/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/weightedOITResolve.d.ts +2 -0
- package/lib/terrain/BilTerrain.d.ts +1 -1
- package/lib/terrain/EmptyTerrain.d.ts +5 -6
- package/lib/terrain/GlobusTerrain.d.ts +18 -23
- package/lib/terrain/RgbTerrain.d.ts +8 -8
- package/lib/terrain/index.d.ts +5 -5
- 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 +2 -2
- package/lib/ui/Dialog.d.ts +30 -3
- package/lib/ui/Input.d.ts +7 -2
- package/lib/ui/Slider.d.ts +5 -2
- 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 +9 -9
- package/lib/utils/FontAtlas.d.ts +57 -8
- 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 +20 -2
- package/lib/utils/shared.d.ts +11 -5
- package/lib/utils/textureResourceMeta.d.ts +9 -0
- package/lib/webgl/BaseFramebuffer.d.ts +7 -0
- package/lib/webgl/Framebuffer.d.ts +9 -6
- package/lib/webgl/Handler.d.ts +81 -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 +77 -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/OldMouseNavigation.d.ts +0 -65
- package/lib/control/ZoomControl.d.ts +0 -28
- 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/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +0 -0
- /package/lib/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Entity } from "
|
|
2
|
-
import {
|
|
3
|
-
import { Vec3 } from "
|
|
4
|
-
import { Vec4 } from "
|
|
5
|
-
import type { NumberArray3 } from "
|
|
6
|
-
import type { NumberArray4 } from "
|
|
1
|
+
import { Entity } from "../Entity";
|
|
2
|
+
import { Scene } from "../../scene/Scene";
|
|
3
|
+
import { Vec3 } from "../../math/Vec3";
|
|
4
|
+
import { Vec4 } from "../../math/Vec4";
|
|
5
|
+
import type { NumberArray3 } from "../../math/Vec3";
|
|
6
|
+
import type { NumberArray4 } from "../../math/Vec4";
|
|
7
7
|
import { StripHandler } from "./StripHandler";
|
|
8
|
-
import type { WebGLBufferExt } from "
|
|
8
|
+
import type { WebGLBufferExt } from "../../webgl/Handler";
|
|
9
|
+
import type { ShaderProgram } from "../../webgl/ShaderProgram";
|
|
9
10
|
type TPoiExt = Vec3 | NumberArray3;
|
|
10
11
|
type TStripExt = [TPoiExt, TPoiExt];
|
|
11
12
|
type TPoi = Vec3;
|
|
@@ -41,13 +42,13 @@ declare class Strip {
|
|
|
41
42
|
* @type {boolean}
|
|
42
43
|
*/
|
|
43
44
|
visibility: boolean;
|
|
44
|
-
|
|
45
|
+
protected _color: Float32Array;
|
|
45
46
|
/**
|
|
46
47
|
* Parent collection render node.
|
|
47
48
|
* @protected
|
|
48
|
-
* @type {
|
|
49
|
+
* @type {Scene}
|
|
49
50
|
*/
|
|
50
|
-
protected
|
|
51
|
+
protected _scene: Scene | null;
|
|
51
52
|
/**
|
|
52
53
|
* Entity instance that holds this strip.
|
|
53
54
|
* @public
|
|
@@ -96,33 +97,36 @@ declare class Strip {
|
|
|
96
97
|
setColorHTML(color: string): void;
|
|
97
98
|
setColor(r: number, g: number, b: number, a?: number): void;
|
|
98
99
|
/**
|
|
99
|
-
*
|
|
100
|
+
* Sets strip opacity.
|
|
100
101
|
* @public
|
|
101
|
-
* @param {number} opacity -
|
|
102
|
+
* @param {number} opacity - Opacity.
|
|
102
103
|
*/
|
|
103
104
|
setOpacity(opacity: number): void;
|
|
105
|
+
isOpaque(): boolean;
|
|
104
106
|
/**
|
|
105
|
-
* Sets
|
|
107
|
+
* Sets strip visibility.
|
|
106
108
|
* @public
|
|
107
109
|
* @param {boolean} visibility - Visibility flag.
|
|
108
110
|
*/
|
|
109
111
|
setVisibility(visibility: boolean): void;
|
|
110
112
|
/**
|
|
111
|
-
* @
|
|
113
|
+
* @returns {boolean} Strip visibility.
|
|
112
114
|
*/
|
|
113
115
|
getVisibility(): boolean;
|
|
114
116
|
/**
|
|
115
117
|
* Assign rendering scene node.
|
|
116
118
|
* @public
|
|
117
|
-
* @param {
|
|
119
|
+
* @param {Scene} scene - Assigned render node.
|
|
118
120
|
*/
|
|
119
|
-
|
|
121
|
+
bindScene(scene: Scene): void;
|
|
120
122
|
/**
|
|
121
123
|
* Removes from entity.
|
|
122
124
|
* @public
|
|
123
125
|
*/
|
|
124
126
|
remove(): void;
|
|
125
|
-
|
|
127
|
+
protected _drawImpl(sh: ShaderProgram, color: Float32Array, opacity: number): void;
|
|
128
|
+
drawTransparent(): void;
|
|
129
|
+
drawOpaque(): void;
|
|
126
130
|
drawPicking(): void;
|
|
127
131
|
/**
|
|
128
132
|
* Delete buffers
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EntityCollection } from "
|
|
2
|
-
import { Renderer } from "
|
|
3
|
-
import {
|
|
1
|
+
import { EntityCollection } from "../EntityCollection";
|
|
2
|
+
import { Renderer } from "../../renderer/Renderer";
|
|
3
|
+
import { Scene } from "../../scene/Scene";
|
|
4
4
|
import { Strip } from "./Strip";
|
|
5
5
|
declare class StripHandler {
|
|
6
6
|
static __counter__: number;
|
|
@@ -29,13 +29,18 @@ declare class StripHandler {
|
|
|
29
29
|
* @type {Array.<Strip>}
|
|
30
30
|
*/
|
|
31
31
|
protected _strips: Strip[];
|
|
32
|
+
protected _opaqueCount: number;
|
|
32
33
|
constructor(entityCollection: EntityCollection);
|
|
33
34
|
protected _initProgram(): void;
|
|
34
|
-
|
|
35
|
+
bindScene(scene: Scene): void;
|
|
36
|
+
protected _swap(i: number, j: number): void;
|
|
35
37
|
add(strip: Strip): void;
|
|
36
38
|
remove(strip: Strip): void;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
drawForward(): void;
|
|
40
|
+
drawOpaque(): void;
|
|
41
|
+
drawTransparent(): void;
|
|
42
|
+
drawTransparentForward(): void;
|
|
43
|
+
updateStripOpacity(strip: Strip): void;
|
|
39
44
|
drawPicking(): void;
|
|
40
45
|
clear(): void;
|
|
41
46
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,43 +1,48 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as jd from
|
|
3
|
-
import * as math from
|
|
4
|
-
import * as mercator from
|
|
5
|
-
import * as utils from
|
|
6
|
-
import * as bv from
|
|
7
|
-
import * as control from
|
|
8
|
-
import * as scene from
|
|
9
|
-
import * as terrain from
|
|
10
|
-
import * as layer from
|
|
11
|
-
import * as ui from
|
|
12
|
-
import * as webgl from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export type { IControlParams } from
|
|
18
|
-
export type { ITouchState } from
|
|
1
|
+
import "../css/og.css";
|
|
2
|
+
import * as jd from "./astro/jd";
|
|
3
|
+
import * as math from "./math";
|
|
4
|
+
import * as mercator from "./mercator";
|
|
5
|
+
import * as utils from "./utils/shared";
|
|
6
|
+
import * as bv from "./bv/index";
|
|
7
|
+
import * as control from "./control/index";
|
|
8
|
+
import * as scene from "./scene/index";
|
|
9
|
+
import * as terrain from "./terrain/index";
|
|
10
|
+
import * as layer from "./layer/index";
|
|
11
|
+
import * as ui from "./ui/index";
|
|
12
|
+
import * as webgl from "./webgl/index";
|
|
13
|
+
export * from "./control/Control";
|
|
14
|
+
export * from "./entity/index";
|
|
15
|
+
export * from "./layer/index";
|
|
16
|
+
export * from "./Globe";
|
|
17
|
+
export type { IControlParams } from "./control/Control";
|
|
18
|
+
export type { ITouchState } from "./renderer/RendererEvents";
|
|
19
|
+
export type { IDeferredShadingPass } from "./renderer/IDeferredShadingPass";
|
|
20
|
+
export type { ITransparencyPass } from "./renderer/ITransparencyPass";
|
|
21
|
+
export { PhongDeferredShading } from "./renderer/PhongDeferredShading";
|
|
22
|
+
export { AtmosphereDeferredShading } from "./renderer/AtmosphereDeferredShading";
|
|
23
|
+
export { WOITPass } from "./renderer/WOITPass";
|
|
24
|
+
export { SHADE_UNLIT, SHADE_PHONG, SHADE_PBR, type ShadeMode, type ShadeModeInput } from "./shadeModeConstants";
|
|
19
25
|
export declare const version: string;
|
|
20
|
-
import { Geoid } from
|
|
21
|
-
import { input } from
|
|
22
|
-
import { Ellipsoid, wgs84, moon, mars } from
|
|
23
|
-
import { Camera, PlanetCamera } from
|
|
24
|
-
import { Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4 } from
|
|
25
|
-
import { Renderer } from
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
|
|
43
|
-
export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, moon, mars, terrain, layer, ui, webgl, Easing, EasingFunction, Framebuffer, EmptyTerrain, GlobusTerrain, RgbTerrain, GlobusRgbTerrain, BilTerrain, Camera, Ellipsoid, Planet, PlanetCamera, LightSource, Program, Handler, Multisample, Renderer, Clock, Events, EventsHandler, createEvents, Extent, LonLat, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, Geoid, Popup, QuadTreeStrategy, EquiQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, Object3d, Gltf, MoveAxisEntity, Loader, IResponse };
|
|
26
|
+
import { Geoid } from "./terrain/Geoid";
|
|
27
|
+
import { input } from "./input/input";
|
|
28
|
+
import { Ellipsoid, wgs84, moon, mars } from "./ellipsoid/index";
|
|
29
|
+
import { Camera, PlanetCamera } from "./camera/index";
|
|
30
|
+
import { Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4 } from "./math/index";
|
|
31
|
+
import { Renderer } from "./renderer/Renderer";
|
|
32
|
+
import { Clock } from "./Clock";
|
|
33
|
+
import { Events, type EventsHandler, createEvents } from "./Events";
|
|
34
|
+
import { Extent } from "./Extent";
|
|
35
|
+
import { LonLat } from "./LonLat";
|
|
36
|
+
import { Scene } from "./scene/Scene";
|
|
37
|
+
import { Planet } from "./scene/Planet";
|
|
38
|
+
import { Popup } from "./Popup";
|
|
39
|
+
import { Loader, type IResponse } from "./utils/Loader";
|
|
40
|
+
import { EarthQuadTreeStrategy, EquiQuadTreeStrategy, QuadTreeStrategy, quadTreeStrategyType, Wgs84QuadTreeStrategy } from "./quadTree/index";
|
|
41
|
+
import { Object3d } from "./Object3d";
|
|
42
|
+
import { Handler, ShaderProgram, Framebuffer, Multisample } from "./webgl/index";
|
|
43
|
+
import { EmptyTerrain, GlobusTerrain, RgbTerrain, BilTerrain, GlobusRgbTerrain } from "./terrain/index";
|
|
44
|
+
import { MoveAxisEntity } from "./control/entityEditor/MoveAxisEntity";
|
|
45
|
+
import { Gltf } from "./utils/gltf/gltfParser";
|
|
46
|
+
import { Easing } from "./utils/easing";
|
|
47
|
+
import type { EasingFunction } from "./utils/easing";
|
|
48
|
+
export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, moon, mars, terrain, layer, ui, webgl, Easing, EasingFunction, Framebuffer, EmptyTerrain, GlobusTerrain, RgbTerrain, GlobusRgbTerrain, BilTerrain, Camera, Ellipsoid, Planet, PlanetCamera, ShaderProgram, Handler, Multisample, Renderer, Clock, Events, EventsHandler, createEvents, Extent, LonLat, Scene, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, Geoid, Popup, QuadTreeStrategy, EquiQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, Object3d, Gltf, MoveAxisEntity, Loader, IResponse };
|
|
@@ -12,14 +12,11 @@ export interface IBaseGeoImageParams extends ILayerParams {
|
|
|
12
12
|
fullExtent?: boolean;
|
|
13
13
|
corners?: NumberArray2[];
|
|
14
14
|
}
|
|
15
|
-
type BaseGeoImageEventsList = [
|
|
16
|
-
"loadend"
|
|
17
|
-
];
|
|
15
|
+
type BaseGeoImageEventsList = ["loadend"];
|
|
18
16
|
export type BaseGeoImageEventsType = EventsHandler<BaseGeoImageEventsList> & EventsHandler<LayerEventsList>;
|
|
19
17
|
/**
|
|
20
|
-
* BaseGeoImage
|
|
21
|
-
*
|
|
22
|
-
* object displayed on the globe.
|
|
18
|
+
* BaseGeoImage represents a square imagery layer displayed on the globe.
|
|
19
|
+
* It can use a static image, animated video, or WebGL buffer as a source.
|
|
23
20
|
* @class
|
|
24
21
|
* @extends {Layer}
|
|
25
22
|
*/
|
|
@@ -48,12 +45,14 @@ declare class BaseGeoImage extends Layer {
|
|
|
48
45
|
protected _cornersWgs84: LonLat[];
|
|
49
46
|
protected _cornersMerc: LonLat[];
|
|
50
47
|
protected _isFullExtent: number;
|
|
48
|
+
protected _crossesAntimeridian: boolean;
|
|
51
49
|
/**
|
|
52
50
|
* rendering function pointer
|
|
53
51
|
* @type {Function}
|
|
54
52
|
*/
|
|
55
53
|
rendering: Function;
|
|
56
54
|
protected _onLoadend_: EventCallback | null;
|
|
55
|
+
protected _materialMipmapUpdateCounter: number;
|
|
57
56
|
constructor(name: string | null, options?: IBaseGeoImageParams);
|
|
58
57
|
get isIdle(): boolean;
|
|
59
58
|
addTo(planet: Planet): void;
|
|
@@ -63,31 +62,33 @@ declare class BaseGeoImage extends Layer {
|
|
|
63
62
|
/**
|
|
64
63
|
* Gets corners coordinates.
|
|
65
64
|
* @public
|
|
66
|
-
* @
|
|
65
|
+
* @returns {Array.<LonLat>} - (exactly 4 entries)
|
|
67
66
|
*/
|
|
68
67
|
getCornersLonLat(): LonLat[];
|
|
69
68
|
/**
|
|
70
69
|
* Gets corners coordinates.
|
|
71
70
|
* @public
|
|
72
|
-
* @
|
|
71
|
+
* @returns {Array.<Array<number>>} - (exactly 4 entries)
|
|
73
72
|
*/
|
|
74
73
|
getCorners(): NumberArray2[];
|
|
75
74
|
/**
|
|
76
75
|
* Sets geoImage geographical corners coordinates.
|
|
77
76
|
* @public
|
|
78
|
-
* @param {Array.<Array.<number>>} corners - GeoImage
|
|
79
|
-
*
|
|
80
|
-
* and fourth - left bottom image corner.
|
|
77
|
+
* @param {Array.<Array.<number>>} corners - GeoImage corner coordinates. Each coordinate has exactly 2 entries.
|
|
78
|
+
* The first corner is top-left, the second is top-right, the third is bottom-right, and the fourth is bottom-left.
|
|
81
79
|
*/
|
|
82
80
|
setCorners(corners: NumberArray2[]): void;
|
|
83
81
|
/**
|
|
84
82
|
* Sets geoImage geographical corners coordinates.
|
|
85
83
|
* @public
|
|
86
|
-
* @param {Array.<LonLat>} corners - GeoImage
|
|
87
|
-
*
|
|
88
|
-
*
|
|
84
|
+
* @param {Array.<LonLat>} corners - GeoImage corner coordinates.
|
|
85
|
+
* The first corner is top-left, the second is top-right, the third is bottom-right, and the fourth is bottom-left.
|
|
86
|
+
* (exactly 4 entries)
|
|
89
87
|
*/
|
|
90
88
|
setCornersLonLat(corners: LonLat[]): void;
|
|
89
|
+
protected _isExplicitFullWorldLonEdge(lonA: number, lonB: number): boolean;
|
|
90
|
+
protected _unwrapCornersLonLat(corners: LonLat[]): LonLat[];
|
|
91
|
+
protected _detectAntimeridianCrossing(corners: LonLat[]): boolean;
|
|
91
92
|
/**
|
|
92
93
|
* Creates geoImage frame.
|
|
93
94
|
* @protected
|
|
@@ -117,22 +118,23 @@ declare class BaseGeoImage extends Layer {
|
|
|
117
118
|
* @param {Material} material - GeoImage material.
|
|
118
119
|
*/
|
|
119
120
|
clearMaterial(material: Material): void;
|
|
121
|
+
protected _getCyclicLonShift(sourceExtent: Extent, targetExtent: Extent, worldWidth: number): number;
|
|
120
122
|
/**
|
|
121
123
|
* @public
|
|
122
124
|
* @override
|
|
123
|
-
* @returns {
|
|
125
|
+
* @returns {NumberArray4}
|
|
124
126
|
*/
|
|
125
127
|
applyMaterial(material: Material): NumberArray4;
|
|
126
128
|
/**
|
|
127
129
|
* Gets frame width size in pixels.
|
|
128
130
|
* @public
|
|
129
|
-
* @returns {
|
|
131
|
+
* @returns {number} Frame width.
|
|
130
132
|
*/
|
|
131
133
|
get getFrameWidth(): number;
|
|
132
134
|
/**
|
|
133
135
|
* Gets frame height size in pixels.
|
|
134
136
|
* @public
|
|
135
|
-
* @returns {
|
|
137
|
+
* @returns {number} Frame height.
|
|
136
138
|
*/
|
|
137
139
|
get getFrameHeight(): number;
|
|
138
140
|
/**
|
|
@@ -140,6 +142,7 @@ declare class BaseGeoImage extends Layer {
|
|
|
140
142
|
* @protected
|
|
141
143
|
*/
|
|
142
144
|
protected _createSourceTexture(): void;
|
|
145
|
+
protected _updateMaterialTextureMipmap(): void;
|
|
143
146
|
_renderingProjType1(): void;
|
|
144
147
|
protected _renderingProjType0(): void;
|
|
145
148
|
}
|
|
@@ -12,26 +12,26 @@ export interface ICanvasTilesParams extends ILayerParams {
|
|
|
12
12
|
minNativeZoom?: number;
|
|
13
13
|
maxNativeZoom?: number;
|
|
14
14
|
}
|
|
15
|
-
type CanvasTilesEventsList = [
|
|
16
|
-
"load",
|
|
17
|
-
"loadend"
|
|
18
|
-
];
|
|
15
|
+
type CanvasTilesEventsList = ["load", "loadend"];
|
|
19
16
|
type CanvasTilesEventsType = EventsHandler<CanvasTilesEventsList> & EventsHandler<LayerEventsList>;
|
|
20
17
|
/**
|
|
21
|
-
* Layer
|
|
18
|
+
* Layer that renders each tile as a separate canvas object.
|
|
22
19
|
* @class
|
|
23
20
|
* @extends {Layer}
|
|
24
|
-
* @param {
|
|
25
|
-
* @param {ICanvasTilesParams} options
|
|
21
|
+
* @param {string} [name="noname"] - Layer name.
|
|
22
|
+
* @param {ICanvasTilesParams} options - Layer options.
|
|
26
23
|
* @param {number} [options.opacity=1.0] - Layer opacity.
|
|
27
24
|
* @param {number} [options.minZoom=0] - Minimal visibility zoom level.
|
|
28
|
-
* @param {number} [options.maxZoom=
|
|
29
|
-
* @param {string} [options.attribution] - Layer attribution
|
|
25
|
+
* @param {number} [options.maxZoom=50] - Maximal visibility zoom level.
|
|
26
|
+
* @param {string} [options.attribution] - Layer attribution shown in the attribution area.
|
|
30
27
|
* @param {boolean} [options.isBaseLayer=false] - Base layer flag.
|
|
31
28
|
* @param {boolean} [options.visibility=true] - Layer visibility.
|
|
29
|
+
* @param {boolean} [options.animated=false] - Re-draw ready tiles every frame.
|
|
30
|
+
* @param {number} [options.minNativeZoom=0] - Minimal zoom level where native tile drawing is allowed.
|
|
31
|
+
* @param {number} [options.maxNativeZoom=100] - Maximal zoom level where native tile drawing is allowed.
|
|
32
32
|
* @param {DrawTileCallback} options.drawTile - Draw tile callback.
|
|
33
|
-
* @fires
|
|
34
|
-
* @fires
|
|
33
|
+
* @fires load
|
|
34
|
+
* @fires loadend
|
|
35
35
|
*/
|
|
36
36
|
declare class CanvasTiles extends Layer {
|
|
37
37
|
static MAX_REQUESTS: number;
|
|
@@ -47,7 +47,7 @@ declare class CanvasTiles extends Layer {
|
|
|
47
47
|
*/
|
|
48
48
|
protected _counter: number;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Queue of pending tiles waiting to be created.
|
|
51
51
|
* @protected
|
|
52
52
|
* @type {Material[]}
|
|
53
53
|
*/
|
|
@@ -99,6 +99,8 @@ declare class CanvasTiles extends Layer {
|
|
|
99
99
|
protected _dequeueRequest(): void;
|
|
100
100
|
protected _whilePendings(): Material | null;
|
|
101
101
|
applyMaterial(material: Material): NumberArray4;
|
|
102
|
+
protected _apllyMaterialDefault(material: Material): NumberArray4;
|
|
103
|
+
protected _applyMaterialFast(material: Material): NumberArray4;
|
|
102
104
|
clearMaterial(material: Material): void;
|
|
103
105
|
}
|
|
104
106
|
export { CanvasTiles };
|
package/lib/layer/GeoImage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseGeoImage } from
|
|
2
|
-
import type { IBaseGeoImageParams } from
|
|
1
|
+
import { BaseGeoImage } from "./BaseGeoImage";
|
|
2
|
+
import type { IBaseGeoImageParams } from "./BaseGeoImage";
|
|
3
3
|
import { Material } from "../layer/Material";
|
|
4
4
|
import type { WebGLTextureExt } from "../webgl/Handler";
|
|
5
5
|
interface IGeoTexture2dParams extends IBaseGeoImageParams {
|
package/lib/layer/KML.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import type { IBillboardParams } from "../entity/billboard/Billboard";
|
|
2
|
+
import { Billboard } from "../entity/billboard/Billboard";
|
|
3
3
|
import { Entity } from "../entity/Entity";
|
|
4
4
|
import { Extent } from "../Extent";
|
|
5
|
-
import { Vector } from "./Vector";
|
|
6
5
|
import type { IVectorParams } from "./Vector";
|
|
6
|
+
import { Vector } from "./Vector";
|
|
7
7
|
interface IKMLParams extends IVectorParams {
|
|
8
8
|
color?: string;
|
|
9
9
|
billboard?: IBillboardParams;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Layer to render
|
|
12
|
+
* Layer to render KML files.
|
|
13
13
|
* @class
|
|
14
14
|
* @extends {Vector}
|
|
15
|
-
* @param {string} name
|
|
16
|
-
* @param {
|
|
15
|
+
* @param {string} name - Layer name.
|
|
16
|
+
* @param {IKMLParams} [options] - KML layer options.
|
|
17
17
|
*/
|
|
18
18
|
export declare class KML extends Vector {
|
|
19
19
|
protected _color: string;
|
|
@@ -24,7 +24,7 @@ export declare class KML extends Vector {
|
|
|
24
24
|
protected _AGBRtoRGBA(agbr: string): string | undefined;
|
|
25
25
|
/**
|
|
26
26
|
* @protected
|
|
27
|
-
* @returns
|
|
27
|
+
* @returns {number[][]} Array of `[longitude, latitude, altitude?]`.
|
|
28
28
|
*/
|
|
29
29
|
protected _parseKMLcoordinates(coords: Element): number[][];
|
|
30
30
|
protected _kmlPlacemarkToEntity(placemark: Element | undefined | null, extent: Extent): Entity | undefined;
|
|
@@ -34,22 +34,23 @@ export declare class KML extends Vector {
|
|
|
34
34
|
/**
|
|
35
35
|
* Creates billboards or polylines from array of lonlat.
|
|
36
36
|
* @protected
|
|
37
|
-
* @param {
|
|
38
|
-
* @param {string} color
|
|
39
|
-
* @
|
|
37
|
+
* @param {number[][][][]} coordinates - Coordinates grouped by files and paths.
|
|
38
|
+
* @param {string} color - Polyline color.
|
|
39
|
+
* @param {IBillboardParams} [billboard] - Billboard options.
|
|
40
|
+
* @returns {{entities: Array.<(Entity|undefined)>, extent: Extent}}
|
|
40
41
|
*/
|
|
41
42
|
protected _convertCoordonatesIntoEntities(coordinates: number[][][][], color: string, billboard?: IBillboardParams): any;
|
|
42
43
|
/**
|
|
43
44
|
* @protected
|
|
44
|
-
* @returns {
|
|
45
|
+
* @returns {Promise<XMLDocument>}
|
|
45
46
|
*/
|
|
46
47
|
protected _getXmlContent(file: Blob): Promise<XMLDocument>;
|
|
47
48
|
protected _expandExtents(extent1: Extent | null | undefined, extent2: Extent): Extent;
|
|
48
49
|
/**
|
|
49
50
|
* @public
|
|
50
|
-
* @param {
|
|
51
|
-
* @param {string} [color]
|
|
52
|
-
* @param {
|
|
51
|
+
* @param {Blob[]} kmls - KML files.
|
|
52
|
+
* @param {string} [color] - Polyline color.
|
|
53
|
+
* @param {IBillboardParams} [billboard] - Billboard options.
|
|
53
54
|
* @returns {Promise<{entities: Entity[], extent: Extent}>}
|
|
54
55
|
*/
|
|
55
56
|
addKmlFromFiles(kmls: Blob[], color?: string, billboard?: IBillboardParams): Promise<{
|
|
@@ -57,16 +58,16 @@ export declare class KML extends Vector {
|
|
|
57
58
|
extent: any;
|
|
58
59
|
} | null>;
|
|
59
60
|
/**
|
|
60
|
-
* @param {string} color
|
|
61
|
+
* @param {string} color - Layer color.
|
|
61
62
|
* @public
|
|
62
63
|
*/
|
|
63
64
|
setColor(color: string): void;
|
|
64
65
|
protected _getKmlFromUrl(url: string): Promise<Document>;
|
|
65
66
|
/**
|
|
66
67
|
* @public
|
|
67
|
-
* @param {string} url -
|
|
68
|
-
* @param {string} [color]
|
|
69
|
-
* @param {Billboard} [billboard]
|
|
68
|
+
* @param {string} url - URL of the KML to display. For example: './myFile.kml' or 'http://mySite/myFile.kml'.
|
|
69
|
+
* @param {string} [color] - Polyline color.
|
|
70
|
+
* @param {Billboard | IBillboardParams} [billboard] - Billboard options.
|
|
70
71
|
* @returns {Promise<{entities: Entity[], extent: Extent}>}
|
|
71
72
|
*/
|
|
72
73
|
addKmlFromUrl(url: string, color?: string, billboard?: Billboard | IBillboardParams): Promise<any>;
|