@loaders.gl/tiles
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -18,3 +18,3 @@ "use strict"; | ||
var rtcCenter = tile.rtcCenter, | ||
rotateYtoZ = tile.rotateYtoZ; | ||
gltfUpAxis = tile.gltfUpAxis; | ||
var computedTransform = tileHeader.computedTransform, | ||
@@ -28,5 +28,18 @@ center = tileHeader.boundingVolume.center; | ||
if (rotateYtoZ) { | ||
var rotation = new _core.Matrix4().rotateX(Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotation); | ||
switch (gltfUpAxis) { | ||
case 'Z': | ||
break; | ||
case 'Y': | ||
var rotationY = new _core.Matrix4().rotateX(Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotationY); | ||
break; | ||
case 'X': | ||
var rotationX = new _core.Matrix4().rotateY(-Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotationX); | ||
break; | ||
default: | ||
break; | ||
} | ||
@@ -33,0 +46,0 @@ |
@@ -182,3 +182,4 @@ "use strict"; | ||
isTileset: 'auto', | ||
isTileHeader: false | ||
isTileHeader: false, | ||
assetGltfUpAxis: this.tileset.asset.gltfUpAxis | ||
})); | ||
@@ -185,0 +186,0 @@ _context.next = 20; |
@@ -9,3 +9,3 @@ import { Ellipsoid } from '@math.gl/geospatial'; | ||
rtcCenter, | ||
rotateYtoZ | ||
gltfUpAxis | ||
} = tile; | ||
@@ -24,5 +24,18 @@ const { | ||
if (rotateYtoZ) { | ||
const rotation = new Matrix4().rotateX(Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotation); | ||
switch (gltfUpAxis) { | ||
case 'Z': | ||
break; | ||
case 'Y': | ||
const rotationY = new Matrix4().rotateX(Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotationY); | ||
break; | ||
case 'X': | ||
const rotationX = new Matrix4().rotateY(-Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotationX); | ||
break; | ||
default: | ||
break; | ||
} | ||
@@ -29,0 +42,0 @@ |
@@ -165,3 +165,4 @@ import { Vector3, Matrix4 } from '@math.gl/core'; | ||
isTileset: 'auto', | ||
isTileHeader: false | ||
isTileHeader: false, | ||
assetGltfUpAxis: this.tileset.asset.gltfUpAxis | ||
} | ||
@@ -168,0 +169,0 @@ }; |
@@ -8,3 +8,3 @@ import { Ellipsoid } from '@math.gl/geospatial'; | ||
var rtcCenter = tile.rtcCenter, | ||
rotateYtoZ = tile.rotateYtoZ; | ||
gltfUpAxis = tile.gltfUpAxis; | ||
var computedTransform = tileHeader.computedTransform, | ||
@@ -18,5 +18,18 @@ center = tileHeader.boundingVolume.center; | ||
if (rotateYtoZ) { | ||
var rotation = new Matrix4().rotateX(Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotation); | ||
switch (gltfUpAxis) { | ||
case 'Z': | ||
break; | ||
case 'Y': | ||
var rotationY = new Matrix4().rotateX(Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotationY); | ||
break; | ||
case 'X': | ||
var rotationX = new Matrix4().rotateY(-Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotationX); | ||
break; | ||
default: | ||
break; | ||
} | ||
@@ -23,0 +36,0 @@ |
@@ -161,3 +161,4 @@ import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
isTileset: 'auto', | ||
isTileHeader: false | ||
isTileHeader: false, | ||
assetGltfUpAxis: this.tileset.asset.gltfUpAxis | ||
})); | ||
@@ -164,0 +165,0 @@ _context.next = 20; |
{ | ||
"name": "@loaders.gl/tiles", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Common components for different tiles loaders.", | ||
@@ -36,5 +36,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"@loaders.gl/core": "2.3.0", | ||
"@loaders.gl/loader-utils": "2.3.0", | ||
"@loaders.gl/math": "2.3.0", | ||
"@loaders.gl/core": "2.3.1", | ||
"@loaders.gl/loader-utils": "2.3.1", | ||
"@loaders.gl/math": "2.3.1", | ||
"@math.gl/core": "^3.3.0", | ||
@@ -49,3 +49,3 @@ "@math.gl/culling": "^3.3.0", | ||
}, | ||
"gitHead": "fc17c60f4ec826987dad851d05a2bebf4fc45d42" | ||
"gitHead": "9fa661b3c4c49de3b0e1a90619d1011624f0ca7d" | ||
} |
@@ -9,3 +9,3 @@ import {Ellipsoid} from '@math.gl/geospatial'; | ||
const {rtcCenter, rotateYtoZ} = tile; | ||
const {rtcCenter, gltfUpAxis} = tile; | ||
const { | ||
@@ -25,5 +25,15 @@ computedTransform, | ||
// https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification#y-up-to-z-up | ||
if (rotateYtoZ) { | ||
const rotation = new Matrix4().rotateX(Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotation); | ||
switch (gltfUpAxis) { | ||
case 'Z': | ||
break; | ||
case 'Y': | ||
const rotationY = new Matrix4().rotateX(Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotationY); | ||
break; | ||
case 'X': | ||
const rotationX = new Matrix4().rotateY(-Math.PI / 2); | ||
modelMatrix = modelMatrix.multiplyRight(rotationX); | ||
break; | ||
default: | ||
break; | ||
} | ||
@@ -30,0 +40,0 @@ |
@@ -212,3 +212,4 @@ // This file is derived from the Cesium code base under Apache 2 license | ||
isTileset: 'auto', | ||
isTileHeader: false | ||
isTileHeader: false, | ||
assetGltfUpAxis: this.tileset.asset.gltfUpAxis | ||
} | ||
@@ -215,0 +216,0 @@ }; |
Sorry, the diff of this file is too big to display
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 not supported yet
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
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1751471
26743
15
+ Added@loaders.gl/core@2.3.1(transitive)
+ Added@loaders.gl/images@2.3.1(transitive)
+ Added@loaders.gl/loader-utils@2.3.1(transitive)
+ Added@loaders.gl/math@2.3.1(transitive)
- Removed@loaders.gl/core@2.3.0(transitive)
- Removed@loaders.gl/images@2.3.0(transitive)
- Removed@loaders.gl/loader-utils@2.3.0(transitive)
- Removed@loaders.gl/math@2.3.0(transitive)
Updated@loaders.gl/core@2.3.1
Updated@loaders.gl/math@2.3.1