@loaders.gl/tile-converter 5.0.0-alpha.11 → 5.0.0-alpha.14

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 (152) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +180 -4
  3. package/bin/converter-v5.js +2 -0
  4. package/dist/converter.min.cjs +172 -182
  5. package/dist/i3s-server/bin/i3s-server.min.cjs +113 -158
  6. package/dist/index.cjs +18832 -19228
  7. package/dist/index.js +19566 -19968
  8. package/dist/v5/adapters.cjs +2002 -230
  9. package/dist/v5/adapters.d.ts +20 -0
  10. package/dist/v5/adapters.js +2005 -214
  11. package/dist/v5/archive-source.d.ts +36 -0
  12. package/dist/v5/browser-tileset-source.d.ts +55 -11
  13. package/dist/v5/browser.cjs +18 -0
  14. package/dist/v5/browser.d.ts +15 -1
  15. package/dist/v5/browser.js +26 -0
  16. package/dist/v5/conversion-api.d.ts +34 -0
  17. package/dist/v5/converter-cli.d.ts +1 -0
  18. package/dist/v5/converter-cli.js +1230 -0
  19. package/dist/v5/core.cjs +547 -77
  20. package/dist/v5/core.d.ts +3 -1
  21. package/dist/v5/core.js +540 -70
  22. package/dist/v5/feature-arrow.d.ts +1 -1
  23. package/dist/v5/i3s-mesh-conversion.d.ts +5 -1
  24. package/dist/v5/i3s-mesh-source-features.d.ts +2 -2
  25. package/dist/v5/i3s-mesh-source-material.d.ts +1 -1
  26. package/dist/v5/i3s-mesh-source.d.ts +2 -2
  27. package/dist/v5/i3s-selection-source.d.ts +70 -0
  28. package/dist/v5/index.cjs +15 -0
  29. package/dist/v5/index.d.ts +13 -1
  30. package/dist/v5/index.js +22 -0
  31. package/dist/v5/mesh-conversion.d.ts +21 -3
  32. package/dist/v5/mesh-draco.d.ts +2 -2
  33. package/dist/v5/mesh-features.d.ts +2 -2
  34. package/dist/v5/mesh-hierarchy.d.ts +47 -0
  35. package/dist/v5/mesh-source-features.d.ts +6 -5
  36. package/dist/v5/mesh-source-schema.d.ts +12 -0
  37. package/dist/v5/mesh-source-texture.d.ts +3 -3
  38. package/dist/v5/mesh-source.d.ts +10 -7
  39. package/dist/v5/mesh-tileset-sink.d.ts +5 -0
  40. package/dist/v5/mesh.d.ts +1 -1
  41. package/dist/v5/node-cli.d.ts +9 -0
  42. package/dist/v5/node-conversion.d.ts +34 -0
  43. package/dist/v5/node-feature-schema.d.ts +3 -0
  44. package/dist/v5/node-i3s-source.d.ts +41 -0
  45. package/dist/v5/node-source.d.ts +47 -0
  46. package/dist/v5/node.cjs +913 -0
  47. package/dist/v5/node.d.ts +6 -0
  48. package/dist/v5/node.js +890 -0
  49. package/dist/v5/point-cloud-attributes.d.ts +19 -0
  50. package/dist/v5/point-cloud-conversion.d.ts +1 -1
  51. package/dist/v5/point-cloud-copc.d.ts +44 -0
  52. package/dist/v5/point-cloud-file.d.ts +83 -0
  53. package/dist/v5/point-cloud-potree.d.ts +47 -0
  54. package/dist/v5/point-cloud-source-encoder.d.ts +1 -1
  55. package/dist/v5/point-cloud-source.d.ts +1 -1
  56. package/dist/v5/point-cloud-tileset.d.ts +44 -0
  57. package/dist/v5/point-cloud.d.ts +1 -1
  58. package/dist/v5/resource-manifest.d.ts +10 -1
  59. package/dist/v5/selected-mesh-source.d.ts +53 -0
  60. package/dist/v5/spatial-conversion.d.ts +1 -1
  61. package/dist/v5/tileset-source.d.ts +1 -1
  62. package/package.json +25 -32
  63. package/src/index.ts +4 -1
  64. package/src/v4/3d-tiles-converter/3d-tiles-converter.ts +11 -12
  65. package/src/v4/3d-tiles-converter/helpers/3d-tiles-content-converter.ts +7 -3
  66. package/src/v4/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.ts +2 -2
  67. package/src/v4/3d-tiles-converter/helpers/load-i3s.ts +4 -6
  68. package/src/v4/3d-tiles-converter/helpers/texture-atlas.ts +1 -1
  69. package/src/v4/3d-tiles-converter/helpers/validate-i3s-spatial-reference.ts +2 -2
  70. package/src/v4/3d-tiles-converter/json-templates/tileset.ts +58 -39
  71. package/src/v4/converter-cli.ts +10 -4
  72. package/src/v4/deps-installer/deps-installer.ts +3 -3
  73. package/src/v4/i3s-converter/helpers/attribute-metadata-info.ts +1 -1
  74. package/src/v4/i3s-converter/helpers/batch-ids-extensions.ts +9 -10
  75. package/src/v4/i3s-converter/helpers/conversion-gltf.ts +108 -0
  76. package/src/v4/i3s-converter/helpers/coordinate-converter.ts +6 -5
  77. package/src/v4/i3s-converter/helpers/create-scene-server-path.ts +5 -6
  78. package/src/v4/i3s-converter/helpers/feature-attributes.ts +4 -4
  79. package/src/v4/i3s-converter/helpers/geometry-attributes.ts +1 -1
  80. package/src/v4/i3s-converter/helpers/geometry-converter.ts +69 -77
  81. package/src/v4/i3s-converter/helpers/gltf-attributes.ts +58 -74
  82. package/src/v4/i3s-converter/helpers/load-3d-tiles.ts +6 -54
  83. package/src/v4/i3s-converter/helpers/node-debug.ts +7 -3
  84. package/src/v4/i3s-converter/helpers/node-index-document.ts +11 -9
  85. package/src/v4/i3s-converter/helpers/node-pages.ts +3 -4
  86. package/src/v4/i3s-converter/helpers/preprocess-3d-tiles.ts +2 -2
  87. package/src/v4/i3s-converter/helpers/tileset-traversal.ts +1 -1
  88. package/src/v4/i3s-converter/i3s-converter.ts +29 -31
  89. package/src/v4/i3s-converter/json-templates/geometry-definitions.ts +71 -66
  90. package/src/v4/i3s-converter/json-templates/layers.ts +97 -132
  91. package/src/v4/i3s-converter/json-templates/metadata.ts +31 -21
  92. package/src/v4/i3s-converter/json-templates/node.ts +60 -74
  93. package/src/v4/i3s-converter/json-templates/scene-server.ts +36 -27
  94. package/src/v4/i3s-converter/json-templates/shared-resources.ts +62 -123
  95. package/src/v4/i3s-converter/json-templates/store.ts +39 -57
  96. package/src/v4/i3s-converter/types.ts +4 -4
  97. package/src/v4/i3s-server/controllers/slpk-controller.ts +3 -3
  98. package/src/v4/i3s-server/utils/create-scene-server.ts +3 -3
  99. package/src/v4/lib/utils/builder-input.ts +8 -0
  100. package/src/v4/lib/utils/conversion-dump.ts +5 -1
  101. package/src/v4/lib/utils/file-utils.ts +1 -1
  102. package/src/v4/lib/utils/hash-string.ts +21 -0
  103. package/src/v4/lib/utils/lod-conversion-utils.ts +3 -3
  104. package/src/v4/pgm-loader.ts +2 -2
  105. package/src/v5/adapters.ts +53 -0
  106. package/src/v5/archive-source.ts +235 -0
  107. package/src/v5/browser-tileset-source.ts +418 -48
  108. package/src/v5/browser.ts +46 -0
  109. package/src/v5/conversion-api.ts +184 -17
  110. package/src/v5/conversion-archive.ts +2 -2
  111. package/src/v5/converter-cli.ts +28 -0
  112. package/src/v5/core.ts +7 -0
  113. package/src/v5/feature-arrow.ts +2 -2
  114. package/src/v5/i3s-mesh-conversion.ts +41 -3
  115. package/src/v5/i3s-mesh-sink.ts +1 -1
  116. package/src/v5/i3s-mesh-source-features.ts +3 -3
  117. package/src/v5/i3s-mesh-source-material.ts +18 -11
  118. package/src/v5/i3s-mesh-source.ts +3 -2
  119. package/src/v5/i3s-selection-source.ts +298 -0
  120. package/src/v5/index.ts +41 -0
  121. package/src/v5/mesh-conversion.ts +24 -4
  122. package/src/v5/mesh-draco.ts +2 -2
  123. package/src/v5/mesh-features.ts +3 -3
  124. package/src/v5/mesh-hierarchy.ts +648 -0
  125. package/src/v5/mesh-source-features.ts +165 -51
  126. package/src/v5/mesh-source-schema.ts +140 -0
  127. package/src/v5/mesh-source-texture.ts +49 -19
  128. package/src/v5/mesh-source.ts +80 -49
  129. package/src/v5/mesh-tileset-archive.ts +1 -1
  130. package/src/v5/mesh-tileset-sink.ts +2 -2
  131. package/src/v5/mesh.ts +1 -1
  132. package/src/v5/node-cli.ts +201 -0
  133. package/src/v5/node-conversion.ts +362 -0
  134. package/src/v5/node-feature-schema.ts +155 -0
  135. package/src/v5/node-i3s-source.ts +181 -0
  136. package/src/v5/node-source.ts +328 -0
  137. package/src/v5/node.ts +16 -0
  138. package/src/v5/point-cloud-attributes.ts +113 -0
  139. package/src/v5/point-cloud-conversion.ts +1 -1
  140. package/src/v5/point-cloud-copc.ts +289 -0
  141. package/src/v5/point-cloud-file.ts +306 -0
  142. package/src/v5/point-cloud-potree.ts +134 -0
  143. package/src/v5/point-cloud-source-encoder.ts +1 -1
  144. package/src/v5/point-cloud-source.ts +1 -1
  145. package/src/v5/point-cloud-spatial.ts +2 -2
  146. package/src/v5/point-cloud-tileset.ts +137 -0
  147. package/src/v5/point-cloud.ts +3 -3
  148. package/src/v5/resource-fetcher.ts +4 -1
  149. package/src/v5/resource-manifest.ts +40 -5
  150. package/src/v5/selected-mesh-source.ts +384 -0
  151. package/src/v5/spatial-conversion.ts +90 -19
  152. package/src/v5/tileset-source.ts +2 -2
