@loaders.gl/tiles-3d 5.0.0-beta.2 → 5.0.0-beta.5
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/README.md +1 -1
- package/dist/3d-tiles/3d-tiles-archive-loader.js +1 -1
- package/dist/3d-tiles/dist.dev.js +1393 -962
- package/dist/3d-tiles/dist.min.js +37 -37
- package/dist/3d-tiles/index.cjs +989 -987
- package/dist/3d-tiles/index.cjs.map +3 -3
- package/dist/3d-tiles/lib/classes/tile-3d-batch-table.d.ts.map +1 -1
- package/dist/3d-tiles/lib/classes/tile-3d-batch-table.js +12 -8
- package/dist/3d-tiles/lib/classes/tile-3d-batch-table.js.map +1 -1
- package/dist/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.js +5 -1
- package/dist/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.js.map +1 -1
- package/dist/3d-tiles/lib/utils/version.js +1 -1
- package/dist/3d-tiles-archive-writer.cjs +1 -1
- package/dist/cesium-ion-loader-with-parser.cjs +983 -981
- package/dist/cesium-ion-loader-with-parser.cjs.map +3 -3
- package/dist/copc/copc-source-loader.js +2 -2
- package/dist/copc/copc-source-loader.js.map +1 -1
- package/dist/copc/copc-writer.js +1 -1
- package/dist/copc/index.cjs +365 -170
- package/dist/copc/index.cjs.map +3 -3
- package/dist/dist.dev.js +231 -38
- package/dist/dist.min.js +10 -10
- package/dist/i3s/arcgis-webscene-loader.js +1 -1
- package/dist/i3s/dist.dev.js +6591 -1184
- package/dist/i3s/dist.min.js +55 -47
- package/dist/i3s/i3s-attribute-loader.js +1 -1
- package/dist/i3s/i3s-building-scene-layer-loader.js +1 -1
- package/dist/i3s/i3s-content-loader.js +1 -1
- package/dist/i3s/i3s-lepcc-loader-types.js +1 -1
- package/dist/i3s/i3s-loader.js +1 -1
- package/dist/i3s/i3s-node-page-loader.js +1 -1
- package/dist/i3s/i3s-slpk-loader.js +1 -1
- package/dist/i3s/i3s-slpk-writer.js +1 -1
- package/dist/i3s/index.cjs +4763 -1136
- package/dist/i3s/index.cjs.map +3 -3
- package/dist/i3s-content-worker-node.js +11 -11
- package/dist/i3s-content-worker-node.js.map +4 -4
- package/dist/i3s-content-worker.js +1148 -391
- package/dist/i3s-lepcc-worker-node.js +609 -44
- package/dist/i3s-lepcc-worker-node.js.map +4 -4
- package/dist/i3s-lepcc-worker.js +575 -40
- package/dist/i3s-mesh-writer.cjs +8880 -5253
- package/dist/i3s-mesh-writer.cjs.map +3 -3
- package/dist/i3s-slpk-writer.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/point-cloud-tile-source-loader-types.js +1 -1
- package/dist/point-cloud-tile-source-loader.cjs +1 -1
- package/dist/potree/dist.dev.js +310 -110
- package/dist/potree/dist.min.js +31 -31
- package/dist/potree/index.cjs +19 -166
- package/dist/potree/index.cjs.map +3 -3
- package/dist/potree/potree-bin-loader.js +1 -1
- package/dist/potree/potree-hierarchy-chunk-loader.js +1 -1
- package/dist/potree/potree-loader-types.js +1 -1
- package/dist/potree/potree-source-loader.js +1 -1
- package/dist/potree/potree-writer.js +1 -1
- package/dist/potree-loader.cjs +1 -1
- package/package.json +13 -13
- package/src/3d-tiles/lib/classes/tile-3d-batch-table.ts +12 -8
- package/src/3d-tiles/lib/parsers/parse-3d-tile-instanced-model.ts +4 -1
- package/src/copc/copc-source-loader.ts +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { PotreeBinFormat } from "./potree-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-beta.
|
|
7
|
+
const VERSION = typeof "5.0.0-beta.5" !== 'undefined' ? "5.0.0-beta.5" : 'latest';
|
|
8
8
|
/**
|
|
9
9
|
* Loader for potree Binary Point Attributes
|
|
10
10
|
* */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { PotreeHierarchyChunkFormat } from "./potree-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-beta.
|
|
7
|
+
const VERSION = typeof "5.0.0-beta.5" !== 'undefined' ? "5.0.0-beta.5" : 'latest';
|
|
8
8
|
/** Preloads the parser-bearing Potree hierarchy chunk loader implementation. */
|
|
9
9
|
async function preload() {
|
|
10
10
|
const { PotreeHierarchyChunkLoaderWithParser } = await import("./potree-hierarchy-chunk-loader-with-parser.js");
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { PotreeFormat } from "./potree-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-beta.
|
|
7
|
+
const VERSION = typeof "5.0.0-beta.5" !== 'undefined' ? "5.0.0-beta.5" : 'latest';
|
|
8
8
|
/** Preloads the parser-bearing Potree loader implementation. */
|
|
9
9
|
async function preload() {
|
|
10
10
|
const { PotreeLoaderWithParser } = await import('@loaders.gl/tiles-3d/potree-loader');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import { PotreeNodesSource } from "./lib/potree-node-source.js";
|
|
5
5
|
// @ts-ignore __VERSION__ is injected by the package build.
|
|
6
|
-
const VERSION = typeof "5.0.0-beta.
|
|
6
|
+
const VERSION = typeof "5.0.0-beta.5" !== 'undefined' ? "5.0.0-beta.5" : 'latest';
|
|
7
7
|
import { PotreeBinFormat } from "./potree-format.js";
|
|
8
8
|
/**
|
|
9
9
|
* Creates point cloud data sources for Potree urls
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
import { convertTableToMesh } from '@loaders.gl/core/schema-utils';
|
|
5
5
|
// @ts-ignore __VERSION__ is injected by the package build.
|
|
6
|
-
const VERSION = typeof "5.0.0-beta.
|
|
6
|
+
const VERSION = typeof "5.0.0-beta.5" !== 'undefined' ? "5.0.0-beta.5" : 'latest';
|
|
7
7
|
/** Standard JSON metadata writer; use encodePotreeDataset for a complete dataset. */
|
|
8
8
|
export const PotreeWriter = {
|
|
9
9
|
name: 'Potree metadata',
|
package/dist/potree-loader.cjs
CHANGED
|
@@ -261,7 +261,7 @@ var PotreeFormat = {
|
|
|
261
261
|
};
|
|
262
262
|
|
|
263
263
|
// dist/potree/potree-loader-types.js
|
|
264
|
-
var VERSION2 = true ? "5.0.0-beta.
|
|
264
|
+
var VERSION2 = true ? "5.0.0-beta.5" : "latest";
|
|
265
265
|
async function preload2() {
|
|
266
266
|
const { PotreeLoaderWithParser: PotreeLoaderWithParser3 } = await Promise.resolve().then(() => (init_potree_loader(), potree_loader_exports));
|
|
267
267
|
return PotreeLoaderWithParser3;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/tiles-3d",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.5",
|
|
4
4
|
"description": "3D tileset runtime and loaders for 3D Tiles, I3S, COPC, and Potree",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -201,26 +201,26 @@
|
|
|
201
201
|
"build-worker-i3s-lepcc-node": "node ../../scripts/build-codec-worker.mjs src/i3s/workers/i3s-lepcc-worker-node.ts --outfile=dist/i3s-lepcc-worker-node.js --platform=node --target=node16 --bundle --sourcemap --define:__VERSION__=\\\"$npm_package_version\\\""
|
|
202
202
|
},
|
|
203
203
|
"dependencies": {
|
|
204
|
-
"@loaders.gl/archives": "5.0.0-beta.
|
|
205
|
-
"@loaders.gl/compression": "5.0.0-beta.
|
|
206
|
-
"@loaders.gl/images": "5.0.0-beta.
|
|
207
|
-
"@loaders.gl/pointclouds": "5.0.0-beta.
|
|
208
|
-
"@loaders.gl/scene": "5.0.0-beta.
|
|
209
|
-
"@math.gl/core": "5.0.0-beta.
|
|
210
|
-
"@math.gl/dggs": "5.0.0-beta.
|
|
211
|
-
"@math.gl/earth": "5.0.0-beta.
|
|
212
|
-
"@math.gl/geometry": "5.0.0-beta.
|
|
213
|
-
"@math.gl/geospatial": "5.0.0-beta.
|
|
204
|
+
"@loaders.gl/archives": "5.0.0-beta.5",
|
|
205
|
+
"@loaders.gl/compression": "5.0.0-beta.5",
|
|
206
|
+
"@loaders.gl/images": "5.0.0-beta.5",
|
|
207
|
+
"@loaders.gl/pointclouds": "5.0.0-beta.5",
|
|
208
|
+
"@loaders.gl/scene": "5.0.0-beta.5",
|
|
209
|
+
"@math.gl/core": "5.0.0-beta.5",
|
|
210
|
+
"@math.gl/dggs": "5.0.0-beta.5",
|
|
211
|
+
"@math.gl/earth": "5.0.0-beta.5",
|
|
212
|
+
"@math.gl/geometry": "5.0.0-beta.5",
|
|
213
|
+
"@math.gl/geospatial": "5.0.0-beta.5",
|
|
214
214
|
"probe.gl": "^5.0.0",
|
|
215
215
|
"zod": "^4.1.12"
|
|
216
216
|
},
|
|
217
217
|
"devDependencies": {
|
|
218
218
|
"@deck.gl/core": "^9.4.0",
|
|
219
|
-
"@math.gl/dggs": "5.0.0-beta.
|
|
219
|
+
"@math.gl/dggs": "5.0.0-beta.5",
|
|
220
220
|
"copc": "0.0.8"
|
|
221
221
|
},
|
|
222
222
|
"peerDependencies": {
|
|
223
223
|
"@loaders.gl/core": "~5.0.0-alpha.0"
|
|
224
224
|
},
|
|
225
|
-
"gitHead": "
|
|
225
|
+
"gitHead": "673b72c560b284f158ff145ba74707f9a3994935"
|
|
226
226
|
}
|
|
@@ -44,9 +44,9 @@ export default class Tile3DBatchTableParser {
|
|
|
44
44
|
this._extensions = this.json?.extensions || {};
|
|
45
45
|
|
|
46
46
|
// Copy all top-level property fields from the json object, ignoring special fields
|
|
47
|
-
this._properties =
|
|
48
|
-
for (const propertyName
|
|
49
|
-
if (!IGNORED_PROPERTY_FIELDS
|
|
47
|
+
this._properties = Object.create(null);
|
|
48
|
+
for (const propertyName of Object.keys(this.json)) {
|
|
49
|
+
if (!Object.hasOwn(IGNORED_PROPERTY_FIELDS, propertyName)) {
|
|
50
50
|
this._properties[propertyName] = this.json[propertyName];
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -214,7 +214,7 @@ export default class Tile3DBatchTableParser {
|
|
|
214
214
|
// Store any information needed to access the binary data, including the typed array,
|
|
215
215
|
// componentCount (e.g. a VEC4 would be 4), and the type used to pack and unpack (e.g. Cartesian4).
|
|
216
216
|
if (binaryProperty) {
|
|
217
|
-
binaryProperties
|
|
217
|
+
binaryProperties ??= Object.create(null) as Record<string, any>;
|
|
218
218
|
binaryProperties[name] = binaryProperty;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
@@ -259,7 +259,7 @@ export default class Tile3DBatchTableParser {
|
|
|
259
259
|
const result = traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {
|
|
260
260
|
const classId = hierarchy.classIds[instanceIndex];
|
|
261
261
|
const instances = hierarchy.classes[classId].instances;
|
|
262
|
-
return defined(instances[name]) ? true : undefined;
|
|
262
|
+
return Object.hasOwn(instances, name) && defined(instances[name]) ? true : undefined;
|
|
263
263
|
});
|
|
264
264
|
|
|
265
265
|
return defined(result);
|
|
@@ -270,7 +270,7 @@ export default class Tile3DBatchTableParser {
|
|
|
270
270
|
const classId = hierarchy.classIds[instanceIndex];
|
|
271
271
|
const instances = hierarchy.classes[classId].instances;
|
|
272
272
|
for (const name in instances) {
|
|
273
|
-
if (
|
|
273
|
+
if (Object.hasOwn(instances, name)) {
|
|
274
274
|
if (results.indexOf(name) === -1) {
|
|
275
275
|
results.push(name);
|
|
276
276
|
}
|
|
@@ -284,7 +284,9 @@ export default class Tile3DBatchTableParser {
|
|
|
284
284
|
const classId = hierarchy.classIds[instanceIndex];
|
|
285
285
|
const instanceClass = hierarchy.classes[classId];
|
|
286
286
|
const indexInClass = hierarchy.classIndexes[instanceIndex];
|
|
287
|
-
const propertyValues = instanceClass.instances
|
|
287
|
+
const propertyValues = Object.hasOwn(instanceClass.instances, name)
|
|
288
|
+
? instanceClass.instances[name]
|
|
289
|
+
: undefined;
|
|
288
290
|
if (defined(propertyValues)) {
|
|
289
291
|
if (defined(propertyValues.typedArray)) {
|
|
290
292
|
return this._getBinaryProperty(propertyValues, indexInClass);
|
|
@@ -300,7 +302,9 @@ export default class Tile3DBatchTableParser {
|
|
|
300
302
|
const classId = hierarchy.classIds[instanceIndex];
|
|
301
303
|
const instanceClass = hierarchy.classes[classId];
|
|
302
304
|
const indexInClass = hierarchy.classIndexes[instanceIndex];
|
|
303
|
-
const propertyValues = instanceClass.instances
|
|
305
|
+
const propertyValues = Object.hasOwn(instanceClass.instances, name)
|
|
306
|
+
? instanceClass.instances[name]
|
|
307
|
+
: undefined;
|
|
304
308
|
if (defined(propertyValues)) {
|
|
305
309
|
assert(instanceIndex === batchId, `Inherited property "${name}" is read-only.`);
|
|
306
310
|
if (defined(propertyValues.typedArray)) {
|
|
@@ -92,6 +92,7 @@ function extractInstancedAttributes(
|
|
|
92
92
|
) {
|
|
93
93
|
const instances = new Array(instancesLength);
|
|
94
94
|
const instancePosition = new Vector3();
|
|
95
|
+
const instanceFramePosition = new Vector3();
|
|
95
96
|
const instanceNormalRight = new Vector3();
|
|
96
97
|
const instanceNormalUp = new Vector3();
|
|
97
98
|
const instanceNormalForward = new Vector3();
|
|
@@ -201,7 +202,9 @@ function extractInstancedAttributes(
|
|
|
201
202
|
tile.hasCustomOrientation = true;
|
|
202
203
|
hasCustomOrientation = true;
|
|
203
204
|
} else if (tile.eastNorthUp) {
|
|
204
|
-
|
|
205
|
+
instanceFramePosition.copy(instancePosition);
|
|
206
|
+
if (tile.rtcCenter) instanceFramePosition.add(tile.rtcCenter);
|
|
207
|
+
eastNorthUpToFixedFrame(Ellipsoid.WGS84, instanceFramePosition, instanceTransform);
|
|
205
208
|
instanceTransform.getRotationMatrix3(instanceRotation);
|
|
206
209
|
} else {
|
|
207
210
|
instanceRotation.identity();
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
makeMeshArrowTable,
|
|
17
17
|
type MeshArrowAttributes
|
|
18
18
|
} from '@loaders.gl/core/schema-utils';
|
|
19
|
-
import {deserializeArrowWorkerTable} from '@loaders.gl/core/
|
|
19
|
+
import {deserializeArrowWorkerTable} from '@loaders.gl/core/arrow-worker-transport';
|
|
20
20
|
import type {
|
|
21
21
|
CoreAPI,
|
|
22
22
|
SourceLoader,
|