Socket
Socket
Sign inDemoInstall

@math.gl/geospatial

Package Overview
Dependencies
Maintainers
3
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@math.gl/geospatial - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0-alpha.2

39

dist/es6/ellipsoid/ellipsoid.js

@@ -20,6 +20,3 @@ import { Vector3, Matrix4, toRadians, toDegrees, assert, equals, _MathUtils } from 'math.gl';

constructor() {
let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.0;
let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.0;
let z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.0;
constructor(x = 0.0, y = 0.0, z = 0.0) {
assert(x >= 0.0);

@@ -52,4 +49,3 @@ assert(y >= 0.0);

cartographicToCartesian(cartographic) {
let result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0, 0];
cartographicToCartesian(cartographic, result = [0, 0, 0]) {
const normal = scratchNormal;

@@ -67,4 +63,3 @@ const k = scratchK;

cartesianToCartographic(cartesian) {
let result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0, 0];
cartesianToCartographic(cartesian, result = [0, 0, 0]) {
scratchCartesian.from(cartesian);

@@ -86,19 +81,15 @@ const point = this.scaleToGeodeticSurface(scratchCartesian, scratchPosition);

eastNorthUpToFixedFrame(origin) {
let result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Matrix4();
eastNorthUpToFixedFrame(origin, result = new Matrix4()) {
return localFrameToFixedFrame(this, 'east', 'north', 'up', origin, result);
}
localFrameToFixedFrame(firstAxis, secondAxis, thirdAxis, origin) {
let result = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : new Matrix4();
localFrameToFixedFrame(firstAxis, secondAxis, thirdAxis, origin, result = new Matrix4()) {
return localFrameToFixedFrame(this, firstAxis, secondAxis, thirdAxis, origin, result);
}
geocentricSurfaceNormal(cartesian) {
let result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0, 0];
geocentricSurfaceNormal(cartesian, result = [0, 0, 0]) {
return scratchVector.from(cartesian).normalize().to(result);
}
geodeticSurfaceNormalCartographic(cartographic) {
let result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0, 0];
geodeticSurfaceNormalCartographic(cartographic, result = [0, 0, 0]) {
const cartographicVectorRadians = fromCartographicToRadians(cartographic);

@@ -112,4 +103,3 @@ const longitude = cartographicVectorRadians[0];

geodeticSurfaceNormal(cartesian) {
let result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0, 0];
geodeticSurfaceNormal(cartesian, result = [0, 0, 0]) {
return scratchVector.from(cartesian).scale(this.oneOverRadiiSquared).normalize().to(result);

@@ -122,4 +112,3 @@ }

scaleToGeocentricSurface(cartesian) {
let result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0, 0];
scaleToGeocentricSurface(cartesian, result = [0, 0, 0]) {
scratchPosition.from(cartesian);

@@ -134,15 +123,11 @@ const positionX = scratchPosition.x;

transformPositionToScaledSpace(position) {
let result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0, 0];
transformPositionToScaledSpace(position, result = [0, 0, 0]) {
return scratchPosition.from(position).scale(this.oneOverRadii).to(result);
}
transformPositionFromScaledSpace(position) {
let result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0, 0];
transformPositionFromScaledSpace(position, result = [0, 0, 0]) {
return scratchPosition.from(position).scale(this.radii).to(result);
}
getSurfaceNormalIntersectionWithZAxis(position) {
let buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.0;
let result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [0, 0, 0];
getSurfaceNormalIntersectionWithZAxis(position, buffer = 0.0, result = [0, 0, 0]) {
assert(equals(this.radii.x, this.radii.y, _MathUtils.EPSILON15));

@@ -149,0 +134,0 @@ assert(this.radii.z > 0);

@@ -6,4 +6,3 @@ import { Vector3, assert, _MathUtils } from 'math.gl';

const scaleToGeodeticSurfaceGradient = new Vector3();
export default function scaleToGeodeticSurface(cartesian, ellipsoid) {
let result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Vector3();
export default function scaleToGeodeticSurface(cartesian, ellipsoid, result = new Vector3()) {
const {

@@ -10,0 +9,0 @@ oneOverRadii,

@@ -7,5 +7,3 @@ import { Vector3, isArray, toRadians, toDegrees, config } from 'math.gl';

const scratchVector = new Vector3();
export function fromCartographic(cartographic, vector) {
let map = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;
export function fromCartographic(cartographic, vector, map = noop) {
if (isArray(cartographic)) {

@@ -27,13 +25,9 @@ vector[0] = map(cartographic[0]);

}
export function fromCartographicToRadians(cartographic) {
let vector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scratchVector;
export function fromCartographicToRadians(cartographic, vector = scratchVector) {
return fromCartographic(cartographic, vector, config.cartographicRadians ? noop : toRadians);
}
export function fromCartographicToDegrees(cartographic) {
let vector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scratchVector;
export function fromCartographicToDegrees(cartographic, vector = scratchVector) {
return fromCartographic(cartographic, vector, config.cartographicRadians ? toDegrees : noop);
}
export function toCartographic(vector, cartographic) {
let map = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;
export function toCartographic(vector, cartographic, map = noop) {
if (isArray(cartographic)) {

@@ -40,0 +34,0 @@ cartographic[0] = map(vector[0]);

@@ -8,3 +8,3 @@ {

},
"version": "3.0.0",
"version": "3.1.0-alpha.2",
"keywords": [

@@ -37,5 +37,5 @@ "webgl",

"gl-matrix": "^3.0.0",
"math.gl": "3.0.0"
"math.gl": "3.1.0-alpha.2"
},
"gitHead": "31af0398206573d0de2b06d3ef637794c634b3ce"
"gitHead": "909cdd4561b8fb72165dea4e6e9f72a193fb8ad2"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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