@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.
package/dist/dist.dev.js CHANGED
@@ -23228,7 +23228,12 @@ return true;`);
23228
23228
  return attributes;
23229
23229
  }
23230
23230
  function readLASString(bytes, offset, length) {
23231
- return new TextDecoder().decode(bytes.subarray(offset, offset + length)).replace(/\0+$/, "").trim();
23231
+ const decoded = new TextDecoder().decode(bytes.subarray(offset, offset + length));
23232
+ let end = decoded.length;
23233
+ while (end > 0 && decoded[end - 1] === "\0") {
23234
+ end--;
23235
+ }
23236
+ return decoded.slice(0, end).trim();
23232
23237
  }
23233
23238
  function sanitizeExtraBytesName(name) {
23234
23239
  return name.trim().replace(/[^A-Za-z0-9_]+/g, "_");