@@ -0,0 +1,19 @@
1
+ import type { Mesh, MeshArrowTable } from '@loaders.gl/core/schema';
2
+ /** Explicit source-name mapping and authorized semantic losses. */
3
+ export interface PointCloudAttributeMapping {
4
+ /** Destination attribute name to source attribute name. Values and normalization remain unchanged. */
5
+ readonly attributes: Readonly<Record<string, string>>;
6
+ /** Source attributes intentionally omitted, each with a nonempty reason. */
7
+ readonly drop?: Readonly<Record<string, string>>;
8
+ }
9
+ /** Decoded mapped rows and a record of every authorized omission. */
10
+ export interface MappedPointCloud {
11
+ /** Mesh with renamed attributes sharing immutable source values. */
12
+ readonly mesh: Mesh;
13
+ /** Explicit source-name/reason pairs, sorted deterministically. */
14
+ readonly droppedAttributes: Readonly<Record<string, string>>;
15
+ }
16
+ /** Maps decoded point attributes without implicit aliases, casts, projection or silent omissions. */
17
+ export declare function mapPointCloudAttributes(input: Mesh | MeshArrowTable, mapping: PointCloudAttributeMapping): MappedPointCloud;
18
+ /** Converts decoded point input after optional retained-buffer accounting and null validation. */
19
+ export declare function getPointCloudMesh(input: Mesh | MeshArrowTable, maxInputBytes?: number): Mesh;
@@ -1,4 +1,4 @@
1
- import type { PointCloudTilesetSource } from '@loaders.gl/tiles';
1
+ import type { PointCloudTilesetSource } from '@loaders.gl/tiles-3d';
2
2
  import type { TileConversionProgress, TileConversionReport, TileConversionSink } from '@loaders.gl/tile-converter/v5/core';
3
3
  import type { PointCloudSourceTile } from '@loaders.gl/tile-converter/v5/core';
4
4
  import type { EncodedPointCloudSourceTile, EncodePointCloudSourceOptions } from './point-cloud-source-encoder.js';
