@loaders.gl/3d-tiles 4.0.0-alpha.23 → 4.0.0-alpha.25

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.
Files changed (75) hide show
  1. package/dist/cesium-ion-loader.d.ts +2 -2
  2. package/dist/cesium-ion-loader.d.ts.map +1 -1
  3. package/dist/dist.min.js +421 -270
  4. package/dist/es5/3d-tiles-archive-loader.js +1 -1
  5. package/dist/es5/cesium-ion-loader.js.map +1 -1
  6. package/dist/es5/lib/utils/version.js +1 -1
  7. package/dist/es5/tile-3d-subtree-loader.js.map +1 -1
  8. package/dist/es5/tile-3d-writer.js.map +1 -1
  9. package/dist/es5/types.js.map +1 -1
  10. package/dist/esm/3d-tiles-archive-loader.js +1 -1
  11. package/dist/esm/cesium-ion-loader.js.map +1 -1
  12. package/dist/esm/lib/utils/version.js +1 -1
  13. package/dist/esm/tile-3d-subtree-loader.js.map +1 -1
  14. package/dist/esm/tile-3d-writer.js.map +1 -1
  15. package/dist/esm/types.js.map +1 -1
  16. package/dist/tile-3d-subtree-loader.d.ts +3 -3
  17. package/dist/tile-3d-subtree-loader.d.ts.map +1 -1
  18. package/dist/tile-3d-writer.d.ts +2 -2
  19. package/dist/tile-3d-writer.d.ts.map +1 -1
  20. package/dist/types.d.ts +2 -5
  21. package/dist/types.d.ts.map +1 -1
  22. package/package.json +8 -8
  23. package/src/cesium-ion-loader.ts +2 -2
  24. package/src/tile-3d-subtree-loader.ts +3 -3
  25. package/src/tile-3d-writer.ts +2 -2
  26. package/src/types.ts +3 -5
  27. package/dist/3d-tiles-archive/3d-tiles-archive-archive.js +0 -72
  28. package/dist/3d-tiles-archive/3d-tiles-archive-parser.js +0 -33
  29. package/dist/3d-tiles-archive-loader.js +0 -31
  30. package/dist/bundle.js +0 -5
  31. package/dist/cesium-ion-loader.js +0 -40
  32. package/dist/index.js +0 -30
  33. package/dist/lib/classes/helpers/tile-3d-accessor-utils.js +0 -113
  34. package/dist/lib/classes/tile-3d-batch-table-hierarchy.js +0 -197
  35. package/dist/lib/classes/tile-3d-batch-table.js +0 -245
  36. package/dist/lib/classes/tile-3d-feature-table.js +0 -72
  37. package/dist/lib/constants.js +0 -26
  38. package/dist/lib/encoders/encode-3d-tile-batched-model.js +0 -46
  39. package/dist/lib/encoders/encode-3d-tile-composite.js +0 -24
  40. package/dist/lib/encoders/encode-3d-tile-instanced-model.js +0 -38
  41. package/dist/lib/encoders/encode-3d-tile-point-cloud.js +0 -39
  42. package/dist/lib/encoders/encode-3d-tile.js +0 -33
  43. package/dist/lib/encoders/helpers/encode-3d-tile-header.js +0 -30
  44. package/dist/lib/filesystems/tiles-3d-archive-file-system.js +0 -75
  45. package/dist/lib/ion/ion.js +0 -68
  46. package/dist/lib/parsers/helpers/normalize-3d-tile-colors.js +0 -65
  47. package/dist/lib/parsers/helpers/normalize-3d-tile-normals.js +0 -30
  48. package/dist/lib/parsers/helpers/normalize-3d-tile-positions.js +0 -42
  49. package/dist/lib/parsers/helpers/parse-3d-implicit-tiles.js +0 -303
  50. package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.js +0 -96
  51. package/dist/lib/parsers/helpers/parse-3d-tile-header.js +0 -28
  52. package/dist/lib/parsers/helpers/parse-3d-tile-subtree.js +0 -87
  53. package/dist/lib/parsers/helpers/parse-3d-tile-tables.js +0 -93
  54. package/dist/lib/parsers/helpers/parse-utils.js +0 -32
  55. package/dist/lib/parsers/parse-3d-tile-batched-model.js +0 -33
  56. package/dist/lib/parsers/parse-3d-tile-composite.js +0 -24
  57. package/dist/lib/parsers/parse-3d-tile-gltf.js +0 -29
  58. package/dist/lib/parsers/parse-3d-tile-header.js +0 -194
  59. package/dist/lib/parsers/parse-3d-tile-instanced-model.js +0 -172
  60. package/dist/lib/parsers/parse-3d-tile-point-cloud.js +0 -441
  61. package/dist/lib/parsers/parse-3d-tile.js +0 -33
  62. package/dist/lib/utils/obb/s2-corners-to-obb.js +0 -37
  63. package/dist/lib/utils/s2/converters/s2-to-boundary.js +0 -61
  64. package/dist/lib/utils/s2/converters/s2-to-obb-points.js +0 -36
  65. package/dist/lib/utils/s2/converters/s2-to-region.js +0 -59
  66. package/dist/lib/utils/s2/index.js +0 -23
  67. package/dist/lib/utils/s2/s2-geometry-functions.js +0 -29
  68. package/dist/lib/utils/s2/s2-token-functions.js +0 -68
  69. package/dist/lib/utils/s2/s2geometry/s2-cell-utils.js +0 -32
  70. package/dist/lib/utils/s2/s2geometry/s2-geometry.js +0 -260
  71. package/dist/lib/utils/version.js +0 -7
  72. package/dist/tile-3d-subtree-loader.js +0 -23
  73. package/dist/tile-3d-writer.js +0 -27
  74. package/dist/tiles-3d-loader.js +0 -80
  75. package/dist/types.js +0 -2
