@openglobus/og 0.11.7 → 0.12.3
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/css/og.css +5 -2
- package/dist/@openglobus/og.css +1 -0
- package/dist/@openglobus/og.esm.js +21 -0
- package/dist/@openglobus/og.esm.js.map +1 -0
- package/dist/@openglobus/og.umd.js +21 -0
- package/dist/@openglobus/og.umd.js.map +1 -0
- package/package.json +11 -11
- package/src/og/Globe.js +18 -6
- package/src/og/camera/Camera.js +70 -79
- package/src/og/camera/PlanetCamera.js +25 -30
- package/src/og/control/DebugInfo.js +2 -2
- package/src/og/control/EarthNavigation.js +26 -17
- package/src/og/control/Lighting.js +52 -73
- package/src/og/control/MouseNavigation.js +30 -29
- package/src/og/control/MouseWheelZoomControl.js +257 -0
- package/src/og/control/Sun.js +3 -3
- package/src/og/control/index.js +2 -0
- package/src/og/control/visibleExtent/Segment.js +1862 -0
- package/src/og/control/visibleExtent/VisibleExtent.js +80 -0
- package/src/og/control/visibleExtent/drawnode.js +751 -0
- package/src/og/entity/BaseBillboard.js +9 -9
- package/src/og/entity/Entity.js +742 -742
- package/src/og/entity/GeoObjectHandler.js +138 -134
- package/src/og/entity/Label.js +7 -7
- package/src/og/entity/LabelHandler.js +2 -1
- package/src/og/layer/CanvasTiles.js +8 -12
- package/src/og/layer/GeoImage.js +2 -10
- package/src/og/layer/GeoTexture2d.js +2 -10
- package/src/og/layer/GeoVideo.js +2 -10
- package/src/og/layer/KML.js +19 -12
- package/src/og/layer/Layer.js +4 -23
- package/src/og/layer/WMS.js +0 -2
- package/src/og/layer/XYZ.js +31 -33
- package/src/og/math/Vec3.js +18 -2
- package/src/og/quadTree/Node.js +48 -93
- package/src/og/quadTree/quadTree.js +1 -1
- package/src/og/renderer/Renderer.js +69 -96
- package/src/og/renderer/RendererEvents.js +3 -1
- package/src/og/scene/Planet.js +171 -173
- package/src/og/segment/Segment.js +99 -268
- package/src/og/segment/Slice.js +45 -0
- package/src/og/shaders/drawnode.js +171 -350
- package/src/og/shaders/geoObject.js +15 -6
- package/src/og/terrain/EmptyTerrain.js +3 -2
- package/src/og/terrain/GlobusTerrain.js +2 -0
- package/src/og/utils/GeoImageCreator.js +5 -1
- package/src/og/utils/Loader.js +1 -1
- package/src/og/utils/PlainSegmentWorker.js +0 -13
- package/src/og/webgl/Handler.js +14 -10
- package/types/Clock.d.ts +94 -0
- package/types/Deferred.d.ts +6 -0
- package/types/Events.d.ts +77 -0
- package/types/Extent.d.ts +166 -0
- package/types/Globe.d.ts +85 -0
- package/types/ImageCanvas.d.ts +123 -0
- package/types/Lock.d.ts +12 -0
- package/types/LonLat.d.ts +108 -0
- package/types/Popup.d.ts +42 -0
- package/types/QueueArray.d.ts +19 -0
- package/types/Rectangle.d.ts +80 -0
- package/types/Stack.d.ts +19 -0
- package/types/ajax.d.ts +24 -0
- package/types/arial.d.ts +48 -0
- package/types/astro/astro.d.ts +38 -0
- package/types/astro/earth.d.ts +7 -0
- package/types/astro/jd.d.ts +254 -0
- package/types/bv/Box.d.ts +30 -0
- package/types/bv/Sphere.d.ts +38 -0
- package/types/bv/index.d.ts +3 -0
- package/types/camera/Camera.d.ts +312 -0
- package/types/camera/Frustum.d.ts +133 -0
- package/types/camera/PlanetCamera.d.ts +219 -0
- package/types/camera/index.d.ts +3 -0
- package/types/cons.d.ts +40 -0
- package/types/control/CompassButton.d.ts +17 -0
- package/types/control/Control.d.ts +104 -0
- package/types/control/DebugInfo.d.ts +15 -0
- package/types/control/EarthCoordinates.d.ts +47 -0
- package/types/control/EarthNavigation.d.ts +43 -0
- package/types/control/GeoImageDragControl.d.ts +6 -0
- package/types/control/KeyboardNavigation.d.ts +21 -0
- package/types/control/LayerSwitcher.d.ts +21 -0
- package/types/control/Lighting.d.ts +16 -0
- package/types/control/MouseNavigation.d.ts +48 -0
- package/types/control/MouseWheelZoomControl.d.ts +45 -0
- package/types/control/ScaleControl.d.ts +22 -0
- package/types/control/ShowFps.d.ts +11 -0
- package/types/control/SimpleNavigation.d.ts +25 -0
- package/types/control/Sun.d.ts +50 -0
- package/types/control/ToggleWireframe.d.ts +12 -0
- package/types/control/TouchNavigation.d.ts +48 -0
- package/types/control/ZoomControl.d.ts +27 -0
- package/types/control/index.d.ts +18 -0
- package/types/ellipsoid/Ellipsoid.d.ts +146 -0
- package/types/ellipsoid/index.d.ts +3 -0
- package/types/ellipsoid/wgs84.d.ts +6 -0
- package/types/entity/BaseBillboard.d.ts +215 -0
- package/types/entity/Billboard.d.ts +94 -0
- package/types/entity/BillboardHandler.d.ts +79 -0
- package/types/entity/Entity.d.ts +348 -0
- package/types/entity/EntityCollection.d.ts +317 -0
- package/types/entity/GeoObject.d.ts +111 -0
- package/types/entity/GeoObjectHandler.d.ts +81 -0
- package/types/entity/Geometry.d.ts +74 -0
- package/types/entity/GeometryHandler.d.ts +76 -0
- package/types/entity/Label.d.ts +189 -0
- package/types/entity/LabelHandler.d.ts +31 -0
- package/types/entity/LabelWorker.d.ts +11 -0
- package/types/entity/PointCloud.d.ts +174 -0
- package/types/entity/PointCloudHandler.d.ts +38 -0
- package/types/entity/Polyline.d.ts +306 -0
- package/types/entity/PolylineHandler.d.ts +18 -0
- package/types/entity/Ray.d.ts +124 -0
- package/types/entity/RayHandler.d.ts +67 -0
- package/types/entity/ShapeHandler.d.ts +22 -0
- package/types/entity/Strip.d.ts +119 -0
- package/types/entity/StripHandler.d.ts +38 -0
- package/types/entity/index.d.ts +8 -0
- package/types/index.core.d.ts +65 -0
- package/types/index.d.ts +45 -0
- package/types/index.webgl.d.ts +7 -0
- package/types/input/KeyboardHandler.d.ts +10 -0
- package/types/input/MouseHandler.d.ts +5 -0
- package/types/input/TouchHandler.d.ts +5 -0
- package/types/input/input.d.ts +34 -0
- package/types/layer/BaseGeoImage.d.ts +94 -0
- package/types/layer/CanvasTiles.d.ts +67 -0
- package/types/layer/GeoImage.d.ts +52 -0
- package/types/layer/GeoTexture2d.d.ts +8 -0
- package/types/layer/GeoVideo.d.ts +55 -0
- package/types/layer/KML.d.ts +68 -0
- package/types/layer/Layer.d.ts +310 -0
- package/types/layer/Material.d.ts +45 -0
- package/types/layer/Vector.d.ts +208 -0
- package/types/layer/WMS.d.ts +61 -0
- package/types/layer/XYZ.d.ts +119 -0
- package/types/layer/index.d.ts +10 -0
- package/types/light/LightSource.d.ts +178 -0
- package/types/math/Line2.d.ts +11 -0
- package/types/math/Line3.d.ts +10 -0
- package/types/math/Mat3.d.ts +65 -0
- package/types/math/Mat4.d.ts +176 -0
- package/types/math/Plane.d.ts +18 -0
- package/types/math/Quat.d.ts +379 -0
- package/types/math/Ray.d.ts +82 -0
- package/types/math/Vec2.d.ts +309 -0
- package/types/math/Vec3.d.ts +467 -0
- package/types/math/Vec4.d.ts +162 -0
- package/types/math/coder.d.ts +43 -0
- package/types/math/index.d.ts +11 -0
- package/types/math.d.ts +261 -0
- package/types/mercator.d.ts +92 -0
- package/types/proj/EPSG3857.d.ts +6 -0
- package/types/proj/EPSG4326.d.ts +6 -0
- package/types/proj/Proj.d.ts +42 -0
- package/types/quadTree/EntityCollectionNode.d.ts +34 -0
- package/types/quadTree/Node.d.ts +60 -0
- package/types/quadTree/quadTree.d.ts +40 -0
- package/types/renderer/Renderer.d.ts +290 -0
- package/types/renderer/RendererEvents.d.ts +237 -0
- package/types/res/images.d.ts +3 -0
- package/types/scene/Axes.d.ts +11 -0
- package/types/scene/BaseNode.d.ts +60 -0
- package/types/scene/Planet.d.ts +576 -0
- package/types/scene/RenderNode.d.ts +142 -0
- package/types/scene/SkyBox.d.ts +10 -0
- package/types/scene/index.d.ts +4 -0
- package/types/segment/Segment.d.ts +275 -0
- package/types/segment/SegmentLonLat.d.ts +17 -0
- package/types/segment/Slice.d.ts +10 -0
- package/types/segment/segmentHelper.d.ts +13 -0
- package/types/shaders/billboard.d.ts +3 -0
- package/types/shaders/depth.d.ts +2 -0
- package/types/shaders/drawnode.d.ts +7 -0
- package/types/shaders/geoObject.d.ts +3 -0
- package/types/shaders/label.d.ts +4 -0
- package/types/shaders/pointCloud.d.ts +2 -0
- package/types/shaders/polyline.d.ts +3 -0
- package/types/shaders/ray.d.ts +2 -0
- package/types/shaders/screenFrame.d.ts +2 -0
- package/types/shaders/shape.d.ts +4 -0
- package/types/shaders/skybox.d.ts +2 -0
- package/types/shaders/toneMapping.d.ts +2 -0
- package/types/shapes/BaseShape.d.ts +250 -0
- package/types/shapes/Sphere.d.ts +41 -0
- package/types/terrain/BilTerrain.d.ts +7 -0
- package/types/terrain/EmptyTerrain.d.ts +73 -0
- package/types/terrain/Geoid.d.ts +26 -0
- package/types/terrain/GlobusTerrain.d.ts +116 -0
- package/types/terrain/MapboxTerrain.d.ts +7 -0
- package/types/terrain/index.d.ts +5 -0
- package/types/utils/FontAtlas.d.ts +15 -0
- package/types/utils/GeoImageCreator.d.ts +30 -0
- package/types/utils/ImagesCacheManager.d.ts +10 -0
- package/types/utils/Loader.d.ts +25 -0
- package/types/utils/NormalMapCreator.d.ts +39 -0
- package/types/utils/PlainSegmentWorker.d.ts +10 -0
- package/types/utils/TerrainWorker.d.ts +9 -0
- package/types/utils/TextureAtlas.d.ts +111 -0
- package/types/utils/VectorTileCreator.d.ts +16 -0
- package/types/utils/colorTable.d.ts +143 -0
- package/types/utils/earcut.d.ts +6 -0
- package/types/utils/shared.d.ts +231 -0
- package/types/webgl/Framebuffer.d.ts +135 -0
- package/types/webgl/Handler.d.ts +417 -0
- package/types/webgl/Multisample.d.ts +89 -0
- package/types/webgl/Program.d.ts +161 -0
- package/types/webgl/ProgramController.d.ts +89 -0
- package/types/webgl/callbacks.d.ts +1 -0
- package/types/webgl/index.d.ts +6 -0
- package/types/webgl/types.d.ts +2 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export class SkyBox extends RenderNode {
|
|
2
|
+
static createDefault(RESOURCES_URL: any): SkyBox;
|
|
3
|
+
params: any;
|
|
4
|
+
vertexPositionBuffer: any;
|
|
5
|
+
texture: any;
|
|
6
|
+
init(): void;
|
|
7
|
+
frame(): void;
|
|
8
|
+
_createBuffers(): void;
|
|
9
|
+
}
|
|
10
|
+
import { RenderNode } from "./RenderNode.js";
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Planet segment Web Mercator tile class that stored and rendered with quad tree.
|
|
3
|
+
* @class
|
|
4
|
+
* @param {quadTree.Node} node - Segment node.
|
|
5
|
+
* @param {Planet} planet - Current planet scene.
|
|
6
|
+
* @param {Number} tileZoom - Zoom index.
|
|
7
|
+
* @param {Extent} extent - Segment extent.
|
|
8
|
+
*/
|
|
9
|
+
export class Segment {
|
|
10
|
+
/**
|
|
11
|
+
* @param {quadTree.Node} node - Segment node.
|
|
12
|
+
* @param {Planet} planet - Current planet scene.
|
|
13
|
+
* @param {number} tileZoom - Zoom index.
|
|
14
|
+
* @param {Extent} extent - Segment extent.
|
|
15
|
+
*/
|
|
16
|
+
constructor(node: quadTree.Node, planet: Planet, tileZoom: number, extent: Extent);
|
|
17
|
+
isPole: boolean;
|
|
18
|
+
_tileGroup: number;
|
|
19
|
+
_projection: import("../proj/Proj.js").Proj;
|
|
20
|
+
/**
|
|
21
|
+
* Quad tree node of the segment.
|
|
22
|
+
* @type {quadTree.Node}
|
|
23
|
+
*/
|
|
24
|
+
node: quadTree.Node;
|
|
25
|
+
/**
|
|
26
|
+
* Planet pointer.
|
|
27
|
+
* @type {Planet}
|
|
28
|
+
*/
|
|
29
|
+
planet: Planet;
|
|
30
|
+
/**
|
|
31
|
+
* WebGl handler pointer.
|
|
32
|
+
* @type {Handler}
|
|
33
|
+
*/
|
|
34
|
+
handler: Handler;
|
|
35
|
+
/**
|
|
36
|
+
* Segment bounding sphere
|
|
37
|
+
* @type {Sphere}
|
|
38
|
+
*/
|
|
39
|
+
bsphere: Sphere;
|
|
40
|
+
_plainRadius: number;
|
|
41
|
+
/**
|
|
42
|
+
* Segment bounding box.
|
|
43
|
+
* @type {Box}
|
|
44
|
+
*/
|
|
45
|
+
bbox: Box;
|
|
46
|
+
_sw: Vec3;
|
|
47
|
+
_nw: Vec3;
|
|
48
|
+
_se: Vec3;
|
|
49
|
+
_ne: Vec3;
|
|
50
|
+
centerNormal: Vec3;
|
|
51
|
+
/**
|
|
52
|
+
* Geographical extent.
|
|
53
|
+
* @type {Extent}
|
|
54
|
+
*/
|
|
55
|
+
_extent: Extent;
|
|
56
|
+
_extentLonLat: Extent;
|
|
57
|
+
/**
|
|
58
|
+
* Vertices grid size.
|
|
59
|
+
* @type {number}
|
|
60
|
+
*/
|
|
61
|
+
gridSize: number;
|
|
62
|
+
fileGridSize: number;
|
|
63
|
+
/**
|
|
64
|
+
* Tile zoom index.
|
|
65
|
+
* @type {number}
|
|
66
|
+
*/
|
|
67
|
+
tileZoom: number;
|
|
68
|
+
/**
|
|
69
|
+
* Horizontal tile index.
|
|
70
|
+
* @type {number}
|
|
71
|
+
*/
|
|
72
|
+
tileX: number;
|
|
73
|
+
tileXE: number;
|
|
74
|
+
tileXW: number;
|
|
75
|
+
tileYN: number;
|
|
76
|
+
tileYS: number;
|
|
77
|
+
/**
|
|
78
|
+
* Vertical tile index.
|
|
79
|
+
* @type {number}
|
|
80
|
+
*/
|
|
81
|
+
tileY: number;
|
|
82
|
+
tileIndex: string;
|
|
83
|
+
/**
|
|
84
|
+
* Texture materials array.
|
|
85
|
+
* @type {Array.<planetSegment.Material>}
|
|
86
|
+
*/
|
|
87
|
+
materials: Array<planetSegment.Material>;
|
|
88
|
+
/**
|
|
89
|
+
* Plain segment vertices was created.
|
|
90
|
+
* @type {boolean}
|
|
91
|
+
*/
|
|
92
|
+
plainReady: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Segment is ready to create plain vertices.
|
|
95
|
+
* @type {boolean}
|
|
96
|
+
*/
|
|
97
|
+
initialized: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Normal map is allready made.
|
|
100
|
+
* @type {boolean}
|
|
101
|
+
*/
|
|
102
|
+
normalMapReady: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Parent normal map is made allready(optimization parameter).
|
|
105
|
+
* @type {boolean}
|
|
106
|
+
*/
|
|
107
|
+
parentNormalMapReady: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Terrain is allready applied flag.
|
|
110
|
+
* @type {boolean}
|
|
111
|
+
*/
|
|
112
|
+
terrainReady: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Terrain is loading now flag.
|
|
115
|
+
* @type {boolean}
|
|
116
|
+
*/
|
|
117
|
+
terrainIsLoading: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Terrain existing flag.
|
|
120
|
+
* @type {boolean}
|
|
121
|
+
*/
|
|
122
|
+
terrainExists: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Means that tree passage reach the segment, and the segment terrain is ready.
|
|
125
|
+
* @type {boolean}
|
|
126
|
+
*/
|
|
127
|
+
passReady: boolean;
|
|
128
|
+
plainVertices: any;
|
|
129
|
+
plainVerticesHigh: any;
|
|
130
|
+
plainVerticesLow: any;
|
|
131
|
+
plainNormals: any;
|
|
132
|
+
terrainVertices: any;
|
|
133
|
+
terrainVerticesHigh: any;
|
|
134
|
+
terrainVerticesLow: any;
|
|
135
|
+
noDataVertices: any;
|
|
136
|
+
tempVertices: any;
|
|
137
|
+
tempVerticesHigh: any;
|
|
138
|
+
tempVerticesLow: any;
|
|
139
|
+
normalMapTexture: any;
|
|
140
|
+
normalMapTextureBias: Float32Array;
|
|
141
|
+
normalMapVertices: any;
|
|
142
|
+
normalMapVerticesHigh: any;
|
|
143
|
+
normalMapVerticesLow: any;
|
|
144
|
+
normalMapNormals: any;
|
|
145
|
+
vertexNormalBuffer: any;
|
|
146
|
+
vertexPositionBuffer: any;
|
|
147
|
+
vertexPositionBufferHigh: any;
|
|
148
|
+
vertexPositionBufferLow: any;
|
|
149
|
+
vertexTextureCoordBuffer: any;
|
|
150
|
+
_globalTextureCoordinates: Float32Array;
|
|
151
|
+
_inTheQueue: boolean;
|
|
152
|
+
_appliedNeighborsZoom: number[];
|
|
153
|
+
_slices: any[];
|
|
154
|
+
_indexBuffer: any;
|
|
155
|
+
readyToEngage: boolean;
|
|
156
|
+
plainProcessing: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Returns entity terrain point.
|
|
159
|
+
* @public
|
|
160
|
+
* @param {Entity} entity - Entity.
|
|
161
|
+
* @param {Vec3} res - Point coordinates.
|
|
162
|
+
* @param {Vec3} [normal] - Terrain point normal.
|
|
163
|
+
* @returns {Vec3} -
|
|
164
|
+
*/
|
|
165
|
+
public getEntityTerrainPoint(entity: Entity, res: Vec3, normal?: Vec3): Vec3;
|
|
166
|
+
isEntityInside(e: any): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Returns distance from object to terrain coordinates and terrain point that calculates out in the res parameter.
|
|
169
|
+
* @public
|
|
170
|
+
* @param {Vec3} xyz - Cartesian object position.
|
|
171
|
+
* @param {LonLat} insideSegmentPosition - Geodetic object position.
|
|
172
|
+
* @param {Vec3} [res] - Result cartesian coordiantes on the terrain.
|
|
173
|
+
* @param {Vec3} [normal] - Terrain point normal.
|
|
174
|
+
* @returns {number} -
|
|
175
|
+
*/
|
|
176
|
+
public getTerrainPoint(xyz: Vec3, insideSegmentPosition: LonLat, res?: Vec3, normal?: Vec3): number;
|
|
177
|
+
/**
|
|
178
|
+
* Project wgs86 to segment native projection.
|
|
179
|
+
* @public
|
|
180
|
+
* @param {LonLat} lonlat - Coordinates to project.
|
|
181
|
+
* @returns {LonLat} -
|
|
182
|
+
*/
|
|
183
|
+
public projectNative(lonlat: LonLat): LonLat;
|
|
184
|
+
/**
|
|
185
|
+
*
|
|
186
|
+
* @param {boolean} forceLoading
|
|
187
|
+
*/
|
|
188
|
+
loadTerrain(forceLoading: boolean): void;
|
|
189
|
+
/**
|
|
190
|
+
* Terrain obtained from server.
|
|
191
|
+
* @param {Float32Array} elevations - Elevation data.
|
|
192
|
+
*/
|
|
193
|
+
elevationsExists(elevations: Float32Array): void;
|
|
194
|
+
_checkEqualization(neighborSide: any, neigborNode: any): boolean;
|
|
195
|
+
equalize(): void;
|
|
196
|
+
engage(): void;
|
|
197
|
+
_plainSegmentWorkerCallback(data: any): void;
|
|
198
|
+
_terrainWorkerCallback(data: any): void;
|
|
199
|
+
normalMapTexturePtr: any;
|
|
200
|
+
/**
|
|
201
|
+
* Terrain is not obtained or not exists on the server.
|
|
202
|
+
*/
|
|
203
|
+
elevationsNotExists(): void;
|
|
204
|
+
_normalMapEdgeEqualize(side: any): void;
|
|
205
|
+
applyTerrain(elevations: any): void;
|
|
206
|
+
/**
|
|
207
|
+
* Delete segment gl buffers.
|
|
208
|
+
*/
|
|
209
|
+
deleteBuffers(): void;
|
|
210
|
+
/**
|
|
211
|
+
* Delete materials.
|
|
212
|
+
*/
|
|
213
|
+
deleteMaterials(): void;
|
|
214
|
+
/**
|
|
215
|
+
* Delete elevation data.
|
|
216
|
+
*/
|
|
217
|
+
deleteElevations(): void;
|
|
218
|
+
/**
|
|
219
|
+
* Clear but not destroy segment data.
|
|
220
|
+
*/
|
|
221
|
+
clearSegment(): void;
|
|
222
|
+
/**
|
|
223
|
+
* Removes cache records.
|
|
224
|
+
*/
|
|
225
|
+
_freeCache(): void;
|
|
226
|
+
/**
|
|
227
|
+
* Clear and destroy all segment data.
|
|
228
|
+
*/
|
|
229
|
+
destroySegment(): void;
|
|
230
|
+
_setExtentLonLat(): void;
|
|
231
|
+
/**
|
|
232
|
+
* Creates bound volumes by segment geographical extent.
|
|
233
|
+
*/
|
|
234
|
+
createBoundsByExtent(): void;
|
|
235
|
+
createBoundsByParent(): void;
|
|
236
|
+
setBoundingSphere(x: any, y: any, z: any, v: any): void;
|
|
237
|
+
setBoundingVolume(xmin: any, ymin: any, zmin: any, xmax: any, ymax: any, zmax: any): void;
|
|
238
|
+
setBoundingVolume3v(vmin: any, vmax: any): void;
|
|
239
|
+
setBoundingVolumeArr(bounds: any): void;
|
|
240
|
+
createCoordsBuffers(verticesHigh: any, verticesLow: any, gridSize: any): void;
|
|
241
|
+
_addViewExtent(): void;
|
|
242
|
+
_assignTileIndexes(): void;
|
|
243
|
+
initialize(): void;
|
|
244
|
+
_assignGlobalTextureCoordinates(): void;
|
|
245
|
+
createPlainSegmentAsync(): void;
|
|
246
|
+
createPlainSegment(): void;
|
|
247
|
+
_createPlainVertices(): void;
|
|
248
|
+
/**
|
|
249
|
+
* Gets specific layer material.
|
|
250
|
+
* @public
|
|
251
|
+
* @param {Layer} layer - Layer object.
|
|
252
|
+
* @returns {planetSegment.Material} - Segment material.
|
|
253
|
+
*/
|
|
254
|
+
public getMaterialByLayer(layer: Layer): planetSegment.Material;
|
|
255
|
+
_getLayerExtentOffset(layer: any): number[];
|
|
256
|
+
screenRendering(sh: any, layerSlice: any, sliceIndex: any, defaultTexture: any, isOverlay: any): void;
|
|
257
|
+
heightPickingRendering(sh: any, layerSlice: any): void;
|
|
258
|
+
colorPickingRendering(sh: any, layerSlice: any, sliceIndex: any, defaultTexture: any, isOverlay: any): void;
|
|
259
|
+
depthRendering(sh: any, layerSlice: any): void;
|
|
260
|
+
_getIndexBuffer(): any;
|
|
261
|
+
_collectVisibleNodes(): void;
|
|
262
|
+
layerOverlap(layer: any): boolean;
|
|
263
|
+
getDefaultTexture(): any;
|
|
264
|
+
getExtentLonLat(): Extent;
|
|
265
|
+
getExtentMerc(): Extent;
|
|
266
|
+
getExtent(): Extent;
|
|
267
|
+
getNodeState(): any;
|
|
268
|
+
getNeighborSide(b: any): 1 | -1 | 0 | 2 | 3;
|
|
269
|
+
}
|
|
270
|
+
import { Sphere } from "../bv/Sphere.js";
|
|
271
|
+
import { Box } from "../bv/Box.js";
|
|
272
|
+
import { Vec3 } from "../math/Vec3.js";
|
|
273
|
+
import { Extent } from "../Extent.js";
|
|
274
|
+
import { LonLat } from "../LonLat.js";
|
|
275
|
+
import { Layer } from "../layer/Layer.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Planet segment Web Mercator tile class that stored and rendered with quad tree.
|
|
3
|
+
* @class
|
|
4
|
+
* @extends {Segment}
|
|
5
|
+
* @param {quadNode.Node} node - Quad tree segment node.
|
|
6
|
+
* @param {Planet} planet - Scene planet.
|
|
7
|
+
* @param {Number} tileZoom - Segment tile zoom index.
|
|
8
|
+
* @param {Extent} extent - Segment WGS84 extent.
|
|
9
|
+
*/
|
|
10
|
+
export class SegmentLonLat extends Segment {
|
|
11
|
+
_extentMerc: Extent;
|
|
12
|
+
acceptForRendering(camera: any): any;
|
|
13
|
+
_isNorth: boolean;
|
|
14
|
+
normalMapNormalsRaw: Float32Array;
|
|
15
|
+
}
|
|
16
|
+
import { Segment } from "./Segment.js";
|
|
17
|
+
import { Extent } from "../Extent.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function getInstance(): SegmentHelper;
|
|
2
|
+
declare class SegmentHelper {
|
|
3
|
+
constructor(maxGridSize?: number);
|
|
4
|
+
_maxGridSize: number;
|
|
5
|
+
get maxGridSize(): number;
|
|
6
|
+
init(): void;
|
|
7
|
+
centerIndexesTable: Uint32Array[];
|
|
8
|
+
skirtsIndexesTable: any[][];
|
|
9
|
+
setMaxGridSize(gridSize: any): void;
|
|
10
|
+
createSegmentIndexes(size: any, sidesSizes: any): Uint32Array;
|
|
11
|
+
initTextureCoordsTable(pow: any): Uint16Array[];
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function drawnode_screen_nl(): Program;
|
|
2
|
+
export function drawnode_screen_wl(): Program;
|
|
3
|
+
export function drawnode_screen_wl_webgl2(): Program;
|
|
4
|
+
export function drawnode_colorPicking(): Program;
|
|
5
|
+
export function drawnode_heightPicking(): Program;
|
|
6
|
+
export function drawnode_depth(): Program;
|
|
7
|
+
import { Program } from "../webgl/Program.js";
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base geometry shape class.
|
|
3
|
+
* @class
|
|
4
|
+
* @param {Object} options - Shape parameters:
|
|
5
|
+
* @param {Vec3} [options.position] - Shape position.
|
|
6
|
+
* @param {Quat} [options.orientation] - Shape orientation(rotation).
|
|
7
|
+
* @param {Vec3} [options.scale] - Scale vector.
|
|
8
|
+
* @param {Array.<number>} [options.color] - Shape RGBA color. (exactly 4 entries)
|
|
9
|
+
* @param {string} [options.src] - Texture image url source.
|
|
10
|
+
* @param {boolean} [options.visibility] - Shape visibility.
|
|
11
|
+
*/
|
|
12
|
+
export class BaseShape {
|
|
13
|
+
static set _staticCounter(arg: any);
|
|
14
|
+
static get _staticCounter(): any;
|
|
15
|
+
constructor(options: any);
|
|
16
|
+
/**
|
|
17
|
+
* Unic identifier.
|
|
18
|
+
* @public
|
|
19
|
+
* @readonly
|
|
20
|
+
* @type {number}
|
|
21
|
+
*/
|
|
22
|
+
public readonly id: number;
|
|
23
|
+
/**
|
|
24
|
+
* Shape position.
|
|
25
|
+
* @public
|
|
26
|
+
* @type {Vec3}
|
|
27
|
+
*/
|
|
28
|
+
public position: Vec3;
|
|
29
|
+
/**
|
|
30
|
+
* Shape orientation(rotation)
|
|
31
|
+
* @public
|
|
32
|
+
* @type {Quat}
|
|
33
|
+
*/
|
|
34
|
+
public orientation: Quat;
|
|
35
|
+
/**
|
|
36
|
+
* Scale.
|
|
37
|
+
* @public
|
|
38
|
+
* @type {Vec3}
|
|
39
|
+
*/
|
|
40
|
+
public scale: Vec3;
|
|
41
|
+
/**
|
|
42
|
+
* Shape RGBA color.
|
|
43
|
+
* @public
|
|
44
|
+
* @type {Array.<number>} - (exactly 4 entries)
|
|
45
|
+
*/
|
|
46
|
+
public color: Array<number>;
|
|
47
|
+
/**
|
|
48
|
+
* Shape visibility.
|
|
49
|
+
* @public
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
*/
|
|
52
|
+
public visibility: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Image url source.
|
|
55
|
+
* @protected
|
|
56
|
+
* @type {string}
|
|
57
|
+
*/
|
|
58
|
+
protected _src: string;
|
|
59
|
+
/**
|
|
60
|
+
* Vertices position gl buffer.
|
|
61
|
+
* @protected
|
|
62
|
+
*/
|
|
63
|
+
protected _positionBuffer: any;
|
|
64
|
+
/**
|
|
65
|
+
* Vertices normal gl buffer.
|
|
66
|
+
* @protected
|
|
67
|
+
*/
|
|
68
|
+
protected _normalBuffer: any;
|
|
69
|
+
/**
|
|
70
|
+
* Vertices indexes gl buffer.
|
|
71
|
+
* @protected
|
|
72
|
+
*/
|
|
73
|
+
protected _indexBuffer: any;
|
|
74
|
+
/**
|
|
75
|
+
* Vertex texture coordinates gl buffer.
|
|
76
|
+
* @protected
|
|
77
|
+
*/
|
|
78
|
+
protected _textureCoordBuffer: any;
|
|
79
|
+
/**
|
|
80
|
+
* Vertex positions.
|
|
81
|
+
* @protected
|
|
82
|
+
* @type {Array.<number>}
|
|
83
|
+
*/
|
|
84
|
+
protected _positionData: Array<number>;
|
|
85
|
+
/**
|
|
86
|
+
* Vertex normals.
|
|
87
|
+
* @protected
|
|
88
|
+
* @type {Array.<number>}
|
|
89
|
+
*/
|
|
90
|
+
protected _normalData: Array<number>;
|
|
91
|
+
/**
|
|
92
|
+
* Vertex indeces.
|
|
93
|
+
* @protected
|
|
94
|
+
* @type {Array.<number>}
|
|
95
|
+
*/
|
|
96
|
+
protected _indexData: Array<number>;
|
|
97
|
+
/**
|
|
98
|
+
* Vertex texture coordinates.
|
|
99
|
+
* @protected
|
|
100
|
+
* @type {Array.<number>}
|
|
101
|
+
*/
|
|
102
|
+
protected _textureCoordData: Array<number>;
|
|
103
|
+
/**
|
|
104
|
+
* Scale matrix.
|
|
105
|
+
* @protected
|
|
106
|
+
* @type {Mat4}
|
|
107
|
+
*/
|
|
108
|
+
protected _mxScale: Mat4;
|
|
109
|
+
/**
|
|
110
|
+
* Translation matrix.
|
|
111
|
+
* @protected
|
|
112
|
+
* @type {Mat4}
|
|
113
|
+
*/
|
|
114
|
+
protected _mxTranslation: Mat4;
|
|
115
|
+
/**
|
|
116
|
+
* Model matrix.
|
|
117
|
+
* @protected
|
|
118
|
+
* @type {Mat4}
|
|
119
|
+
*/
|
|
120
|
+
protected _mxModel: Mat4;
|
|
121
|
+
/**
|
|
122
|
+
* Gl texture pointer.
|
|
123
|
+
* @protected
|
|
124
|
+
*/
|
|
125
|
+
protected texture: any;
|
|
126
|
+
/**
|
|
127
|
+
* Assigned render node.
|
|
128
|
+
* @protected
|
|
129
|
+
* @type {RenderNode}
|
|
130
|
+
*/
|
|
131
|
+
protected _renderNode: RenderNode;
|
|
132
|
+
/**
|
|
133
|
+
* Assigned picking color.
|
|
134
|
+
* @protected
|
|
135
|
+
* @type {Array.<number>} - (exactly 3 entries)
|
|
136
|
+
*/
|
|
137
|
+
protected _pickingColor: Array<number>;
|
|
138
|
+
/**
|
|
139
|
+
* Entity instance that holds this shape.
|
|
140
|
+
* @protected
|
|
141
|
+
* @type {Entity}
|
|
142
|
+
*/
|
|
143
|
+
protected _entity: Entity;
|
|
144
|
+
/**
|
|
145
|
+
* Handler that stores and renders this shape object.
|
|
146
|
+
* @protected
|
|
147
|
+
* @type {ShapeHandler}
|
|
148
|
+
*/
|
|
149
|
+
protected _handler: ShapeHandler;
|
|
150
|
+
/**
|
|
151
|
+
* Shape handler array index.
|
|
152
|
+
* @protected
|
|
153
|
+
* @type {number}
|
|
154
|
+
*/
|
|
155
|
+
protected _handlerIndex: number;
|
|
156
|
+
/**
|
|
157
|
+
* Clear shape parameters.
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
public clear(): void;
|
|
161
|
+
/**
|
|
162
|
+
* Sets shape color.
|
|
163
|
+
* @public
|
|
164
|
+
* @param {Array.<number>} color - RGBA color values array. (exactly 4 entries)
|
|
165
|
+
*/
|
|
166
|
+
public setColor(color: Array<number>): void;
|
|
167
|
+
/**
|
|
168
|
+
* Sets shape color.
|
|
169
|
+
* @public
|
|
170
|
+
* @param {Vec4} color - RGBA color vector.
|
|
171
|
+
*/
|
|
172
|
+
public setColor4v(color: Vec4): void;
|
|
173
|
+
/**
|
|
174
|
+
* Sets shape opacity value.
|
|
175
|
+
* @public
|
|
176
|
+
* @param {number} opacity - Opacity value.
|
|
177
|
+
*/
|
|
178
|
+
public setOpacity(opacity: number): void;
|
|
179
|
+
/**
|
|
180
|
+
* Delete gl buffers.
|
|
181
|
+
* @protected
|
|
182
|
+
*/
|
|
183
|
+
protected _deleteBuffers(): void;
|
|
184
|
+
/**
|
|
185
|
+
* Sets shape visibility.
|
|
186
|
+
* @public
|
|
187
|
+
* @param {boolean} visibility - Visibility.
|
|
188
|
+
*/
|
|
189
|
+
public setVisibility(visibility: boolean): void;
|
|
190
|
+
/**
|
|
191
|
+
* Gets visibilty flag.
|
|
192
|
+
* @public
|
|
193
|
+
* @returns {boolean} -
|
|
194
|
+
*/
|
|
195
|
+
public getVisibility(): boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Assign render node.
|
|
198
|
+
* @public
|
|
199
|
+
* @param {RenderNode} renderNode - Render node to assign.
|
|
200
|
+
*/
|
|
201
|
+
public setRenderNode(renderNode: RenderNode): void;
|
|
202
|
+
/**
|
|
203
|
+
* Sets shape position.
|
|
204
|
+
* @public
|
|
205
|
+
* @param {Vec3} position - Shape position.
|
|
206
|
+
*/
|
|
207
|
+
public setPosition3v(position: Vec3): void;
|
|
208
|
+
/**
|
|
209
|
+
* Translate shape position to vector.
|
|
210
|
+
* @public
|
|
211
|
+
* @param {Vec3} vec - Translation vector.
|
|
212
|
+
*/
|
|
213
|
+
public translate3v(vec: Vec3): void;
|
|
214
|
+
/**
|
|
215
|
+
* Sets shape scale.
|
|
216
|
+
* @param {Vec3} scale - Scale vector.
|
|
217
|
+
*/
|
|
218
|
+
setScale3v(scale: Vec3): void;
|
|
219
|
+
setScale(scale: any): void;
|
|
220
|
+
/**
|
|
221
|
+
* Removes shape from shape handler.
|
|
222
|
+
* @public
|
|
223
|
+
*/
|
|
224
|
+
public remove(): void;
|
|
225
|
+
/**
|
|
226
|
+
* Assign picking color.
|
|
227
|
+
* @protected
|
|
228
|
+
* @param {Vec3} color - Picking RGB color.
|
|
229
|
+
*/
|
|
230
|
+
protected setPickingColor3v(color: Vec3): void;
|
|
231
|
+
/**
|
|
232
|
+
* Creates buffers.
|
|
233
|
+
* @protected
|
|
234
|
+
*/
|
|
235
|
+
protected _createBuffers(): void;
|
|
236
|
+
/**
|
|
237
|
+
* Update model matrix.
|
|
238
|
+
* @public
|
|
239
|
+
*/
|
|
240
|
+
public refresh(): void;
|
|
241
|
+
/**
|
|
242
|
+
* Shape rendering.
|
|
243
|
+
* @public
|
|
244
|
+
*/
|
|
245
|
+
public draw(): void;
|
|
246
|
+
drawPicking(): void;
|
|
247
|
+
}
|
|
248
|
+
import { Vec3 } from "../math/Vec3.js";
|
|
249
|
+
import { Quat } from "../math/Quat.js";
|
|
250
|
+
import { Mat4 } from "../math/Mat4.js";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @class
|
|
3
|
+
* @extends {BaseShape}
|
|
4
|
+
* @param {Object} options - Sphere parameters:
|
|
5
|
+
* @param {Vec3} [options.position] - Sphere position.
|
|
6
|
+
* @param {Quat} [options.orientation] - Sphere orientation(rotation).
|
|
7
|
+
* @param {Vec3} [options.scale] - Scale vector.
|
|
8
|
+
* @param {Array.<number>} [options.color] - Sphere RGBA color. (exactly 4 entries)
|
|
9
|
+
* @param {string} [options.src] - Texture image url source.
|
|
10
|
+
* @param {boolean} [options.visibility] - Sphere visibility.
|
|
11
|
+
* @param {number} [options.radius=100] - Sphere radius.
|
|
12
|
+
* @param {number} [options.latBands=16] - Number of latitude bands.
|
|
13
|
+
* @param {number} [options.lonBands=16] - Number of longitude bands.
|
|
14
|
+
*/
|
|
15
|
+
export class Sphere extends BaseShape {
|
|
16
|
+
/**
|
|
17
|
+
* Sphere radius.
|
|
18
|
+
* @protected
|
|
19
|
+
* @type {number}
|
|
20
|
+
*/
|
|
21
|
+
protected _radius: number;
|
|
22
|
+
/**
|
|
23
|
+
* Number of latitude bands.
|
|
24
|
+
* @protected
|
|
25
|
+
* @type {number}
|
|
26
|
+
*/
|
|
27
|
+
protected _latBands: number;
|
|
28
|
+
/**
|
|
29
|
+
* Number of longitude bands.
|
|
30
|
+
* @protected
|
|
31
|
+
* @type {number}
|
|
32
|
+
*/
|
|
33
|
+
protected _lonBands: number;
|
|
34
|
+
/**
|
|
35
|
+
* Create specific shape vertices data.
|
|
36
|
+
* @protected
|
|
37
|
+
* @virtual
|
|
38
|
+
*/
|
|
39
|
+
protected _createData(): void;
|
|
40
|
+
}
|
|
41
|
+
import { BaseShape } from "./BaseShape.js";
|