@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.
Files changed (39) hide show
  1. package/dist/dist.dev.js +837 -71
  2. package/dist/dist.min.js +20 -20
  3. package/dist/las/las-loader-shared.cjs +1 -1
  4. package/dist/las/las-loader-shared.js +1 -1
  5. package/dist/las/las-writer.cjs +1 -1
  6. package/dist/las/las-writer.js +1 -1
  7. package/dist/las/lib/laz-perf/parse-las.cjs +8 -7
  8. package/dist/las/lib/laz-perf/parse-las.cjs.map +3 -3
  9. package/dist/las/lib/laz-perf/parse-las.js +8 -7
  10. package/dist/las/lib/laz-perf/parse-las.js.map +1 -1
  11. package/dist/las/lib/laz-rs-wasm/parse-las.cjs +8 -7
  12. package/dist/las/lib/laz-rs-wasm/parse-las.cjs.map +3 -3
  13. package/dist/las/lib/laz-rs-wasm/parse-las.js +8 -7
  14. package/dist/las/lib/laz-rs-wasm/parse-las.js.map +1 -1
  15. package/dist/las-worker.js +1 -1
  16. package/dist/las-writer.cjs +1 -1
  17. package/dist/pcd/pcd-loader-types.cjs +1 -1
  18. package/dist/pcd/pcd-loader-types.js +1 -1
  19. package/dist/pcd/pcd-writer.cjs +1 -1
  20. package/dist/pcd/pcd-writer.js +1 -1
  21. package/dist/pcd-loader-types.cjs +1 -1
  22. package/dist/pcd-worker.js +37 -1
  23. package/dist/pcd-writer.cjs +1 -1
  24. package/dist/ply/lib/parse-ply-in-batches.cjs +7 -6
  25. package/dist/ply/lib/parse-ply-in-batches.cjs.map +3 -3
  26. package/dist/ply/lib/parse-ply-in-batches.d.ts.map +1 -1
  27. package/dist/ply/lib/parse-ply-in-batches.js +2 -2
  28. package/dist/ply/lib/parse-ply-in-batches.js.map +1 -1
  29. package/dist/ply/ply-loader-types.cjs +1 -1
  30. package/dist/ply/ply-loader-types.js +1 -1
  31. package/dist/ply/ply-writer.cjs +1 -1
  32. package/dist/ply/ply-writer.js +1 -1
  33. package/dist/ply-loader-types.cjs +1 -1
  34. package/dist/ply-worker.js +790 -24
  35. package/dist/ply-writer.cjs +1 -1
  36. package/package.json +3 -3
  37. package/src/las/lib/laz-perf/parse-las.ts +7 -8
  38. package/src/las/lib/laz-rs-wasm/parse-las.ts +7 -8
  39. package/src/ply/lib/parse-ply-in-batches.ts +2 -2
@@ -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.7" : "latest";
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.7",
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.7",
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": "66290be3efdcaed637e7f1b18f30a69b2bd935c6"
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
- // import type {ArrowTable, ColumnarTable} from '@loaders.gl/core/schema';
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 /* , convertMeshToTable */} from '@loaders.gl/core/schema-utils';
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.las?.colorDepth);
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.las?.colorDepth);
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
- colorDepth?: number | string
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
- // eslint-disable-next-line
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
- // import type {ArrowTable, ColumnarTable} from '@loaders.gl/core/schema';
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 /* , convertMeshToTable */} from '@loaders.gl/core/schema-utils';
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.las?.colorDepth);
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.las?.colorDepth);
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
- colorDepth?: number | string
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
- // eslint-disable-next-line
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
- // eslint-disable-next-line
660
- console.log('unhandled', lineType, lineValues);
660
+ loaderLog.log(0, 'unhandled', lineType, lineValues)();
661
661
  }
662
662
 
663
663
  return false;