Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@openglobus/og

Package Overview
Dependencies
Maintainers
2
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openglobus/og - npm Package Compare versions

Comparing version 0.19.0 to 0.19.1

20

lib/js/quadTree/Node.js

@@ -158,5 +158,5 @@ import { Extent } from "../Extent";

this.clearNeighbors();
for (let i = 0; i < this._fadingNodes.length; i++) {
this._fadingNodes[i].neighbors && this._fadingNodes[i].clearNeighbors();
}
// for (let i = 0; i < this._fadingNodes.length; i++) {
// this._fadingNodes[i].neighbors && this._fadingNodes[i].clearNeighbors();
// }
let seg = this.segment, planet = this.planet;

@@ -356,18 +356,6 @@ this._cameraInside = false;

this.segment._transitionOpacity = 1.0;
this._fadingNodes = [];
}
else {
this.segment.increaseTransitionOpacity();
for (let i = 0; i < this._fadingNodes.length; i++) {
let n = this._fadingNodes[i];
if (n.segment) {
if (n.segment._transitionOpacity > 0 && !this.planet._fadingNodes.has(n.nodeId)) {
this.planet._fadingNodes.set(n.nodeId, n);
n.segment.fadingTransitionOpacity();
}
}
else {
this.segment._transitionOpacity = 1.0;
break;
}
}
}

@@ -374,0 +362,0 @@ }

42

lib/js/scene/Planet.js

@@ -1062,14 +1062,7 @@ import * as math from "../math";

let i = renderedNodes.length;
let _renderingFadingNodes = this._renderingFadingNodes;
if (cam.slope > 0.78 || cam.getAltitude() > 10000) {
_renderingFadingNodes = this._renderingFadingNodesNoDepth;
}
while (i--) {
let ri = renderedNodes[i];
let s = ri.segment;
_renderingFadingNodes(nodes, sh, ri, sl[0], 0, transparentSegments);
if (s._transitionOpacity < 1) {
transparentSegments.push(s);
}
else {
if (cam.slope > 0.8 /*|| cam.getAltitude() > 10000*/) {
while (i--) {
let ri = renderedNodes[i];
let s = ri.segment;
this._renderingFadingNodesNoDepth(nodes, sh, ri, sl[0], 0);
isEq && s.equalize();

@@ -1080,7 +1073,22 @@ s.readyToEngage && s.engage();

}
for (let j = 0; j < transparentSegments.length; j++) {
let tj = transparentSegments[j];
isEq && tj.equalize();
tj.readyToEngage && tj.engage();
tj.screenRendering(sh, sl[0], 0);
else {
while (i--) {
let ri = renderedNodes[i];
let s = ri.segment;
this._renderingFadingNodes(nodes, sh, ri, sl[0], 0, transparentSegments);
if (s._transitionOpacity < 1) {
transparentSegments.push(s);
}
else {
isEq && s.equalize();
s.readyToEngage && s.engage();
s.screenRendering(sh, sl[0], 0);
}
}
for (let j = 0; j < transparentSegments.length; j++) {
let tj = transparentSegments[j];
isEq && tj.equalize();
tj.readyToEngage && tj.engage();
tj.screenRendering(sh, sl[0], 0);
}
}

@@ -1087,0 +1095,0 @@ }

@@ -1031,9 +1031,26 @@ import * as mercator from "../mercator";

this._transitionTimestamp = window.performance.now();
if (this._transitionOpacity > 1.0) {
this._transitionOpacity = 1.0;
if (this._transitionOpacity > 2.0) {
this._transitionOpacity = 2.0;
}
let i = this.node._fadingNodes.length;
while (i--) {
let n = this.node._fadingNodes[i];
if (n.segment) {
if (n.segment._transitionOpacity > 0 && !this.planet._fadingNodes.has(n.nodeId)) {
this.planet._fadingNodes.set(n.nodeId, n);
n.segment._transitionOpacity = 2.0 - this._transitionOpacity;
if (n.segment._transitionOpacity === 0) {
this.node._fadingNodes.splice(i, 1);
}
}
}
else {
this._transitionOpacity = 1.0;
break;
}
}
}
fadingTransitionOpacity() {
//this._transitionOpacity -= 0.01;
this._transitionOpacity -= (window.performance.now() - this._transitionTimestamp) / this.planet.transitionTime;
this._transitionOpacity -= 0.01;
// this._transitionOpacity -= (window.performance.now() - this._transitionTimestamp) / this.planet.transitionTime;
this._transitionTimestamp = window.performance.now();

@@ -1040,0 +1057,0 @@ if (this._transitionOpacity < 0.0) {

@@ -41,3 +41,2 @@ import { Program } from "../webgl/Program";

uniform float uUseTexture;
uniform vec3 uScaleByDistance;

@@ -55,3 +54,2 @@ uniform mat4 projectionMatrix;

varying float vDispose;
varying float vUseTexture;
varying vec2 vTexCoords;

@@ -69,3 +67,2 @@

vUseTexture = uUseTexture;
vColor = aColor;

@@ -135,3 +132,4 @@ vTexCoords = aTexCoord;

uniform sampler2D uTexture;
uniform float uUseTexture;
varying vec3 cameraPosition;

@@ -142,3 +140,2 @@ varying vec3 v_vertex;

varying vec2 vTexCoords;
varying float vUseTexture;

@@ -156,3 +153,4 @@ void main(void) {

vec4 tColor = texture2D(uTexture, vTexCoords);
if(vUseTexture > 0.0){
if(uUseTexture > 0.0) {
gl_FragColor = vec4(tColor.rgb * lightWeighting, tColor.a);

@@ -159,0 +157,0 @@ } else {

{
"name": "@openglobus/og",
"version": "0.19.0",
"version": "0.19.1",
"description": "[openglobus](https://www.openglobus.org/) is a javascript/typescript library designed to display interactive 3d maps and planets with map tiles, imagery and vector data, markers, and 3D objects. It uses the WebGL technology, open source, and completely free.",

@@ -5,0 +5,0 @@ "directories": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc