@loaders.gl/pointclouds 5.0.0-beta.2 → 5.0.0-beta.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.
@@ -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.2" : "latest";
30
+ var VERSION = true ? "5.0.0-beta.4" : "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.2",
3
+ "version": "5.0.0-beta.4",
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.2",
229
+ "@math.gl/geospatial": "5.0.0-beta.4",
230
230
  "apache-arrow": ">= 17.0.0"
231
231
  },
232
232
  "peerDependencies": {
@@ -235,5 +235,6 @@
235
235
  "optionalDependencies": {
236
236
  "copc": "0.0.8",
237
237
  "laz-perf": "^0.0.7"
238
- }
238
+ },
239
+ "gitHead": "c9420f06e870fa353889d55b684e3588d24574c2"
239
240
  }
@@ -166,10 +166,12 @@ export function populateLASTypedExtraBytes(
166
166
  }
167
167
 
168
168
  function readLASString(bytes: Uint8Array, offset: number, length: number): string {
169
- return new TextDecoder()
170
- .decode(bytes.subarray(offset, offset + length))
171
- .replace(/\0+$/, '')
172
- .trim();
169
+ const decoded = new TextDecoder().decode(bytes.subarray(offset, offset + length));
170
+ let end = decoded.length;
171
+ while (end > 0 && decoded[end - 1] === '\0') {
172
+ end--;
173
+ }
174
+ return decoded.slice(0, end).trim();
173
175
  }
174
176
 
175
177
  function sanitizeExtraBytesName(name: string): string {