@@ -0,0 +1,44 @@
1
+ import { type COPCWriterOptions } from '@loaders.gl/tiles-3d/copc';
2
+ import type { Mesh, MeshArrowTable } from '@loaders.gl/core/schema';
3
+ import { type TileConversionCodec } from '@loaders.gl/tile-converter/v5/core';
4
+ import { type PointCloudAttributeMapping } from './point-cloud-attributes.js';
5
+ /** Bounded, explicitly placed COPC batch authoring. */
6
+ export interface EncodePointCloudCOPCOptions {
7
+ /** All attribute aliases and semantic omissions must be explicit. */
8
+ readonly mapping: PointCloudAttributeMapping;
9
+ /** LAS axis scales; positions must already be absolute coordinates in the declared CRS. */
10
+ readonly scale: readonly [number, number, number];
11
+ /** LAS axis offsets used for signed int32 quantization. */
12
+ readonly offset: readonly [number, number, number];
13
+ /** Explicit OGC WKT CRS declaration; no inference or reprojection is performed. */
14
+ readonly wkt: string;
15
+ /** Maximum Euclidean quantization error in source units. */
16
+ readonly maxPositionError: number;
17
+ /** Maximum distinct retained source buffer bytes; default 64 MiB. */
18
+ readonly maxInputBytes?: number;
19
+ /** Maximum rows in one batch; default 1000000. */
20
+ readonly maxPoints?: number;
21
+ /** Maximum completed encoded bytes; default 128 MiB. Writer temporary memory is additional. */
22
+ readonly maxOutputBytes?: number;
23
+ /** Explicit LAS Extra Bytes names for custom typed attributes, including exact 64-bit IDs. */
24
+ readonly extraBytes?: NonNullable<COPCWriterOptions['copc']>['extraBytes'];
25
+ /** Optional octree organization forwarded to the owning COPC writer. */
26
+ readonly organization?: Pick<NonNullable<COPCWriterOptions['copc']>, 'nodePointLimit' | 'maximumDepth' | 'hierarchyPageDepth' | 'spacing'>;
27
+ /** Cancellation before validation and before/after synchronous writer execution. */
28
+ readonly signal?: AbortSignal;
29
+ }
30
+ /** A complete COPC file and its explicit precision/loss report. */
31
+ export interface EncodedPointCloudCOPC {
32
+ /** Range-readable COPC 1.0 / LAZ 1.4 bytes. */
33
+ readonly copc: ArrayBuffer;
34
+ /** Exact encoded point count. */
35
+ readonly pointCount: number;
36
+ /** Maximum reconstructed Euclidean position error. */
37
+ readonly maximumPositionError: number;
38
+ /** Authorized attribute omissions and reasons. */
39
+ readonly droppedAttributes: Readonly<Record<string, string>>;
40
+ }
41
+ /** Encodes one decoded point batch as COPC with explicit mappings, CRS and precision gates. */
42
+ export declare function encodePointCloudCOPC(input: Mesh | MeshArrowTable, options: EncodePointCloudCOPCOptions): Promise<EncodedPointCloudCOPC>;
43
+ /** Creates a v5 codec for one independently authored COPC file per decoded input batch. */
44
+ export declare function createCOPCConversionCodec(options: EncodePointCloudCOPCOptions): TileConversionCodec<unknown, Mesh | MeshArrowTable, EncodedPointCloudCOPC>;
@@ -0,0 +1,83 @@
1
+ import type { COPCTileSource, COPCSourceLoaderOptions } from '@loaders.gl/tiles-3d/copc';
2
+ import { PotreeSourceLoader } from '@loaders.gl/tiles-3d/potree';
3
+ import type { PotreeDataset, PotreeWriterNode, PotreeWriterOptions, PotreeSourceLoaderOptions } from '@loaders.gl/tiles-3d/potree';
4
+ import type { Mesh, MeshArrowTable, MeshGeometry } from '@loaders.gl/core/schema';
5
+ /** Explicit local-file input; no format is inferred from an extension. */
6
+ export type OpenPointCloudFileOptions = {
7
+ /** Maximum retained input Blob size. This does not bound decoded heap. */
8
+ readonly maxFileBytes: number;
9
+ /** Cancellation before/after initialization and during archived resource reads. */
10
+ readonly signal?: AbortSignal;
11
+ } & ({
12
+ /** COPC is a native single LAZ file. */
13
+ readonly format: 'copc';
14
+ /** Existing COPC source coordinate and decoder controls. */
15
+ readonly sourceOptions?: COPCSourceLoaderOptions;
16
+ } | {
17
+ /** A loaders.gl STORE ZIP convention, not a native Potree archive standard. */
18
+ readonly format: 'potree-zip';
19
+ /** Maximum ZIP entry count, including metadata; default 100000. */
20
+ readonly maxEntries?: number;
21
+ /** Maximum requested ZIP resource/range bytes; default 64 MiB. */
22
+ readonly maxResourceBytes?: number;
23
+ /** Explicit metadata path when it is not at the ZIP root. */
24
+ readonly metadataPath?: string;
25
+ /** Existing Potree parser controls; the bundle owns its isolated fetch transport. */
26
+ readonly sourceOptions?: PotreeSourceLoaderOptions;
27
+ });
28
+ /** An initialized source with an owned local file lifetime. */
29
+ export interface OpenedPointCloudFile {
30
+ /** Lazy node access through the existing unified source APIs. */
31
+ readonly source: ReturnType<typeof PotreeSourceLoader.createDataSource> | COPCTileSource;
32
+ /** Closes the source and rejects subsequent bundle reads; idempotent. */
33
+ readonly close: () => Promise<void>;
34
+ }
35
+ /** Complete Potree dataset packaging controls. */
36
+ export interface EncodePotreeArchiveOptions {
37
+ /** Existing dataset version, precision, hierarchy and encoded-byte limits. */
38
+ readonly potree?: PotreeWriterOptions['potree'];
39
+ /** Maximum completed STORE ZIP32 bytes, checked before archive allocation. */
40
+ readonly maxArchiveBytes: number;
41
+ }
42
+ /**
43
+ * Writes a complete Potree 1.x/2.0 dataset to a deterministic uncompressed ZIP32 Blob.
44
+ * This is a loaders.gl bundle convention, not a native Potree archive standard. Metadata sits
45
+ * at the root with original relative resource paths. Writer version/attribute/precision gates
46
+ * apply. Inputs, dataset bytes, ZIP temporaries and the returned Blob are separate memory.
47
+ * @param input - Decoded points or caller-organized additive nodes; no LOD sampling is inferred.
48
+ * @param options - Dataset writer controls and final archive budget.
49
+ * @returns A downloadable ZIP Blob that openPointCloudFile can read incrementally.
50
+ */
51
+ export declare function encodePotreeArchive(input: Mesh | MeshArrowTable | readonly PotreeWriterNode[], options: EncodePotreeArchiveOptions): Promise<Blob>;
52
+ /** Packages already encoded Potree files without encoding or sampling points a second time. */
53
+ export declare function encodePotreeDatasetArchive(dataset: PotreeDataset, maxArchiveBytes: number, signal?: AbortSignal): Promise<Blob>;
54
+ /**
55
+ * Opens a COPC Blob or a Potree STORE ZIP without extracting the complete dataset.
56
+ * ZIP directory/local headers are checked before constructing the Potree source; modern node
57
+ * requests slice only their archived byte ranges. DEFLATE, encrypted entries, ambiguous
58
+ * metadata and noncanonical paths fail explicitly. Partial reads do not verify whole-entry CRCs.
59
+ * Legacy Potree retains its existing coordinate behavior; modern Potree retains native coordinates.
60
+ * COPC uses its existing source coordinate policy. Applications own CRS preparation and conversion.
61
+ * @param input - Immutable local file/Blob, bounded by maxFileBytes.
62
+ * @param options - Explicit format, source controls and archive transport limits.
63
+ * @returns An initialized lazy source; close it when conversion finishes.
64
+ */
65
+ export declare function openPointCloudFile(input: Blob, options: OpenPointCloudFileOptions): Promise<OpenedPointCloudFile>;
66
+ /** Explicit opt-in mesh-to-point selection. */
67
+ export interface ExtractMeshVerticesOptions {
68
+ /** Attribute names to retain in addition to POSITION; all other semantics are omitted explicitly. */
69
+ readonly attributes: readonly string[];
70
+ /** Maximum stored vertices, not expanded triangle corners. */
71
+ readonly maxPoints: number;
72
+ }
73
+ /**
74
+ * Harvests one point per stored vertex from already placed triangle geometry.
75
+ * Does not expand indices, deduplicate coincident vertices or sample triangle interiors. Output
76
+ * shares immutable attribute arrays. Materials, features, topology and unselected attributes are
77
+ * discarded by this explicit opt-in; select compatible attributes before destination encoding.
78
+ * For tiles, use the mesh source adapters first so node/RTC/tile transforms are applied once.
79
+ * @param mesh - Decoded triangle geometry in the desired absolute coordinate frame.
80
+ * @param options - Explicit retained attributes and stored-vertex count budget.
81
+ * @returns An unindexed point Mesh ready for point-cloud writers or the dynamic tiler.
82
+ */
83
+ export declare function extractMeshVertices(mesh: MeshGeometry, options: ExtractMeshVerticesOptions): Mesh;
@@ -0,0 +1,47 @@
1
+ import type { Mesh, MeshArrowTable } from '@loaders.gl/core/schema';
2
+ import { type PointCloudTilerOptions } from '@loaders.gl/core/schema-utils';
3
+ import type { PotreeDataset, PotreeWriterOptions } from '@loaders.gl/tiles-3d/potree';
4
+ /** Bounded authoring of one decoded dataset in its already placed native coordinates. */
5
+ export interface ConvertPointCloudToPotreeOptions {
6
+ /** Explicit CRS declaration written verbatim; coordinates are not reprojected. */
7
+ readonly projection: string;
8
+ /** Maximum bytes retained across all gathered node attribute buffers. */
9
+ readonly maxGatheredBytes: number;
10
+ /** Maximum complete encoded dataset bytes, including metadata and hierarchy. */
11
+ readonly maxOutputBytes: number;
12
+ /** Input, index, per-node and node-count limits of the shared dynamic tiler. */
13
+ readonly tiling?: Omit<PointCloudTilerOptions, 'signal'>;
14
+ /** Existing version, precision, spacing and hierarchy controls. */
15
+ readonly potree?: Omit<NonNullable<PotreeWriterOptions['potree']>, 'projection' | 'signal' | 'maxOutputBytes'>;
16
+ /** Also package the completed files as a loaders.gl STORE ZIP32 bundle. */
17
+ readonly archive?: {
18
+ readonly maxArchiveBytes: number;
19
+ };
20
+ /** Cooperative cancellation during indexing, gathering, writing and packaging. */
21
+ readonly signal?: AbortSignal;
22
+ }
23
+ /** Complete Potree files; no partial dataset is returned after a failure. */
24
+ export interface ConvertedPointCloudPotree {
25
+ /** Exact input row count, emitted once across the additive octree. */
26
+ readonly pointCount: number;
27
+ /** Number of connected octree nodes, including an empty root for empty input. */
28
+ readonly nodeCount: number;
29
+ /** Metadata and encoded resources; applications own storage. */
30
+ readonly dataset: PotreeDataset;
31
+ /** Optional downloadable bundle; applications own object URL and saving lifetimes. */
32
+ readonly archive?: Blob;
33
+ }
34
+ /**
35
+ * Connects the portable point tiler to the existing Potree 1.x/2.0 dataset writer.
36
+ * Retains additive octree addresses and every source row exactly once, including terminal
37
+ * overflow. Input must be immutable, unindexed decoded points already placed in the declared
38
+ * CRS. No origins, transforms, reprojection, attribute mappings or surface sampling are inferred.
39
+ * The writer rejects attributes or precision that the selected version cannot represent.
40
+ * Gathered nodes are bounded separately from source buffers, indexes, encoded output and ZIP
41
+ * temporaries. This is in-memory authoring, not streaming ingestion or a peak-heap guarantee.
42
+ * The shared tiler's sample coverage bound is not a qualified viewer LOD/error contract.
43
+ * @param input - One decoded point Mesh or MeshArrowTable, including loader output.
44
+ * @param options - Explicit native CRS, resource budgets and existing writer controls.
45
+ * @returns A complete dataset and optional bundle after releasing the owned tiler.
46
+ */
47
+ export declare function convertPointCloudToPotree(input: Mesh | MeshArrowTable, options: ConvertPointCloudToPotreeOptions): Promise<ConvertedPointCloudPotree>;
@@ -1,4 +1,4 @@
1
- import type { PointCloudBoundingVolume, PointCloudCoordinateSystem, PointCloudTilesetSource, TilesetSpatialReference } from '@loaders.gl/tiles';
1
+ import type { PointCloudBoundingVolume, PointCloudCoordinateSystem, PointCloudTilesetSource, TilesetSpatialReference } from '@loaders.gl/tiles-3d';
2
2
  import type { PointCloudSpatialOptions } from './point-cloud-spatial.js';
