@loaders.gl/3d-tiles 4.1.0-alpha.2 → 4.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/3d-tiles-archive/3d-tiles-archive-archive.d.ts.map +1 -1
- package/dist/3d-tiles-archive/3d-tiles-archive-archive.js.map +1 -1
- package/dist/3d-tiles-archive/3d-tiles-archive-parser.d.ts.map +1 -1
- package/dist/3d-tiles-archive/3d-tiles-archive-parser.js.map +1 -1
- package/dist/3d-tiles-archive-loader.d.ts.map +1 -1
- package/dist/3d-tiles-archive-loader.js +1 -1
- package/dist/3d-tiles-archive-loader.js.map +1 -1
- package/dist/cesium-ion-loader.d.ts.map +1 -1
- package/dist/cesium-ion-loader.js.map +1 -1
- package/dist/dist.dev.js +111 -44
- package/dist/index.cjs +29 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/classes/helpers/tile-3d-accessor-utils.d.ts.map +1 -1
- package/dist/lib/classes/helpers/tile-3d-accessor-utils.js.map +1 -1
- package/dist/lib/classes/tile-3d-batch-table-hierarchy.d.ts.map +1 -1
- package/dist/lib/classes/tile-3d-batch-table-hierarchy.js.map +1 -1
- package/dist/lib/classes/tile-3d-batch-table.d.ts.map +1 -1
- package/dist/lib/classes/tile-3d-batch-table.js.map +1 -1
- package/dist/lib/classes/tile-3d-feature-table.d.ts.map +1 -1
- package/dist/lib/classes/tile-3d-feature-table.js.map +1 -1
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/encoders/encode-3d-tile-batched-model.d.ts.map +1 -1
- package/dist/lib/encoders/encode-3d-tile-batched-model.js.map +1 -1
- package/dist/lib/encoders/encode-3d-tile-composite.d.ts.map +1 -1
- package/dist/lib/encoders/encode-3d-tile-composite.js.map +1 -1
- package/dist/lib/encoders/encode-3d-tile-instanced-model.d.ts.map +1 -1
- package/dist/lib/encoders/encode-3d-tile-instanced-model.js.map +1 -1
- package/dist/lib/encoders/encode-3d-tile-point-cloud.d.ts.map +1 -1
- package/dist/lib/encoders/encode-3d-tile-point-cloud.js.map +1 -1
- package/dist/lib/encoders/encode-3d-tile.d.ts.map +1 -1
- package/dist/lib/encoders/encode-3d-tile.js.map +1 -1
- package/dist/lib/encoders/helpers/encode-3d-tile-header.d.ts.map +1 -1
- package/dist/lib/encoders/helpers/encode-3d-tile-header.js.map +1 -1
- package/dist/lib/filesystems/tiles-3d-archive-file-system.d.ts.map +1 -1
- package/dist/lib/filesystems/tiles-3d-archive-file-system.js.map +1 -1
- package/dist/lib/ion/ion.d.ts.map +1 -1
- package/dist/lib/ion/ion.js.map +1 -1
- package/dist/lib/parsers/helpers/normalize-3d-tile-colors.d.ts.map +1 -1
- package/dist/lib/parsers/helpers/normalize-3d-tile-colors.js.map +1 -1
- package/dist/lib/parsers/helpers/normalize-3d-tile-normals.d.ts.map +1 -1
- package/dist/lib/parsers/helpers/normalize-3d-tile-normals.js.map +1 -1
- package/dist/lib/parsers/helpers/normalize-3d-tile-positions.d.ts.map +1 -1
- package/dist/lib/parsers/helpers/normalize-3d-tile-positions.js.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-implicit-tiles.d.ts.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-implicit-tiles.js +21 -19
- package/dist/lib/parsers/helpers/parse-3d-implicit-tiles.js.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.d.ts.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-gltf-view.js.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-header.d.ts.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-header.js.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-subtree.d.ts +9 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-subtree.d.ts.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-subtree.js +3 -2
- package/dist/lib/parsers/helpers/parse-3d-tile-subtree.js.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-tables.d.ts.map +1 -1
- package/dist/lib/parsers/helpers/parse-3d-tile-tables.js.map +1 -1
- package/dist/lib/parsers/helpers/parse-utils.d.ts.map +1 -1
- package/dist/lib/parsers/helpers/parse-utils.js.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-batched-model.d.ts.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-batched-model.js.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-composite.d.ts.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-composite.js.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-gltf.d.ts.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-gltf.js.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-header.d.ts.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-header.js +6 -5
- package/dist/lib/parsers/parse-3d-tile-header.js.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-instanced-model.d.ts.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-point-cloud.d.ts.map +1 -1
- package/dist/lib/parsers/parse-3d-tile-point-cloud.js.map +1 -1
- package/dist/lib/parsers/parse-3d-tile.d.ts.map +1 -1
- package/dist/lib/parsers/parse-3d-tile.js.map +1 -1
- package/dist/lib/utils/obb/s2-corners-to-obb.d.ts.map +1 -1
- package/dist/lib/utils/obb/s2-corners-to-obb.js.map +1 -1
- package/dist/lib/utils/s2/converters/s2-to-boundary.d.ts.map +1 -1
- package/dist/lib/utils/s2/converters/s2-to-boundary.js.map +1 -1
- package/dist/lib/utils/s2/converters/s2-to-obb-points.d.ts.map +1 -1
- package/dist/lib/utils/s2/converters/s2-to-obb-points.js.map +1 -1
- package/dist/lib/utils/s2/converters/s2-to-region.d.ts.map +1 -1
- package/dist/lib/utils/s2/converters/s2-to-region.js.map +1 -1
- package/dist/lib/utils/s2/index.d.ts.map +1 -1
- package/dist/lib/utils/s2/index.js.map +1 -1
- package/dist/lib/utils/s2/s2-geometry-functions.d.ts.map +1 -1
- package/dist/lib/utils/s2/s2-geometry-functions.js.map +1 -1
- package/dist/lib/utils/s2/s2-token-functions.d.ts.map +1 -1
- package/dist/lib/utils/s2/s2-token-functions.js.map +1 -1
- package/dist/lib/utils/s2/s2geometry/s2-cell-utils.d.ts.map +1 -1
- package/dist/lib/utils/s2/s2geometry/s2-cell-utils.js.map +1 -1
- package/dist/lib/utils/s2/s2geometry/s2-geometry.d.ts.map +1 -1
- package/dist/lib/utils/s2/s2geometry/s2-geometry.js.map +1 -1
- package/dist/lib/utils/version.js +1 -1
- package/dist/lib/utils/version.js.map +1 -1
- package/dist/tile-3d-subtree-loader.d.ts.map +1 -1
- package/dist/tile-3d-subtree-loader.js.map +1 -1
- package/dist/tile-3d-writer.d.ts.map +1 -1
- package/dist/tile-3d-writer.js.map +1 -1
- package/dist/tiles-3d-loader.d.ts.map +1 -1
- package/dist/tiles-3d-loader.js.map +1 -1
- package/dist/types.d.ts +4 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +8 -8
- package/src/3d-tiles-archive/3d-tiles-archive-archive.ts +4 -0
- package/src/3d-tiles-archive/3d-tiles-archive-parser.ts +4 -0
- package/src/3d-tiles-archive-loader.ts +4 -0
- package/src/cesium-ion-loader.ts +4 -0
- package/src/index.ts +4 -0
- package/src/lib/classes/helpers/tile-3d-accessor-utils.ts +4 -0
- package/src/lib/classes/tile-3d-batch-table-hierarchy.ts +4 -0
- package/src/lib/classes/tile-3d-batch-table.ts +4 -0
- package/src/lib/classes/tile-3d-feature-table.ts +4 -0
- package/src/lib/constants.ts +4 -0
- package/src/lib/encoders/encode-3d-tile-batched-model.ts +4 -0
- package/src/lib/encoders/encode-3d-tile-composite.ts +4 -0
- package/src/lib/encoders/encode-3d-tile-instanced-model.ts +4 -0
- package/src/lib/encoders/encode-3d-tile-point-cloud.ts +4 -0
- package/src/lib/encoders/encode-3d-tile.ts +4 -0
- package/src/lib/encoders/helpers/encode-3d-tile-header.ts +4 -0
- package/src/lib/filesystems/tiles-3d-archive-file-system.ts +4 -0
- package/src/lib/ion/ion.ts +4 -0
- package/src/lib/parsers/helpers/normalize-3d-tile-colors.ts +4 -0
- package/src/lib/parsers/helpers/normalize-3d-tile-normals.ts +4 -0
- package/src/lib/parsers/helpers/normalize-3d-tile-positions.ts +4 -0
- package/src/lib/parsers/helpers/parse-3d-implicit-tiles.ts +25 -16
- package/src/lib/parsers/helpers/parse-3d-tile-gltf-view.ts +4 -0
- package/src/lib/parsers/helpers/parse-3d-tile-header.ts +4 -0
- package/src/lib/parsers/helpers/parse-3d-tile-subtree.ts +11 -2
- package/src/lib/parsers/helpers/parse-3d-tile-tables.ts +4 -0
- package/src/lib/parsers/helpers/parse-utils.ts +4 -0
- package/src/lib/parsers/parse-3d-tile-batched-model.ts +4 -0
- package/src/lib/parsers/parse-3d-tile-composite.ts +4 -0
- package/src/lib/parsers/parse-3d-tile-gltf.ts +2 -1
- package/src/lib/parsers/parse-3d-tile-header.ts +11 -3
- package/src/lib/parsers/parse-3d-tile-instanced-model.ts +4 -0
- package/src/lib/parsers/parse-3d-tile-point-cloud.ts +4 -0
- package/src/lib/parsers/parse-3d-tile.ts +4 -0
- package/src/lib/utils/obb/s2-corners-to-obb.ts +4 -0
- package/src/lib/utils/s2/converters/s2-to-boundary.ts +4 -0
- package/src/lib/utils/s2/converters/s2-to-obb-points.ts +4 -0
- package/src/lib/utils/s2/converters/s2-to-region.ts +4 -0
- package/src/lib/utils/s2/index.ts +3 -1
- package/src/lib/utils/s2/s2-geometry-functions.ts +3 -1
- package/src/lib/utils/s2/s2-token-functions.ts +3 -2
- package/src/lib/utils/s2/s2geometry/s2-cell-utils.ts +3 -1
- package/src/lib/utils/s2/s2geometry/s2-geometry.ts +4 -1
- package/src/tile-3d-subtree-loader.ts +4 -0
- package/src/tile-3d-writer.ts +4 -0
- package/src/tiles-3d-loader.ts +4 -0
- package/src/types.ts +8 -4
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
import type {Availability, Tile3DBoundingVolume, Subtree} from '../../../types';
|
|
2
6
|
import {Tile3DSubtreeLoader} from '../../../tile-3d-subtree-loader';
|
|
3
7
|
import {load} from '@loaders.gl/core';
|
|
@@ -10,12 +14,12 @@ import Long from 'long';
|
|
|
10
14
|
import {Tiles3DLoaderOptions} from '../../../tiles-3d-loader';
|
|
11
15
|
import {ImplicitOptions} from '../parse-3d-tile-header';
|
|
12
16
|
|
|
13
|
-
const
|
|
14
|
-
const
|
|
17
|
+
const QUADTREE_DIVISION_COUNT = 4;
|
|
18
|
+
const OCTREE_DIVISION_COUNT = 8;
|
|
15
19
|
|
|
16
20
|
const SUBDIVISION_COUNT_MAP = {
|
|
17
|
-
QUADTREE:
|
|
18
|
-
OCTREE:
|
|
21
|
+
QUADTREE: QUADTREE_DIVISION_COUNT,
|
|
22
|
+
OCTREE: OCTREE_DIVISION_COUNT
|
|
19
23
|
};
|
|
20
24
|
|
|
21
25
|
/**
|
|
@@ -103,17 +107,20 @@ export async function parseImplicitTiles(params: {
|
|
|
103
107
|
z: 0
|
|
104
108
|
},
|
|
105
109
|
childIndex = 0,
|
|
110
|
+
s2VolumeBox,
|
|
111
|
+
loaderOptions
|
|
112
|
+
} = params;
|
|
113
|
+
let {
|
|
114
|
+
subtree,
|
|
115
|
+
level = 0,
|
|
106
116
|
globalData = {
|
|
107
117
|
level: 0,
|
|
108
118
|
mortonIndex: 0,
|
|
109
119
|
x: 0,
|
|
110
120
|
y: 0,
|
|
111
121
|
z: 0
|
|
112
|
-
}
|
|
113
|
-
s2VolumeBox,
|
|
114
|
-
loaderOptions
|
|
122
|
+
}
|
|
115
123
|
} = params;
|
|
116
|
-
let {subtree, level = 0} = params;
|
|
117
124
|
const {
|
|
118
125
|
subdivisionScheme,
|
|
119
126
|
subtreeLevels,
|
|
@@ -163,9 +170,9 @@ export async function parseImplicitTiles(params: {
|
|
|
163
170
|
);
|
|
164
171
|
}
|
|
165
172
|
|
|
166
|
-
const x = concatBits(globalData.x, childTileX, level
|
|
167
|
-
const y = concatBits(globalData.y, childTileY, level
|
|
168
|
-
const z = concatBits(globalData.z, childTileZ, level
|
|
173
|
+
const x = concatBits(globalData.x, childTileX, level);
|
|
174
|
+
const y = concatBits(globalData.y, childTileY, level);
|
|
175
|
+
const z = concatBits(globalData.z, childTileZ, level);
|
|
169
176
|
|
|
170
177
|
if (isChildSubtreeAvailable) {
|
|
171
178
|
const subtreePath = `${basePath}/${subtreesUriTemplate}`;
|
|
@@ -174,11 +181,13 @@ export async function parseImplicitTiles(params: {
|
|
|
174
181
|
|
|
175
182
|
subtree = childSubtree;
|
|
176
183
|
|
|
177
|
-
globalData
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
184
|
+
globalData = {
|
|
185
|
+
mortonIndex: childTileMortonIndex,
|
|
186
|
+
x: childTileX,
|
|
187
|
+
y: childTileY,
|
|
188
|
+
z: childTileZ,
|
|
189
|
+
level
|
|
190
|
+
};
|
|
182
191
|
|
|
183
192
|
childTileMortonIndex = 0;
|
|
184
193
|
tileAvailabilityIndex = 0;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT AND Apache-2.0
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
// This file is derived from the Cesium code base under Apache 2 license
|
|
2
6
|
// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
|
3
7
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT AND Apache-2.0
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
// This file is derived from the Cesium code base under Apache 2 license
|
|
2
6
|
// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
|
3
7
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
import type {Subtree, Availability} from '../../../types';
|
|
2
6
|
import type {LoaderContext, LoaderOptions} from '@loaders.gl/loader-utils';
|
|
3
7
|
|
|
@@ -72,7 +76,7 @@ export default async function parse3DTilesSubtree(
|
|
|
72
76
|
* @param internalBinaryBuffer - subtree binary buffer
|
|
73
77
|
* @param context - loaders.gl context
|
|
74
78
|
*/
|
|
75
|
-
async function loadExplicitBitstream(
|
|
79
|
+
export async function loadExplicitBitstream(
|
|
76
80
|
subtree: Subtree,
|
|
77
81
|
availabilityObject: Availability,
|
|
78
82
|
internalBinaryBuffer: ArrayBuffer,
|
|
@@ -109,8 +113,13 @@ async function loadExplicitBitstream(
|
|
|
109
113
|
);
|
|
110
114
|
return;
|
|
111
115
|
}
|
|
116
|
+
|
|
117
|
+
const bufferStart = subtree.buffers
|
|
118
|
+
.slice(0, bufferView.buffer)
|
|
119
|
+
.reduce((offset, buf) => offset + buf.byteLength, 0);
|
|
120
|
+
|
|
112
121
|
availabilityObject.explicitBitstream = new Uint8Array(
|
|
113
|
-
internalBinaryBuffer,
|
|
122
|
+
internalBinaryBuffer.slice(bufferStart, bufferStart + buffer.byteLength),
|
|
114
123
|
bufferView.byteOffset,
|
|
115
124
|
bufferView.byteLength
|
|
116
125
|
);
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT AND Apache-2.0
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
// This file is derived from the Cesium code base under Apache 2 license
|
|
2
6
|
// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
|
3
7
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT AND Apache-2.0
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
// This file is derived from the Cesium code base under Apache 2 license
|
|
2
6
|
// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
|
3
7
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT AND Apache-2.0
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
// This file is derived from the Cesium code base under Apache 2 license
|
|
2
6
|
// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
|
3
7
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT AND Apache-2.0
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
// This file is derived from the Cesium code base under Apache 2 license
|
|
2
6
|
// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
|
3
7
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
import type {Tiles3DLoaderOptions} from '../../tiles-3d-loader';
|
|
2
6
|
import type {LoaderOptions} from '@loaders.gl/loader-utils';
|
|
3
7
|
import {path} from '@loaders.gl/loader-utils';
|
|
@@ -79,7 +83,7 @@ function getRefine(refine?: string): TILE_REFINEMENT | string | undefined {
|
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
85
|
|
|
82
|
-
function resolveUri(uri: string
|
|
86
|
+
function resolveUri(uri: string, basePath: string): string {
|
|
83
87
|
// url scheme per RFC3986
|
|
84
88
|
const urlSchemeRegex = /^[a-z][0-9a-z+.-]*:/i;
|
|
85
89
|
|
|
@@ -103,7 +107,10 @@ export function normalizeTileData(
|
|
|
103
107
|
let tileContentUrl: string | undefined;
|
|
104
108
|
if (tile.content) {
|
|
105
109
|
const contentUri = tile.content.uri || tile.content?.url;
|
|
106
|
-
|
|
110
|
+
if (typeof contentUri !== 'undefined') {
|
|
111
|
+
// sparse implicit tilesets may not define content for all nodes
|
|
112
|
+
tileContentUrl = resolveUri(contentUri, basePath);
|
|
113
|
+
}
|
|
107
114
|
}
|
|
108
115
|
const tilePostprocessed: Tiles3DTileJSONPostprocessed = {
|
|
109
116
|
...tile,
|
|
@@ -195,7 +202,8 @@ export async function normalizeImplicitTileHeaders(
|
|
|
195
202
|
const replacedUrlTemplate = replaceContentUrlTemplate(subtreesUriTemplate, 0, 0, 0, 0);
|
|
196
203
|
const subtreeUrl = resolveUri(replacedUrlTemplate, basePath);
|
|
197
204
|
const subtree = await load(subtreeUrl, Tile3DSubtreeLoader, options);
|
|
198
|
-
const
|
|
205
|
+
const tileContentUri = tile.content?.uri;
|
|
206
|
+
const contentUrlTemplate = tileContentUri ? resolveUri(tileContentUri, basePath) : '';
|
|
199
207
|
const refine = tileset?.root?.refine;
|
|
200
208
|
// @ts-ignore
|
|
201
209
|
const rootLodMetricValue = tile.geometricError;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT AND Apache-2.0
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
// This file is derived from the Cesium code base under Apache 2 license
|
|
2
6
|
// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
|
3
7
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT AND Apache-2.0
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
// This file is derived from the Cesium code base under Apache 2 license
|
|
2
6
|
// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
|
3
7
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT AND Apache-2.0
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
// This file is derived from the Cesium code base under Apache 2 license
|
|
2
6
|
// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md
|
|
3
7
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
//
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright vis.gl contributors
|
|
2
4
|
|
|
3
5
|
export {getS2CellIdFromToken, getS2TokenFromCellId, getS2ChildCellId} from './s2-token-functions';
|
|
4
6
|
export {getS2BoundaryFlat, getS2LngLat} from './s2-geometry-functions';
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
import type {LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';
|
|
2
6
|
import type {Subtree} from './types';
|
|
3
7
|
import parse3DTilesSubtree from './lib/parsers/helpers/parse-3d-tile-subtree';
|
package/src/tile-3d-writer.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
import type {WriterWithEncoder, WriterOptions} from '@loaders.gl/loader-utils';
|
|
2
6
|
import {VERSION} from './lib/utils/version';
|
|
3
7
|
import encode3DTile from './lib/encoders/encode-3d-tile';
|
package/src/tiles-3d-loader.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
import type {LoaderWithParser, LoaderOptions, LoaderContext} from '@loaders.gl/loader-utils';
|
|
2
6
|
// / import type { GLTFLoaderOptions } from '@loaders.gl/gltf';
|
|
3
7
|
import type {DracoLoaderOptions} from '@loaders.gl/draco';
|
package/src/types.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright vis.gl contributors
|
|
4
|
+
|
|
1
5
|
import type {GLTFPostprocessed, FeatureTableJson} from '@loaders.gl/gltf';
|
|
2
6
|
export type {FeatureTableJson};
|
|
3
7
|
|
|
@@ -321,10 +325,10 @@ export type Subtree = {
|
|
|
321
325
|
*/
|
|
322
326
|
childSubtreeAvailability: Availability;
|
|
323
327
|
// TODO: These are unused properties. Improve types when they are required
|
|
324
|
-
propertyTables
|
|
325
|
-
tileMetadata
|
|
326
|
-
contentMetadata
|
|
327
|
-
subtreeMetadata
|
|
328
|
+
propertyTables?: unknown;
|
|
329
|
+
tileMetadata?: unknown;
|
|
330
|
+
contentMetadata?: unknown;
|
|
331
|
+
subtreeMetadata?: unknown;
|
|
328
332
|
};
|
|
329
333
|
|
|
330
334
|
export type Availability = {
|