@math.gl/geospatial
Advanced tools
Comparing version 3.0.0-beta.1 to 3.0.0-beta.2
@@ -11,2 +11,3 @@ "use strict"; | ||
var EPSILON14 = 1e-14; | ||
var scratchOrigin = new _math.Vector3(); | ||
var VECTOR_PRODUCT_LOCAL_FRAME = { | ||
@@ -70,3 +71,3 @@ up: { | ||
function localFrameToFixedFrame(ellipsoid, firstAxis, secondAxis, thirdAxis, origin, result) { | ||
function localFrameToFixedFrame(ellipsoid, firstAxis, secondAxis, thirdAxis, cartesianOrigin, result) { | ||
var thirdAxisInferred = VECTOR_PRODUCT_LOCAL_FRAME[firstAxis] && VECTOR_PRODUCT_LOCAL_FRAME[firstAxis][secondAxis]; | ||
@@ -77,2 +78,3 @@ (0, _math.assert)(thirdAxisInferred && (!thirdAxis || thirdAxis === thirdAxisInferred)); | ||
var thirdAxisVector; | ||
var origin = scratchOrigin.copy(cartesianOrigin); | ||
var atPole = (0, _math.equals)(origin.x, 0.0, EPSILON14) && (0, _math.equals)(origin.y, 0.0, EPSILON14); | ||
@@ -79,0 +81,0 @@ |
import { Vector3, assert, equals as equalsEpsilon } from 'math.gl'; | ||
const EPSILON14 = 1e-14; | ||
const scratchOrigin = new Vector3(); | ||
const VECTOR_PRODUCT_LOCAL_FRAME = { | ||
@@ -60,3 +61,3 @@ up: { | ||
const scratchVector3 = new Vector3(); | ||
export default function localFrameToFixedFrame(ellipsoid, firstAxis, secondAxis, thirdAxis, origin, result) { | ||
export default function localFrameToFixedFrame(ellipsoid, firstAxis, secondAxis, thirdAxis, cartesianOrigin, result) { | ||
const thirdAxisInferred = VECTOR_PRODUCT_LOCAL_FRAME[firstAxis] && VECTOR_PRODUCT_LOCAL_FRAME[firstAxis][secondAxis]; | ||
@@ -67,2 +68,3 @@ assert(thirdAxisInferred && (!thirdAxis || thirdAxis === thirdAxisInferred)); | ||
let thirdAxisVector; | ||
const origin = scratchOrigin.copy(cartesianOrigin); | ||
const atPole = equalsEpsilon(origin.x, 0.0, EPSILON14) && equalsEpsilon(origin.y, 0.0, EPSILON14); | ||
@@ -69,0 +71,0 @@ |
import { Vector3, assert, equals as equalsEpsilon } from 'math.gl'; | ||
var EPSILON14 = 1e-14; | ||
var scratchOrigin = new Vector3(); | ||
var VECTOR_PRODUCT_LOCAL_FRAME = { | ||
@@ -60,3 +61,3 @@ up: { | ||
var scratchVector3 = new Vector3(); | ||
export default function localFrameToFixedFrame(ellipsoid, firstAxis, secondAxis, thirdAxis, origin, result) { | ||
export default function localFrameToFixedFrame(ellipsoid, firstAxis, secondAxis, thirdAxis, cartesianOrigin, result) { | ||
var thirdAxisInferred = VECTOR_PRODUCT_LOCAL_FRAME[firstAxis] && VECTOR_PRODUCT_LOCAL_FRAME[firstAxis][secondAxis]; | ||
@@ -67,2 +68,3 @@ assert(thirdAxisInferred && (!thirdAxis || thirdAxis === thirdAxisInferred)); | ||
var thirdAxisVector; | ||
var origin = scratchOrigin.copy(cartesianOrigin); | ||
var atPole = equalsEpsilon(origin.x, 0.0, EPSILON14) && equalsEpsilon(origin.y, 0.0, EPSILON14); | ||
@@ -69,0 +71,0 @@ |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "3.0.0-beta.1", | ||
"version": "3.0.0-beta.2", | ||
"keywords": [ | ||
@@ -37,5 +37,5 @@ "webgl", | ||
"gl-matrix": "^3.0.0", | ||
"math.gl": "3.0.0-beta.1" | ||
"math.gl": "3.0.0-beta.2" | ||
}, | ||
"gitHead": "5a2c03aedfa4910702cbd2c6e37aa3f8fde6e6c3" | ||
"gitHead": "c798c156e1fe89a5927054e4d1acebd91ca63467" | ||
} |
import {Vector3, assert, equals as equalsEpsilon} from 'math.gl'; | ||
const EPSILON14 = 1e-14; | ||
// Contains functions for transforming positions to reference frames. | ||
const scratchOrigin = new Vector3(); | ||
// Caclulate third axis from given two axii | ||
@@ -76,3 +77,3 @@ const VECTOR_PRODUCT_LOCAL_FRAME = { | ||
thirdAxis, | ||
origin, | ||
cartesianOrigin, | ||
result | ||
@@ -89,2 +90,4 @@ ) { | ||
const origin = scratchOrigin.copy(cartesianOrigin); | ||
// If x and y are zero, assume origin is at a pole, which is a special case. | ||
@@ -91,0 +94,0 @@ const atPole = equalsEpsilon(origin.x, 0.0, EPSILON14) && equalsEpsilon(origin.y, 0.0, EPSILON14); |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
201364
1766
+ Addedmath.gl@3.0.0-beta.2(transitive)
- Removedmath.gl@3.0.0-beta.1(transitive)
Updatedmath.gl@3.0.0-beta.2