@loaders.gl/pointclouds 5.0.0-beta.7 → 5.0.0-beta.8
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/dist.dev.js +837 -71
- package/dist/dist.min.js +20 -20
- package/dist/las/las-loader-shared.cjs +1 -1
- package/dist/las/las-loader-shared.js +1 -1
- package/dist/las/las-writer.cjs +1 -1
- package/dist/las/las-writer.js +1 -1
- package/dist/las/lib/laz-perf/parse-las.cjs +8 -7
- package/dist/las/lib/laz-perf/parse-las.cjs.map +3 -3
- package/dist/las/lib/laz-perf/parse-las.js +8 -7
- package/dist/las/lib/laz-perf/parse-las.js.map +1 -1
- package/dist/las/lib/laz-rs-wasm/parse-las.cjs +8 -7
- package/dist/las/lib/laz-rs-wasm/parse-las.cjs.map +3 -3
- package/dist/las/lib/laz-rs-wasm/parse-las.js +8 -7
- package/dist/las/lib/laz-rs-wasm/parse-las.js.map +1 -1
- package/dist/las-worker.js +1 -1
- package/dist/las-writer.cjs +1 -1
- package/dist/pcd/pcd-loader-types.cjs +1 -1
- package/dist/pcd/pcd-loader-types.js +1 -1
- package/dist/pcd/pcd-writer.cjs +1 -1
- package/dist/pcd/pcd-writer.js +1 -1
- package/dist/pcd-loader-types.cjs +1 -1
- package/dist/pcd-worker.js +37 -1
- package/dist/pcd-writer.cjs +1 -1
- package/dist/ply/lib/parse-ply-in-batches.cjs +7 -6
- package/dist/ply/lib/parse-ply-in-batches.cjs.map +3 -3
- package/dist/ply/lib/parse-ply-in-batches.d.ts.map +1 -1
- package/dist/ply/lib/parse-ply-in-batches.js +2 -2
- package/dist/ply/lib/parse-ply-in-batches.js.map +1 -1
- package/dist/ply/ply-loader-types.cjs +1 -1
- package/dist/ply/ply-loader-types.js +1 -1
- package/dist/ply/ply-writer.cjs +1 -1
- package/dist/ply/ply-writer.js +1 -1
- package/dist/ply-loader-types.cjs +1 -1
- package/dist/ply-worker.js +790 -24
- package/dist/ply-writer.cjs +1 -1
- package/package.json +3 -3
- package/src/las/lib/laz-perf/parse-las.ts +7 -8
- package/src/las/lib/laz-rs-wasm/parse-las.ts +7 -8
- package/src/ply/lib/parse-ply-in-batches.ts +2 -2
package/dist/ply-writer.cjs
CHANGED
|
@@ -27,7 +27,7 @@ module.exports = __toCommonJS(ply_writer_exports);
|
|
|
27
27
|
// src/ply/ply-writer.ts
|
|
28
28
|
var import_schema_utils = require("@loaders.gl/core/schema-utils");
|
|
29
29
|
var import_ply_format = require("./ply-format.cjs");
|
|
30
|
-
var VERSION = true ? "5.0.0-beta.
|
|
30
|
+
var VERSION = true ? "5.0.0-beta.8" : "latest";
|
|
31
31
|
var PLYWriter = {
|
|
32
32
|
...import_ply_format.PLYFormat,
|
|
33
33
|
dataType: null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/pointclouds",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.8",
|
|
4
4
|
"description": "LAS, LAZ, PCD, and PLY point cloud and mesh loaders and writers",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
"build-bundle-dev": "node ../../scripts/build-codec-bundle.mjs ./bundle.ts --env=dev --output=dist/dist.dev.js"
|
|
227
227
|
},
|
|
228
228
|
"dependencies": {
|
|
229
|
-
"@math.gl/geospatial": "5.0.0-beta.
|
|
229
|
+
"@math.gl/geospatial": "5.0.0-beta.8",
|
|
230
230
|
"apache-arrow": ">= 17.0.0"
|
|
231
231
|
},
|
|
232
232
|
"peerDependencies": {
|
|
@@ -236,5 +236,5 @@
|
|
|
236
236
|
"copc": "0.0.8",
|
|
237
237
|
"laz-perf": "^0.0.7"
|
|
238
238
|
},
|
|
239
|
-
"gitHead": "
|
|
239
|
+
"gitHead": "1f2236bb9c47e76b89cd2b8eae44844f57f53d24"
|
|
240
240
|
}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
// ported and es6-ified from https://github.com/verma/plasio/
|
|
6
|
-
|
|
6
|
+
import {getLoaderLog} from '@loaders.gl/core/loader-utils';
|
|
7
7
|
import type {LASLoaderOptions} from '../../las-loader-types';
|
|
8
8
|
import type {LASMesh, LASHeader} from '../las-types';
|
|
9
9
|
import type {MeshAttributes} from '@loaders.gl/core/schema';
|
|
10
|
-
import {getMeshBoundingBox
|
|
10
|
+
import {getMeshBoundingBox} from '@loaders.gl/core/schema-utils';
|
|
11
11
|
import {concatenateArrayBuffersAsync} from '@loaders.gl/core/loader-utils';
|
|
12
12
|
import {getLASSchema} from '../get-las-schema';
|
|
13
13
|
import {LASFile} from './laslaz-decoder';
|
|
@@ -133,7 +133,7 @@ function parseLASMesh(arrayBuffer: ArrayBuffer, options: LASLoaderOptions = {}):
|
|
|
133
133
|
offset: [offsetX, offsetY, offsetZ]
|
|
134
134
|
} = lasHeader;
|
|
135
135
|
|
|
136
|
-
const twoByteColor = detectTwoByteColors(decoder, batchSize, options
|
|
136
|
+
const twoByteColor = detectTwoByteColors(decoder, batchSize, options);
|
|
137
137
|
|
|
138
138
|
for (let i = 0; i < batchSize; i++) {
|
|
139
139
|
const {position, color, intensity, classification} = decoder.getPoint(i);
|
|
@@ -270,7 +270,7 @@ function populateLASAttributes(
|
|
|
270
270
|
scale: [scaleX, scaleY, scaleZ],
|
|
271
271
|
offset: [offsetX, offsetY, offsetZ]
|
|
272
272
|
} = lasHeader;
|
|
273
|
-
const twoByteColor = detectTwoByteColors(decoder, batchSize, options
|
|
273
|
+
const twoByteColor = detectTwoByteColors(decoder, batchSize, options);
|
|
274
274
|
|
|
275
275
|
for (let i = 0; i < batchSize; i++) {
|
|
276
276
|
const {position, color, intensity, classification} = decoder.getPoint(i);
|
|
@@ -382,10 +382,10 @@ function getBatchSize(options: LASLoaderOptions): number {
|
|
|
382
382
|
function detectTwoByteColors(
|
|
383
383
|
decoder: any = {},
|
|
384
384
|
batchSize: number,
|
|
385
|
-
|
|
385
|
+
options: LASLoaderOptions
|
|
386
386
|
): boolean {
|
|
387
387
|
let twoByteColor = false;
|
|
388
|
-
switch (colorDepth) {
|
|
388
|
+
switch (options.las?.colorDepth) {
|
|
389
389
|
case 8:
|
|
390
390
|
twoByteColor = false;
|
|
391
391
|
break;
|
|
@@ -404,8 +404,7 @@ function detectTwoByteColors(
|
|
|
404
404
|
}
|
|
405
405
|
break;
|
|
406
406
|
default:
|
|
407
|
-
|
|
408
|
-
console.warn('las: illegal value for options.las.colorDepth');
|
|
407
|
+
getLoaderLog(options).warn('las: illegal value for options.las.colorDepth')();
|
|
409
408
|
break;
|
|
410
409
|
}
|
|
411
410
|
return twoByteColor;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
// ported and es6-ified from https://github.com/verma/plasio/
|
|
6
|
-
|
|
6
|
+
import {getLoaderLog} from '@loaders.gl/core/loader-utils';
|
|
7
7
|
import type {LASLoaderOptions} from '../../las-loader-types';
|
|
8
8
|
import type {LASMesh, LASHeader} from '../las-types';
|
|
9
9
|
import type {MeshAttributes} from '@loaders.gl/core/schema';
|
|
10
|
-
import {getMeshBoundingBox
|
|
10
|
+
import {getMeshBoundingBox} from '@loaders.gl/core/schema-utils';
|
|
11
11
|
import {concatenateArrayBuffersAsync} from '@loaders.gl/core/loader-utils';
|
|
12
12
|
import {getLASSchema} from '../get-las-schema';
|
|
13
13
|
import {LASFile} from './laslaz-decoder';
|
|
@@ -133,7 +133,7 @@ function parseLASMesh(arrayBuffer: ArrayBuffer, options: LASLoaderOptions = {}):
|
|
|
133
133
|
offset: [offsetX, offsetY, offsetZ]
|
|
134
134
|
} = lasHeader;
|
|
135
135
|
|
|
136
|
-
const twoByteColor = detectTwoByteColors(decoder, batchSize, options
|
|
136
|
+
const twoByteColor = detectTwoByteColors(decoder, batchSize, options);
|
|
137
137
|
|
|
138
138
|
for (let i = 0; i < batchSize; i++) {
|
|
139
139
|
const {position, color, intensity, classification} = decoder.getPoint(i);
|
|
@@ -270,7 +270,7 @@ function populateLASAttributes(
|
|
|
270
270
|
scale: [scaleX, scaleY, scaleZ],
|
|
271
271
|
offset: [offsetX, offsetY, offsetZ]
|
|
272
272
|
} = lasHeader;
|
|
273
|
-
const twoByteColor = detectTwoByteColors(decoder, batchSize, options
|
|
273
|
+
const twoByteColor = detectTwoByteColors(decoder, batchSize, options);
|
|
274
274
|
|
|
275
275
|
for (let i = 0; i < batchSize; i++) {
|
|
276
276
|
const {position, color, intensity, classification} = decoder.getPoint(i);
|
|
@@ -382,10 +382,10 @@ function getBatchSize(options: LASLoaderOptions): number {
|
|
|
382
382
|
function detectTwoByteColors(
|
|
383
383
|
decoder: any = {},
|
|
384
384
|
batchSize: number,
|
|
385
|
-
|
|
385
|
+
options: LASLoaderOptions
|
|
386
386
|
): boolean {
|
|
387
387
|
let twoByteColor = false;
|
|
388
|
-
switch (colorDepth) {
|
|
388
|
+
switch (options.las?.colorDepth) {
|
|
389
389
|
case 8:
|
|
390
390
|
twoByteColor = false;
|
|
391
391
|
break;
|
|
@@ -404,8 +404,7 @@ function detectTwoByteColors(
|
|
|
404
404
|
}
|
|
405
405
|
break;
|
|
406
406
|
default:
|
|
407
|
-
|
|
408
|
-
console.warn('las: illegal value for options.las.colorDepth');
|
|
407
|
+
getLoaderLog(options).warn('las: illegal value for options.las.colorDepth')();
|
|
409
408
|
break;
|
|
410
409
|
}
|
|
411
410
|
return twoByteColor;
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
// }
|
|
26
26
|
// });
|
|
27
27
|
|
|
28
|
+
import {log as loaderLog} from '@loaders.gl/core/loader-utils';
|
|
28
29
|
import {
|
|
29
30
|
makeLineIterator,
|
|
30
31
|
makeTextDecoderIterator,
|
|
@@ -656,8 +657,7 @@ async function parseASCIIHeader(
|
|
|
656
657
|
break;
|
|
657
658
|
|
|
658
659
|
default:
|
|
659
|
-
|
|
660
|
-
console.log('unhandled', lineType, lineValues);
|
|
660
|
+
loaderLog.log(0, 'unhandled', lineType, lineValues)();
|
|
661
661
|
}
|
|
662
662
|
|
|
663
663
|
return false;
|