@loaders.gl/tile-converter 3.3.2 → 3.3.3
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/3d-tiles-attributes-worker.js +1 -1
- package/dist/converter.min.js +171 -171
- package/dist/dist.min.js +92 -4
- package/dist/es5/3d-tiles-attributes-worker.js +1 -1
- package/dist/es5/deps-installer/deps-installer.js +1 -1
- package/dist/es5/i3s-attributes-worker.js +1 -1
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/esm/3d-tiles-attributes-worker.js +1 -1
- package/dist/esm/deps-installer/deps-installer.js +1 -1
- package/dist/esm/i3s-attributes-worker.js +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/i3s-converter/helpers/node-pages.js +1 -1
- package/package.json +15 -15
package/dist/dist.min.js
CHANGED
|
@@ -10556,8 +10556,8 @@ var require_bounding_sphere = __commonJS({
|
|
|
10556
10556
|
}, {
|
|
10557
10557
|
key: "expand",
|
|
10558
10558
|
value: function expand(point) {
|
|
10559
|
-
var
|
|
10560
|
-
var radius =
|
|
10559
|
+
var scratchPoint2 = scratchVector7.from(point);
|
|
10560
|
+
var radius = scratchPoint2.subtract(this.center).magnitude();
|
|
10561
10561
|
if (radius > this.radius) {
|
|
10562
10562
|
this.radius = radius;
|
|
10563
10563
|
}
|
|
@@ -10580,8 +10580,8 @@ var require_bounding_sphere = __commonJS({
|
|
|
10580
10580
|
}, {
|
|
10581
10581
|
key: "distanceTo",
|
|
10582
10582
|
value: function distanceTo(point) {
|
|
10583
|
-
var
|
|
10584
|
-
var delta =
|
|
10583
|
+
var scratchPoint2 = scratchVector7.from(point);
|
|
10584
|
+
var delta = scratchPoint2.subtract(this.center);
|
|
10585
10585
|
return Math.max(0, delta.len() - this.radius);
|
|
10586
10586
|
}
|
|
10587
10587
|
}, {
|
|
@@ -66975,6 +66975,7 @@ var import_geospatial4 = __toModule(require_es55());
|
|
|
66975
66975
|
function defined2(x) {
|
|
66976
66976
|
return x !== void 0 && x !== null;
|
|
66977
66977
|
}
|
|
66978
|
+
var scratchPoint = new import_core4.Vector3();
|
|
66978
66979
|
var scratchScale = new import_core4.Vector3();
|
|
66979
66980
|
var scratchNorthWest = new import_core4.Vector3();
|
|
66980
66981
|
var scratchSouthEast = new import_core4.Vector3();
|
|
@@ -66996,6 +66997,22 @@ function createBoundingVolume(boundingVolumeHeader, transform11, result) {
|
|
|
66996
66997
|
}
|
|
66997
66998
|
throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box");
|
|
66998
66999
|
}
|
|
67000
|
+
function getCartographicBounds(boundingVolumeHeader, boundingVolume) {
|
|
67001
|
+
if (boundingVolumeHeader.box) {
|
|
67002
|
+
return orientedBoundingBoxToCartographicBounds(boundingVolume);
|
|
67003
|
+
}
|
|
67004
|
+
if (boundingVolumeHeader.region) {
|
|
67005
|
+
const [west, south, east, north, minHeight, maxHeight] = boundingVolumeHeader.region;
|
|
67006
|
+
return [
|
|
67007
|
+
[(0, import_core4.degrees)(west), (0, import_core4.degrees)(south), minHeight],
|
|
67008
|
+
[(0, import_core4.degrees)(east), (0, import_core4.degrees)(north), maxHeight]
|
|
67009
|
+
];
|
|
67010
|
+
}
|
|
67011
|
+
if (boundingVolumeHeader.sphere) {
|
|
67012
|
+
return boundingSphereToCartographicBounds(boundingVolume);
|
|
67013
|
+
}
|
|
67014
|
+
throw new Error("Unkown boundingVolume type");
|
|
67015
|
+
}
|
|
66999
67016
|
function createBox(box, transform11, result) {
|
|
67000
67017
|
const center = new import_core4.Vector3(box[0], box[1], box[2]);
|
|
67001
67018
|
transform11.transform(center, center);
|
|
@@ -67051,6 +67068,71 @@ function createSphere(sphere, transform11, result) {
|
|
|
67051
67068
|
}
|
|
67052
67069
|
return new import_culling3.BoundingSphere(center, radius);
|
|
67053
67070
|
}
|
|
67071
|
+
function orientedBoundingBoxToCartographicBounds(boundingVolume) {
|
|
67072
|
+
const result = emptyCartographicBounds();
|
|
67073
|
+
const { halfAxes } = boundingVolume;
|
|
67074
|
+
const xAxis = new import_core4.Vector3(halfAxes.getColumn(0));
|
|
67075
|
+
const yAxis = new import_core4.Vector3(halfAxes.getColumn(1));
|
|
67076
|
+
const zAxis = new import_core4.Vector3(halfAxes.getColumn(2));
|
|
67077
|
+
for (let x = 0; x < 2; x++) {
|
|
67078
|
+
for (let y = 0; y < 2; y++) {
|
|
67079
|
+
for (let z = 0; z < 2; z++) {
|
|
67080
|
+
scratchPoint.copy(boundingVolume.center);
|
|
67081
|
+
scratchPoint.add(xAxis);
|
|
67082
|
+
scratchPoint.add(yAxis);
|
|
67083
|
+
scratchPoint.add(zAxis);
|
|
67084
|
+
addToCartographicBounds(result, scratchPoint);
|
|
67085
|
+
zAxis.negate();
|
|
67086
|
+
}
|
|
67087
|
+
yAxis.negate();
|
|
67088
|
+
}
|
|
67089
|
+
xAxis.negate();
|
|
67090
|
+
}
|
|
67091
|
+
return result;
|
|
67092
|
+
}
|
|
67093
|
+
function boundingSphereToCartographicBounds(boundingVolume) {
|
|
67094
|
+
const result = emptyCartographicBounds();
|
|
67095
|
+
const { center, radius } = boundingVolume;
|
|
67096
|
+
const point = import_geospatial4.Ellipsoid.WGS84.scaleToGeodeticSurface(center, scratchPoint);
|
|
67097
|
+
let zAxis;
|
|
67098
|
+
if (point) {
|
|
67099
|
+
zAxis = import_geospatial4.Ellipsoid.WGS84.geodeticSurfaceNormal(point);
|
|
67100
|
+
} else {
|
|
67101
|
+
zAxis = new import_core4.Vector3(0, 0, 1);
|
|
67102
|
+
}
|
|
67103
|
+
let xAxis = new import_core4.Vector3(zAxis[2], -zAxis[1], 0);
|
|
67104
|
+
if (xAxis.len() > 0) {
|
|
67105
|
+
xAxis.normalize();
|
|
67106
|
+
} else {
|
|
67107
|
+
xAxis = new import_core4.Vector3(0, 1, 0);
|
|
67108
|
+
}
|
|
67109
|
+
const yAxis = xAxis.clone().cross(zAxis);
|
|
67110
|
+
for (const axis of [xAxis, yAxis, zAxis]) {
|
|
67111
|
+
scratchScale.copy(axis).scale(radius);
|
|
67112
|
+
for (let dir = 0; dir < 2; dir++) {
|
|
67113
|
+
scratchPoint.copy(center);
|
|
67114
|
+
scratchPoint.add(scratchScale);
|
|
67115
|
+
addToCartographicBounds(result, scratchPoint);
|
|
67116
|
+
scratchScale.negate();
|
|
67117
|
+
}
|
|
67118
|
+
}
|
|
67119
|
+
return result;
|
|
67120
|
+
}
|
|
67121
|
+
function emptyCartographicBounds() {
|
|
67122
|
+
return [
|
|
67123
|
+
[Infinity, Infinity, Infinity],
|
|
67124
|
+
[-Infinity, -Infinity, -Infinity]
|
|
67125
|
+
];
|
|
67126
|
+
}
|
|
67127
|
+
function addToCartographicBounds(target, cartesian) {
|
|
67128
|
+
import_geospatial4.Ellipsoid.WGS84.cartesianToCartographic(cartesian, scratchPoint);
|
|
67129
|
+
target[0][0] = Math.min(target[0][0], scratchPoint[0]);
|
|
67130
|
+
target[0][1] = Math.min(target[0][1], scratchPoint[1]);
|
|
67131
|
+
target[0][2] = Math.min(target[0][2], scratchPoint[2]);
|
|
67132
|
+
target[1][0] = Math.max(target[1][0], scratchPoint[0]);
|
|
67133
|
+
target[1][1] = Math.max(target[1][1], scratchPoint[1]);
|
|
67134
|
+
target[1][2] = Math.max(target[1][2], scratchPoint[2]);
|
|
67135
|
+
}
|
|
67054
67136
|
|
|
67055
67137
|
// ../tiles/src/tileset/helpers/tiles-3d-lod.ts
|
|
67056
67138
|
var import_core5 = __toModule(require_es54());
|
|
@@ -67557,6 +67639,12 @@ var Tile3D = class {
|
|
|
67557
67639
|
get screenSpaceError() {
|
|
67558
67640
|
return this._screenSpaceError;
|
|
67559
67641
|
}
|
|
67642
|
+
get boundingBox() {
|
|
67643
|
+
if (!this._boundingBox) {
|
|
67644
|
+
this._boundingBox = getCartographicBounds(this.header.boundingVolume, this.boundingVolume);
|
|
67645
|
+
}
|
|
67646
|
+
return this._boundingBox;
|
|
67647
|
+
}
|
|
67560
67648
|
getScreenSpaceError(frameState, useParentLodMetric) {
|
|
67561
67649
|
switch (this.tileset.type) {
|
|
67562
67650
|
case TILESET_TYPE.I3S:
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports._typecheckI3SAttributesWorker = exports.Tile3dAttributesWorker = void 0;
|
|
7
7
|
exports.transform3DTilesAttributesOnWorker = transform3DTilesAttributesOnWorker;
|
|
8
8
|
var _workerUtils = require("@loaders.gl/worker-utils");
|
|
9
|
-
var VERSION = typeof "3.3.
|
|
9
|
+
var VERSION = typeof "3.3.3" !== 'undefined' ? "3.3.3" : 'latest';
|
|
10
10
|
var Tile3dAttributesWorker = {
|
|
11
11
|
id: '3d-tiles-attributes',
|
|
12
12
|
name: '3DTiles Attributes Worker',
|
|
@@ -14,7 +14,7 @@ var _zip = require("@loaders.gl/zip");
|
|
|
14
14
|
var _fileUtils = require("../lib/utils/file-utils");
|
|
15
15
|
var _path = require("path");
|
|
16
16
|
var _workerUtils = require("@loaders.gl/worker-utils");
|
|
17
|
-
var VERSION = typeof "3.3.
|
|
17
|
+
var VERSION = typeof "3.3.3" !== 'undefined' ? "3.3.3" : 'beta';
|
|
18
18
|
var PGM_LINK = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip';
|
|
19
19
|
|
|
20
20
|
var DepsInstaller = function () {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports._typecheckI3SAttributesWorker = exports.I3SAttributesWorker = void 0;
|
|
7
7
|
exports.transformI3SAttributesOnWorker = transformI3SAttributesOnWorker;
|
|
8
8
|
var _workerUtils = require("@loaders.gl/worker-utils");
|
|
9
|
-
var VERSION = typeof "3.3.
|
|
9
|
+
var VERSION = typeof "3.3.3" !== 'undefined' ? "3.3.3" : 'latest';
|
|
10
10
|
var I3SAttributesWorker = {
|
|
11
11
|
id: 'i3s-attributes',
|
|
12
12
|
name: 'I3S Attributes Worker',
|
package/dist/es5/pgm-loader.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.PGMLoader = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _geoid = require("@math.gl/geoid");
|
|
11
|
-
var VERSION = typeof "3.3.
|
|
11
|
+
var VERSION = typeof "3.3.3" !== 'undefined' ? "3.3.3" : 'latest';
|
|
12
12
|
|
|
13
13
|
var PGMLoader = {
|
|
14
14
|
name: 'PGM - Netpbm grayscale image format',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { processOnWorker } from '@loaders.gl/worker-utils';
|
|
2
2
|
|
|
3
|
-
const VERSION = typeof "3.3.
|
|
3
|
+
const VERSION = typeof "3.3.3" !== 'undefined' ? "3.3.3" : 'latest';
|
|
4
4
|
export const Tile3dAttributesWorker = {
|
|
5
5
|
id: '3d-tiles-attributes',
|
|
6
6
|
name: '3DTiles Attributes Worker',
|
|
@@ -4,7 +4,7 @@ import { writeFile } from '../lib/utils/file-utils';
|
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
import { ChildProcessProxy } from '@loaders.gl/worker-utils';
|
|
6
6
|
|
|
7
|
-
const VERSION = typeof "3.3.
|
|
7
|
+
const VERSION = typeof "3.3.3" !== 'undefined' ? "3.3.3" : 'beta';
|
|
8
8
|
const PGM_LINK = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/egm/egm2008-5.zip';
|
|
9
9
|
|
|
10
10
|
export class DepsInstaller {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { processOnWorker } from '@loaders.gl/worker-utils';
|
|
2
2
|
|
|
3
|
-
const VERSION = typeof "3.3.
|
|
3
|
+
const VERSION = typeof "3.3.3" !== 'undefined' ? "3.3.3" : 'latest';
|
|
4
4
|
export const I3SAttributesWorker = {
|
|
5
5
|
id: 'i3s-attributes',
|
|
6
6
|
name: 'I3S Attributes Worker',
|
package/dist/esm/pgm-loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const file_utils_1 = require("../../lib/utils/file-utils");
|
|
|
11
11
|
* class NodePages - wrapper of nodePages array
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
|
-
* import {writeFile} from './helpers/write-file';
|
|
14
|
+
* import {writeFile} from './helpers/write-file.js';
|
|
15
15
|
*
|
|
16
16
|
* // create an instance of the class
|
|
17
17
|
* const nodePages = new NodePages(writeFile, HARDCODED_NODES_PER_PAGE);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/tile-converter",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"description": "Converter",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
"build-3d-tiles-attributes-worker": "esbuild src/workers/3d-tiles-attributes-worker.ts --outfile=dist/3d-tiles-attributes-worker.js --platform=node --target=esnext,node14 --external:join-images --minify --bundle --sourcemap --define:__VERSION__=\\\"$npm_package_version\\\""
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@loaders.gl/3d-tiles": "3.3.
|
|
48
|
-
"@loaders.gl/crypto": "3.3.
|
|
49
|
-
"@loaders.gl/draco": "3.3.
|
|
50
|
-
"@loaders.gl/gltf": "3.3.
|
|
51
|
-
"@loaders.gl/i3s": "3.3.
|
|
52
|
-
"@loaders.gl/images": "3.3.
|
|
53
|
-
"@loaders.gl/loader-utils": "3.3.
|
|
54
|
-
"@loaders.gl/polyfills": "3.3.
|
|
55
|
-
"@loaders.gl/schema": "3.3.
|
|
56
|
-
"@loaders.gl/textures": "3.3.
|
|
57
|
-
"@loaders.gl/tiles": "3.3.
|
|
58
|
-
"@loaders.gl/worker-utils": "3.3.
|
|
59
|
-
"@loaders.gl/zip": "3.3.
|
|
47
|
+
"@loaders.gl/3d-tiles": "3.3.3",
|
|
48
|
+
"@loaders.gl/crypto": "3.3.3",
|
|
49
|
+
"@loaders.gl/draco": "3.3.3",
|
|
50
|
+
"@loaders.gl/gltf": "3.3.3",
|
|
51
|
+
"@loaders.gl/i3s": "3.3.3",
|
|
52
|
+
"@loaders.gl/images": "3.3.3",
|
|
53
|
+
"@loaders.gl/loader-utils": "3.3.3",
|
|
54
|
+
"@loaders.gl/polyfills": "3.3.3",
|
|
55
|
+
"@loaders.gl/schema": "3.3.3",
|
|
56
|
+
"@loaders.gl/textures": "3.3.3",
|
|
57
|
+
"@loaders.gl/tiles": "3.3.3",
|
|
58
|
+
"@loaders.gl/worker-utils": "3.3.3",
|
|
59
|
+
"@loaders.gl/zip": "3.3.3",
|
|
60
60
|
"@luma.gl/engine": "^8.5.4",
|
|
61
61
|
"@math.gl/core": "^3.5.1",
|
|
62
62
|
"@math.gl/culling": "^3.5.1",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"join-images": "^1.1.3",
|
|
81
81
|
"sharp": "^0.31.3"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "44f4e272d8216f226a332eaae81e832e44c7e474"
|
|
84
84
|
}
|