@openglobus/og 0.13.7 → 0.13.8
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/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/Object3d.js +384 -0
- package/src/og/arial.js +1705 -1703
- package/src/og/camera/Camera.js +640 -640
- package/src/og/control/EarthCoordinates.js +1 -1
- package/src/og/control/LayerAnimation.js +115 -0
- package/src/og/control/MouseNavigation.js +460 -460
- package/src/og/control/Sun.js +170 -170
- package/src/og/control/ZoomControl.js +0 -2
- package/src/og/control/index.js +3 -1
- package/src/og/control/ruler/Ruler.js +43 -0
- package/src/og/control/ruler/RulerScene.js +370 -0
- package/src/og/control/visibleExtent/Segment.js +1 -4
- package/src/og/ellipsoid/Ellipsoid.js +19 -0
- package/src/og/entity/Entity.js +1 -1
- package/src/og/entity/GeoObject.js +1 -1
- package/src/og/entity/LabelHandler.js +1 -0
- package/src/og/layer/Layer.js +23 -40
- package/src/og/layer/Vector.js +80 -14
- package/src/og/layer/XYZ.js +4 -0
- package/src/og/math/Vec3.js +1 -1
- package/src/og/math.js +4 -4
- package/src/og/quadTree/Node.js +1 -1
- package/src/og/renderer/Renderer.js +1 -2
- package/src/og/res/images.js +0 -2
- package/src/og/scene/Planet.js +3 -2
- package/src/og/segment/Segment.js +0 -8
- package/src/og/shaders/label.js +30 -42
- package/src/og/utils/FontAtlas.js +1 -2
- package/src/og/utils/Loader.js +160 -153
- package/src/og/utils/VectorTileCreator.js +1 -1
- package/src/og/webgl/ProgramController.js +143 -143
- package/types/Object3d.d.ts +21 -0
- package/types/arial.d.ts +1 -0
- package/types/control/Sun.d.ts +1 -1
- package/types/control/index.d.ts +2 -1
- package/types/control/ruler/Ruler.d.ts +13 -0
- package/types/control/ruler/RulerScene.d.ts +48 -0
- package/types/ellipsoid/Ellipsoid.d.ts +8 -0
- package/types/layer/Layer.d.ts +23 -31
- package/types/layer/Vector.d.ts +2 -0
- package/types/layer/XYZ.d.ts +1 -0
- package/types/math.d.ts +1 -1
- package/types/res/images.d.ts +0 -1
- package/types/scene/Planet.d.ts +2 -2
- package/types/utils/Loader.d.ts +1 -0
package/src/og/math/Vec3.js
CHANGED
|
@@ -194,7 +194,7 @@ export class Vec3 {
|
|
|
194
194
|
* @returns {Vec3} -
|
|
195
195
|
*/
|
|
196
196
|
static lerp(v1, v2, l) {
|
|
197
|
-
return Vec3(v1.x + (v2.x - v1.x) * l, v1.y + (v2.y - v1.y) * l, v1.z + (v2.z - v1.z) * l);
|
|
197
|
+
return new Vec3(v1.x + (v2.x - v1.x) * l, v1.y + (v2.y - v1.y) * l, v1.z + (v2.z - v1.z) * l);
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
/**
|
package/src/og/math.js
CHANGED
|
@@ -200,15 +200,15 @@ export function mod(m, n) {
|
|
|
200
200
|
* @returns {number} -
|
|
201
201
|
*/
|
|
202
202
|
export function zeroTwoPI(a) {
|
|
203
|
-
|
|
204
|
-
if (Math.abs(
|
|
203
|
+
const res = mod(a, TWO_PI);
|
|
204
|
+
if (Math.abs(res) < EPSILON14 && Math.abs(a) > EPSILON14) {
|
|
205
205
|
return TWO_PI;
|
|
206
206
|
}
|
|
207
|
-
return
|
|
207
|
+
return res;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
/**
|
|
211
|
-
* Returns 0.0 if x is smaller
|
|
211
|
+
* Returns 0.0 if x is smaller than edge and otherwise 1.0.
|
|
212
212
|
* @function
|
|
213
213
|
* @param {number} edge -
|
|
214
214
|
* @param {number} x - Value to edge.
|
package/src/og/quadTree/Node.js
CHANGED
|
@@ -284,7 +284,7 @@ class Node {
|
|
|
284
284
|
} else if (
|
|
285
285
|
seg.terrainReady &&
|
|
286
286
|
seg.tileZoom < planet.terrain._maxNodeZoom &&
|
|
287
|
-
(!maxZoom ||
|
|
287
|
+
(!maxZoom || cam.projectedSize(seg.bsphere.center, seg.bsphere.radius) > this.planet._maxLodSize)) {
|
|
288
288
|
this.traverseNodes(cam, maxZoom, seg, stopLoading);
|
|
289
289
|
} else if (altVis) {
|
|
290
290
|
seg.passReady = maxZoom ? seg.terrainReady : false;
|
|
@@ -15,7 +15,6 @@ import { FontAtlas } from "../utils/FontAtlas.js";
|
|
|
15
15
|
import { TextureAtlas } from "../utils/TextureAtlas.js";
|
|
16
16
|
import * as arial from "../arial.js";
|
|
17
17
|
import { depth } from "../shaders/depth.js";
|
|
18
|
-
import { ARIAL_FONT_B64 } from "../res/images.js";
|
|
19
18
|
import { LabelWorker } from "../entity/LabelWorker.js";
|
|
20
19
|
|
|
21
20
|
let __pickingCallbackCounter__ = 0;
|
|
@@ -497,7 +496,7 @@ class Renderer {
|
|
|
497
496
|
|
|
498
497
|
this.outputTexture = this.screenTexture.screen;
|
|
499
498
|
|
|
500
|
-
this.fontAtlas.initFont("arial", arial.data,
|
|
499
|
+
this.fontAtlas.initFont("arial", arial.data, arial.image);
|
|
501
500
|
}
|
|
502
501
|
|
|
503
502
|
setCurrentScreen(screenName) {
|