3
3
  import type { EncodePointCloudTileOptions, EncodedPointCloudTile } from './point-cloud.js';
4
4
  import type { PointCloudSourceTile, TraversePointCloudSourceOptions } from '@loaders.gl/tile-converter/v5/core';
@@ -1,4 +1,4 @@
1
- import type { PointCloudTileContent, PointCloudTileHeader, PointCloudTilesetSource } from '@loaders.gl/tiles';
1
+ import type { PointCloudTileContent, PointCloudTileHeader, PointCloudTilesetSource } from '@loaders.gl/tiles-3d';
2
2
  /** A source tile and its decoded point content, including null content when no payload exists. */
3
3
  export type PointCloudSourceTile = {
4
4
  /** Header with the source tile's hierarchy, bounds, and LOD metadata. */
@@ -0,0 +1,44 @@
1
+ import type { Mesh, MeshArrowTable } from '@loaders.gl/core/schema';
2
+ import type { PointCloudTilerOptions } from '@loaders.gl/core/schema-utils';
3
+ import type { TilesetSpatialReference } from '@loaders.gl/tiles-3d';
4
+ import type { BrowserTileConversionFile, TileConversionProgress, TileConversionReport } from '@loaders.gl/tile-converter/v5/core';
5
+ import type { PointCloudTilesetSinkOptions } from './point-cloud-tileset-sink.js';
6
+ import type { TileConversionArchiveOptions } from './conversion-archive.js';
7
+ /** Bounded authoring of a complete decoded ECEF point dataset. */
8
+ export interface ConvertPointCloudToTilesetOptions extends PointCloudTilesetSinkOptions {
9
+ /** Explicit native EPSG:4978 XYZ meters with ellipsoidal heights. No CRS is inferred. */
10
+ readonly spatialReference: TilesetSpatialReference;
11
+ /** In-memory input, index, gathered-tile and node limits; defaults belong to PointCloudTiler. */
12
+ readonly tiling?: Omit<PointCloudTilerOptions, 'signal'>;
13
+ /** Also create an indexed 3TZ Blob within this final archive-size budget. */
14
+ readonly archive?: Pick<TileConversionArchiveOptions, 'maxArchiveBytes'>;
15
+ /** Cooperative cancellation during indexing, traversal, encoding and packaging. */
16
+ readonly signal?: AbortSignal;
17
+ /** PNTS conversion progress; excludes tileset JSON and optional archive packaging. */
18
+ readonly onProgress?: (progress: TileConversionProgress) => void;
19
+ }
20
+ /** Completed point authoring result; no partial files are returned on failure. */
21
+ export interface ConvertedPointCloudTileset {
22
+ /** Exact number of input points, each emitted once across the complete collection. */
23
+ readonly pointCount: number;
24
+ /** PNTS resource counts and bytes; input bytes count gathered Arrow column buffers. */
25
+ readonly report: TileConversionReport;
26
+ /** PNTS resources and tileset.json, including JSON in the retained output byte budget. */
27
+ readonly files: readonly BrowserTileConversionFile[];
28
+ /** Optional indexed 3TZ Blob. Applications own saving and object URL lifetimes. */
29
+ readonly archive?: Blob;
30
+ }
31
+ /**
32
+ * Tiles decoded point Mesh/Arrow data and authors a flat additive 3D Tiles 1.0 collection.
33
+ * All input rows are emitted once, including remaining rows at the tiler's maximum depth.
34
+ * Per-tile RTC centers reduce float32 rounding; geometricError gates measured reconstruction error.
35
+ * The flat collection does not preserve octree LOD or provide a sampling-error guarantee.
36
+ * Input must remain immutable until completion. Arrow normalization can copy buffers; retained
37
+ * input, row indexes, gathered tiles, output Blobs and optional ZIP temporaries are separate memory.
38
+ * This is bounded in-memory authoring, not streaming ingestion or an out-of-core converter.
39
+ * Unsupported PNTS attributes fail; callers must explicitly map or remove them beforehand.
40
+ * @param input - One decoded unindexed point-list with finite floating-point XYZ positions.
41
+ * @param options - Explicit ECEF frame, precision and resource limits, and optional 3TZ packaging.
42
+ * @returns Completed files and report after releasing the privately owned dynamic source.
43
+ */
44
+ export declare function convertPointCloudToTileset(input: Mesh | MeshArrowTable, options: ConvertPointCloudToTilesetOptions): Promise<ConvertedPointCloudTileset>;
@@ -1,4 +1,4 @@
1
- import type { Mesh, MeshArrowTable, MeshAttribute } from '@loaders.gl/schema';
1
+ import type { Mesh, MeshArrowTable, MeshAttribute } from '@loaders.gl/core/schema';
2
2
  /** Options for encoding one Arrow or mesh point batch as a 3D Tiles point tile. */
3
3
  export interface EncodePointCloudTileOptions {
4
4
  /** Optional origin subtracted from absolute positions and stored as the PNTS RTC_CENTER. */
@@ -32,6 +32,14 @@ export interface ManifestBackedTileConversionSinkOptions<TResource> {
32
32
  readonly sink: TileConversionSink<TResource>;
33
33
  /** Persistence adapter for snapshots written after each resource. */
34
34
  readonly manifestStore: TileResourceManifestStore;
35
+ /** Optional cap on unique checkpoint entries loaded or written; defaults to no cap. */
36
+ readonly maxResources?: number;
37
+ /**
38
+ * Checks destination bytes before skipping a matching checkpoint. Return true only when
39
+ * stored bytes match the entry's size and fingerprint; false rewrites the resource.
40
+ * Without this callback the caller guarantees checkpointed destination bytes remain intact.
41
+ */
42
+ readonly verifyResource?: (entry: TileResourceManifestEntry, signal?: AbortSignal) => Promise<boolean>;
35
43
  /** Stable profile-specific path or resource key. */
36
44
  readonly getResourceId: (resource: TResource) => string;
37
45
  /** Byte length used to detect changed content under an existing resource ID. */
@@ -50,7 +58,8 @@ export interface ManifestBackedTileConversionSinkOptions<TResource> {
50
58
  * including writes skipped because the matching resource was already present. A graceful abort
51
59
  * clears the manifest checkpoint before asking the destination to clean partial output, so the
52
60
  * next run starts cleanly. A process interruption that does not call `abort` can resume from its
53
- * last saved checkpoint.
61
+ * last saved checkpoint. Optional destination verification repairs missing or changed stored
62
+ * resources before treating them as complete. maxResources caps unique checkpoint entries.
54
63
  *
55
64
  * @param options - Destination, manifest store, stable IDs, byte measurement, and fingerprinting.
56
65
  * @returns A `TileConversionSink` with resumable per-resource progress.
@@ -0,0 +1,53 @@
1
+ import type { DracoLibraryOptions } from '@loaders.gl/draco/bundled';
2
+ import { createTiles3DConversionSpatialContext } from '@loaders.gl/tile-converter/v5/core';
3
+ import type { BrowserTilesetConversionInspection, BrowserTilesetConversionInputResource, TileConversionSource } from '@loaders.gl/tile-converter/v5/core';
4
+ import type { MeshSourceResource, MeshSourceFeatureOptions } from '@loaders.gl/tile-converter/v5/adapters';
5
+ /** Required transport, decoded geometry, retained output, and archive budgets for this demo. */
6
+ export declare const SELECTED_MESH_LIMITS: {
7
+ /** Root JSON plus selected content transport bytes; also the decoded geometry/image/feature byte gate. */
8
+ readonly maxInputBytes: number;
9
+ /** Maximum declared content placements inspected. */
10
+ readonly maxInputResources: 1000;
11
+ /** Maximum inspected root/external document placements. */
12
+ readonly maxTilesetDocuments: 32;
13
+ /** Maximum explicitly selected content placements in one partial archive. */
14
+ readonly maxSelectedResources: 64;
15
+ /** Maximum primitive placements authored across all selected contents. */
16
+ readonly maxMeshResources: 64;
17
+ /** Maximum retained file bytes and final archive bytes. */
18
+ readonly maxOutputBytes: number;
19
+ /** Maximum measured reconstruction error in meters. */
20
+ readonly maxPositionError: 0.01;
21
+ };
22
+ /** Injected transport and decoder assets for the bounded selected mesh profile. */
23
+ export interface SelectedMeshSourceOptions {
24
+ /** Require a complete qualified explicit tree; pair with createMeshHierarchyTilesetSink. */
25
+ readonly preserveHierarchy?: boolean;
26
+ /** Inspected content placement identifiers; one to 64 distinct selections. */
27
+ readonly resourceIds: readonly string[];
28
+ /** Cancellation across qualification, raw reads and decoding. */
29
+ readonly signal: AbortSignal;
30
+ /** Application-owned decoder asset locations or modules. */
31
+ readonly dracoLibraryOptions: DracoLibraryOptions;
32
+ /** Transport for decoded buffers/images, confined by a platform adapter when local. */
33
+ readonly fetcher?: typeof fetch;
34
+ /** Optional source owning the raw input lifetime, such as a Node file/archive adapter. */
35
+ readonly source?: TileConversionSource<BrowserTilesetConversionInspection, BrowserTilesetConversionInputResource>;
36
+ /** Explicit feature mapping, or the qualified inline structural metadata profile. */
37
+ readonly features?: MeshSourceFeatureOptions;
38
+ /** Lower the shared 16 MiB transport and decoded mesh limit. */
39
+ readonly maxInputBytes?: number;
40
+ }
41
+ /** Qualified selected-mesh decoding and source error policy. */
42
+ export interface SelectedMeshConversionSource {
43
+ /** Lazy source that releases each dedicated mesh runtime after use. */
44
+ readonly source: TileConversionSource<BrowserTilesetConversionInspection, MeshSourceResource>;
45
+ /** Native ECEF coordinate context, qualified before reading mesh content. */
46
+ readonly spatialContext: ReturnType<typeof createTiles3DConversionSpatialContext>;
47
+ /** Conservative metric source error plus the position reconstruction allowance. */
48
+ readonly geometricError: number;
49
+ }
50
+ /** Qualifies and constructs a lazy selected mesh source without platform I/O or output ownership. */
51
+ export declare function createSelectedMeshConversionSource(inspection: BrowserTilesetConversionInspection, options: SelectedMeshSourceOptions): Promise<SelectedMeshConversionSource>;
52
+ /** Charges geometry, encoded image bytes, triangle associations and Arrow columns after extraction. */
53
+ export declare function measureMeshBytes(resource: MeshSourceResource): number;
@@ -1,4 +1,4 @@
1
- import type { CreateTilesetSpatialReferenceOptions, I3SSpatialBounds, I3STransformedPositions, I3STransformedGeometry, Tiles3DSpatialBoundingVolume, TilesetSpatialOptions, TilesetSpatialReference } from '@loaders.gl/tiles';
1
+ import type { CreateTilesetSpatialReferenceOptions, I3SSpatialBounds, I3STransformedPositions, I3STransformedGeometry, Tiles3DSpatialBoundingVolume, TilesetSpatialOptions, TilesetSpatialReference } from '@loaders.gl/tiles-3d';
2
2
  /** Portable coordinate operations and output metadata for a 3D Tiles conversion. */
3
3
  export interface Tiles3DConversionSpatialContext {
4
4
  /** Source and selected target CRS, height reference, units, and transformation state. */
@@ -1,4 +1,4 @@
1
- import type { Tileset3D, TilesetContentTraversalItem, TilesetSourceMetadata, TraverseTilesetContentsOptions } from '@loaders.gl/tiles';
1
+ import type { Tileset3D, TilesetContentTraversalItem, TilesetSourceMetadata, TraverseTilesetContentsOptions } from '@loaders.gl/tiles-3d';
2
2
  import type { TileConversionSource } from './conversion-api.js';
3
3
  /** Decoded-content lifetime options for source-backed conversion. */
4
4
  export type TilesetConversionSourceOptions = Pick<TraverseTilesetContentsOptions, 'unloadContent'>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/tile-converter",
3
- "version": "5.0.0-alpha.11",
3
+ "version": "5.0.0-alpha.14",
4
4
  "description": "Converter",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -44,12 +44,18 @@
44
44
  "types": "./dist/v5/adapters.d.ts",
45
45
  "import": "./dist/v5/adapters.js",
46
46
  "require": "./dist/v5/adapters.cjs"
47
+ },
48
+ "./v5/node": {
49
+ "types": "./dist/v5/node.d.ts",
50
+ "import": "./dist/v5/node.js",
51
+ "require": "./dist/v5/node.cjs"
47
52
  }
48
53
  },
49
54
  "sideEffects": false,
50
55
  "bin": {
51
56
  "i3s-server": "./bin/i3s-server.js",
52
- "tile-converter": "./bin/converter.js"
57
+ "tile-converter": "./bin/converter.js",
58
+ "tile-converter-v5": "./bin/converter-v5.js"
53
59
  },
54
60
  "files": [
55
61
  "src",
@@ -58,7 +64,6 @@
58
64
  "README.md"
59
65
  ],
60
66
  "browser": {
61
- "archiver": false,
62
67
  "fs": false,
63
68
  "join-images": false,
64
69
  "path": false,
@@ -71,41 +76,29 @@
71
76
  "build-converter-bundle": "esbuild src/v4/converter-cli.ts --outfile=dist/converter.min.cjs --platform=node --target=esnext,node14 --external:join-images --minify --bundle --define:__VERSION__=\\\"$npm_package_version\\\"",
72
77
  "build-i3s-server-bundle": "esbuild src/v4/i3s-server/bin/www.ts --outfile=dist/i3s-server/bin/i3s-server.min.cjs --platform=node --target=esnext,node14 --minify --bundle --define:__VERSION__=\\\"$npm_package_version\\\"",
73
78
  "copy-certificates": "cp -R src/v4/i3s-server/certs dist/i3s-server",
74
- "build-v5-entrypoints": "esbuild src/v5/core.ts src/v5/adapters.ts src/v5/index.ts src/v5/browser.ts --bundle --packages=external --external:@loaders.gl/* --platform=browser --outdir=dist/v5 --format=esm && esbuild src/v5/core.ts src/v5/adapters.ts src/v5/index.ts src/v5/browser.ts --bundle --packages=external --external:@loaders.gl/* --platform=browser --outdir=dist/v5 --format=cjs --out-extension:.js=.cjs"
79
+ "build-v5-entrypoints": "esbuild src/v5/core.ts src/v5/adapters.ts src/v5/index.ts src/v5/browser.ts --bundle --packages=external --external:@loaders.gl/* --platform=browser --outdir=dist/v5 --format=esm && esbuild src/v5/core.ts src/v5/adapters.ts src/v5/index.ts src/v5/browser.ts --bundle --packages=external --external:@loaders.gl/* --platform=browser --outdir=dist/v5 --format=cjs --out-extension:.js=.cjs && esbuild src/v5/node.ts src/v5/converter-cli.ts --bundle --packages=external --external:@loaders.gl/* --platform=node --outdir=dist/v5 --format=esm && esbuild src/v5/node.ts --bundle --packages=external --external:@loaders.gl/* --platform=node --outdir=dist/v5 --format=cjs --out-extension:.js=.cjs"
75
80
  },
76
81
  "dependencies": {
77
- "@loaders.gl/3d-tiles": "5.0.0-alpha.11",
78
- "@loaders.gl/compression": "5.0.0-alpha.11",
79
- "@loaders.gl/crypto": "5.0.0-alpha.11",
80
- "@loaders.gl/draco": "5.0.0-alpha.11",
81
- "@loaders.gl/gltf": "5.0.0-alpha.11",
82
- "@loaders.gl/i3s": "5.0.0-alpha.11",
83
- "@loaders.gl/images": "5.0.0-alpha.11",
84
- "@loaders.gl/loader-utils": "5.0.0-alpha.11",
85
- "@loaders.gl/polyfills": "5.0.0-alpha.11",
86
- "@loaders.gl/schema": "5.0.0-alpha.11",
87
- "@loaders.gl/schema-utils": "5.0.0-alpha.11",
88
- "@loaders.gl/textures": "5.0.0-alpha.11",
89
- "@loaders.gl/tiles": "5.0.0-alpha.11",
90
- "@loaders.gl/worker-utils": "5.0.0-alpha.11",
91
- "@loaders.gl/zip": "5.0.0-alpha.11",
92
- "@math.gl/core": "5.0.0-alpha.15",
93
- "@math.gl/crs": "5.0.0-alpha.15",
94
- "@math.gl/culling": "5.0.0-alpha.15",
95
- "@math.gl/geoid": "5.0.0-alpha.15",
96
- "@math.gl/geometry-utils": "5.0.0-alpha.15",
97
- "@math.gl/geospatial": "5.0.0-alpha.15",
82
+ "@loaders.gl/archives": "5.0.0-alpha.14",
83
+ "@loaders.gl/compression": "5.0.0-alpha.14",
84
+ "@loaders.gl/core": "5.0.0-alpha.14",
85
+ "@loaders.gl/crypto": "5.0.0-alpha.14",
86
+ "@loaders.gl/draco": "5.0.0-alpha.14",
87
+ "@loaders.gl/gltf": "5.0.0-alpha.14",
88
+ "@loaders.gl/images": "5.0.0-alpha.14",
89
+ "@loaders.gl/textures": "5.0.0-alpha.14",
90
+ "@loaders.gl/tiles": "5.0.0-alpha.14",
91
+ "@loaders.gl/tiles-3d": "5.0.0-alpha.14",
92
+ "@math.gl/core": "5.0.0-alpha.20",
93
+ "@math.gl/earth": "5.0.0-alpha.20",
94
+ "@math.gl/geometry": "5.0.0-alpha.20",
95
+ "@math.gl/geospatial": "5.0.0-alpha.20",
98
96
  "ajv": "^8.12.0",
99
- "archiver": "^5.0.0",
100
97
  "cors": "^2.8.5",
101
- "crypt": "^0.0.2",
102
98
  "debug": "~4.3.4",
103
99
  "express": "~4.19.2",
104
100
  "inquirer": "^8.0.0",
105
- "json-map-transform": "^1.2.6",
106
- "md5": "^2.3.0",
107
- "morgan": "~1.9.1",
108
- "uuid": "^9.0.0"
101
+ "morgan": "~1.12.1"
109
102
  },
110
103
  "quarantinedDependencies": {
111
104
  "join-images": "^1.1.3",
@@ -119,5 +112,5 @@
119
112
  "peerDependencies": {
120
113
  "@loaders.gl/core": "~5.0.0-alpha.0"
121
114
  },
122
- "gitHead": "e9694544adb0bc7dac68a35adbc8bdae35f64dae"
115
+ "gitHead": "226b7bca7ecb3684b7386487ee76565ca240d7d9"
123
116
  }
package/src/index.ts CHANGED
@@ -1 +1,4 @@
1
- export * from './v4/index.js';
1
+ export {
2
+ I3SConverter,
3
+ Tiles3DConverter
4
+ } from './v4/index.js';
@@ -4,15 +4,14 @@ import type {
4
4
  NodeReference,
5
5
  I3STilesetHeader,
6
6
  I3STileAttributes
7
- } from '@loaders.gl/i3s';
8
- import type {Tile3DBoundingVolume, Tiles3DTileJSON} from '@loaders.gl/3d-tiles';
7
+ } from '@loaders.gl/tiles-3d/i3s';
8
+ import type {Tile3DBoundingVolume, Tiles3DTileJSON} from '@loaders.gl/tiles-3d/3d-tiles';
9
9
 
10
10
  import {join} from 'path';
11
11
  import process from 'process';
12
- import transform from 'json-map-transform';
13
12
  import {load, isBrowser} from '@loaders.gl/core';
14
- import {I3SLoader, I3SAttributeLoader, COORDINATE_SYSTEM} from '@loaders.gl/i3s';
15
- import {Geoid} from '@math.gl/geoid';
13
+ import {I3SLoader, I3SAttributeLoader, COORDINATE_SYSTEM} from '@loaders.gl/tiles-3d/i3s';
14
+ import {Geoid} from '@math.gl/earth/geoid';
16
15
 
17
16
  import {validateI3SConversionSpatialReference} from './helpers/validate-i3s-spatial-reference';
18
17
  import {PGMLoader} from '../pgm-loader';
@@ -20,18 +19,18 @@ import {i3sObbTo3dTilesObb} from './helpers/i3s-obb-to-3d-tiles-obb';
20
19
  import {convertScreenThresholdToGeometricError} from '../lib/utils/lod-conversion-utils';
21
20
  import {writeFile, removeDir} from '../lib/utils/file-utils';
22
21
  import {calculateDatasetSize, timeConverter} from '../lib/utils/statistic-utils';
23
- import {TILESET as tilesetTemplate} from './json-templates/tileset';
22
+ import {createTileset} from './json-templates/tileset';
24
23
  import {createObbFromMbs} from '../i3s-converter/helpers/coordinate-converter';
25
- import {WorkerFarm} from '@loaders.gl/worker-utils';
24
+ import {WorkerFarm} from '@loaders.gl/core/worker-utils';
26
25
  import {BROWSER_ERROR_MESSAGE} from '../constants';
27
26
  import {
28
27
  Tiles3DContentConverter,
29
28
  type I3SAttributesData
30
29
  } from './helpers/3d-tiles-content-converter';
31
- import {I3STileHeader} from '@loaders.gl/i3s/src/types';
30
+ import type {I3STileHeader} from '@loaders.gl/tiles-3d/i3s';
32
31
  import {getNodeCount, loadFromArchive, loadI3SContent, openSLPK} from './helpers/load-i3s';
33
- import {I3SLoaderOptions} from '@loaders.gl/i3s/src/i3s-loader';
34
- import {ZipFileSystem} from '../../../zip/src';
32
+ import type {I3SLoaderOptions} from '@loaders.gl/tiles-3d/i3s';
33
+ import type {ZipFileSystem} from '@loaders.gl/archives/zip';
35
34
  import {ConversionDump, ConversionDumpOptions} from '../lib/utils/conversion-dump';
36
35
  import {Progress} from '../i3s-converter/helpers/progress';
37
36
  import {PromptModule} from 'inquirer';
@@ -61,7 +60,7 @@ export default class Tiles3DConverter {
61
60
  i3s: {coordinateSystem: COORDINATE_SYSTEM.LNGLAT_OFFSETS, decodeTextures: false},
62
61
  // We need to load local fs workers because nodejs can't load workers from the Internet
63
62
  'i3s-content': {
64
- workerUrl: './modules/i3s/dist/i3s-content-worker-node.js'
63
+ workerUrl: './modules/tiles-3d/dist/i3s-content-worker-node.js'
65
64
  }
66
65
  };
67
66
  conversionDump: ConversionDump;
@@ -204,7 +203,7 @@ export default class Tiles3DConverter {
204
203
 
205
204
  await this._addChildren(rootNode, rootTile, 1);
206
205
 
207
- const tileset = transform({asset: {version: outputVersion}, root: rootTile}, tilesetTemplate());
206
+ const tileset = createTileset({asset: {version: outputVersion}, root: rootTile});
208
207
  await writeFile(this.tilesetPath, JSON.stringify(tileset), 'tileset.json');
209
208
  await this.conversionDump.deleteDumpFile();
210
209
 
@@ -1,4 +1,8 @@
1
- import type {I3STileContent, AttributeStorageInfo, I3STileAttributes} from '@loaders.gl/i3s';
1
+ import type {
2
+ I3STileContent,
3
+ AttributeStorageInfo,
4
+ I3STileAttributes
5
+ } from '@loaders.gl/tiles-3d/i3s';
2
6
  import {encodeSync} from '@loaders.gl/core';
3
7
  import {
4
8
  GLTFScenegraph,
@@ -7,9 +11,9 @@ import {
7
11
  createExtMeshFeatures,
8
12
  type PropertyAttribute
9
13
  } from '@loaders.gl/gltf';
10
- import {Tile3DWriter, TILE3D_TYPE} from '@loaders.gl/3d-tiles';
14
+ import {Tile3DWriter, TILE3D_TYPE} from '@loaders.gl/tiles-3d/3d-tiles';
11
15
  import {Matrix4, Vector3} from '@math.gl/core';
12
- import {isTypedArray} from '@math.gl/types';
16
+ import {isTypedArray} from '@math.gl/core/types';
13
17
  import {Ellipsoid} from '@math.gl/geospatial';
14
18
  import {convertTextureAtlas} from './texture-atlas';
15
19
  import {generateSyntheticIndices} from '../../lib/utils/geometry-utils';
@@ -1,6 +1,6 @@
1
1
  import {Vector3} from '@math.gl/core';
2
2
  import {Ellipsoid} from '@math.gl/geospatial';
3
- import {OrientedBoundingBox} from '@math.gl/culling';
3
+ import {makeOrientedBoundingBoxFromQuaternion} from '@math.gl/geometry/culling';
4
4
  // @ts-expect-error
5
5
  import {GeoidHeightModel} from '@loaders.gl/tile-converter/lib/geoid-height-model';
6
6
 
@@ -24,7 +24,7 @@ export function i3sObbTo3dTilesObb(
24
24
  i3SObb.center[2] + geoidHeightModel.getHeight(i3SObb.center[1], i3SObb.center[0])
25
25
  ];
26
26
  const cartesianCenter = Ellipsoid.WGS84.cartographicToCartesian(tiles3DCenter, new Vector3());
27
- const tiles3DObb = new OrientedBoundingBox().fromCenterHalfSizeQuaternion(
27
+ const tiles3DObb = makeOrientedBoundingBoxFromQuaternion(
28
28
  cartesianCenter,
29
29
  i3SObb.halfSize,
30
30
  i3SObb.quaternion
@@ -6,9 +6,9 @@ import {
6
6
  I3SLoader,
7
7
  I3SLoaderOptions,
8
8
  parseSLPKArchive
9
- } from '@loaders.gl/i3s';
10
- import {NodeFile} from '@loaders.gl/loader-utils';
11
- import {ZipFileSystem, makeZipCDHeaderIterator} from '@loaders.gl/zip';
9
+ } from '@loaders.gl/tiles-3d/i3s';
10
+ import {NodeFile} from '@loaders.gl/core/loader-utils';
11
+ import {ZipFileSystem} from '@loaders.gl/archives/zip';
12
12
 
13
13
  export type SLPKUrlParts = {slpkFileName: string; internalFileName: string};
14
14
 
@@ -116,9 +116,7 @@ export async function getNodeCount(fileSystem: ZipFileSystem | null): Promise<nu
116
116
  return 0;
117
117
  }
118
118
  const nodeSet = new Set();
119
- const filesIterator = makeZipCDHeaderIterator(fileSystem.file);
120
- for await (const file of filesIterator) {
121
- const filename = file.fileName;
119
+ for (const filename of await fileSystem.readdir()) {
122
120
  const nodeNumberSearchResult = /^nodes\/(\d+)\//.exec(filename);
123
121
  if (nodeNumberSearchResult) {
124
122
  nodeSet.add(nodeNumberSearchResult[1]);
@@ -1,4 +1,4 @@
1
- import type {TypedArray} from '@loaders.gl/loader-utils';
1
+ import type {TypedArray} from '@loaders.gl/core/loader-utils';
2
2
 
3
3
  /**
4
4
  * Apply uvRegions to texture coordinates.
@@ -2,8 +2,8 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright vis.gl contributors
4
4
 
5
- import {parseWKTCRS, type WKTCRSNode} from '@math.gl/crs';
6
- import {getSpatialCoordinateFrame} from '@loaders.gl/tiles';
5
+ import {parseWKTCRS, type WKTCRSNode} from '@math.gl/geospatial/crs';
6
+ import {getSpatialCoordinateFrame} from '@loaders.gl/tiles-3d';
7
7
 
8
8
  /** Horizontal CRS declarations consumed by the legacy I3S converter. */
9
9
  export type I3SConversionSpatialReference = {