@openglobus/og 0.15.3 → 0.15.5
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/README.md +3 -7
- package/css/og.css +24 -15
- package/dist/@openglobus/og.css +1 -1
- package/dist/@openglobus/og.esm.js +2 -2
- package/dist/@openglobus/og.esm.js.map +1 -1
- package/dist/@openglobus/og.umd.js +2 -2
- package/dist/@openglobus/og.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/og/Globe.js +4 -0
- package/src/og/LonLat.js +207 -193
- package/src/og/Object3d.js +1 -1
- package/src/og/camera/Camera.js +4 -16
- package/src/og/camera/PlanetCamera.js +12 -6
- package/src/og/control/DebugInfo.js +263 -165
- package/src/og/control/KeyboardNavigation.js +153 -169
- package/src/og/control/MouseNavigation.js +0 -20
- package/src/og/control/RulerSwitcher.js +4 -1
- package/src/og/control/SimpleNavigation.js +123 -128
- package/src/og/control/heightRuler/HeightRuler.js +12 -0
- package/src/og/control/heightRuler/HeightRulerScene.js +224 -0
- package/src/og/control/heightRuler/HeightRulerSwitcher.js +15 -0
- package/src/og/control/index.js +2 -0
- package/src/og/control/ruler/RulerScene.js +106 -79
- package/src/og/ellipsoid/Ellipsoid.js +20 -3
- package/src/og/entity/Entity.js +6 -6
- package/src/og/entity/EntityCollection.js +4 -0
- package/src/og/entity/GeoObjectHandler.js +3 -0
- package/src/og/layer/BaseGeoImage.js +152 -16
- package/src/og/layer/GeoImage.js +0 -91
- package/src/og/layer/GeoTexture2d.js +54 -143
- package/src/og/layer/GeoVideo.js +6 -107
- package/src/og/layer/Material.js +1 -1
- package/src/og/layer/Vector.js +8 -6
- package/src/og/layer/XYZ.js +2 -2
- package/src/og/quadTree/EntityCollectionNode.js +8 -2
- package/src/og/renderer/Renderer.js +91 -94
- package/src/og/renderer/RendererEvents.js +39 -23
- package/src/og/scene/BaseNode.js +113 -113
- package/src/og/scene/Planet.js +20 -13
- package/src/og/scene/RenderNode.js +42 -9
- package/src/og/segment/Segment.js +38 -45
- package/src/og/shaders/geoObject.js +12 -10
- package/src/og/shaders/pickingMask.js +1 -1
- package/src/og/utils/GeoImageCreator.js +61 -21
- package/src/og/utils/VectorTileCreator.js +32 -49
- package/src/og/webgl/Framebuffer.js +5 -0
- package/types/LonLat.d.ts +8 -0
- package/types/camera/PlanetCamera.d.ts +1 -1
- package/types/control/DebugInfo.d.ts +4 -0
- package/types/control/SimpleNavigation.d.ts +1 -0
- package/types/control/heightRuler/HeightRuler.d.ts +6 -0
- package/types/control/heightRuler/HeightRulerScene.d.ts +23 -0
- package/types/control/index.d.ts +2 -1
- package/types/control/ruler/RulerScene.d.ts +8 -5
- package/types/control/selection/SelectionScene.d.ts +0 -1
- package/types/ellipsoid/Ellipsoid.d.ts +13 -1
- package/types/entity/EntityCollection.d.ts +1 -0
- package/types/layer/BaseGeoImage.d.ts +17 -3
- package/types/layer/GeoImage.d.ts +0 -8
- package/types/layer/GeoTexture2d.d.ts +0 -2
- package/types/layer/GeoVideo.d.ts +0 -8
- package/types/layer/XYZ.d.ts +1 -1
- package/types/renderer/Renderer.d.ts +12 -3
- package/types/scene/Axes.d.ts +1 -1
- package/types/scene/BaseNode.d.ts +2 -2
- package/types/scene/Planet.d.ts +0 -5
- package/types/scene/RenderNode.d.ts +16 -9
- package/types/scene/SkyBox.d.ts +1 -1
- package/types/segment/Segment.d.ts +2 -3
- package/types/utils/VectorTileCreator.d.ts +1 -3
- package/types/webgl/Framebuffer.d.ts +1 -0
package/types/scene/Planet.d.ts
CHANGED
|
@@ -398,11 +398,6 @@ export class Planet extends RenderNode {
|
|
|
398
398
|
*/
|
|
399
399
|
protected _collectRenderNodes(): void;
|
|
400
400
|
_globalPreDraw(): void;
|
|
401
|
-
/**
|
|
402
|
-
* Render node callback.
|
|
403
|
-
* @public
|
|
404
|
-
*/
|
|
405
|
-
public frame(): void;
|
|
406
401
|
_checkRendercompleted(): void;
|
|
407
402
|
lockQuadTree(): void;
|
|
408
403
|
unlockQuadTree(): void;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Render node is a logical part of a render mechanism. Represents scene rendering.
|
|
3
|
-
*
|
|
3
|
+
* For example one scene node for rendering the Earth, another one for rendering the Moon, another node for rendering stars etc.
|
|
4
4
|
* Each render node has own model view space defined with matrices(scale, rotation, translation, transformation).
|
|
5
5
|
* There are collections of ligh sources, entities and so on in the node.
|
|
6
6
|
* Access to the node is renderer.renderNodes["Earth"]
|
|
7
7
|
* @class
|
|
8
|
-
* @extends {
|
|
8
|
+
* @extends {BaseNode}
|
|
9
9
|
* @param {string} name - Node name.
|
|
10
10
|
*/
|
|
11
|
-
export class RenderNode {
|
|
11
|
+
export class RenderNode extends BaseNode {
|
|
12
|
+
constructor(name?: string);
|
|
12
13
|
/**
|
|
13
14
|
* Renderer that calls frame() callback.
|
|
14
15
|
* @public
|
|
@@ -45,12 +46,6 @@ export class RenderNode {
|
|
|
45
46
|
public entityCollections: Array<EntityCollection>;
|
|
46
47
|
_pickingId: number;
|
|
47
48
|
events: Events;
|
|
48
|
-
/**
|
|
49
|
-
* Adds node to the current hierarchy.
|
|
50
|
-
* @public
|
|
51
|
-
* @type {RenderNode}
|
|
52
|
-
*/
|
|
53
|
-
public addNode(node: any): void;
|
|
54
49
|
/**
|
|
55
50
|
* Assign render node with renderer.
|
|
56
51
|
* @public
|
|
@@ -93,6 +88,11 @@ export class RenderNode {
|
|
|
93
88
|
* @param {LightSource} light - Light source object.
|
|
94
89
|
*/
|
|
95
90
|
public removeLight(light: LightSource): void;
|
|
91
|
+
/**
|
|
92
|
+
* Calls render frame node's callback. Used in renderer.
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
public preDrawNode(frustum: any, frustumIndex: any): void;
|
|
96
96
|
/**
|
|
97
97
|
* Calls render frame node's callback. Used in renderer.
|
|
98
98
|
* @public
|
|
@@ -123,6 +123,12 @@ export class RenderNode {
|
|
|
123
123
|
public transformLights(): void;
|
|
124
124
|
updateBillboardsTexCoords(): void;
|
|
125
125
|
updateGeoObjectsTexCoords(): void;
|
|
126
|
+
frame(): void;
|
|
127
|
+
preFrame(): void;
|
|
128
|
+
/**
|
|
129
|
+
* @private
|
|
130
|
+
*/
|
|
131
|
+
private _preDrawNodes;
|
|
126
132
|
/**
|
|
127
133
|
* @private
|
|
128
134
|
*/
|
|
@@ -140,4 +146,5 @@ export class RenderNode {
|
|
|
140
146
|
*/
|
|
141
147
|
private _entityCollectionPickingCallback;
|
|
142
148
|
}
|
|
149
|
+
import { BaseNode } from "./BaseNode.js";
|
|
143
150
|
import { Events } from "../Events.js";
|
package/types/scene/SkyBox.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export class SkyBox extends RenderNode {
|
|
2
2
|
static createDefault(RESOURCES_URL: any): SkyBox;
|
|
3
|
+
constructor(params: any);
|
|
3
4
|
params: any;
|
|
4
5
|
vertexPositionBuffer: any;
|
|
5
6
|
texture: any;
|
|
6
7
|
init(): void;
|
|
7
|
-
frame(): void;
|
|
8
8
|
_createBuffers(): void;
|
|
9
9
|
}
|
|
10
10
|
import { RenderNode } from "./RenderNode.js";
|
|
@@ -163,10 +163,9 @@ export class Segment {
|
|
|
163
163
|
* @public
|
|
164
164
|
* @param {Entity} entity - Entity.
|
|
165
165
|
* @param {Vec3} res - Point coordinates.
|
|
166
|
-
* @param {Vec3} [normal] - Terrain point normal.
|
|
167
166
|
* @returns {Vec3} -
|
|
168
167
|
*/
|
|
169
|
-
public getEntityTerrainPoint(entity: Entity, res: Vec3
|
|
168
|
+
public getEntityTerrainPoint(entity: Entity, res: Vec3): Vec3;
|
|
170
169
|
isEntityInside(e: any): boolean;
|
|
171
170
|
/**
|
|
172
171
|
* Returns distance from object to terrain coordinates and terrain point that calculates out in the res parameter.
|
|
@@ -177,7 +176,7 @@ export class Segment {
|
|
|
177
176
|
* @param {Vec3} [normal] - Terrain point normal.
|
|
178
177
|
* @returns {number} -
|
|
179
178
|
*/
|
|
180
|
-
public getTerrainPoint(xyz: Vec3, insideSegmentPosition: LonLat, res?: Vec3
|
|
179
|
+
public getTerrainPoint(xyz: Vec3, insideSegmentPosition: LonLat, res?: Vec3): number;
|
|
181
180
|
/**
|
|
182
181
|
* Project wgs86 to segment native projection.
|
|
183
182
|
* @public
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
export class VectorTileCreator {
|
|
2
|
-
constructor(planet: any,
|
|
2
|
+
constructor(planet: any, width?: number, height?: number);
|
|
3
3
|
_width: number;
|
|
4
4
|
_height: number;
|
|
5
5
|
_handler: any;
|
|
6
6
|
_planet: any;
|
|
7
7
|
_framebuffer: Framebuffer;
|
|
8
|
-
MAX_FRAMES: number;
|
|
9
|
-
_currentFrame: number;
|
|
10
8
|
_queue: any[];
|
|
11
9
|
_initialize(): void;
|
|
12
10
|
frame(): void;
|