@@ -9,7 +9,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
10
  var _loaderUtils = require("@loaders.gl/loader-utils");
11
11
  var _dTilesArchiveParser = require("./3d-tiles-archive/3d-tiles-archive-parser");
12
- var VERSION = typeof "4.0.0-alpha.23" !== 'undefined' ? "4.0.0-alpha.23" : 'latest';
12
+ var VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
13
13
  var Tiles3DArchiveFileLoader = {
14
14
  name: '3tz',
15
15
  id: '3tz',
@@ -1 +1 @@
1
- {"version":3,"file":"cesium-ion-loader.js","names":["_tiles3dLoader","require","_ion","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","preload","_x","_preload","_asyncToGenerator2","_regenerator","mark","_callee2","url","options","_options","accessToken","assetId","matched","_args2","wrap","_callee2$","_context2","prev","next","undefined","Number","isFinite","match","abrupt","getIonTilesetMetadata","stop","CesiumIonLoader","Tiles3DLoader","id","name","parse","_parse","_callee","data","context","_callee$","_context","loader","_x2","_x3","_x4","exports"],"sources":["../../src/cesium-ion-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {Tiles3DLoader} from './tiles-3d-loader';\nimport {getIonTilesetMetadata} from './lib/ion/ion';\n\nasync function preload(url, options = {}) {\n options = options['cesium-ion'] || {};\n // @ts-ignore\n const {accessToken} = options;\n // @ts-ignore\n let assetId = options.assetId;\n if (!Number.isFinite(assetId)) {\n const matched = url.match(/\\/([0-9]+)\\/tileset.json/);\n assetId = matched && matched[1];\n }\n return getIonTilesetMetadata(accessToken, assetId);\n}\n\n/**\n * Loader for 3D tiles from Cesium ION\n */\nexport const CesiumIonLoader: LoaderWithParser = {\n ...Tiles3DLoader,\n id: 'cesium-ion',\n name: 'Cesium Ion',\n // @ts-ignore\n preload,\n parse: async (data, options?, context?) => {\n options = {...options};\n options['3d-tiles'] = options['cesium-ion'];\n // @ts-ignore\n options.loader = CesiumIonLoader;\n return Tiles3DLoader.parse(data, options, context); // , loader);\n },\n options: {\n 'cesium-ion': {\n ...Tiles3DLoader.options['3d-tiles'],\n accessToken: null\n }\n }\n};\n"],"mappings":";;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAAoD,SAAAE,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,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E,QAAA,CAAAX,IAAA;QAAA;MAAA,GAAAO,OAAA;IAAA,CACnD;IAAA,SAAAF,MAAAQ,GAAA,EAAAC,GAAA,EAAAC,GAAA;MAAA,OAAAT,MAAA,CAAA7C,KAAA,OAAAI,SAAA;IAAA;IAAA,OAAAwC,KAAA;EAAA;EACDtB,OAAO,EAAE;IACP,YAAY,EAAArB,aAAA,CAAAA,aAAA,KACPwC,4BAAa,CAACnB,OAAO,CAAC,UAAU,CAAC;MACpCE,WAAW,EAAE;IAAI;EAErB;AAAC,EACF;AAAC+B,OAAA,CAAAf,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"cesium-ion-loader.js","names":["_tiles3dLoader","require","_ion","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","preload","_x","_preload","_asyncToGenerator2","_regenerator","mark","_callee2","url","options","_options","accessToken","assetId","matched","_args2","wrap","_callee2$","_context2","prev","next","undefined","Number","isFinite","match","abrupt","getIonTilesetMetadata","stop","CesiumIonLoader","Tiles3DLoader","id","name","parse","_parse","_callee","data","context","_callee$","_context","loader","_x2","_x3","_x4","exports"],"sources":["../../src/cesium-ion-loader.ts"],"sourcesContent":["import type {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {Tiles3DLoader} from './tiles-3d-loader';\nimport {getIonTilesetMetadata} from './lib/ion/ion';\n\nasync function preload(url, options = {}) {\n options = options['cesium-ion'] || {};\n // @ts-ignore\n const {accessToken} = options;\n // @ts-ignore\n let assetId = options.assetId;\n if (!Number.isFinite(assetId)) {\n const matched = url.match(/\\/([0-9]+)\\/tileset.json/);\n assetId = matched && matched[1];\n }\n return getIonTilesetMetadata(accessToken, assetId);\n}\n\n/**\n * Loader for 3D tiles from Cesium ION\n */\nexport const CesiumIonLoader: LoaderWithParser<unknown, never, LoaderOptions> = {\n ...Tiles3DLoader,\n id: 'cesium-ion',\n name: 'Cesium Ion',\n // @ts-ignore\n preload,\n parse: async (data, options?, context?) => {\n options = {...options};\n options['3d-tiles'] = options['cesium-ion'];\n // @ts-ignore\n options.loader = CesiumIonLoader;\n return Tiles3DLoader.parse(data, options, context); // , loader);\n },\n options: {\n 'cesium-ion': {\n ...Tiles3DLoader.options['3d-tiles'],\n accessToken: null\n }\n }\n};\n"],"mappings":";;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAAoD,SAAAE,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA,QAAAA,CAAA,OAAAf,OAAA,CAAAI,MAAA,CAAAc,MAAA,OAAAC,OAAA,WAAAC,GAAA,QAAAC,gBAAA,CAAAC,OAAA,EAAAR,MAAA,EAAAM,GAAA,EAAAF,MAAA,CAAAE,GAAA,SAAAhB,MAAA,CAAAmB,yBAAA,GAAAnB,MAAA,CAAAoB,gBAAA,CAAAV,MAAA,EAAAV,MAAA,CAAAmB,yBAAA,CAAAL,MAAA,KAAAlB,OAAA,CAAAI,MAAA,CAAAc,MAAA,GAAA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- var VERSION = typeof "4.0.0-alpha.23" !== 'undefined' ? "4.0.0-alpha.23" : 'latest';
7
+ var VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
8
8
  exports.VERSION = VERSION;
9
9
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tile-3d-subtree-loader.js","names":["_parse3dTileSubtree","_interopRequireDefault","require","_version","Tile3DSubtreeLoader","id","name","module","version","VERSION","extensions","mimeTypes","tests","parse","parse3DTilesSubtree","options","exports"],"sources":["../../src/tile-3d-subtree-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport parse3DTilesSubtree from './lib/parsers/helpers/parse-3d-tile-subtree';\nimport {VERSION} from './lib/utils/version';\n\n/**\n * Loader for 3D Tiles Subtree\n *\n */\nexport const Tile3DSubtreeLoader: LoaderWithParser = {\n id: '3d-tiles-subtree',\n name: '3D Tiles Subtree',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['subtree'],\n mimeTypes: ['application/octet-stream'],\n tests: ['subtree'],\n parse: parse3DTilesSubtree,\n options: {}\n};\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAMO,IAAME,mBAAqC,GAAG;EACnDC,EAAE,EAAE,kBAAkB;EACtBC,IAAI,EAAE,kBAAkB;EACxBC,MAAM,EAAE,UAAU;EAClBC,OAAO,EAAEC,gBAAO;EAChBC,UAAU,EAAE,CAAC,SAAS,CAAC;EACvBC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,KAAK,EAAE,CAAC,SAAS,CAAC;EAClBC,KAAK,EAAEC,2BAAmB;EAC1BC,OAAO,EAAE,CAAC;AACZ,CAAC;AAACC,OAAA,CAAAZ,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"file":"tile-3d-subtree-loader.js","names":["_parse3dTileSubtree","_interopRequireDefault","require","_version","Tile3DSubtreeLoader","id","name","module","version","VERSION","extensions","mimeTypes","tests","parse","parse3DTilesSubtree","options","exports"],"sources":["../../src/tile-3d-subtree-loader.ts"],"sourcesContent":["import type {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {Subtree} from './types';\nimport parse3DTilesSubtree from './lib/parsers/helpers/parse-3d-tile-subtree';\nimport {VERSION} from './lib/utils/version';\n\n/**\n * Loader for 3D Tiles Subtree\n */\nexport const Tile3DSubtreeLoader: LoaderWithParser<Subtree, never, LoaderOptions> = {\n id: '3d-tiles-subtree',\n name: '3D Tiles Subtree',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['subtree'],\n mimeTypes: ['application/octet-stream'],\n tests: ['subtree'],\n parse: parse3DTilesSubtree,\n options: {}\n};\n"],"mappings":";;;;;;;AAEA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKO,IAAME,mBAAoE,GAAG;EAClFC,EAAE,EAAE,kBAAkB;EACtBC,IAAI,EAAE,kBAAkB;EACxBC,MAAM,EAAE,UAAU;EAClBC,OAAO,EAAEC,gBAAO;EAChBC,UAAU,EAAE,CAAC,SAAS,CAAC;EACvBC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,KAAK,EAAE,CAAC,SAAS,CAAC;EAClBC,KAAK,EAAEC,2BAAmB;EAC1BC,OAAO,EAAE,CAAC;AACZ,CAAC;AAACC,OAAA,CAAAZ,mBAAA,GAAAA,mBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"tile-3d-writer.js","names":["_version","require","_encode3dTile","_interopRequireDefault","Tile3DWriter","name","id","module","version","VERSION","extensions","mimeTypes","encodeSync","binary","options","_defineProperty2","default","exports","tile","encode3DTile"],"sources":["../../src/tile-3d-writer.ts"],"sourcesContent":["import type {Writer} from '@loaders.gl/loader-utils';\nimport {VERSION} from './lib/utils/version';\nimport encode3DTile from './lib/encoders/encode-3d-tile';\n\n/**\n * Exporter for 3D Tiles\n */\nexport const Tile3DWriter: Writer = {\n name: '3D Tile',\n id: '3d-tiles',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n mimeTypes: ['application/octet-stream'],\n encodeSync,\n binary: true,\n options: {\n ['3d-tiles']: {}\n }\n};\n\nfunction encodeSync(tile, options) {\n return encode3DTile(tile, options);\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKO,IAAMG,YAAoB,GAAG;EAClCC,IAAI,EAAE,SAAS;EACfC,EAAE,EAAE,UAAU;EACdC,MAAM,EAAE,UAAU;EAClBC,OAAO,EAAEC,gBAAO;EAChBC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;EAC5CC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,UAAU,EAAVA,UAAU;EACVC,MAAM,EAAE,IAAI;EACZC,OAAO,MAAAC,gBAAA,CAAAC,OAAA,MACJ,UAAU,EAAG,CAAC,CAAC;AAEpB,CAAC;AAACC,OAAA,CAAAb,YAAA,GAAAA,YAAA;AAEF,SAASQ,UAAUA,CAACM,IAAI,EAAEJ,OAAO,EAAE;EACjC,OAAO,IAAAK,qBAAY,EAACD,IAAI,EAAEJ,OAAO,CAAC;AACpC"}
1
+ {"version":3,"file":"tile-3d-writer.js","names":["_version","require","_encode3dTile","_interopRequireDefault","Tile3DWriter","name","id","module","version","VERSION","extensions","mimeTypes","encodeSync","binary","options","_defineProperty2","default","exports","tile","encode3DTile"],"sources":["../../src/tile-3d-writer.ts"],"sourcesContent":["import type {Writer, WriterOptions} from '@loaders.gl/loader-utils';\nimport {VERSION} from './lib/utils/version';\nimport encode3DTile from './lib/encoders/encode-3d-tile';\n\n/**\n * Exporter for 3D Tiles\n */\nexport const Tile3DWriter: Writer<unknown, never, WriterOptions> = {\n name: '3D Tile',\n id: '3d-tiles',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n mimeTypes: ['application/octet-stream'],\n encodeSync,\n binary: true,\n options: {\n ['3d-tiles']: {}\n }\n};\n\nfunction encodeSync(tile, options) {\n return encode3DTile(tile, options);\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKO,IAAMG,YAAmD,GAAG;EACjEC,IAAI,EAAE,SAAS;EACfC,EAAE,EAAE,UAAU;EACdC,MAAM,EAAE,UAAU;EAClBC,OAAO,EAAEC,gBAAO;EAChBC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;EAC5CC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,UAAU,EAAVA,UAAU;EACVC,MAAM,EAAE,IAAI;EACZC,OAAO,MAAAC,gBAAA,CAAAC,OAAA,MACJ,UAAU,EAAG,CAAC,CAAC;AAEpB,CAAC;AAACC,OAAA,CAAAb,YAAA,GAAAA,YAAA;AAEF,SAASQ,UAAUA,CAACM,IAAI,EAAEJ,OAAO,EAAE;EACjC,OAAO,IAAAK,qBAAY,EAACD,IAAI,EAAEJ,OAAO,CAAC;AACpC"}
@@ -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 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
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["import type {GLTFPostprocessed, FeatureTableJson} from '@loaders.gl/gltf';\nexport type {FeatureTableJson};\n\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 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,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';
3
- const VERSION = typeof "4.0.0-alpha.23" !== 'undefined' ? "4.0.0-alpha.23" : 'latest';
3
+ const VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
4
4
  export const Tiles3DArchiveFileLoader = {
5
5
  name: '3tz',
6
6
  id: '3tz',
@@ -1 +1 @@
1
- {"version":3,"file":"cesium-ion-loader.js","names":["Tiles3DLoader","getIonTilesetMetadata","preload","url","options","arguments","length","undefined","accessToken","assetId","Number","isFinite","matched","match","CesiumIonLoader","id","name","parse","data","context","loader"],"sources":["../../src/cesium-ion-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {Tiles3DLoader} from './tiles-3d-loader';\nimport {getIonTilesetMetadata} from './lib/ion/ion';\n\nasync function preload(url, options = {}) {\n options = options['cesium-ion'] || {};\n // @ts-ignore\n const {accessToken} = options;\n // @ts-ignore\n let assetId = options.assetId;\n if (!Number.isFinite(assetId)) {\n const matched = url.match(/\\/([0-9]+)\\/tileset.json/);\n assetId = matched && matched[1];\n }\n return getIonTilesetMetadata(accessToken, assetId);\n}\n\n/**\n * Loader for 3D tiles from Cesium ION\n */\nexport const CesiumIonLoader: LoaderWithParser = {\n ...Tiles3DLoader,\n id: 'cesium-ion',\n name: 'Cesium Ion',\n // @ts-ignore\n preload,\n parse: async (data, options?, context?) => {\n options = {...options};\n options['3d-tiles'] = options['cesium-ion'];\n // @ts-ignore\n options.loader = CesiumIonLoader;\n return Tiles3DLoader.parse(data, options, context); // , loader);\n },\n options: {\n 'cesium-ion': {\n ...Tiles3DLoader.options['3d-tiles'],\n accessToken: null\n }\n }\n};\n"],"mappings":"AACA,SAAQA,aAAa,QAAO,mBAAmB;AAC/C,SAAQC,qBAAqB,QAAO,eAAe;AAEnD,eAAeC,OAAOA,CAACC,GAAG,EAAgB;EAAA,IAAdC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACtCD,OAAO,GAAGA,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;EAErC,MAAM;IAACI;EAAW,CAAC,GAAGJ,OAAO;EAE7B,IAAIK,OAAO,GAAGL,OAAO,CAACK,OAAO;EAC7B,IAAI,CAACC,MAAM,CAACC,QAAQ,CAACF,OAAO,CAAC,EAAE;IAC7B,MAAMG,OAAO,GAAGT,GAAG,CAACU,KAAK,CAAC,0BAA0B,CAAC;IACrDJ,OAAO,GAAGG,OAAO,IAAIA,OAAO,CAAC,CAAC,CAAC;EACjC;EACA,OAAOX,qBAAqB,CAACO,WAAW,EAAEC,OAAO,CAAC;AACpD;AAKA,OAAO,MAAMK,eAAiC,GAAG;EAC/C,GAAGd,aAAa;EAChBe,EAAE,EAAE,YAAY;EAChBC,IAAI,EAAE,YAAY;EAElBd,OAAO;EACPe,KAAK,EAAE,MAAAA,CAAOC,IAAI,EAAEd,OAAQ,EAAEe,OAAQ,KAAK;IACzCf,OAAO,GAAG;MAAC,GAAGA;IAAO,CAAC;IACtBA,OAAO,CAAC,UAAU,CAAC,GAAGA,OAAO,CAAC,YAAY,CAAC;IAE3CA,OAAO,CAACgB,MAAM,GAAGN,eAAe;IAChC,OAAOd,aAAa,CAACiB,KAAK,CAACC,IAAI,EAAEd,OAAO,EAAEe,OAAO,CAAC;EACpD,CAAC;EACDf,OAAO,EAAE;IACP,YAAY,EAAE;MACZ,GAAGJ,aAAa,CAACI,OAAO,CAAC,UAAU,CAAC;MACpCI,WAAW,EAAE;IACf;EACF;AACF,CAAC"}
1
+ {"version":3,"file":"cesium-ion-loader.js","names":["Tiles3DLoader","getIonTilesetMetadata","preload","url","options","arguments","length","undefined","accessToken","assetId","Number","isFinite","matched","match","CesiumIonLoader","id","name","parse","data","context","loader"],"sources":["../../src/cesium-ion-loader.ts"],"sourcesContent":["import type {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {Tiles3DLoader} from './tiles-3d-loader';\nimport {getIonTilesetMetadata} from './lib/ion/ion';\n\nasync function preload(url, options = {}) {\n options = options['cesium-ion'] || {};\n // @ts-ignore\n const {accessToken} = options;\n // @ts-ignore\n let assetId = options.assetId;\n if (!Number.isFinite(assetId)) {\n const matched = url.match(/\\/([0-9]+)\\/tileset.json/);\n assetId = matched && matched[1];\n }\n return getIonTilesetMetadata(accessToken, assetId);\n}\n\n/**\n * Loader for 3D tiles from Cesium ION\n */\nexport const CesiumIonLoader: LoaderWithParser<unknown, never, LoaderOptions> = {\n ...Tiles3DLoader,\n id: 'cesium-ion',\n name: 'Cesium Ion',\n // @ts-ignore\n preload,\n parse: async (data, options?, context?) => {\n options = {...options};\n options['3d-tiles'] = options['cesium-ion'];\n // @ts-ignore\n options.loader = CesiumIonLoader;\n return Tiles3DLoader.parse(data, options, context); // , loader);\n },\n options: {\n 'cesium-ion': {\n ...Tiles3DLoader.options['3d-tiles'],\n accessToken: null\n }\n }\n};\n"],"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undefined' ? "4.0.0-alpha.23" : 'latest';
1
+ export const VERSION = typeof "4.0.0-alpha.25" !== 'undefined' ? "4.0.0-alpha.25" : 'latest';
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tile-3d-subtree-loader.js","names":["parse3DTilesSubtree","VERSION","Tile3DSubtreeLoader","id","name","module","version","extensions","mimeTypes","tests","parse","options"],"sources":["../../src/tile-3d-subtree-loader.ts"],"sourcesContent":["import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport parse3DTilesSubtree from './lib/parsers/helpers/parse-3d-tile-subtree';\nimport {VERSION} from './lib/utils/version';\n\n/**\n * Loader for 3D Tiles Subtree\n *\n */\nexport const Tile3DSubtreeLoader: LoaderWithParser = {\n id: '3d-tiles-subtree',\n name: '3D Tiles Subtree',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['subtree'],\n mimeTypes: ['application/octet-stream'],\n tests: ['subtree'],\n parse: parse3DTilesSubtree,\n options: {}\n};\n"],"mappings":"AACA,OAAOA,mBAAmB,MAAM,6CAA6C;AAC7E,SAAQC,OAAO,QAAO,qBAAqB;AAM3C,OAAO,MAAMC,mBAAqC,GAAG;EACnDC,EAAE,EAAE,kBAAkB;EACtBC,IAAI,EAAE,kBAAkB;EACxBC,MAAM,EAAE,UAAU;EAClBC,OAAO,EAAEL,OAAO;EAChBM,UAAU,EAAE,CAAC,SAAS,CAAC;EACvBC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,KAAK,EAAE,CAAC,SAAS,CAAC;EAClBC,KAAK,EAAEV,mBAAmB;EAC1BW,OAAO,EAAE,CAAC;AACZ,CAAC"}
1
+ {"version":3,"file":"tile-3d-subtree-loader.js","names":["parse3DTilesSubtree","VERSION","Tile3DSubtreeLoader","id","name","module","version","extensions","mimeTypes","tests","parse","options"],"sources":["../../src/tile-3d-subtree-loader.ts"],"sourcesContent":["import type {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {Subtree} from './types';\nimport parse3DTilesSubtree from './lib/parsers/helpers/parse-3d-tile-subtree';\nimport {VERSION} from './lib/utils/version';\n\n/**\n * Loader for 3D Tiles Subtree\n */\nexport const Tile3DSubtreeLoader: LoaderWithParser<Subtree, never, LoaderOptions> = {\n id: '3d-tiles-subtree',\n name: '3D Tiles Subtree',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['subtree'],\n mimeTypes: ['application/octet-stream'],\n tests: ['subtree'],\n parse: parse3DTilesSubtree,\n options: {}\n};\n"],"mappings":"AAEA,OAAOA,mBAAmB,MAAM,6CAA6C;AAC7E,SAAQC,OAAO,QAAO,qBAAqB;AAK3C,OAAO,MAAMC,mBAAoE,GAAG;EAClFC,EAAE,EAAE,kBAAkB;EACtBC,IAAI,EAAE,kBAAkB;EACxBC,MAAM,EAAE,UAAU;EAClBC,OAAO,EAAEL,OAAO;EAChBM,UAAU,EAAE,CAAC,SAAS,CAAC;EACvBC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,KAAK,EAAE,CAAC,SAAS,CAAC;EAClBC,KAAK,EAAEV,mBAAmB;EAC1BW,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tile-3d-writer.js","names":["VERSION","encode3DTile","Tile3DWriter","name","id","module","version","extensions","mimeTypes","encodeSync","binary","options","tile"],"sources":["../../src/tile-3d-writer.ts"],"sourcesContent":["import type {Writer} from '@loaders.gl/loader-utils';\nimport {VERSION} from './lib/utils/version';\nimport encode3DTile from './lib/encoders/encode-3d-tile';\n\n/**\n * Exporter for 3D Tiles\n */\nexport const Tile3DWriter: Writer = {\n name: '3D Tile',\n id: '3d-tiles',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n mimeTypes: ['application/octet-stream'],\n encodeSync,\n binary: true,\n options: {\n ['3d-tiles']: {}\n }\n};\n\nfunction encodeSync(tile, options) {\n return encode3DTile(tile, options);\n}\n"],"mappings":"AACA,SAAQA,OAAO,QAAO,qBAAqB;AAC3C,OAAOC,YAAY,MAAM,+BAA+B;AAKxD,OAAO,MAAMC,YAAoB,GAAG;EAClCC,IAAI,EAAE,SAAS;EACfC,EAAE,EAAE,UAAU;EACdC,MAAM,EAAE,UAAU;EAClBC,OAAO,EAAEN,OAAO;EAChBO,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;EAC5CC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,UAAU;EACVC,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE;IACP,CAAC,UAAU,GAAG,CAAC;EACjB;AACF,CAAC;AAED,SAASF,UAAUA,CAACG,IAAI,EAAED,OAAO,EAAE;EACjC,OAAOV,YAAY,CAACW,IAAI,EAAED,OAAO,CAAC;AACpC"}
1
+ {"version":3,"file":"tile-3d-writer.js","names":["VERSION","encode3DTile","Tile3DWriter","name","id","module","version","extensions","mimeTypes","encodeSync","binary","options","tile"],"sources":["../../src/tile-3d-writer.ts"],"sourcesContent":["import type {Writer, WriterOptions} from '@loaders.gl/loader-utils';\nimport {VERSION} from './lib/utils/version';\nimport encode3DTile from './lib/encoders/encode-3d-tile';\n\n/**\n * Exporter for 3D Tiles\n */\nexport const Tile3DWriter: Writer<unknown, never, WriterOptions> = {\n name: '3D Tile',\n id: '3d-tiles',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n mimeTypes: ['application/octet-stream'],\n encodeSync,\n binary: true,\n options: {\n ['3d-tiles']: {}\n }\n};\n\nfunction encodeSync(tile, options) {\n return encode3DTile(tile, options);\n}\n"],"mappings":"AACA,SAAQA,OAAO,QAAO,qBAAqB;AAC3C,OAAOC,YAAY,MAAM,+BAA+B;AAKxD,OAAO,MAAMC,YAAmD,GAAG;EACjEC,IAAI,EAAE,SAAS;EACfC,EAAE,EAAE,UAAU;EACdC,MAAM,EAAE,UAAU;EAClBC,OAAO,EAAEN,OAAO;EAChBO,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;EAC5CC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,UAAU;EACVC,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE;IACP,CAAC,UAAU,GAAG,CAAC;EACjB;AACF,CAAC;AAED,SAASF,UAAUA,CAACG,IAAI,EAAED,OAAO,EAAE;EACjC,OAAOV,YAAY,CAACW,IAAI,EAAED,OAAO,CAAC;AACpC"}
@@ -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 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
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["import type {GLTFPostprocessed, FeatureTableJson} from '@loaders.gl/gltf';\nexport type {FeatureTableJson};\n\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 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,7 +1,7 @@
1
- import type { LoaderWithParser } from '@loaders.gl/loader-utils';
1
+ import type { LoaderOptions, LoaderWithParser } from '@loaders.gl/loader-utils';
2
+ import type { Subtree } from './types';
2
3
  /**
3
4
  * Loader for 3D Tiles Subtree
4
- *
5
5
  */
6
- export declare const Tile3DSubtreeLoader: LoaderWithParser;
6
+ export declare const Tile3DSubtreeLoader: LoaderWithParser<Subtree, never, LoaderOptions>;
7
7
  //# sourceMappingURL=tile-3d-subtree-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tile-3d-subtree-loader.d.ts","sourceRoot":"","sources":["../src/tile-3d-subtree-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAI/D;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,gBAUjC,CAAC"}
1
+ {"version":3,"file":"tile-3d-subtree-loader.d.ts","sourceRoot":"","sources":["../src/tile-3d-subtree-loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAIrC;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,aAAa,CAU/E,CAAC"}
@@ -1,6 +1,6 @@
1
- import type { Writer } from '@loaders.gl/loader-utils';
1
+ import type { Writer, WriterOptions } from '@loaders.gl/loader-utils';
2
2
  /**
3
3
  * Exporter for 3D Tiles
4
4
  */
5
- export declare const Tile3DWriter: Writer;
5
+ export declare const Tile3DWriter: Writer<unknown, never, WriterOptions>;
6
6
  //# sourceMappingURL=tile-3d-writer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tile-3d-writer.d.ts","sourceRoot":"","sources":["../src/tile-3d-writer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAIrD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAY1B,CAAC"}
1
+ {"version":3,"file":"tile-3d-writer.d.ts","sourceRoot":"","sources":["../src/tile-3d-writer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAIpE;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,aAAa,CAY9D,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,10 +1,8 @@
1
- import type { GLTFPostprocessed } from '@loaders.gl/gltf';
1
+ import type { GLTFPostprocessed, FeatureTableJson } from '@loaders.gl/gltf';
2
+ export type { FeatureTableJson };
2
3
  import { LoaderWithParser } from '@loaders.gl/loader-utils';
3
4
  import { Matrix4, Vector3 } from '@math.gl/core';
4
5
  import { TILESET_TYPE, LOD_METRIC_TYPE, TILE_TYPE, TILE_REFINEMENT } from '@loaders.gl/tiles';
5
- export type FeatureTableJson = {
6
- [key: string]: any[];
7
- };
8
6
  export type B3DMContent = {
9
7
  batchTableJson?: FeatureTableJson;
10
8
  byteLength: number;
@@ -375,5 +373,4 @@ type ImplicitTilingData = {
375
373
  uri: string;
376
374
  };
377
375
  };
378
- export {};
379
376
  //# sourceMappingURL=types.d.ts.map
@@ -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;IAC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b,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,0BAA0B;AAC1B,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,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.23",
3
+ "version": "4.0.0-alpha.25",
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.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",
37
+ "@loaders.gl/draco": "4.0.0-alpha.25",
38
+ "@loaders.gl/gltf": "4.0.0-alpha.25",
39
+ "@loaders.gl/loader-utils": "4.0.0-alpha.25",
40
+ "@loaders.gl/math": "4.0.0-alpha.25",
41
+ "@loaders.gl/tiles": "4.0.0-alpha.25",
42
+ "@loaders.gl/zip": "4.0.0-alpha.25",
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": "e212f2a0c0e342f7cb65ce84fa2ff39f64b7d94b"
51
+ "gitHead": "40135f391b869388dbbcd615bbe51178d0c370be"
52
52
  }
@@ -1,4 +1,4 @@
1
- import type {LoaderWithParser} from '@loaders.gl/loader-utils';
1
+ import type {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';
2
2
  import {Tiles3DLoader} from './tiles-3d-loader';
3
3
  import {getIonTilesetMetadata} from './lib/ion/ion';
4
4
 
@@ -18,7 +18,7 @@ async function preload(url, options = {}) {
18
18
  /**
19
19
  * Loader for 3D tiles from Cesium ION
20
20
  */
21
- export const CesiumIonLoader: LoaderWithParser = {
21
+ export const CesiumIonLoader: LoaderWithParser<unknown, never, LoaderOptions> = {
22
22
  ...Tiles3DLoader,
23
23
  id: 'cesium-ion',
24
24
  name: 'Cesium Ion',
@@ -1,12 +1,12 @@
1
- import type {LoaderWithParser} from '@loaders.gl/loader-utils';
1
+ import type {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';
2
+ import type {Subtree} from './types';
2
3
  import parse3DTilesSubtree from './lib/parsers/helpers/parse-3d-tile-subtree';
3
4
  import {VERSION} from './lib/utils/version';
4
5
 
5
6
  /**
6
7
  * Loader for 3D Tiles Subtree
7
- *
8
8
  */
9
- export const Tile3DSubtreeLoader: LoaderWithParser = {
9
+ export const Tile3DSubtreeLoader: LoaderWithParser<Subtree, never, LoaderOptions> = {
10
10
  id: '3d-tiles-subtree',
11
11
  name: '3D Tiles Subtree',
12
12
  module: '3d-tiles',
@@ -1,11 +1,11 @@
1
- import type {Writer} from '@loaders.gl/loader-utils';
1
+ import type {Writer, WriterOptions} from '@loaders.gl/loader-utils';
2
2
  import {VERSION} from './lib/utils/version';
3
3
  import encode3DTile from './lib/encoders/encode-3d-tile';
4
4
 
5
5
  /**
6
6
  * Exporter for 3D Tiles
7
7
  */
8
- export const Tile3DWriter: Writer = {
8
+ export const Tile3DWriter: Writer<unknown, never, WriterOptions> = {
9
9
  name: '3D Tile',
10
10
  id: '3d-tiles',
11
11
  module: '3d-tiles',
package/src/types.ts CHANGED
@@ -1,12 +1,10 @@
1
- import type {GLTFPostprocessed} from '@loaders.gl/gltf';
1
+ import type {GLTFPostprocessed, FeatureTableJson} from '@loaders.gl/gltf';
2
+ export type {FeatureTableJson};
3
+
2
4
  import {LoaderWithParser} from '@loaders.gl/loader-utils';
3
5
  import {Matrix4, Vector3} from '@math.gl/core';
4
6
  import {TILESET_TYPE, LOD_METRIC_TYPE, TILE_TYPE, TILE_REFINEMENT} from '@loaders.gl/tiles';
5
7
 
6
- export type FeatureTableJson = {
7
- [key: string]: any[];
8
- };
9
-
10
8
  export type B3DMContent = {
11
9
  batchTableJson?: FeatureTableJson;
12
10
  byteLength: number;
@@ -1,72 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Tiles3DArchive = void 0;
7
- const md5_1 = __importDefault(require("md5"));
8
- const zip_1 = require("@loaders.gl/zip");
9
- const compression_1 = require("@loaders.gl/compression");
10
- /**
11
- * Handling different compression types in zip
12
- */
13
- const COMPRESSION_METHODS = {
14
- /** No compression */
15
- 0: (data) => new compression_1.NoCompression().decompress(data),
16
- /** Deflation */
17
- 8: (data) => new compression_1.DeflateCompression({ raw: true }).decompress(data)
18
- };
19
- /**
20
- * Class for handling information about 3tz file
21
- */
22
- class Tiles3DArchive {
23
- /**
24
- * creates Tiles3DArchive handler
25
- * @param fileProvider - FileProvider with the whole file
26
- * @param hashFile - hash info
27
- */
28
- constructor(fileProvider, hashFile) {
29
- this.fileProvider = fileProvider;
30
- this.hashArray = hashFile;
31
- }
32
- /**
33
- * Returns file with the given path from 3tz archive
34
- * @param path - path inside the 3tz
35
- * @returns buffer with ready to use file
36
- */
37
- async getFile(path) {
38
- // sometimes paths are not in lower case when hash file is created,
39
- // so first we're looking for lower case file name and then for original one
40
- let data = await this.getFileBytes(path.toLocaleLowerCase());
41
- if (!data) {
42
- data = await this.getFileBytes(path);
43
- }
44
- if (!data) {
45
- throw new Error('No such file in the archive');
46
- }
47
- return data;
48
- }
49
- /**
50
- * Trying to get raw file data by adress
51
- * @param path - path inside the archive
52
- * @returns buffer with the raw file data
53
- */
54
- async getFileBytes(path) {
55
- const nameHash = Buffer.from((0, md5_1.default)(path), 'hex');
56
- const fileInfo = (0, zip_1.findBin)(nameHash, this.hashArray); // implement binary search
57
- if (!fileInfo) {
58
- return null;
59
- }
60
- const localFileHeader = await (0, zip_1.parseZipLocalFileHeader)(fileInfo.offset, this.fileProvider);
61
- if (!localFileHeader) {
62
- return null;
63
- }
64
- const compressedFile = await this.fileProvider.slice(localFileHeader.fileDataOffset, localFileHeader.fileDataOffset + localFileHeader.compressedSize);
65
- const compressionMethod = COMPRESSION_METHODS[localFileHeader.compressionMethod];
66
- if (!compressionMethod) {
67
- throw Error('Only Deflation compression is supported');
68
- }
69
- return compressionMethod(compressedFile);
70
- }
71
- }
72
- exports.Tiles3DArchive = Tiles3DArchive;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parse3DTilesArchive = void 0;
4
- const zip_1 = require("@loaders.gl/zip");
5
- const _3d_tiles_archive_archive_1 = require("./3d-tiles-archive-archive");
6
- /**
7
- * Creates 3tz file handler from raw file
8
- * @param fileProvider raw file data
9
- * @param cb is called with information message during parsing
10
- * @returns 3tz file handler
11
- */
12
- const parse3DTilesArchive = async (fileProvider, cb) => {
13
- const hashCDOffset = await (0, zip_1.searchFromTheEnd)(fileProvider, zip_1.cdSignature);
14
- const cdFileHeader = await (0, zip_1.parseZipCDFileHeader)(hashCDOffset, fileProvider);
15
- let hashData;
16
- if (cdFileHeader?.fileName !== '@3dtilesIndex1@') {
17
- cb?.('3tz doesnt contain hash file');
18
- hashData = await (0, zip_1.generateHashInfo)(fileProvider);
19
- cb?.('hash info has been composed according to central directory records');
20
- }
21
- else {
22
- cb?.('3tz contains hash file');
23
- const localFileHeader = await (0, zip_1.parseZipLocalFileHeader)(cdFileHeader.localHeaderOffset, fileProvider);
24
- if (!localFileHeader) {
25
- throw new Error('corrupted 3tz');
26
- }
27
- const fileDataOffset = localFileHeader.fileDataOffset;
28
- const hashFile = await fileProvider.slice(fileDataOffset, fileDataOffset + localFileHeader.compressedSize);
29
- hashData = (0, zip_1.parseHashFile)(hashFile);
30
- }
31
- return new _3d_tiles_archive_archive_1.Tiles3DArchive(fileProvider, hashData);
32
- };
33
- exports.parse3DTilesArchive = parse3DTilesArchive;