@loaders.gl/3d-tiles 4.1.0-alpha.9 → 4.1.0
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataViewFile } from '@loaders.gl/loader-utils';
|
|
2
2
|
import { parse3DTilesArchive as parse3DTilesArchiveFromProvider } from "./3d-tiles-archive/3d-tiles-archive-parser.js";
|
|
3
|
-
const VERSION = typeof "4.1.0
|
|
3
|
+
const VERSION = typeof "4.1.0" !== 'undefined' ? "4.1.0" : 'latest';
|
|
4
4
|
export const Tiles3DArchiveFileLoader = {
|
|
5
5
|
name: '3tz',
|
|
6
6
|
id: '3tz',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3d-tiles-archive-loader.js","names":["DataViewFile","parse3DTilesArchive","parse3DTilesArchiveFromProvider","VERSION","Tiles3DArchiveFileLoader","name","id","module","version","mimeTypes","parse","extensions","options","data","_options$3dTilesArc","_options$3dTilesArc2","arguments","length","undefined","archive","DataView","getFile","path"],"sources":["../src/3d-tiles-archive-loader.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright vis.gl contributors\n\nimport type {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {DataViewFile} from '@loaders.gl/loader-utils';\nimport {parse3DTilesArchive as parse3DTilesArchiveFromProvider} from './3d-tiles-archive/3d-tiles-archive-parser';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n/** options to load data from 3tz */\nexport type Tiles3DArchiveFileLoaderOptions = LoaderOptions & {\n '3d-tiles-archive'?: {\n /** path inside the 3tz archive */\n path?: string;\n };\n};\n\n/**\n * Loader for 3tz packages\n */\nexport const Tiles3DArchiveFileLoader: LoaderWithParser<\n ArrayBuffer,\n never,\n Tiles3DArchiveFileLoaderOptions\n> = {\n name: '3tz',\n id: '3tz',\n module: '3d-tiles',\n version: VERSION,\n mimeTypes: ['application/octet-stream', 'application/vnd.maxar.archive.3tz+zip'],\n parse: parse3DTilesArchive,\n extensions: ['3tz'],\n options: {}\n};\n\n/**\n * returns a single file from the 3tz archive\n * @param data 3tz archive data\n * @param options options\n * @returns requested file\n */\nasync function parse3DTilesArchive(\n data: ArrayBuffer,\n options: Tiles3DArchiveFileLoaderOptions = {}\n): Promise<ArrayBuffer> {\n const archive = await parse3DTilesArchiveFromProvider(new DataViewFile(new DataView(data)));\n return archive.getFile(options['3d-tiles-archive']?.path ?? '');\n}\n"],"mappings":"AAKA,SAAQA,YAAY,QAAO,0BAA0B;AAAC,SAC9CC,mBAAmB,IAAIC,+BAA+B;AAI9D,MAAMC,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"3d-tiles-archive-loader.js","names":["DataViewFile","parse3DTilesArchive","parse3DTilesArchiveFromProvider","VERSION","Tiles3DArchiveFileLoader","name","id","module","version","mimeTypes","parse","extensions","options","data","_options$3dTilesArc","_options$3dTilesArc2","arguments","length","undefined","archive","DataView","getFile","path"],"sources":["../src/3d-tiles-archive-loader.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright vis.gl contributors\n\nimport type {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {DataViewFile} from '@loaders.gl/loader-utils';\nimport {parse3DTilesArchive as parse3DTilesArchiveFromProvider} from './3d-tiles-archive/3d-tiles-archive-parser';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n/** options to load data from 3tz */\nexport type Tiles3DArchiveFileLoaderOptions = LoaderOptions & {\n '3d-tiles-archive'?: {\n /** path inside the 3tz archive */\n path?: string;\n };\n};\n\n/**\n * Loader for 3tz packages\n */\nexport const Tiles3DArchiveFileLoader: LoaderWithParser<\n ArrayBuffer,\n never,\n Tiles3DArchiveFileLoaderOptions\n> = {\n name: '3tz',\n id: '3tz',\n module: '3d-tiles',\n version: VERSION,\n mimeTypes: ['application/octet-stream', 'application/vnd.maxar.archive.3tz+zip'],\n parse: parse3DTilesArchive,\n extensions: ['3tz'],\n options: {}\n};\n\n/**\n * returns a single file from the 3tz archive\n * @param data 3tz archive data\n * @param options options\n * @returns requested file\n */\nasync function parse3DTilesArchive(\n data: ArrayBuffer,\n options: Tiles3DArchiveFileLoaderOptions = {}\n): Promise<ArrayBuffer> {\n const archive = await parse3DTilesArchiveFromProvider(new DataViewFile(new DataView(data)));\n return archive.getFile(options['3d-tiles-archive']?.path ?? '');\n}\n"],"mappings":"AAKA,SAAQA,YAAY,QAAO,0BAA0B;AAAC,SAC9CC,mBAAmB,IAAIC,+BAA+B;AAI9D,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAa3E,OAAO,MAAMC,wBAIZ,GAAG;EACFC,IAAI,EAAE,KAAK;EACXC,EAAE,EAAE,KAAK;EACTC,MAAM,EAAE,UAAU;EAClBC,OAAO,EAAEL,OAAO;EAChBM,SAAS,EAAE,CAAC,0BAA0B,EAAE,uCAAuC,CAAC;EAChFC,KAAK,EAAET,mBAAmB;EAC1BU,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,OAAO,EAAE,CAAC;AACZ,CAAC;AAQD,eAAeX,mBAAmBA,CAChCY,IAAiB,EAEK;EAAA,IAAAC,mBAAA,EAAAC,oBAAA;EAAA,IADtBH,OAAwC,GAAAI,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE7C,MAAMG,OAAO,GAAG,MAAMjB,+BAA+B,CAAC,IAAIF,YAAY,CAAC,IAAIoB,QAAQ,CAACP,IAAI,CAAC,CAAC,CAAC;EAC3F,OAAOM,OAAO,CAACE,OAAO,EAAAP,mBAAA,IAAAC,oBAAA,GAACH,OAAO,CAAC,kBAAkB,CAAC,cAAAG,oBAAA,uBAA3BA,oBAAA,CAA6BO,IAAI,cAAAR,mBAAA,cAAAA,mBAAA,GAAI,EAAE,CAAC;AACjE"}
|
package/dist/dist.dev.js
CHANGED
|
@@ -4309,7 +4309,7 @@ var __exports__ = (() => {
|
|
|
4309
4309
|
console.warn("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
|
|
4310
4310
|
globalThis._loadersgl_.version = NPM_TAG;
|
|
4311
4311
|
} else {
|
|
4312
|
-
globalThis._loadersgl_.version = "4.1.0
|
|
4312
|
+
globalThis._loadersgl_.version = "4.1.0";
|
|
4313
4313
|
}
|
|
4314
4314
|
}
|
|
4315
4315
|
return globalThis._loadersgl_.version;
|
|
@@ -4471,6 +4471,9 @@ var __exports__ = (() => {
|
|
|
4471
4471
|
return true;
|
|
4472
4472
|
}
|
|
4473
4473
|
function concatenateArrayBuffers(...sources) {
|
|
4474
|
+
return concatenateArrayBuffersFromArray(sources);
|
|
4475
|
+
}
|
|
4476
|
+
function concatenateArrayBuffersFromArray(sources) {
|
|
4474
4477
|
const sourceArrays = sources.map((source2) => source2 instanceof ArrayBuffer ? new Uint8Array(source2) : source2);
|
|
4475
4478
|
const byteLength = sourceArrays.reduce((length4, typedArray) => length4 + typedArray.byteLength, 0);
|
|
4476
4479
|
const result = new Uint8Array(byteLength);
|
|
@@ -10083,7 +10086,7 @@ var __exports__ = (() => {
|
|
|
10083
10086
|
}({});
|
|
10084
10087
|
|
|
10085
10088
|
// src/lib/utils/version.ts
|
|
10086
|
-
var VERSION2 = true ? "4.1.0
|
|
10089
|
+
var VERSION2 = true ? "4.1.0" : "latest";
|
|
10087
10090
|
|
|
10088
10091
|
// src/lib/constants.ts
|
|
10089
10092
|
var TILE3D_TYPE = {
|
|
@@ -10117,7 +10120,7 @@ var __exports__ = (() => {
|
|
|
10117
10120
|
}
|
|
10118
10121
|
|
|
10119
10122
|
// ../draco/src/lib/utils/version.ts
|
|
10120
|
-
var VERSION3 = true ? "4.1.0
|
|
10123
|
+
var VERSION3 = true ? "4.1.0" : "latest";
|
|
10121
10124
|
|
|
10122
10125
|
// ../draco/src/draco-loader.ts
|
|
10123
10126
|
var DracoLoader = {
|
|
@@ -11819,7 +11822,7 @@ var __exports__ = (() => {
|
|
|
11819
11822
|
});
|
|
11820
11823
|
|
|
11821
11824
|
// ../images/src/lib/utils/version.ts
|
|
11822
|
-
var VERSION4 = true ? "4.1.0
|
|
11825
|
+
var VERSION4 = true ? "4.1.0" : "latest";
|
|
11823
11826
|
|
|
11824
11827
|
// ../images/src/lib/category-api/image-type.ts
|
|
11825
11828
|
var parseImageNode = globalThis.loaders?.parseImageNode;
|
|
@@ -13528,10 +13531,10 @@ var __exports__ = (() => {
|
|
|
13528
13531
|
}
|
|
13529
13532
|
|
|
13530
13533
|
// ../gltf/src/lib/utils/version.ts
|
|
13531
|
-
var VERSION5 = true ? "4.1.0
|
|
13534
|
+
var VERSION5 = true ? "4.1.0" : "latest";
|
|
13532
13535
|
|
|
13533
13536
|
// ../textures/src/lib/utils/version.ts
|
|
13534
|
-
var VERSION6 = true ? "4.1.0
|
|
13537
|
+
var VERSION6 = true ? "4.1.0" : "latest";
|
|
13535
13538
|
|
|
13536
13539
|
// ../textures/src/lib/parsers/basis-module-loader.ts
|
|
13537
13540
|
var BASIS_EXTERNAL_LIBRARIES = {
|
|
@@ -18320,6 +18323,97 @@ var __exports__ = (() => {
|
|
|
18320
18323
|
}
|
|
18321
18324
|
};
|
|
18322
18325
|
};
|
|
18326
|
+
var EOCD_FIELDS = [{
|
|
18327
|
+
offset: 0,
|
|
18328
|
+
size: 4,
|
|
18329
|
+
default: new DataView(eoCDSignature.buffer).getUint32(0, true)
|
|
18330
|
+
}, {
|
|
18331
|
+
offset: 4,
|
|
18332
|
+
size: 2,
|
|
18333
|
+
default: 0
|
|
18334
|
+
}, {
|
|
18335
|
+
offset: 6,
|
|
18336
|
+
size: 2,
|
|
18337
|
+
default: 0
|
|
18338
|
+
}, {
|
|
18339
|
+
offset: 8,
|
|
18340
|
+
size: 2,
|
|
18341
|
+
name: "recordsNumber"
|
|
18342
|
+
}, {
|
|
18343
|
+
offset: 10,
|
|
18344
|
+
size: 2,
|
|
18345
|
+
name: "recordsNumber"
|
|
18346
|
+
}, {
|
|
18347
|
+
offset: 12,
|
|
18348
|
+
size: 4,
|
|
18349
|
+
name: "cdSize"
|
|
18350
|
+
}, {
|
|
18351
|
+
offset: 16,
|
|
18352
|
+
size: 4,
|
|
18353
|
+
name: "cdOffset"
|
|
18354
|
+
}, {
|
|
18355
|
+
offset: 20,
|
|
18356
|
+
size: 2,
|
|
18357
|
+
default: 0
|
|
18358
|
+
}];
|
|
18359
|
+
var ZIP64_EOCD_LOCATOR_FIELDS = [{
|
|
18360
|
+
offset: 0,
|
|
18361
|
+
size: 4,
|
|
18362
|
+
default: new DataView(zip64EoCDLocatorSignature.buffer).getUint32(0, true)
|
|
18363
|
+
}, {
|
|
18364
|
+
offset: 4,
|
|
18365
|
+
size: 4,
|
|
18366
|
+
default: 0
|
|
18367
|
+
}, {
|
|
18368
|
+
offset: 8,
|
|
18369
|
+
size: 8,
|
|
18370
|
+
name: "eoCDStart"
|
|
18371
|
+
}, {
|
|
18372
|
+
offset: 16,
|
|
18373
|
+
size: 4,
|
|
18374
|
+
default: 1
|
|
18375
|
+
}];
|
|
18376
|
+
var ZIP64_EOCD_FIELDS = [{
|
|
18377
|
+
offset: 0,
|
|
18378
|
+
size: 4,
|
|
18379
|
+
default: new DataView(zip64EoCDSignature.buffer).getUint32(0, true)
|
|
18380
|
+
}, {
|
|
18381
|
+
offset: 4,
|
|
18382
|
+
size: 8,
|
|
18383
|
+
default: 44
|
|
18384
|
+
}, {
|
|
18385
|
+
offset: 12,
|
|
18386
|
+
size: 2,
|
|
18387
|
+
default: 45
|
|
18388
|
+
}, {
|
|
18389
|
+
offset: 14,
|
|
18390
|
+
size: 2,
|
|
18391
|
+
default: 45
|
|
18392
|
+
}, {
|
|
18393
|
+
offset: 16,
|
|
18394
|
+
size: 4,
|
|
18395
|
+
default: 0
|
|
18396
|
+
}, {
|
|
18397
|
+
offset: 20,
|
|
18398
|
+
size: 4,
|
|
18399
|
+
default: 0
|
|
18400
|
+
}, {
|
|
18401
|
+
offset: 24,
|
|
18402
|
+
size: 8,
|
|
18403
|
+
name: "recordsNumber"
|
|
18404
|
+
}, {
|
|
18405
|
+
offset: 32,
|
|
18406
|
+
size: 8,
|
|
18407
|
+
name: "recordsNumber"
|
|
18408
|
+
}, {
|
|
18409
|
+
offset: 40,
|
|
18410
|
+
size: 8,
|
|
18411
|
+
name: "cdSize"
|
|
18412
|
+
}, {
|
|
18413
|
+
offset: 48,
|
|
18414
|
+
size: 8,
|
|
18415
|
+
name: "cdOffset"
|
|
18416
|
+
}];
|
|
18323
18417
|
|
|
18324
18418
|
// ../zip/src/parse-zip/cd-file-header.ts
|
|
18325
18419
|
var CD_COMPRESSED_SIZE_OFFSET = 20n;
|
|
@@ -19112,6 +19206,9 @@ var __exports__ = (() => {
|
|
|
19112
19206
|
}
|
|
19113
19207
|
async function makeHashTableFromZipHeaders(fileProvider) {
|
|
19114
19208
|
const zipCDIterator = makeZipCDHeaderIterator(fileProvider);
|
|
19209
|
+
return getHashTable(zipCDIterator);
|
|
19210
|
+
}
|
|
19211
|
+
async function getHashTable(zipCDIterator) {
|
|
19115
19212
|
const md5Hash = new MD5Hash();
|
|
19116
19213
|
const textEncoder = new TextEncoder();
|
|
19117
19214
|
const hashTable = {};
|
|
@@ -19446,7 +19543,7 @@ var __exports__ = (() => {
|
|
|
19446
19543
|
};
|
|
19447
19544
|
|
|
19448
19545
|
// src/3d-tiles-archive-loader.ts
|
|
19449
|
-
var VERSION8 = true ? "4.1.0
|
|
19546
|
+
var VERSION8 = true ? "4.1.0" : "latest";
|
|
19450
19547
|
var Tiles3DArchiveFileLoader = {
|
|
19451
19548
|
name: "3tz",
|
|
19452
19549
|
id: "3tz",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = typeof "4.1.0
|
|
1
|
+
export const VERSION = typeof "4.1.0" !== 'undefined' ? "4.1.0" : 'latest';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","names":["VERSION"],"sources":["../../../src/lib/utils/version.ts"],"sourcesContent":["// Version constant cannot be imported, it needs to correspond to the build version of **this** module.\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nexport const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n"],"mappings":"AAGA,OAAO,MAAMA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","names":["VERSION"],"sources":["../../../src/lib/utils/version.ts"],"sourcesContent":["// Version constant cannot be imported, it needs to correspond to the build version of **this** module.\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nexport const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n"],"mappings":"AAGA,OAAO,MAAMA,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/3d-tiles",
|
|
3
|
-
"version": "4.1.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "3D Tiles, an open standard for streaming massive heterogeneous 3D geospatial datasets.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"module": "dist/index.js",
|
|
30
30
|
"exports": {
|
|
31
31
|
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
32
33
|
"import": "./dist/index.js",
|
|
33
|
-
"require": "./dist/index.cjs"
|
|
34
|
-
"types": "./dist/index.d.ts"
|
|
34
|
+
"require": "./dist/index.cjs"
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"sideEffects": false,
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"build-bundle": "ocular-bundle ./src/index.ts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@loaders.gl/draco": "4.1.0
|
|
49
|
-
"@loaders.gl/gltf": "4.1.0
|
|
50
|
-
"@loaders.gl/loader-utils": "4.1.0
|
|
51
|
-
"@loaders.gl/math": "4.1.0
|
|
52
|
-
"@loaders.gl/tiles": "4.1.0
|
|
53
|
-
"@loaders.gl/zip": "4.1.0
|
|
48
|
+
"@loaders.gl/draco": "4.1.0",
|
|
49
|
+
"@loaders.gl/gltf": "4.1.0",
|
|
50
|
+
"@loaders.gl/loader-utils": "4.1.0",
|
|
51
|
+
"@loaders.gl/math": "4.1.0",
|
|
52
|
+
"@loaders.gl/tiles": "4.1.0",
|
|
53
|
+
"@loaders.gl/zip": "4.1.0",
|
|
54
54
|
"@math.gl/core": "^4.0.0",
|
|
55
55
|
"@math.gl/geospatial": "^4.0.0",
|
|
56
56
|
"@probe.gl/log": "^4.0.4",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@loaders.gl/core": "^4.0.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "75961cc7a6ed6679018c0e3fb6eb5c3c74d97bdb"
|
|
63
63
|
}
|