@loaders.gl/3d-tiles 4.0.0-alpha.22 → 4.0.0-alpha.23
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-archive/3d-tiles-archive-archive.d.ts +2 -1
- package/dist/3d-tiles-archive/3d-tiles-archive-archive.d.ts.map +1 -1
- package/dist/3d-tiles-archive/3d-tiles-archive-parser.d.ts +1 -1
- package/dist/3d-tiles-archive/3d-tiles-archive-parser.d.ts.map +1 -1
- package/dist/3d-tiles-archive-loader.d.ts +1 -1
- package/dist/3d-tiles-archive-loader.d.ts.map +1 -1
- package/dist/3d-tiles-archive-loader.js +2 -2
- package/dist/cesium-ion-loader.d.ts.map +1 -1
- package/dist/cesium-ion-loader.js +0 -1
- package/dist/dist.min.js +2020 -1475
- package/dist/es5/3d-tiles-archive/3d-tiles-archive-archive.js.map +1 -1
- package/dist/es5/3d-tiles-archive/3d-tiles-archive-parser.js.map +1 -1
- package/dist/es5/3d-tiles-archive-loader.js +3 -3
- package/dist/es5/3d-tiles-archive-loader.js.map +1 -1
- package/dist/es5/cesium-ion-loader.js.map +1 -1
- package/dist/es5/lib/filesystems/tiles-3d-archive-file-system.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-composite.js +3 -1
- package/dist/es5/lib/parsers/parse-3d-tile-composite.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile-gltf.js +3 -1
- package/dist/es5/lib/parsers/parse-3d-tile-gltf.js.map +1 -1
- package/dist/es5/lib/parsers/parse-3d-tile.js +3 -1
- package/dist/es5/lib/parsers/parse-3d-tile.js.map +1 -1
- package/dist/es5/lib/utils/version.js +1 -1
- package/dist/es5/tiles-3d-loader.js +2 -0
- package/dist/es5/tiles-3d-loader.js.map +1 -1
- package/dist/es5/types.js.map +1 -1
- package/dist/esm/3d-tiles-archive/3d-tiles-archive-archive.js.map +1 -1
- package/dist/esm/3d-tiles-archive/3d-tiles-archive-parser.js.map +1 -1
- package/dist/esm/3d-tiles-archive-loader.js +2 -2
- package/dist/esm/3d-tiles-archive-loader.js.map +1 -1
- package/dist/esm/cesium-ion-loader.js.map +1 -1
- package/dist/esm/lib/filesystems/tiles-3d-archive-file-system.js.map +1 -1
- package/dist/esm/lib/parsers/parse-3d-tile-composite.js +3 -1
- package/dist/esm/lib/parsers/parse-3d-tile-composite.js.map +1 -1
- package/dist/esm/lib/parsers/parse-3d-tile-gltf.js +2 -1
- package/dist/esm/lib/parsers/parse-3d-tile-gltf.js.map +1 -1
- package/dist/esm/lib/parsers/parse-3d-tile.js +3 -1
- package/dist/esm/lib/parsers/parse-3d-tile.js.map +1 -1
- package/dist/esm/lib/utils/version.js +1 -1
- package/dist/esm/tiles-3d-loader.js +2 -0
- package/dist/esm/tiles-3d-loader.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/lib/filesystems/tiles-3d-archive-file-system.d.ts +2 -1
- package/dist/lib/filesystems/tiles-3d-archive-file-system.d.ts.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-composite.js +1 -1
- package/dist/lib/parsers/parse-3d-tile-gltf.d.ts +1 -1
- package/dist/lib/parsers/parse-3d-tile-gltf.d.ts.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-gltf.js +2 -1
- package/dist/lib/parsers/parse-3d-tile.d.ts +1 -1
- package/dist/lib/parsers/parse-3d-tile.d.ts.map +1 -1
- package/dist/lib/parsers/parse-3d-tile.js +1 -1
- package/dist/tiles-3d-loader.d.ts +2 -1
- package/dist/tiles-3d-loader.d.ts.map +1 -1
- package/dist/tiles-3d-loader.js +4 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/3d-tiles-archive/3d-tiles-archive-archive.ts +2 -1
- package/src/3d-tiles-archive/3d-tiles-archive-parser.ts +1 -1
- package/src/3d-tiles-archive-loader.ts +2 -2
- package/src/cesium-ion-loader.ts +0 -1
- package/src/lib/filesystems/tiles-3d-archive-file-system.ts +1 -1
- package/src/lib/parsers/parse-3d-tile-composite.ts +1 -1
- package/src/lib/parsers/parse-3d-tile-gltf.ts +3 -2
- package/src/lib/parsers/parse-3d-tile.ts +2 -2
- package/src/tiles-3d-loader.ts +16 -4
- package/src/types.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiles-3d-archive-file-system.js","names":["ZipFileSystem","cdSignature","cdHeaderSignature","searchFromTheEnd","parseZipCDFileHeader","parseHashFile","parseZipLocalFileHeader","Tiles3DArchive","Tiles3DArchiveFileSystem","constructor","file","_defineProperty","fetch","filename","fileProvider","Error","hashData","archive","fileData","getFile","response","Response","Object","defineProperty","value","concat","fileName","undefined","hashCDOffset","cdFileHeader","localFileHeader","localHeaderOffset","fileDataOffset","hashFile","slice","compressedSize"],"sources":["../../../../src/lib/filesystems/tiles-3d-archive-file-system.ts"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"tiles-3d-archive-file-system.js","names":["ZipFileSystem","cdSignature","cdHeaderSignature","searchFromTheEnd","parseZipCDFileHeader","parseHashFile","parseZipLocalFileHeader","Tiles3DArchive","Tiles3DArchiveFileSystem","constructor","file","_defineProperty","fetch","filename","fileProvider","Error","hashData","archive","fileData","getFile","response","Response","Object","defineProperty","value","concat","fileName","undefined","hashCDOffset","cdFileHeader","localFileHeader","localHeaderOffset","fileDataOffset","hashFile","slice","compressedSize"],"sources":["../../../../src/lib/filesystems/tiles-3d-archive-file-system.ts"],"sourcesContent":["import {FileProvider} from '@loaders.gl/loader-utils';\nimport {\n ZipFileSystem,\n cdSignature as cdHeaderSignature,\n searchFromTheEnd,\n parseZipCDFileHeader,\n HashElement,\n parseHashFile,\n parseZipLocalFileHeader\n} from '@loaders.gl/zip';\nimport {Tiles3DArchive} from '../../3d-tiles-archive/3d-tiles-archive-archive';\n\n/**\n * FileSystem adapter for a 3tz (3D tiles archive format) file\n * Holds FileProvider object that provides random access to archived files.\n * The difference from ZipFileSystem is usage of `@3dtilesIndex1@` index file that increases\n * access speed to archived files\n * @see https://github.com/erikdahlstrom/3tz-specification/blob/master/Specification.md\n */\nexport class Tiles3DArchiveFileSystem extends ZipFileSystem {\n hashData?: HashElement[] | null;\n\n /**\n * Constructor\n * @param file - instance of FileProvider or file path string\n */\n constructor(file: FileProvider | string) {\n super(file);\n }\n\n /**\n * Implementation of fetch against this file system.\n * It tries to take `@3dtilesIndex1@` file from the archive and use it\n * for faster access to archived files\n * @param filename - name of a file\n * @returns - Response with file data\n */\n async fetch(filename: string): Promise<Response> {\n const fileProvider = await this.fileProvider;\n if (!fileProvider) {\n throw new Error('No data detected in the zip archive');\n }\n await this.parseHashFile();\n if (this.hashData) {\n const archive = new Tiles3DArchive(fileProvider, this.hashData);\n\n const fileData = await archive.getFile(filename);\n const response = new Response(fileData);\n Object.defineProperty(response, 'url', {value: `${this.fileName || ''}/${filename}`});\n return response;\n }\n return super.fetch(filename);\n }\n\n /**\n * Try to get and parse '@3dtilesIndex1@' file, that allows to get direct access\n * to files inside the archive\n * @returns void\n */\n private async parseHashFile(): Promise<void> {\n if (this.hashData !== undefined) {\n return;\n }\n\n const fileProvider = await this.fileProvider;\n if (!fileProvider) {\n throw new Error('No data detected in the zip archive');\n }\n\n const hashCDOffset = await searchFromTheEnd(fileProvider, cdHeaderSignature);\n\n const cdFileHeader = await parseZipCDFileHeader(hashCDOffset, fileProvider);\n\n // '@3dtilesIndex1@' is index file that must be the last in the archive. It allows\n // to improve load and read performance when the archive contains a very large number\n // of files.\n if (cdFileHeader?.fileName === '@3dtilesIndex1@') {\n const localFileHeader = await parseZipLocalFileHeader(\n cdFileHeader.localHeaderOffset,\n fileProvider\n );\n if (!localFileHeader) {\n throw new Error('corrupted 3tz');\n }\n\n const fileDataOffset = localFileHeader.fileDataOffset;\n const hashFile = await fileProvider.slice(\n fileDataOffset,\n fileDataOffset + localFileHeader.compressedSize\n );\n\n this.hashData = parseHashFile(hashFile);\n } else {\n this.hashData = null;\n }\n }\n}\n"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;IAEA,MAAMa,YAAY,GAAG,MAAMzB,gBAAgB,CAACW,YAAY,EAAEZ,iBAAiB,CAAC;IAE5E,MAAM2B,YAAY,GAAG,MAAMzB,oBAAoB,CAACwB,YAAY,EAAEd,YAAY,CAAC;IAK3E,IAAI,CAAAe,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEH,QAAQ,MAAK,iBAAiB,EAAE;MAChD,MAAMI,eAAe,GAAG,MAAMxB,uBAAuB,CACnDuB,YAAY,CAACE,iBAAiB,EAC9BjB,YACF,CAAC;MACD,IAAI,CAACgB,eAAe,EAAE;QACpB,MAAM,IAAIf,KAAK,CAAC,eAAe,CAAC;MAClC;MAEA,MAAMiB,cAAc,GAAGF,eAAe,CAACE,cAAc;MACrD,MAAMC,QAAQ,GAAG,MAAMnB,YAAY,CAACoB,KAAK,CACvCF,cAAc,EACdA,cAAc,GAAGF,eAAe,CAACK,cACnC,CAAC;MAED,IAAI,CAACnB,QAAQ,GAAGX,aAAa,CAAC4B,QAAQ,CAAC;IACzC,CAAC,MAAM;MACL,IAAI,CAACjB,QAAQ,GAAG,IAAI;IACtB;EACF;AACF"}
|
|
@@ -6,7 +6,9 @@ export async function parseComposite3DTile(tile, arrayBuffer, byteOffset, option
|
|
|
6
6
|
byteOffset += 4;
|
|
7
7
|
tile.tiles = [];
|
|
8
8
|
while (tile.tiles.length < tile.tilesLength && (tile.byteLength || 0) - byteOffset > 12) {
|
|
9
|
-
const subtile = {
|
|
9
|
+
const subtile = {
|
|
10
|
+
shape: 'tile3d'
|
|
11
|
+
};
|
|
10
12
|
tile.tiles.push(subtile);
|
|
11
13
|
byteOffset = await parse3DTile(arrayBuffer, byteOffset, options, context, subtile);
|
|
12
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-3d-tile-composite.js","names":["parse3DTileHeaderSync","parseComposite3DTile","tile","arrayBuffer","byteOffset","options","context","parse3DTile","view","DataView","tilesLength","getUint32","tiles","length","byteLength","subtile","push"],"sources":["../../../../src/lib/parsers/parse-3d-tile-composite.ts"],"sourcesContent":["// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n// Reference code:\n// https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Composite3DTileContent.js#L182\n\nimport type {LoaderContext} from '@loaders.gl/loader-utils';\nimport type {Tiles3DLoaderOptions} from '../../tiles-3d-loader';\nimport {parse3DTileHeaderSync} from './helpers/parse-3d-tile-header';\nimport {Tiles3DTileContent} from '../../types';\n\n/** Resolve circulate dependency by passing in parsing function as argument */\ntype Parse3DTile = (\n arrayBuffer: ArrayBuffer,\n byteOffset: number,\n options: Tiles3DLoaderOptions | undefined,\n context: LoaderContext | undefined,\n subtile\n) => Promise<number>;\n\n// eslint-disable-next-line max-params\nexport async function parseComposite3DTile(\n tile: Tiles3DTileContent,\n arrayBuffer: ArrayBuffer,\n byteOffset: number,\n options: Tiles3DLoaderOptions | undefined,\n context: LoaderContext | undefined,\n parse3DTile: Parse3DTile\n): Promise<number> {\n byteOffset = parse3DTileHeaderSync(tile, arrayBuffer, byteOffset);\n\n const view = new DataView(arrayBuffer);\n\n // Extract number of tiles\n tile.tilesLength = view.getUint32(byteOffset, true);\n byteOffset += 4;\n\n // extract each tile from the byte stream\n tile.tiles = [];\n while (tile.tiles.length < tile.tilesLength && (tile.byteLength || 0) - byteOffset > 12) {\n const subtile = {};\n tile.tiles.push(subtile);\n byteOffset = await parse3DTile(arrayBuffer, byteOffset, options, context, subtile);\n // TODO - do we need to add any padding in between tiles?\n }\n\n return byteOffset;\n}\n"],"mappings":"AAQA,SAAQA,qBAAqB,QAAO,gCAAgC;AAapE,OAAO,eAAeC,oBAAoBA,CACxCC,IAAwB,EACxBC,WAAwB,EACxBC,UAAkB,EAClBC,OAAyC,EACzCC,OAAkC,EAClCC,WAAwB,EACP;EACjBH,UAAU,GAAGJ,qBAAqB,CAACE,IAAI,EAAEC,WAAW,EAAEC,UAAU,CAAC;EAEjE,MAAMI,IAAI,GAAG,IAAIC,QAAQ,CAACN,WAAW,CAAC;EAGtCD,IAAI,CAACQ,WAAW,GAAGF,IAAI,CAACG,SAAS,CAACP,UAAU,EAAE,IAAI,CAAC;EACnDA,UAAU,IAAI,CAAC;EAGfF,IAAI,CAACU,KAAK,GAAG,EAAE;EACf,OAAOV,IAAI,CAACU,KAAK,CAACC,MAAM,GAAGX,IAAI,CAACQ,WAAW,IAAI,CAACR,IAAI,CAACY,UAAU,IAAI,CAAC,IAAIV,UAAU,GAAG,EAAE,EAAE;IACvF,MAAMW,
|
|
1
|
+
{"version":3,"file":"parse-3d-tile-composite.js","names":["parse3DTileHeaderSync","parseComposite3DTile","tile","arrayBuffer","byteOffset","options","context","parse3DTile","view","DataView","tilesLength","getUint32","tiles","length","byteLength","subtile","shape","push"],"sources":["../../../../src/lib/parsers/parse-3d-tile-composite.ts"],"sourcesContent":["// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n// Reference code:\n// https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Composite3DTileContent.js#L182\n\nimport type {LoaderContext} from '@loaders.gl/loader-utils';\nimport type {Tiles3DLoaderOptions} from '../../tiles-3d-loader';\nimport {parse3DTileHeaderSync} from './helpers/parse-3d-tile-header';\nimport {Tiles3DTileContent} from '../../types';\n\n/** Resolve circulate dependency by passing in parsing function as argument */\ntype Parse3DTile = (\n arrayBuffer: ArrayBuffer,\n byteOffset: number,\n options: Tiles3DLoaderOptions | undefined,\n context: LoaderContext | undefined,\n subtile\n) => Promise<number>;\n\n// eslint-disable-next-line max-params\nexport async function parseComposite3DTile(\n tile: Tiles3DTileContent,\n arrayBuffer: ArrayBuffer,\n byteOffset: number,\n options: Tiles3DLoaderOptions | undefined,\n context: LoaderContext | undefined,\n parse3DTile: Parse3DTile\n): Promise<number> {\n byteOffset = parse3DTileHeaderSync(tile, arrayBuffer, byteOffset);\n\n const view = new DataView(arrayBuffer);\n\n // Extract number of tiles\n tile.tilesLength = view.getUint32(byteOffset, true);\n byteOffset += 4;\n\n // extract each tile from the byte stream\n tile.tiles = [];\n while (tile.tiles.length < tile.tilesLength && (tile.byteLength || 0) - byteOffset > 12) {\n const subtile: Tiles3DTileContent = {shape: 'tile3d'};\n tile.tiles.push(subtile);\n byteOffset = await parse3DTile(arrayBuffer, byteOffset, options, context, subtile);\n // TODO - do we need to add any padding in between tiles?\n }\n\n return byteOffset;\n}\n"],"mappings":"AAQA,SAAQA,qBAAqB,QAAO,gCAAgC;AAapE,OAAO,eAAeC,oBAAoBA,CACxCC,IAAwB,EACxBC,WAAwB,EACxBC,UAAkB,EAClBC,OAAyC,EACzCC,OAAkC,EAClCC,WAAwB,EACP;EACjBH,UAAU,GAAGJ,qBAAqB,CAACE,IAAI,EAAEC,WAAW,EAAEC,UAAU,CAAC;EAEjE,MAAMI,IAAI,GAAG,IAAIC,QAAQ,CAACN,WAAW,CAAC;EAGtCD,IAAI,CAACQ,WAAW,GAAGF,IAAI,CAACG,SAAS,CAACP,UAAU,EAAE,IAAI,CAAC;EACnDA,UAAU,IAAI,CAAC;EAGfF,IAAI,CAACU,KAAK,GAAG,EAAE;EACf,OAAOV,IAAI,CAACU,KAAK,CAACC,MAAM,GAAGX,IAAI,CAACQ,WAAW,IAAI,CAACR,IAAI,CAACY,UAAU,IAAI,CAAC,IAAIV,UAAU,GAAG,EAAE,EAAE;IACvF,MAAMW,OAA2B,GAAG;MAACC,KAAK,EAAE;IAAQ,CAAC;IACrDd,IAAI,CAACU,KAAK,CAACK,IAAI,CAACF,OAAO,CAAC;IACxBX,UAAU,GAAG,MAAMG,WAAW,CAACJ,WAAW,EAAEC,UAAU,EAAEC,OAAO,EAAEC,OAAO,EAAES,OAAO,CAAC;EAEpF;EAEA,OAAOX,UAAU;AACnB"}
|
|
@@ -6,7 +6,7 @@ export async function parseGltf3DTile(tile, arrayBuffer, options, context) {
|
|
|
6
6
|
tile.gltfUpAxis = options !== null && options !== void 0 && (_options$3dTiles = options['3d-tiles']) !== null && _options$3dTiles !== void 0 && _options$3dTiles.assetGltfUpAxis ? options['3d-tiles'].assetGltfUpAxis : 'Y';
|
|
7
7
|
if (options !== null && options !== void 0 && (_options$3dTiles2 = options['3d-tiles']) !== null && _options$3dTiles2 !== void 0 && _options$3dTiles2.loadGLTF) {
|
|
8
8
|
if (!context) {
|
|
9
|
-
return;
|
|
9
|
+
return arrayBuffer.byteLength;
|
|
10
10
|
}
|
|
11
11
|
const gltfWithBuffers = await parseFromContext(arrayBuffer, GLTFLoader, options, context);
|
|
12
12
|
tile.gltf = postProcessGLTF(gltfWithBuffers);
|
|
@@ -14,5 +14,6 @@ export async function parseGltf3DTile(tile, arrayBuffer, options, context) {
|
|
|
14
14
|
} else {
|
|
15
15
|
tile.gltfArrayBuffer = arrayBuffer;
|
|
16
16
|
}
|
|
17
|
+
return arrayBuffer.byteLength;
|
|
17
18
|
}
|
|
18
19
|
//# sourceMappingURL=parse-3d-tile-gltf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-3d-tile-gltf.js","names":["parseFromContext","_getMemoryUsageGLTF","GLTFLoader","postProcessGLTF","parseGltf3DTile","tile","arrayBuffer","options","context","_options$3dTiles","_options$3dTiles2","rotateYtoZ","gltfUpAxis","assetGltfUpAxis","loadGLTF","gltfWithBuffers","gltf","gpuMemoryUsageInBytes","gltfArrayBuffer"],"sources":["../../../../src/lib/parsers/parse-3d-tile-gltf.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {parseFromContext, LoaderContext} from '@loaders.gl/loader-utils';\nimport {_getMemoryUsageGLTF, GLTFLoader, postProcessGLTF} from '@loaders.gl/gltf';\nimport type {Tiles3DLoaderOptions} from '../../tiles-3d-loader';\nimport {Tiles3DTileContent} from '../../types';\n\nexport async function parseGltf3DTile(\n tile: Tiles3DTileContent,\n arrayBuffer: ArrayBuffer,\n options?: Tiles3DLoaderOptions,\n context?: LoaderContext\n): Promise<
|
|
1
|
+
{"version":3,"file":"parse-3d-tile-gltf.js","names":["parseFromContext","_getMemoryUsageGLTF","GLTFLoader","postProcessGLTF","parseGltf3DTile","tile","arrayBuffer","options","context","_options$3dTiles","_options$3dTiles2","rotateYtoZ","gltfUpAxis","assetGltfUpAxis","loadGLTF","byteLength","gltfWithBuffers","gltf","gpuMemoryUsageInBytes","gltfArrayBuffer"],"sources":["../../../../src/lib/parsers/parse-3d-tile-gltf.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {parseFromContext, LoaderContext} from '@loaders.gl/loader-utils';\nimport {_getMemoryUsageGLTF, GLTFLoader, postProcessGLTF} from '@loaders.gl/gltf';\nimport type {Tiles3DLoaderOptions} from '../../tiles-3d-loader';\nimport {Tiles3DTileContent} from '../../types';\n\nexport async function parseGltf3DTile(\n tile: Tiles3DTileContent,\n arrayBuffer: ArrayBuffer,\n options?: Tiles3DLoaderOptions,\n context?: LoaderContext\n): Promise<number> {\n // Set flags\n // glTF models need to be rotated from Y to Z up\n // https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification#y-up-to-z-up\n tile.rotateYtoZ = true;\n // Save gltf up axis\n tile.gltfUpAxis = options?.['3d-tiles']?.assetGltfUpAxis\n ? options['3d-tiles'].assetGltfUpAxis\n : 'Y';\n\n if (options?.['3d-tiles']?.loadGLTF) {\n if (!context) {\n return arrayBuffer.byteLength;\n }\n const gltfWithBuffers = await parseFromContext(arrayBuffer, GLTFLoader, options, context);\n tile.gltf = postProcessGLTF(gltfWithBuffers);\n tile.gpuMemoryUsageInBytes = _getMemoryUsageGLTF(tile.gltf);\n } else {\n tile.gltfArrayBuffer = arrayBuffer;\n }\n return arrayBuffer.byteLength;\n}\n"],"mappings":"AAEA,SAAQA,gBAAgB,QAAsB,0BAA0B;AACxE,SAAQC,mBAAmB,EAAEC,UAAU,EAAEC,eAAe,QAAO,kBAAkB;AAIjF,OAAO,eAAeC,eAAeA,CACnCC,IAAwB,EACxBC,WAAwB,EACxBC,OAA8B,EAC9BC,OAAuB,EACN;EAAA,IAAAC,gBAAA,EAAAC,iBAAA;EAIjBL,IAAI,CAACM,UAAU,GAAG,IAAI;EAEtBN,IAAI,CAACO,UAAU,GAAGL,OAAO,aAAPA,OAAO,gBAAAE,gBAAA,GAAPF,OAAO,CAAG,UAAU,CAAC,cAAAE,gBAAA,eAArBA,gBAAA,CAAuBI,eAAe,GACpDN,OAAO,CAAC,UAAU,CAAC,CAACM,eAAe,GACnC,GAAG;EAEP,IAAIN,OAAO,aAAPA,OAAO,gBAAAG,iBAAA,GAAPH,OAAO,CAAG,UAAU,CAAC,cAAAG,iBAAA,eAArBA,iBAAA,CAAuBI,QAAQ,EAAE;IACnC,IAAI,CAACN,OAAO,EAAE;MACZ,OAAOF,WAAW,CAACS,UAAU;IAC/B;IACA,MAAMC,eAAe,GAAG,MAAMhB,gBAAgB,CAACM,WAAW,EAAEJ,UAAU,EAAEK,OAAO,EAAEC,OAAO,CAAC;IACzFH,IAAI,CAACY,IAAI,GAAGd,eAAe,CAACa,eAAe,CAAC;IAC5CX,IAAI,CAACa,qBAAqB,GAAGjB,mBAAmB,CAACI,IAAI,CAACY,IAAI,CAAC;EAC7D,CAAC,MAAM;IACLZ,IAAI,CAACc,eAAe,GAAGb,WAAW;EACpC;EACA,OAAOA,WAAW,CAACS,UAAU;AAC/B"}
|
|
@@ -9,7 +9,9 @@ export async function parse3DTile(arrayBuffer) {
|
|
|
9
9
|
let byteOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
10
10
|
let options = arguments.length > 2 ? arguments[2] : undefined;
|
|
11
11
|
let context = arguments.length > 3 ? arguments[3] : undefined;
|
|
12
|
-
let tile = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
|
|
12
|
+
let tile = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
|
|
13
|
+
shape: 'tile3d'
|
|
14
|
+
};
|
|
13
15
|
tile.byteOffset = byteOffset;
|
|
14
16
|
tile.type = getMagicString(arrayBuffer, byteOffset);
|
|
15
17
|
switch (tile.type) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-3d-tile.js","names":["TILE3D_TYPE","getMagicString","parsePointCloud3DTile","parseBatchedModel3DTile","parseInstancedModel3DTile","parseComposite3DTile","parseGltf3DTile","parse3DTile","arrayBuffer","byteOffset","arguments","length","undefined","options","context","tile","type","COMPOSITE","BATCHED_3D_MODEL","GLTF","INSTANCED_3D_MODEL","POINT_CLOUD","Error","concat"],"sources":["../../../../src/lib/parsers/parse-3d-tile.ts"],"sourcesContent":["// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {TILE3D_TYPE} from '../constants';\nimport {getMagicString} from './helpers/parse-utils';\n\nimport {parsePointCloud3DTile} from './parse-3d-tile-point-cloud';\nimport {parseBatchedModel3DTile} from './parse-3d-tile-batched-model';\nimport {parseInstancedModel3DTile} from './parse-3d-tile-instanced-model';\nimport {parseComposite3DTile} from './parse-3d-tile-composite';\nimport {parseGltf3DTile} from './parse-3d-tile-gltf';\nimport {LoaderContext} from '@loaders.gl/loader-utils';\nimport {Tiles3DLoaderOptions} from '../../tiles-3d-loader';\nimport {Tiles3DTileContent} from '../../types';\n\n// Extracts\nexport async function parse3DTile(\n arrayBuffer: ArrayBuffer,\n byteOffset = 0,\n options: Tiles3DLoaderOptions | undefined,\n context: LoaderContext | undefined,\n tile: Tiles3DTileContent = {}\n) {\n tile.byteOffset = byteOffset;\n tile.type = getMagicString(arrayBuffer, byteOffset);\n\n switch (tile.type) {\n case TILE3D_TYPE.COMPOSITE:\n // Note: We pass this function as argument so that embedded tiles can be parsed recursively\n return await parseComposite3DTile(\n tile,\n arrayBuffer,\n byteOffset,\n options,\n context,\n parse3DTile\n );\n\n case TILE3D_TYPE.BATCHED_3D_MODEL:\n return await parseBatchedModel3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n case TILE3D_TYPE.GLTF:\n return await parseGltf3DTile(tile, arrayBuffer, options, context);\n\n case TILE3D_TYPE.INSTANCED_3D_MODEL:\n return await parseInstancedModel3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n case TILE3D_TYPE.POINT_CLOUD:\n return await parsePointCloud3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n default:\n throw new Error(`3DTileLoader: unknown type ${tile.type}`); // eslint-disable-line\n }\n}\n"],"mappings":"AAGA,SAAQA,WAAW,QAAO,cAAc;AACxC,SAAQC,cAAc,QAAO,uBAAuB;AAEpD,SAAQC,qBAAqB,QAAO,6BAA6B;AACjE,SAAQC,uBAAuB,QAAO,+BAA+B;AACrE,SAAQC,yBAAyB,QAAO,iCAAiC;AACzE,SAAQC,oBAAoB,QAAO,2BAA2B;AAC9D,SAAQC,eAAe,QAAO,sBAAsB;AAMpD,OAAO,eAAeC,WAAWA,CAC/BC,WAAwB,
|
|
1
|
+
{"version":3,"file":"parse-3d-tile.js","names":["TILE3D_TYPE","getMagicString","parsePointCloud3DTile","parseBatchedModel3DTile","parseInstancedModel3DTile","parseComposite3DTile","parseGltf3DTile","parse3DTile","arrayBuffer","byteOffset","arguments","length","undefined","options","context","tile","shape","type","COMPOSITE","BATCHED_3D_MODEL","GLTF","INSTANCED_3D_MODEL","POINT_CLOUD","Error","concat"],"sources":["../../../../src/lib/parsers/parse-3d-tile.ts"],"sourcesContent":["// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {TILE3D_TYPE} from '../constants';\nimport {getMagicString} from './helpers/parse-utils';\n\nimport {parsePointCloud3DTile} from './parse-3d-tile-point-cloud';\nimport {parseBatchedModel3DTile} from './parse-3d-tile-batched-model';\nimport {parseInstancedModel3DTile} from './parse-3d-tile-instanced-model';\nimport {parseComposite3DTile} from './parse-3d-tile-composite';\nimport {parseGltf3DTile} from './parse-3d-tile-gltf';\nimport {LoaderContext} from '@loaders.gl/loader-utils';\nimport {Tiles3DLoaderOptions} from '../../tiles-3d-loader';\nimport {Tiles3DTileContent} from '../../types';\n\n// Extracts\nexport async function parse3DTile(\n arrayBuffer: ArrayBuffer,\n byteOffset = 0,\n options: Tiles3DLoaderOptions | undefined,\n context: LoaderContext | undefined,\n tile: Tiles3DTileContent = {shape: 'tile3d'}\n): Promise<number> {\n tile.byteOffset = byteOffset;\n tile.type = getMagicString(arrayBuffer, byteOffset);\n\n switch (tile.type) {\n case TILE3D_TYPE.COMPOSITE:\n // Note: We pass this function as argument so that embedded tiles can be parsed recursively\n return await parseComposite3DTile(\n tile,\n arrayBuffer,\n byteOffset,\n options,\n context,\n parse3DTile\n );\n\n case TILE3D_TYPE.BATCHED_3D_MODEL:\n return await parseBatchedModel3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n case TILE3D_TYPE.GLTF:\n return await parseGltf3DTile(tile, arrayBuffer, options, context);\n\n case TILE3D_TYPE.INSTANCED_3D_MODEL:\n return await parseInstancedModel3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n case TILE3D_TYPE.POINT_CLOUD:\n return await parsePointCloud3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n default:\n throw new Error(`3DTileLoader: unknown type ${tile.type}`); // eslint-disable-line\n }\n}\n"],"mappings":"AAGA,SAAQA,WAAW,QAAO,cAAc;AACxC,SAAQC,cAAc,QAAO,uBAAuB;AAEpD,SAAQC,qBAAqB,QAAO,6BAA6B;AACjE,SAAQC,uBAAuB,QAAO,+BAA+B;AACrE,SAAQC,yBAAyB,QAAO,iCAAiC;AACzE,SAAQC,oBAAoB,QAAO,2BAA2B;AAC9D,SAAQC,eAAe,QAAO,sBAAsB;AAMpD,OAAO,eAAeC,WAAWA,CAC/BC,WAAwB,EAKP;EAAA,IAJjBC,UAAU,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAA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
-
export const VERSION = typeof "4.0.0-alpha.
|
|
1
|
+
export const VERSION = typeof "4.0.0-alpha.23" !== 'undefined' ? "4.0.0-alpha.23" : 'latest';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -41,6 +41,7 @@ async function parseTileset(data, options, context) {
|
|
|
41
41
|
const normalizedRoot = await normalizeTileHeaders(tilesetJson, basePath, options || {});
|
|
42
42
|
const tilesetJsonPostprocessed = {
|
|
43
43
|
...tilesetJson,
|
|
44
|
+
shape: 'tileset3d',
|
|
44
45
|
loader: Tiles3DLoader,
|
|
45
46
|
url: tilesetUrl,
|
|
46
47
|
queryString: (context === null || context === void 0 ? void 0 : context.queryString) || '',
|
|
@@ -55,6 +56,7 @@ async function parseTileset(data, options, context) {
|
|
|
55
56
|
async function parseTile(arrayBuffer, options, context) {
|
|
56
57
|
const tile = {
|
|
57
58
|
content: {
|
|
59
|
+
shape: 'tile3d',
|
|
58
60
|
featureIds: null
|
|
59
61
|
}
|
|
60
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiles-3d-loader.js","names":["path","TILESET_TYPE","LOD_METRIC_TYPE","VERSION","parse3DTile","normalizeTileHeaders","Tiles3DLoader","id","name","module","version","extensions","mimeTypes","tests","parse","options","loadGLTF","decodeQuantizedPositions","isTileset","assetGltfUpAxis","data","arguments","length","undefined","context","loaderOptions","url","indexOf","parseTileset","parseTile","_tilesetJson$root","tilesetJson","JSON","TextDecoder","decode","tilesetUrl","basePath","getBaseUri","normalizedRoot","tilesetJsonPostprocessed","loader","queryString","root","type","TILES3D","lodMetricType","GEOMETRIC_ERROR","lodMetricValue","geometricError","arrayBuffer","tile","content","featureIds","byteOffset","dirname"],"sources":["../../src/tiles-3d-loader.ts"],"sourcesContent":["import type {LoaderWithParser, LoaderOptions, LoaderContext} from '@loaders.gl/loader-utils';\n// / import type { GLTFLoaderOptions } from '@loaders.gl/gltf';\nimport type {DracoLoaderOptions} from '@loaders.gl/draco';\nimport type {ImageLoaderOptions} from '@loaders.gl/images';\n\nimport {path} from '@loaders.gl/loader-utils';\nimport {TILESET_TYPE, LOD_METRIC_TYPE} from '@loaders.gl/tiles';\nimport {VERSION} from './lib/utils/version';\nimport {parse3DTile} from './lib/parsers/parse-3d-tile';\nimport {normalizeTileHeaders} from './lib/parsers/parse-3d-tile-header';\nimport {Tiles3DTilesetJSON, Tiles3DTilesetJSONPostprocessed} from './types';\n\nexport type Tiles3DLoaderOptions = LoaderOptions &\n // GLTFLoaderOptions & - TODO not yet exported\n DracoLoaderOptions &\n ImageLoaderOptions & {\n '3d-tiles'?: {\n /** Whether to parse any embedded glTF binaries (or extract memory for independent glTF parsing) */\n loadGLTF?: boolean;\n /** If renderer doesn't support quantized positions, loader can decode them on CPU */\n decodeQuantizedPositions?: boolean;\n /** Whether this is a tileset or a tile */\n isTileset?: boolean | 'auto';\n /** Controls which axis is \"up\" in glTF files */\n assetGltfUpAxis?: 'x' | 'y' | 'z' | null;\n };\n };\n\n/**\n * Loader for 3D Tiles\n */\nexport const Tiles3DLoader: LoaderWithParser = {\n id: '3d-tiles',\n name: '3D Tiles',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n mimeTypes: ['application/octet-stream'],\n tests: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n parse,\n options: {\n '3d-tiles': {\n loadGLTF: true,\n decodeQuantizedPositions: false,\n isTileset: 'auto',\n assetGltfUpAxis: null\n }\n }\n};\n\n/** Parses a tileset or tile */\nasync function parse(data
|
|
1
|
+
{"version":3,"file":"tiles-3d-loader.js","names":["path","TILESET_TYPE","LOD_METRIC_TYPE","VERSION","parse3DTile","normalizeTileHeaders","Tiles3DLoader","id","name","module","version","extensions","mimeTypes","tests","parse","options","loadGLTF","decodeQuantizedPositions","isTileset","assetGltfUpAxis","data","arguments","length","undefined","context","loaderOptions","url","indexOf","parseTileset","parseTile","_tilesetJson$root","tilesetJson","JSON","TextDecoder","decode","tilesetUrl","basePath","getBaseUri","normalizedRoot","tilesetJsonPostprocessed","shape","loader","queryString","root","type","TILES3D","lodMetricType","GEOMETRIC_ERROR","lodMetricValue","geometricError","arrayBuffer","tile","content","featureIds","byteOffset","dirname"],"sources":["../../src/tiles-3d-loader.ts"],"sourcesContent":["import type {LoaderWithParser, LoaderOptions, LoaderContext} from '@loaders.gl/loader-utils';\n// / import type { GLTFLoaderOptions } from '@loaders.gl/gltf';\nimport type {DracoLoaderOptions} from '@loaders.gl/draco';\nimport type {ImageLoaderOptions} from '@loaders.gl/images';\n\nimport {path} from '@loaders.gl/loader-utils';\nimport {TILESET_TYPE, LOD_METRIC_TYPE} from '@loaders.gl/tiles';\nimport {VERSION} from './lib/utils/version';\nimport {parse3DTile} from './lib/parsers/parse-3d-tile';\nimport {normalizeTileHeaders} from './lib/parsers/parse-3d-tile-header';\nimport {Tiles3DTilesetJSON, Tiles3DTileContent, Tiles3DTilesetJSONPostprocessed} from './types';\n\nexport type Tiles3DLoaderOptions = LoaderOptions &\n // GLTFLoaderOptions & - TODO not yet exported\n DracoLoaderOptions &\n ImageLoaderOptions & {\n '3d-tiles'?: {\n /** Whether to parse any embedded glTF binaries (or extract memory for independent glTF parsing) */\n loadGLTF?: boolean;\n /** If renderer doesn't support quantized positions, loader can decode them on CPU */\n decodeQuantizedPositions?: boolean;\n /** Whether this is a tileset or a tile */\n isTileset?: boolean | 'auto';\n /** Controls which axis is \"up\" in glTF files */\n assetGltfUpAxis?: 'x' | 'y' | 'z' | null;\n };\n };\n\n/**\n * Loader for 3D Tiles\n */\nexport const Tiles3DLoader: LoaderWithParser<\n any, // Tiles3DTileContent | Tiles3DTilesetJSONPostprocessed,\n never,\n Tiles3DLoaderOptions\n> = {\n id: '3d-tiles',\n name: '3D Tiles',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n mimeTypes: ['application/octet-stream'],\n tests: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n parse,\n options: {\n '3d-tiles': {\n loadGLTF: true,\n decodeQuantizedPositions: false,\n isTileset: 'auto',\n assetGltfUpAxis: null\n }\n }\n};\n\n/** Parses a tileset or tile */\nasync function parse(\n data,\n options: Tiles3DLoaderOptions = {},\n context?: LoaderContext\n): Promise<Tiles3DTileContent | Tiles3DTilesetJSONPostprocessed> {\n // auto detect file type\n const loaderOptions = options['3d-tiles'] || {};\n let isTileset;\n if (loaderOptions.isTileset === 'auto') {\n isTileset = context?.url && context.url.indexOf('.json') !== -1;\n } else {\n isTileset = loaderOptions.isTileset;\n }\n\n return isTileset ? parseTileset(data, options, context) : parseTile(data, options, context);\n}\n\n/** Parse a tileset */\nasync function parseTileset(\n data: ArrayBuffer,\n options?: Tiles3DLoaderOptions,\n context?: LoaderContext\n): Promise<Tiles3DTilesetJSONPostprocessed> {\n const tilesetJson: Tiles3DTilesetJSON = JSON.parse(new TextDecoder().decode(data));\n\n const tilesetUrl = context?.url || '';\n const basePath = getBaseUri(tilesetUrl);\n const normalizedRoot = await normalizeTileHeaders(tilesetJson, basePath, options || {});\n const tilesetJsonPostprocessed: Tiles3DTilesetJSONPostprocessed = {\n ...tilesetJson,\n shape: 'tileset3d',\n loader: Tiles3DLoader,\n url: tilesetUrl,\n queryString: context?.queryString || '',\n basePath,\n root: normalizedRoot || tilesetJson.root,\n type: TILESET_TYPE.TILES3D,\n lodMetricType: LOD_METRIC_TYPE.GEOMETRIC_ERROR,\n lodMetricValue: tilesetJson.root?.geometricError || 0\n };\n return tilesetJsonPostprocessed;\n}\n\n/** Parse a tile */\nasync function parseTile(\n arrayBuffer: ArrayBuffer,\n options?: Tiles3DLoaderOptions,\n context?: LoaderContext\n): Promise<Tiles3DTileContent> {\n const tile = {\n content: {\n shape: 'tile3d',\n featureIds: null\n }\n };\n const byteOffset = 0;\n // @ts-expect-error\n await parse3DTile(arrayBuffer, byteOffset, options, context, tile.content);\n // @ts-expect-error\n return tile.content;\n}\n\n/** Get base name */\nfunction getBase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AC9BS,OAAuB,EACM;EAC7B,MAAM2B,IAAI,GAAG;IACXC,OAAO,EAAE;MACPZ,KAAK,EAAE,QAAQ;MACfa,UAAU,EAAE;IACd;EACF,CAAC;EACD,MAAMC,UAAU,GAAG,CAAC;EAEpB,MAAMlD,WAAW,CAAC8C,WAAW,EAAEI,UAAU,EAAEvC,OAAO,EAAES,OAAO,EAAE2B,IAAI,CAACC,OAAO,CAAC;EAE1E,OAAOD,IAAI,CAACC,OAAO;AACrB;AAGA,SAASf,UAAUA,CAACF,UAAkB,EAAU;EAC9C,OAAOnC,IAAI,CAACuD,OAAO,CAACpB,UAAU,CAAC;AACjC"}
|
package/dist/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["import type {GLTFPostprocessed} from '@loaders.gl/gltf';\nimport {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {Matrix4, Vector3} from '@math.gl/core';\nimport {TILESET_TYPE, LOD_METRIC_TYPE, TILE_TYPE, TILE_REFINEMENT} from '@loaders.gl/tiles';\n\nexport type FeatureTableJson = {\n [key: string]: any[];\n};\n\nexport type B3DMContent = {\n batchTableJson?: FeatureTableJson;\n byteLength: number;\n byteOffset: number;\n cartesianModelMatrix: Matrix4;\n cartesianOrigin: Vector3;\n cartographicModelMatrix: Matrix4;\n cartographicOrigin: Vector3;\n featureIds?: number[] | null;\n featureTableBinary?: Uint8Array;\n featureTableJson?: FeatureTableJson;\n gltf?: GLTFPostprocessed;\n gltfUpAxis: string;\n header: GLTFHeader;\n magic: number;\n modelMatrix: Matrix4;\n rotateYtoZ: boolean;\n rtcCenter: [number, number, number];\n type: string;\n version: number;\n};\n\nexport type GLTFHeader = {\n batchLength?: number;\n batchTableBinaryByteLength: number;\n batchTableJsonByteLength: number;\n featureTableBinaryByteLength: number;\n featureTableJsonByteLength: number;\n};\n\n/**\n * A 3D Tiles tileset JSON\n * https://github.com/CesiumGS/3d-tiles/tree/main/specification#property-reference\n */\nexport type Tiles3DTilesetJSON = {\n /** Metadata about the entire tileset.\n * https://github.com/CesiumGS/3d-tiles/tree/main/specification#asset\n */\n asset: {\n /** The 3D Tiles version. The version defines the JSON schema for the tileset JSON and the base set of tile formats. */\n version: string;\n /** Application-specific version of this tileset, e.g., for when an existing tileset is updated. */\n tilesetVersion?: string;\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n /** Not mentioned in 1.0 spec but some tilesets contain this option */\n gltfUpAxis?: string;\n };\n /** A dictionary object of metadata about per-feature properties. */\n properties?: Record<string, TilesetProperty>;\n /** The error, in meters, introduced if this tileset is not rendered. At runtime, the geometric error is used to compute screen space error (SSE), i.e., the error measured in pixels. */\n geometricError: number;\n /** A tile in a 3D Tiles tileset. */\n root: Tiles3DTileJSON;\n /** Names of 3D Tiles extensions used somewhere in this tileset. */\n extensionsUsed?: string[];\n /** Names of 3D Tiles extensions required to properly load this tileset. */\n extensionsRequired?: string[];\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n};\n\n/** TilesetJSON postprocessed by Tiles3DLoader */\nexport type Tiles3DTilesetJSONPostprocessed = Omit<Tiles3DTilesetJSON, 'root'> & {\n /**\n * Loader used\n * @deprecated\n */\n loader: LoaderWithParser;\n /** URL used to load a tileset resource */\n url: string;\n /** HTTP request query string */\n queryString: string;\n /** base path that non-absolute paths in tileset are relative to. */\n basePath: string;\n /** tileset type */\n type: TILESET_TYPE.TILES3D;\n /** LOD metric type */\n lodMetricType: LOD_METRIC_TYPE.GEOMETRIC_ERROR;\n /** LOD metric value */\n lodMetricValue: number;\n /** Postprocessed root */\n root: Tiles3DTileJSONPostprocessed;\n};\n\n/**\n * A tile in a 3D Tiles tileset.\n * https://github.com/CesiumGS/3d-tiles/tree/main/specification#tile\n */\nexport type Tiles3DTileJSON = {\n /** A bounding volume that encloses a tile or its content. */\n boundingVolume: Tile3DBoundingVolume;\n /** A bounding volume that encloses a tile or its content. */\n viewerRequestVolume?: object;\n /** The error, in meters, introduced if this tile is rendered and its children are not. At runtime, the geometric error is used to compute screen space error (SSE), i.e., the error measured in pixels. */\n geometricError: number;\n /**\n * Specifies if additive or replacement refinement is used when traversing the tileset for rendering. This property is required for the root tile of a tileset; it is optional for all other tiles.\n * The default is to inherit from the parent tile.\n */\n refine?: string;\n /** A floating-point 4x4 affine transformation matrix, stored in column-major order, that transforms the tile's content */\n transform?: number[];\n /** Metadata about the tile's content and a link to the content. */\n content?: Tiles3DTileContentJSON;\n /** An array of objects that define child tiles. */\n children: Tiles3DTileJSON[];\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n\n /** 3DTiles v1.1 properties\n * https://github.com/CesiumGS/3d-tiles/blob/draft-1.1/specification/schema/tile.schema.json\n */\n /** This object allows a tile to be implicitly subdivided. Tile and content availability and metadata is stored in subtrees which are referenced externally. */\n implicitTiling?: ImplicitTilingData;\n};\n\nexport type Tiles3DTileJSONPostprocessed = Omit<Tiles3DTileJSON, 'refine' | 'children'> & {\n /** Unique ID */\n id?: string;\n /** Content full URL */\n contentUrl?: string;\n /** LOD metric type */\n lodMetricType?: LOD_METRIC_TYPE.GEOMETRIC_ERROR;\n /** LOD metric value */\n lodMetricValue?: number;\n /** Duplicate of transform */\n transformMatrix?: number[];\n /** Type of tile */\n type?: TILE_TYPE | string;\n /**\n * Specifies if additive or replacement refinement is used when traversing the tileset for rendering. This property is required for the root tile of a tileset; it is optional for all other tiles.\n * The default is to inherit from the parent tile.\n */\n refine?: TILE_REFINEMENT | string;\n /** An array of objects that define child tiles. */\n children: Tiles3DTileJSONPostprocessed[];\n};\n\n/** Metadata about the tile's content and a link to the content. */\nexport type Tiles3DTileContentJSON = {\n /** A uri that points to the tile's content. When the uri is relative, it is relative to the referring tileset JSON file. */\n uri: string;\n /** url doesn't allign the spec but we support it same way as uri */\n url?: string;\n /** A bounding volume that encloses a tile or its content. At least one bounding volume property is required. Bounding volumes include box, region, or sphere. */\n boundingVolume?: Tile3DBoundingVolume;\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n};\n\n/** A bounding volume that encloses a tile or its content.\n * https://github.com/CesiumGS/3d-tiles/tree/main/specification#bounding-volume\n */\nexport type Tile3DBoundingVolume = {\n /** An array of 12 numbers that define an oriented bounding box. The first three elements define the x, y, and z values for the center of the box.\n * The next three elements (with indices 3, 4, and 5) define the x axis direction and half-length. The next three elements (indices 6, 7, and 8) define\n * the y axis direction and half-length. The last three elements (indices 9, 10, and 11) define the z axis direction and half-length. */\n box?: number[];\n /** An array of four numbers that define a bounding sphere. The first three elements define the x, y, and z values for the center of the sphere.\n * The last element (with index 3) defines the radius in meters. */\n sphere?: number[];\n /** An array of six numbers that define a bounding geographic region in EPSG:4979 coordinates with the order [west, south, east, north, minimum height, maximum height].\n * Longitudes and latitudes are in radians, and heights are in meters above (or below) the WGS84 ellipsoid. */\n region?: number[];\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n};\n\n/**\n * A dictionary object of metadata about per-feature properties.\n * https://github.com/CesiumGS/3d-tiles/tree/main/specification#properties\n */\nexport type TilesetProperty = {\n /** The maximum value of this property of all the features in the tileset. */\n maximum: number;\n /** The minimum value of this property of all the features in the tileset. */\n minimum: number;\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n};\n\nexport type Tiles3DTileContent = {\n /** Common properties */\n byteOffset?: number;\n type?: string;\n featureIds?: null;\n\n /** 3DTile header */\n magic?: number;\n version?: number;\n byteLength?: number;\n\n /** 3DTile tables header */\n header?: {\n featureTableJsonByteLength?: number;\n featureTableBinaryByteLength?: number;\n batchTableJsonByteLength?: number;\n batchTableBinaryByteLength?: number;\n batchLength?: number;\n };\n\n /** 3DTile tables */\n featureTableJson?:\n | {\n BATCH_LENGTH?: number;\n }\n | Record<string, any>;\n featureTableBinary?: Uint8Array;\n batchTableJson?: Record<string, (string | number)[]>;\n batchTableBinary?: Uint8Array;\n rtcCenter?: number[];\n\n /** 3DTile glTF */\n gltfArrayBuffer?: ArrayBuffer;\n gltfByteOffset?: number;\n gltfByteLength?: number;\n rotateYtoZ?: boolean;\n gltfUpAxis?: 'x' | 'X' | 'y' | 'Y' | 'z' | 'Z';\n gltfUrl?: string;\n gpuMemoryUsageInBytes?: number;\n gltf?: GLTFPostprocessed;\n\n /** For Composite tiles */\n tilesLength?: number;\n tiles?: Tiles3DTileContent[];\n\n /** For Instances model and Pointcloud tiles */\n featuresLength?: number;\n\n /** For Instanced model tiles */\n gltfFormat?: number;\n eastNorthUp?: boolean;\n normalUp?: number[];\n normalRight?: number[];\n hasCustomOrientation?: boolean;\n octNormalUp?: number[];\n octNormalRight?: number[];\n instances?: {\n modelMatrix: Matrix4;\n batchId: number;\n }[];\n\n /** For Pointcloud tiles */\n attributes?: {\n positions: null | number[];\n colors:\n | null\n | number[]\n | {type: number; value: Uint8ClampedArray; size: number; normalized: boolean};\n normals: null | number[] | {type: number; size: number; value: Float32Array};\n batchIds: null | number[];\n };\n constantRGBA?: number[];\n isQuantized?: boolean;\n isTranslucent?: boolean;\n isRGB565?: boolean;\n isOctEncoded16P?: boolean;\n pointsLength?: number;\n pointCount?: number;\n batchIds?: number[];\n hasPositions?: boolean;\n hasColors?: boolean;\n hasNormals?: boolean;\n hasBatchIds?: boolean;\n quantizedVolumeScale?: Vector3;\n quantizedVolumeOffset?: Vector3;\n quantizedRange?: number;\n isQuantizedDraco?: boolean;\n octEncodedRange?: number;\n isOctEncodedDraco?: boolean;\n};\n\n/**\n * 3DTILES_implicit_tiling types\n * Spec - https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_implicit_tiling\n * JSON Schema v1.1 https://github.com/CesiumGS/3d-tiles/blob/8e5e67e078850cc8ce15bd1873fe54f11bbee02f/specification/schema/Subtree/subtree.schema.json\n * JSON Schema vNext https://github.com/CesiumGS/3d-tiles/blob/8e5e67e078850cc8ce15bd1873fe54f11bbee02f/extensions/3DTILES_implicit_tiling/schema/subtree/subtree.schema.json\n */\nexport type Subtree = {\n /** An array of buffers. */\n buffers: Buffer[];\n /** An array of buffer views. */\n bufferViews: BufferView[];\n /** The availability of tiles in the subtree. The availability bitstream is a 1D boolean array where tiles are ordered by their level in the subtree and Morton index\n * within that level. A tile's availability is determined by a single bit, 1 meaning a tile exists at that spatial index, and 0 meaning it does not.\n * The number of elements in the array is `(N^subtreeLevels - 1)/(N - 1)` where N is 4 for subdivision scheme `QUADTREE` and 8 for `OCTREE`.\n * Availability may be stored in a buffer view or as a constant value that applies to all tiles. If a non-root tile's availability is 1 its parent\n * tile's availability shall also be 1. `tileAvailability.constant: 0` is disallowed, as subtrees shall have at least one tile.\n */\n tileAvailability: Availability;\n /** It is array by spec but there are tiles that has a single object\n * An array of content availability objects. If the tile has a single content this array will have one element; if the tile has multiple contents -\n * as supported by 3DTILES_multiple_contents and 3D Tiles 1.1 - this array will have multiple elements.\n */\n contentAvailability: Availability | Availability[];\n /** The availability of children subtrees. The availability bitstream is a 1D boolean array where subtrees are ordered by their Morton index in the level of the tree\n * immediately below the bottom row of the subtree. A child subtree's availability is determined by a single bit, 1 meaning a subtree exists at that spatial index,\n * and 0 meaning it does not. The number of elements in the array is `N^subtreeLevels` where N is 4 for subdivision scheme `QUADTREE` and 8 for `OCTREE`.\n * Availability may be stored in a buffer view or as a constant value that applies to all child subtrees. If availability is 0 for all child subtrees,\n * then the tileset does not subdivide further.\n */\n childSubtreeAvailability: Availability;\n // TODO: These are unused properties. Improve types when they are required\n propertyTables: unknown;\n tileMetadata: unknown;\n contentMetadata: unknown;\n subtreeMetadata: unknown;\n};\n\nexport type Availability = {\n /** Integer indicating whether all of the elements are available (1) or all are unavailable (0). */\n constant?: 0 | 1;\n /** Index of a buffer view that indicates whether each element is available. The bitstream conforms to the boolean array encoding described\n * in the 3D Metadata specification. If an element is available, its bit is 1, and if it is unavailable, its bit is 0. */\n bitstream?: number;\n /**\n * v1.1 https://github.com/CesiumGS/3d-tiles/blob/8e5e67e078850cc8ce15bd1873fe54f11bbee02f/specification/schema/Subtree/availability.schema.json\n * vNext https://github.com/CesiumGS/3d-tiles/blob/8e5e67e078850cc8ce15bd1873fe54f11bbee02f/extensions/3DTILES_implicit_tiling/schema/subtree/availability.schema.json\n * The schemas of vNext and 1.1 are same but there are tiles with `bufferView` property instead of `bitstream`\n */\n bufferView?: number;\n /**\n * Postprocessing property\n * contain availability bits loaded from the bufferView\n */\n explicitBitstream?: ExplicitBitstream;\n};\n\nexport type ExplicitBitstream = Uint8Array;\n\n/**\n * Spec - https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_implicit_tiling#subdivision-scheme\n */\nexport type SubdivisionScheme = 'QUADTREE' | 'OCTREE';\n\ntype Buffer = {\n name: string;\n uri?: string;\n byteLength: number;\n};\n\n/** Subtree buffer view */\nexport type BufferView = {\n buffer: number;\n byteOffset: number;\n byteLength: number;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_implicit_tiling\n */\nexport type ImplicitTilingExensionData = ImplicitTilingData & {\n /** This property is not part of the schema\n * https://github.com/CesiumGS/3d-tiles/blob/main/extensions/3DTILES_implicit_tiling/schema/tile.3DTILES_implicit_tiling.schema.json\n * But it can be seen in some test datasets. It is handled as substitute of `availableLevels`\n */\n maximumLevel?: number;\n};\n\n/** 3DTiles v1.1 types */\n\n/**\n * This object allows a tile to be implicitly subdivided. Tile and content availability and metadata is stored in subtrees which are referenced externally.\n * https://github.com/CesiumGS/3d-tiles/blob/draft-1.1/specification/schema/tile.implicitTiling.schema.json\n * */\ntype ImplicitTilingData = {\n /** A string describing the subdivision scheme used within the tileset. */\n subdivisionScheme: 'QUADTREE' | 'OCTREE' | string;\n /** The number of distinct levels in each subtree. For example, a quadtree with `subtreeLevels = 2` will have subtrees with 5 nodes (one root and 4 children). */\n subtreeLevels: number;\n /** The numbers of the levels in the tree with available tiles. */\n availableLevels: number;\n /** An object describing the location of subtree files. */\n subtrees: {\n /** A template URI pointing to subtree files. A subtree is a fixed-depth (defined by `subtreeLevels`) portion of the tree to keep memory use bounded.\n * The URI of each file is substituted with the subtree root's global level, x, and y. For subdivision scheme `OCTREE`, z shall also be given. Relative paths are relative to the tileset JSON. */\n uri: string;\n };\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["import type {GLTFPostprocessed} from '@loaders.gl/gltf';\nimport {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {Matrix4, Vector3} from '@math.gl/core';\nimport {TILESET_TYPE, LOD_METRIC_TYPE, TILE_TYPE, TILE_REFINEMENT} from '@loaders.gl/tiles';\n\nexport type FeatureTableJson = {\n [key: string]: any[];\n};\n\nexport type B3DMContent = {\n batchTableJson?: FeatureTableJson;\n byteLength: number;\n byteOffset: number;\n cartesianModelMatrix: Matrix4;\n cartesianOrigin: Vector3;\n cartographicModelMatrix: Matrix4;\n cartographicOrigin: Vector3;\n featureIds?: number[] | null;\n featureTableBinary?: Uint8Array;\n featureTableJson?: FeatureTableJson;\n gltf?: GLTFPostprocessed;\n gltfUpAxis: string;\n header: GLTFHeader;\n magic: number;\n modelMatrix: Matrix4;\n rotateYtoZ: boolean;\n rtcCenter: [number, number, number];\n type: string;\n version: number;\n};\n\nexport type GLTFHeader = {\n batchLength?: number;\n batchTableBinaryByteLength: number;\n batchTableJsonByteLength: number;\n featureTableBinaryByteLength: number;\n featureTableJsonByteLength: number;\n};\n\n/**\n * A 3D Tiles tileset JSON\n * https://github.com/CesiumGS/3d-tiles/tree/main/specification#property-reference\n */\nexport type Tiles3DTilesetJSON = {\n shape: 'tileset3d';\n /** Metadata about the entire tileset.\n * https://github.com/CesiumGS/3d-tiles/tree/main/specification#asset\n */\n asset: {\n /** The 3D Tiles version. The version defines the JSON schema for the tileset JSON and the base set of tile formats. */\n version: string;\n /** Application-specific version of this tileset, e.g., for when an existing tileset is updated. */\n tilesetVersion?: string;\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n /** Not mentioned in 1.0 spec but some tilesets contain this option */\n gltfUpAxis?: string;\n };\n /** A dictionary object of metadata about per-feature properties. */\n properties?: Record<string, TilesetProperty>;\n /** The error, in meters, introduced if this tileset is not rendered. At runtime, the geometric error is used to compute screen space error (SSE), i.e., the error measured in pixels. */\n geometricError: number;\n /** A tile in a 3D Tiles tileset. */\n root: Tiles3DTileJSON;\n /** Names of 3D Tiles extensions used somewhere in this tileset. */\n extensionsUsed?: string[];\n /** Names of 3D Tiles extensions required to properly load this tileset. */\n extensionsRequired?: string[];\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n};\n\n/** TilesetJSON postprocessed by Tiles3DLoader */\nexport type Tiles3DTilesetJSONPostprocessed = Omit<Tiles3DTilesetJSON, 'root'> & {\n /**\n * Loader used\n * @deprecated\n */\n loader: LoaderWithParser;\n /** URL used to load a tileset resource */\n url: string;\n /** HTTP request query string */\n queryString: string;\n /** base path that non-absolute paths in tileset are relative to. */\n basePath: string;\n /** tileset type */\n type: TILESET_TYPE.TILES3D;\n /** LOD metric type */\n lodMetricType: LOD_METRIC_TYPE.GEOMETRIC_ERROR;\n /** LOD metric value */\n lodMetricValue: number;\n /** Postprocessed root */\n root: Tiles3DTileJSONPostprocessed;\n};\n\n/**\n * A tile in a 3D Tiles tileset.\n * https://github.com/CesiumGS/3d-tiles/tree/main/specification#tile\n */\nexport type Tiles3DTileJSON = {\n /** A bounding volume that encloses a tile or its content. */\n boundingVolume: Tile3DBoundingVolume;\n /** A bounding volume that encloses a tile or its content. */\n viewerRequestVolume?: object;\n /** The error, in meters, introduced if this tile is rendered and its children are not. At runtime, the geometric error is used to compute screen space error (SSE), i.e., the error measured in pixels. */\n geometricError: number;\n /**\n * Specifies if additive or replacement refinement is used when traversing the tileset for rendering. This property is required for the root tile of a tileset; it is optional for all other tiles.\n * The default is to inherit from the parent tile.\n */\n refine?: string;\n /** A floating-point 4x4 affine transformation matrix, stored in column-major order, that transforms the tile's content */\n transform?: number[];\n /** Metadata about the tile's content and a link to the content. */\n content?: Tiles3DTileContentJSON;\n /** An array of objects that define child tiles. */\n children: Tiles3DTileJSON[];\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n\n /** 3DTiles v1.1 properties\n * https://github.com/CesiumGS/3d-tiles/blob/draft-1.1/specification/schema/tile.schema.json\n */\n /** This object allows a tile to be implicitly subdivided. Tile and content availability and metadata is stored in subtrees which are referenced externally. */\n implicitTiling?: ImplicitTilingData;\n};\n\nexport type Tiles3DTileJSONPostprocessed = Omit<Tiles3DTileJSON, 'refine' | 'children'> & {\n /** Unique ID */\n id?: string;\n /** Content full URL */\n contentUrl?: string;\n /** LOD metric type */\n lodMetricType?: LOD_METRIC_TYPE.GEOMETRIC_ERROR;\n /** LOD metric value */\n lodMetricValue?: number;\n /** Duplicate of transform */\n transformMatrix?: number[];\n /** Type of tile */\n type?: TILE_TYPE | string;\n /**\n * Specifies if additive or replacement refinement is used when traversing the tileset for rendering. This property is required for the root tile of a tileset; it is optional for all other tiles.\n * The default is to inherit from the parent tile.\n */\n refine?: TILE_REFINEMENT | string;\n /** An array of objects that define child tiles. */\n children: Tiles3DTileJSONPostprocessed[];\n};\n\n/** Metadata about the tile's content and a link to the content. */\nexport type Tiles3DTileContentJSON = {\n /** A uri that points to the tile's content. When the uri is relative, it is relative to the referring tileset JSON file. */\n uri: string;\n /** url doesn't allign the spec but we support it same way as uri */\n url?: string;\n /** A bounding volume that encloses a tile or its content. At least one bounding volume property is required. Bounding volumes include box, region, or sphere. */\n boundingVolume?: Tile3DBoundingVolume;\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n};\n\n/** A bounding volume that encloses a tile or its content.\n * https://github.com/CesiumGS/3d-tiles/tree/main/specification#bounding-volume\n */\nexport type Tile3DBoundingVolume = {\n /** An array of 12 numbers that define an oriented bounding box. The first three elements define the x, y, and z values for the center of the box.\n * The next three elements (with indices 3, 4, and 5) define the x axis direction and half-length. The next three elements (indices 6, 7, and 8) define\n * the y axis direction and half-length. The last three elements (indices 9, 10, and 11) define the z axis direction and half-length. */\n box?: number[];\n /** An array of four numbers that define a bounding sphere. The first three elements define the x, y, and z values for the center of the sphere.\n * The last element (with index 3) defines the radius in meters. */\n sphere?: number[];\n /** An array of six numbers that define a bounding geographic region in EPSG:4979 coordinates with the order [west, south, east, north, minimum height, maximum height].\n * Longitudes and latitudes are in radians, and heights are in meters above (or below) the WGS84 ellipsoid. */\n region?: number[];\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n};\n\n/**\n * A dictionary object of metadata about per-feature properties.\n * https://github.com/CesiumGS/3d-tiles/tree/main/specification#properties\n */\nexport type TilesetProperty = {\n /** The maximum value of this property of all the features in the tileset. */\n maximum: number;\n /** The minimum value of this property of all the features in the tileset. */\n minimum: number;\n /** Dictionary object with extension-specific objects. */\n extensions?: object;\n /** Application-specific data. */\n extras?: any;\n};\n\nexport type Tiles3DTileContent = {\n shape: 'tile3d';\n\n /** Common properties */\n byteOffset?: number;\n type?: string;\n featureIds?: null;\n\n /** 3DTile header */\n magic?: number;\n version?: number;\n byteLength?: number;\n\n /** 3DTile tables header */\n header?: {\n featureTableJsonByteLength?: number;\n featureTableBinaryByteLength?: number;\n batchTableJsonByteLength?: number;\n batchTableBinaryByteLength?: number;\n batchLength?: number;\n };\n\n /** 3DTile tables */\n featureTableJson?:\n | {\n BATCH_LENGTH?: number;\n }\n | Record<string, any>;\n featureTableBinary?: Uint8Array;\n batchTableJson?: Record<string, (string | number)[]>;\n batchTableBinary?: Uint8Array;\n rtcCenter?: number[];\n\n /** 3DTile glTF */\n gltfArrayBuffer?: ArrayBuffer;\n gltfByteOffset?: number;\n gltfByteLength?: number;\n rotateYtoZ?: boolean;\n gltfUpAxis?: 'x' | 'X' | 'y' | 'Y' | 'z' | 'Z';\n gltfUrl?: string;\n gpuMemoryUsageInBytes?: number;\n gltf?: GLTFPostprocessed;\n\n /** For Composite tiles */\n tilesLength?: number;\n tiles?: Tiles3DTileContent[];\n\n /** For Instances model and Pointcloud tiles */\n featuresLength?: number;\n\n /** For Instanced model tiles */\n gltfFormat?: number;\n eastNorthUp?: boolean;\n normalUp?: number[];\n normalRight?: number[];\n hasCustomOrientation?: boolean;\n octNormalUp?: number[];\n octNormalRight?: number[];\n instances?: {\n modelMatrix: Matrix4;\n batchId: number;\n }[];\n\n /** For Pointcloud tiles */\n attributes?: {\n positions: null | number[];\n colors:\n | null\n | number[]\n | {type: number; value: Uint8ClampedArray; size: number; normalized: boolean};\n normals: null | number[] | {type: number; size: number; value: Float32Array};\n batchIds: null | number[];\n };\n constantRGBA?: number[];\n isQuantized?: boolean;\n isTranslucent?: boolean;\n isRGB565?: boolean;\n isOctEncoded16P?: boolean;\n pointsLength?: number;\n pointCount?: number;\n batchIds?: number[];\n hasPositions?: boolean;\n hasColors?: boolean;\n hasNormals?: boolean;\n hasBatchIds?: boolean;\n quantizedVolumeScale?: Vector3;\n quantizedVolumeOffset?: Vector3;\n quantizedRange?: number;\n isQuantizedDraco?: boolean;\n octEncodedRange?: number;\n isOctEncodedDraco?: boolean;\n};\n\n/**\n * 3DTILES_implicit_tiling types\n * Spec - https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_implicit_tiling\n * JSON Schema v1.1 https://github.com/CesiumGS/3d-tiles/blob/8e5e67e078850cc8ce15bd1873fe54f11bbee02f/specification/schema/Subtree/subtree.schema.json\n * JSON Schema vNext https://github.com/CesiumGS/3d-tiles/blob/8e5e67e078850cc8ce15bd1873fe54f11bbee02f/extensions/3DTILES_implicit_tiling/schema/subtree/subtree.schema.json\n */\nexport type Subtree = {\n /** An array of buffers. */\n buffers: Buffer[];\n /** An array of buffer views. */\n bufferViews: BufferView[];\n /** The availability of tiles in the subtree. The availability bitstream is a 1D boolean array where tiles are ordered by their level in the subtree and Morton index\n * within that level. A tile's availability is determined by a single bit, 1 meaning a tile exists at that spatial index, and 0 meaning it does not.\n * The number of elements in the array is `(N^subtreeLevels - 1)/(N - 1)` where N is 4 for subdivision scheme `QUADTREE` and 8 for `OCTREE`.\n * Availability may be stored in a buffer view or as a constant value that applies to all tiles. If a non-root tile's availability is 1 its parent\n * tile's availability shall also be 1. `tileAvailability.constant: 0` is disallowed, as subtrees shall have at least one tile.\n */\n tileAvailability: Availability;\n /** It is array by spec but there are tiles that has a single object\n * An array of content availability objects. If the tile has a single content this array will have one element; if the tile has multiple contents -\n * as supported by 3DTILES_multiple_contents and 3D Tiles 1.1 - this array will have multiple elements.\n */\n contentAvailability: Availability | Availability[];\n /** The availability of children subtrees. The availability bitstream is a 1D boolean array where subtrees are ordered by their Morton index in the level of the tree\n * immediately below the bottom row of the subtree. A child subtree's availability is determined by a single bit, 1 meaning a subtree exists at that spatial index,\n * and 0 meaning it does not. The number of elements in the array is `N^subtreeLevels` where N is 4 for subdivision scheme `QUADTREE` and 8 for `OCTREE`.\n * Availability may be stored in a buffer view or as a constant value that applies to all child subtrees. If availability is 0 for all child subtrees,\n * then the tileset does not subdivide further.\n */\n childSubtreeAvailability: Availability;\n // TODO: These are unused properties. Improve types when they are required\n propertyTables: unknown;\n tileMetadata: unknown;\n contentMetadata: unknown;\n subtreeMetadata: unknown;\n};\n\nexport type Availability = {\n /** Integer indicating whether all of the elements are available (1) or all are unavailable (0). */\n constant?: 0 | 1;\n /** Index of a buffer view that indicates whether each element is available. The bitstream conforms to the boolean array encoding described\n * in the 3D Metadata specification. If an element is available, its bit is 1, and if it is unavailable, its bit is 0. */\n bitstream?: number;\n /**\n * v1.1 https://github.com/CesiumGS/3d-tiles/blob/8e5e67e078850cc8ce15bd1873fe54f11bbee02f/specification/schema/Subtree/availability.schema.json\n * vNext https://github.com/CesiumGS/3d-tiles/blob/8e5e67e078850cc8ce15bd1873fe54f11bbee02f/extensions/3DTILES_implicit_tiling/schema/subtree/availability.schema.json\n * The schemas of vNext and 1.1 are same but there are tiles with `bufferView` property instead of `bitstream`\n */\n bufferView?: number;\n /**\n * Postprocessing property\n * contain availability bits loaded from the bufferView\n */\n explicitBitstream?: ExplicitBitstream;\n};\n\nexport type ExplicitBitstream = Uint8Array;\n\n/**\n * Spec - https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_implicit_tiling#subdivision-scheme\n */\nexport type SubdivisionScheme = 'QUADTREE' | 'OCTREE';\n\ntype Buffer = {\n name: string;\n uri?: string;\n byteLength: number;\n};\n\n/** Subtree buffer view */\nexport type BufferView = {\n buffer: number;\n byteOffset: number;\n byteLength: number;\n};\n\n/**\n * Spec - https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_implicit_tiling\n */\nexport type ImplicitTilingExensionData = ImplicitTilingData & {\n /** This property is not part of the schema\n * https://github.com/CesiumGS/3d-tiles/blob/main/extensions/3DTILES_implicit_tiling/schema/tile.3DTILES_implicit_tiling.schema.json\n * But it can be seen in some test datasets. It is handled as substitute of `availableLevels`\n */\n maximumLevel?: number;\n};\n\n/** 3DTiles v1.1 types */\n\n/**\n * This object allows a tile to be implicitly subdivided. Tile and content availability and metadata is stored in subtrees which are referenced externally.\n * https://github.com/CesiumGS/3d-tiles/blob/draft-1.1/specification/schema/tile.implicitTiling.schema.json\n * */\ntype ImplicitTilingData = {\n /** A string describing the subdivision scheme used within the tileset. */\n subdivisionScheme: 'QUADTREE' | 'OCTREE' | string;\n /** The number of distinct levels in each subtree. For example, a quadtree with `subtreeLevels = 2` will have subtrees with 5 nodes (one root and 4 children). */\n subtreeLevels: number;\n /** The numbers of the levels in the tree with available tiles. */\n availableLevels: number;\n /** An object describing the location of subtree files. */\n subtrees: {\n /** A template URI pointing to subtree files. A subtree is a fixed-depth (defined by `subtreeLevels`) portion of the tree to keep memory use bounded.\n * The URI of each file is substituted with the subtree root's global level, x, and y. For subdivision scheme `OCTREE`, z shall also be given. Relative paths are relative to the tileset JSON. */\n uri: string;\n };\n};\n"],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FileProvider
|
|
1
|
+
import { FileProvider } from '@loaders.gl/loader-utils';
|
|
2
|
+
import { ZipFileSystem, HashElement } from '@loaders.gl/zip';
|
|
2
3
|
/**
|
|
3
4
|
* FileSystem adapter for a 3tz (3D tiles archive format) file
|
|
4
5
|
* Holds FileProvider object that provides random access to archived files.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiles-3d-archive-file-system.d.ts","sourceRoot":"","sources":["../../../src/lib/filesystems/tiles-3d-archive-file-system.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"tiles-3d-archive-file-system.d.ts","sourceRoot":"","sources":["../../../src/lib/filesystems/tiles-3d-archive-file-system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACL,aAAa,EAIb,WAAW,EAGZ,MAAM,iBAAiB,CAAC;AAGzB;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,aAAa;IACzD,QAAQ,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAEhC;;;OAGG;gBACS,IAAI,EAAE,YAAY,GAAG,MAAM;IAIvC;;;;;;OAMG;IACG,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAiBhD;;;;OAIG;YACW,aAAa;CAqC5B"}
|
|
@@ -14,7 +14,7 @@ async function parseComposite3DTile(tile, arrayBuffer, byteOffset, options, cont
|
|
|
14
14
|
// extract each tile from the byte stream
|
|
15
15
|
tile.tiles = [];
|
|
16
16
|
while (tile.tiles.length < tile.tilesLength && (tile.byteLength || 0) - byteOffset > 12) {
|
|
17
|
-
const subtile = {};
|
|
17
|
+
const subtile = { shape: 'tile3d' };
|
|
18
18
|
tile.tiles.push(subtile);
|
|
19
19
|
byteOffset = await parse3DTile(arrayBuffer, byteOffset, options, context, subtile);
|
|
20
20
|
// TODO - do we need to add any padding in between tiles?
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LoaderContext } from '@loaders.gl/loader-utils';
|
|
2
2
|
import type { Tiles3DLoaderOptions } from '../../tiles-3d-loader';
|
|
3
3
|
import { Tiles3DTileContent } from '../../types';
|
|
4
|
-
export declare function parseGltf3DTile(tile: Tiles3DTileContent, arrayBuffer: ArrayBuffer, options?: Tiles3DLoaderOptions, context?: LoaderContext): Promise<
|
|
4
|
+
export declare function parseGltf3DTile(tile: Tiles3DTileContent, arrayBuffer: ArrayBuffer, options?: Tiles3DLoaderOptions, context?: LoaderContext): Promise<number>;
|
|
5
5
|
//# sourceMappingURL=parse-3d-tile-gltf.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-3d-tile-gltf.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-3d-tile-gltf.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAE/C,wBAAsB,eAAe,CACnC,IAAI,EAAE,kBAAkB,EACxB,WAAW,EAAE,WAAW,EACxB,OAAO,CAAC,EAAE,oBAAoB,EAC9B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"parse-3d-tile-gltf.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-3d-tile-gltf.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAE/C,wBAAsB,eAAe,CACnC,IAAI,EAAE,kBAAkB,EACxB,WAAW,EAAE,WAAW,EACxB,OAAO,CAAC,EAAE,oBAAoB,EAC9B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,MAAM,CAAC,CAqBjB"}
|
|
@@ -15,7 +15,7 @@ async function parseGltf3DTile(tile, arrayBuffer, options, context) {
|
|
|
15
15
|
: 'Y';
|
|
16
16
|
if (options?.['3d-tiles']?.loadGLTF) {
|
|
17
17
|
if (!context) {
|
|
18
|
-
return;
|
|
18
|
+
return arrayBuffer.byteLength;
|
|
19
19
|
}
|
|
20
20
|
const gltfWithBuffers = await (0, loader_utils_1.parseFromContext)(arrayBuffer, gltf_1.GLTFLoader, options, context);
|
|
21
21
|
tile.gltf = (0, gltf_1.postProcessGLTF)(gltfWithBuffers);
|
|
@@ -24,5 +24,6 @@ async function parseGltf3DTile(tile, arrayBuffer, options, context) {
|
|
|
24
24
|
else {
|
|
25
25
|
tile.gltfArrayBuffer = arrayBuffer;
|
|
26
26
|
}
|
|
27
|
+
return arrayBuffer.byteLength;
|
|
27
28
|
}
|
|
28
29
|
exports.parseGltf3DTile = parseGltf3DTile;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LoaderContext } from '@loaders.gl/loader-utils';
|
|
2
2
|
import { Tiles3DLoaderOptions } from '../../tiles-3d-loader';
|
|
3
3
|
import { Tiles3DTileContent } from '../../types';
|
|
4
|
-
export declare function parse3DTile(arrayBuffer: ArrayBuffer, byteOffset: number | undefined, options: Tiles3DLoaderOptions | undefined, context: LoaderContext | undefined, tile?: Tiles3DTileContent): Promise<number
|
|
4
|
+
export declare function parse3DTile(arrayBuffer: ArrayBuffer, byteOffset: number | undefined, options: Tiles3DLoaderOptions | undefined, context: LoaderContext | undefined, tile?: Tiles3DTileContent): Promise<number>;
|
|
5
5
|
//# sourceMappingURL=parse-3d-tile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-3d-tile.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-3d-tile.ts"],"names":[],"mappings":"AAWA,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAG/C,wBAAsB,WAAW,CAC/B,WAAW,EAAE,WAAW,EACxB,UAAU,oBAAI,EACd,OAAO,EAAE,oBAAoB,GAAG,SAAS,EACzC,OAAO,EAAE,aAAa,GAAG,SAAS,EAClC,IAAI,GAAE,
|
|
1
|
+
{"version":3,"file":"parse-3d-tile.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-3d-tile.ts"],"names":[],"mappings":"AAWA,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAG/C,wBAAsB,WAAW,CAC/B,WAAW,EAAE,WAAW,EACxB,UAAU,oBAAI,EACd,OAAO,EAAE,oBAAoB,GAAG,SAAS,EACzC,OAAO,EAAE,aAAa,GAAG,SAAS,EAClC,IAAI,GAAE,kBAAsC,GAC3C,OAAO,CAAC,MAAM,CAAC,CA+BjB"}
|
|
@@ -11,7 +11,7 @@ const parse_3d_tile_instanced_model_1 = require("./parse-3d-tile-instanced-model
|
|
|
11
11
|
const parse_3d_tile_composite_1 = require("./parse-3d-tile-composite");
|
|
12
12
|
const parse_3d_tile_gltf_1 = require("./parse-3d-tile-gltf");
|
|
13
13
|
// Extracts
|
|
14
|
-
async function parse3DTile(arrayBuffer, byteOffset = 0, options, context, tile = {}) {
|
|
14
|
+
async function parse3DTile(arrayBuffer, byteOffset = 0, options, context, tile = { shape: 'tile3d' }) {
|
|
15
15
|
tile.byteOffset = byteOffset;
|
|
16
16
|
tile.type = (0, parse_utils_1.getMagicString)(arrayBuffer, byteOffset);
|
|
17
17
|
switch (tile.type) {
|
|
@@ -16,5 +16,6 @@ export type Tiles3DLoaderOptions = LoaderOptions & DracoLoaderOptions & ImageLoa
|
|
|
16
16
|
/**
|
|
17
17
|
* Loader for 3D Tiles
|
|
18
18
|
*/
|
|
19
|
-
export declare const Tiles3DLoader: LoaderWithParser
|
|
19
|
+
export declare const Tiles3DLoader: LoaderWithParser<any, // Tiles3DTileContent | Tiles3DTilesetJSONPostprocessed,
|
|
20
|
+
never, Tiles3DLoaderOptions>;
|
|
20
21
|
//# sourceMappingURL=tiles-3d-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiles-3d-loader.d.ts","sourceRoot":"","sources":["../src/tiles-3d-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAgB,MAAM,0BAA0B,CAAC;AAE7F,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAS3D,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAE9C,kBAAkB,GAClB,kBAAkB,GAAG;IACnB,UAAU,CAAC,EAAE;QACX,mGAAmG;QACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,qFAAqF;QACrF,wBAAwB,CAAC,EAAE,OAAO,CAAC;QACnC,0CAA0C;QAC1C,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC7B,gDAAgD;QAChD,eAAe,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;KAC1C,CAAC;CACH,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"tiles-3d-loader.d.ts","sourceRoot":"","sources":["../src/tiles-3d-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAgB,MAAM,0BAA0B,CAAC;AAE7F,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAS3D,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAE9C,kBAAkB,GAClB,kBAAkB,GAAG;IACnB,UAAU,CAAC,EAAE;QACX,mGAAmG;QACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,qFAAqF;QACrF,wBAAwB,CAAC,EAAE,OAAO,CAAC;QACnC,0CAA0C;QAC1C,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC7B,gDAAgD;QAChD,eAAe,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;KAC1C,CAAC;CACH,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAC1C,GAAG,EAAE,wDAAwD;AAC7D,KAAK,EACL,oBAAoB,CAkBrB,CAAC"}
|
package/dist/tiles-3d-loader.js
CHANGED
|
@@ -48,6 +48,7 @@ async function parseTileset(data, options, context) {
|
|
|
48
48
|
const normalizedRoot = await (0, parse_3d_tile_header_1.normalizeTileHeaders)(tilesetJson, basePath, options || {});
|
|
49
49
|
const tilesetJsonPostprocessed = {
|
|
50
50
|
...tilesetJson,
|
|
51
|
+
shape: 'tileset3d',
|
|
51
52
|
loader: exports.Tiles3DLoader,
|
|
52
53
|
url: tilesetUrl,
|
|
53
54
|
queryString: context?.queryString || '',
|
|
@@ -63,11 +64,14 @@ async function parseTileset(data, options, context) {
|
|
|
63
64
|
async function parseTile(arrayBuffer, options, context) {
|
|
64
65
|
const tile = {
|
|
65
66
|
content: {
|
|
67
|
+
shape: 'tile3d',
|
|
66
68
|
featureIds: null
|
|
67
69
|
}
|
|
68
70
|
};
|
|
69
71
|
const byteOffset = 0;
|
|
72
|
+
// @ts-expect-error
|
|
70
73
|
await (0, parse_3d_tile_1.parse3DTile)(arrayBuffer, byteOffset, options, context, tile.content);
|
|
74
|
+
// @ts-expect-error
|
|
71
75
|
return tile.content;
|
|
72
76
|
}
|
|
73
77
|
/** Get base name */
|
package/dist/types.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export type GLTFHeader = {
|
|
|
38
38
|
* https://github.com/CesiumGS/3d-tiles/tree/main/specification#property-reference
|
|
39
39
|
*/
|
|
40
40
|
export type Tiles3DTilesetJSON = {
|
|
41
|
+
shape: 'tileset3d';
|
|
41
42
|
/** Metadata about the entire tileset.
|
|
42
43
|
* https://github.com/CesiumGS/3d-tiles/tree/main/specification#asset
|
|
43
44
|
*/
|
|
@@ -190,6 +191,7 @@ export type TilesetProperty = {
|
|
|
190
191
|
extras?: any;
|
|
191
192
|
};
|
|
192
193
|
export type Tiles3DTileContent = {
|
|
194
|
+
shape: 'tile3d';
|
|
193
195
|
/** Common properties */
|
|
194
196
|
byteOffset?: number;
|
|
195
197
|
type?: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAC,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAE5F,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,UAAU,EAAE,MAAM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MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,kBAAkB,GAAG;IAC5D;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,yBAAyB;AAEzB;;;KAGK;AACL,KAAK,kBAAkB,GAAG;IACxB,0EAA0E;IAC1E,iBAAiB,EAAE,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IAClD,iKAAiK;IACjK,aAAa,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAC;IACxB,0DAA0D;IAC1D,QAAQ,EAAE;QACR;0MACkM;QAClM,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/3d-tiles",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.23",
|
|
4
4
|
"description": "3D Tiles, an open standard for streaming massive heterogeneous 3D geospatial datasets.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@loaders.gl/draco": "4.0.0-alpha.
|
|
38
|
-
"@loaders.gl/gltf": "4.0.0-alpha.
|
|
39
|
-
"@loaders.gl/loader-utils": "4.0.0-alpha.
|
|
40
|
-
"@loaders.gl/math": "4.0.0-alpha.
|
|
41
|
-
"@loaders.gl/tiles": "4.0.0-alpha.
|
|
42
|
-
"@loaders.gl/zip": "4.0.0-alpha.
|
|
37
|
+
"@loaders.gl/draco": "4.0.0-alpha.23",
|
|
38
|
+
"@loaders.gl/gltf": "4.0.0-alpha.23",
|
|
39
|
+
"@loaders.gl/loader-utils": "4.0.0-alpha.23",
|
|
40
|
+
"@loaders.gl/math": "4.0.0-alpha.23",
|
|
41
|
+
"@loaders.gl/tiles": "4.0.0-alpha.23",
|
|
42
|
+
"@loaders.gl/zip": "4.0.0-alpha.23",
|
|
43
43
|
"@math.gl/core": "^3.5.1",
|
|
44
44
|
"@math.gl/geospatial": "^3.5.1",
|
|
45
45
|
"@probe.gl/log": "^4.0.4",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@loaders.gl/core": "^4.0.0-alpha.8"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "e212f2a0c0e342f7cb65ce84fa2ff39f64b7d94b"
|
|
52
52
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import md5 from 'md5';
|
|
2
|
-
import {FileProvider
|
|
2
|
+
import {FileProvider} from '@loaders.gl/loader-utils';
|
|
3
|
+
import {parseZipLocalFileHeader, HashElement, findBin} from '@loaders.gl/zip';
|
|
3
4
|
import {DeflateCompression, NoCompression} from '@loaders.gl/compression';
|
|
4
5
|
|
|
5
6
|
type CompressionHandler = (compressedFile: ArrayBuffer) => Promise<ArrayBuffer>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';
|
|
2
|
-
import {DataViewFile} from '@loaders.gl/
|
|
1
|
+
import type {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';
|
|
2
|
+
import {DataViewFile} from '@loaders.gl/loader-utils';
|
|
3
3
|
import {parse3DTilesArchive as parse3DTilesArchiveFromProvider} from './3d-tiles-archive/3d-tiles-archive-parser';
|
|
4
4
|
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
package/src/cesium-ion-loader.ts
CHANGED
|
@@ -38,7 +38,7 @@ export async function parseComposite3DTile(
|
|
|
38
38
|
// extract each tile from the byte stream
|
|
39
39
|
tile.tiles = [];
|
|
40
40
|
while (tile.tiles.length < tile.tilesLength && (tile.byteLength || 0) - byteOffset > 12) {
|
|
41
|
-
const subtile = {};
|
|
41
|
+
const subtile: Tiles3DTileContent = {shape: 'tile3d'};
|
|
42
42
|
tile.tiles.push(subtile);
|
|
43
43
|
byteOffset = await parse3DTile(arrayBuffer, byteOffset, options, context, subtile);
|
|
44
44
|
// TODO - do we need to add any padding in between tiles?
|
|
@@ -10,7 +10,7 @@ export async function parseGltf3DTile(
|
|
|
10
10
|
arrayBuffer: ArrayBuffer,
|
|
11
11
|
options?: Tiles3DLoaderOptions,
|
|
12
12
|
context?: LoaderContext
|
|
13
|
-
): Promise<
|
|
13
|
+
): Promise<number> {
|
|
14
14
|
// Set flags
|
|
15
15
|
// glTF models need to be rotated from Y to Z up
|
|
16
16
|
// https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification#y-up-to-z-up
|
|
@@ -22,7 +22,7 @@ export async function parseGltf3DTile(
|
|
|
22
22
|
|
|
23
23
|
if (options?.['3d-tiles']?.loadGLTF) {
|
|
24
24
|
if (!context) {
|
|
25
|
-
return;
|
|
25
|
+
return arrayBuffer.byteLength;
|
|
26
26
|
}
|
|
27
27
|
const gltfWithBuffers = await parseFromContext(arrayBuffer, GLTFLoader, options, context);
|
|
28
28
|
tile.gltf = postProcessGLTF(gltfWithBuffers);
|
|
@@ -30,4 +30,5 @@ export async function parseGltf3DTile(
|
|
|
30
30
|
} else {
|
|
31
31
|
tile.gltfArrayBuffer = arrayBuffer;
|
|
32
32
|
}
|
|
33
|
+
return arrayBuffer.byteLength;
|
|
33
34
|
}
|
|
@@ -19,8 +19,8 @@ export async function parse3DTile(
|
|
|
19
19
|
byteOffset = 0,
|
|
20
20
|
options: Tiles3DLoaderOptions | undefined,
|
|
21
21
|
context: LoaderContext | undefined,
|
|
22
|
-
tile: Tiles3DTileContent = {}
|
|
23
|
-
) {
|
|
22
|
+
tile: Tiles3DTileContent = {shape: 'tile3d'}
|
|
23
|
+
): Promise<number> {
|
|
24
24
|
tile.byteOffset = byteOffset;
|
|
25
25
|
tile.type = getMagicString(arrayBuffer, byteOffset);
|
|
26
26
|
|