@loaders.gl/las 4.2.0-alpha.6 → 4.2.0-beta.2
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 +4 -0
- package/dist/dist.min.js +4 -4
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/las-loader.d.ts +25 -2
- package/dist/las-loader.d.ts.map +1 -1
- package/dist/las-loader.js +3 -1
- package/dist/las-worker.js +5 -1
- package/dist/lib/laslaz-decoder.d.ts.map +1 -1
- package/dist/lib/laslaz-decoder.js +2 -0
- package/package.json +4 -4
- package/src/index.ts +2 -2
- package/src/las-loader.ts +7 -2
- package/src/lib/laslaz-decoder.ts +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { LoaderWithParser } from '@loaders.gl/loader-utils';
|
|
2
1
|
import type { LASLoaderOptions } from "./las-loader.js";
|
|
3
2
|
import type { LASMesh } from "./lib/las-types.js";
|
|
4
3
|
import { LASLoader as LASWorkerLoader } from "./las-loader.js";
|
|
@@ -8,5 +7,28 @@ export { LASWorkerLoader };
|
|
|
8
7
|
* Loader for the LAS (LASer) point cloud format
|
|
9
8
|
* @note Does not support LAS v1.4
|
|
10
9
|
*/
|
|
11
|
-
export declare const LASLoader:
|
|
10
|
+
export declare const LASLoader: {
|
|
11
|
+
readonly parse: (arrayBuffer: ArrayBuffer, options?: LASLoaderOptions) => Promise<LASMesh>;
|
|
12
|
+
readonly parseSync: (arrayBuffer: ArrayBuffer, options?: LASLoaderOptions) => LASMesh;
|
|
13
|
+
readonly dataType: LASMesh;
|
|
14
|
+
readonly batchType: never;
|
|
15
|
+
readonly name: "LAS";
|
|
16
|
+
readonly id: "las";
|
|
17
|
+
readonly module: "las";
|
|
18
|
+
readonly version: any;
|
|
19
|
+
readonly worker: true;
|
|
20
|
+
readonly extensions: ["las", "laz"];
|
|
21
|
+
readonly mimeTypes: ["application/octet-stream"];
|
|
22
|
+
readonly text: true;
|
|
23
|
+
readonly binary: true;
|
|
24
|
+
readonly tests: ["LAS"];
|
|
25
|
+
readonly options: {
|
|
26
|
+
readonly las: {
|
|
27
|
+
readonly shape: "mesh";
|
|
28
|
+
readonly fp64: false;
|
|
29
|
+
readonly skip: 1;
|
|
30
|
+
readonly colorDepth: 8;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
12
34
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,gBAAgB,EAAC,wBAAqB;AACnD,OAAO,KAAK,EAAC,OAAO,EAAC,2BAAwB;AAC7C,OAAO,EAAC,SAAS,IAAI,eAAe,EAAC,wBAAqB;AAK1D,YAAY,EAAC,gBAAgB,EAAC,CAAC;AAC/B,OAAO,EAAC,eAAe,EAAC,CAAC;AAEzB;;;GAGG;AACH,eAAO,MAAM,SAAS;kCAEO,WAAW,YAAY,gBAAgB;sCAEzC,WAAW,YAAY,gBAAgB;;;;;;;;;;;;;;;;;;;;;CAEK,CAAC"}
|
package/dist/las-loader.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LoaderOptions } from '@loaders.gl/loader-utils';
|
|
2
2
|
import type { LASMesh } from "./lib/las-types.js";
|
|
3
3
|
export type LASLoaderOptions = LoaderOptions & {
|
|
4
4
|
las?: {
|
|
@@ -6,6 +6,8 @@ export type LASLoaderOptions = LoaderOptions & {
|
|
|
6
6
|
fp64?: boolean;
|
|
7
7
|
skip?: number;
|
|
8
8
|
colorDepth?: number | string;
|
|
9
|
+
/** Override the URL to the worker bundle (by default loads from unpkg.com) */
|
|
10
|
+
workerUrl?: string;
|
|
9
11
|
};
|
|
10
12
|
onProgress?: Function;
|
|
11
13
|
};
|
|
@@ -13,5 +15,26 @@ export type LASLoaderOptions = LoaderOptions & {
|
|
|
13
15
|
* Loader for the LAS (LASer) point cloud format
|
|
14
16
|
* @note Does not support LAS v1.4
|
|
15
17
|
*/
|
|
16
|
-
export declare const LASLoader:
|
|
18
|
+
export declare const LASLoader: {
|
|
19
|
+
readonly dataType: LASMesh;
|
|
20
|
+
readonly batchType: never;
|
|
21
|
+
readonly name: "LAS";
|
|
22
|
+
readonly id: "las";
|
|
23
|
+
readonly module: "las";
|
|
24
|
+
readonly version: any;
|
|
25
|
+
readonly worker: true;
|
|
26
|
+
readonly extensions: ["las", "laz"];
|
|
27
|
+
readonly mimeTypes: ["application/octet-stream"];
|
|
28
|
+
readonly text: true;
|
|
29
|
+
readonly binary: true;
|
|
30
|
+
readonly tests: ["LAS"];
|
|
31
|
+
readonly options: {
|
|
32
|
+
readonly las: {
|
|
33
|
+
readonly shape: "mesh";
|
|
34
|
+
readonly fp64: false;
|
|
35
|
+
readonly skip: 1;
|
|
36
|
+
readonly colorDepth: 8;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
17
40
|
//# sourceMappingURL=las-loader.d.ts.map
|
package/dist/las-loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"las-loader.d.ts","sourceRoot":"","sources":["../src/las-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"las-loader.d.ts","sourceRoot":"","sources":["../src/las-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAS,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAC,OAAO,EAAC,2BAAwB;AAM7C,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAAC,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,GAAG,gBAAgB,GAAG,aAAa,CAAC;QAClD,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAC7B,8EAA8E;QAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,UAAU,CAAC,EAAE,QAAQ,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;CAsBuC,CAAC"}
|
package/dist/las-loader.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
2
2
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
3
|
-
const VERSION = typeof "4.2.0-
|
|
3
|
+
const VERSION = typeof "4.2.0-beta.1" !== 'undefined' ? "4.2.0-beta.1" : 'latest';
|
|
4
4
|
/**
|
|
5
5
|
* Loader for the LAS (LASer) point cloud format
|
|
6
6
|
* @note Does not support LAS v1.4
|
|
7
7
|
*/
|
|
8
8
|
export const LASLoader = {
|
|
9
|
+
dataType: null,
|
|
10
|
+
batchType: null,
|
|
9
11
|
name: 'LAS',
|
|
10
12
|
id: 'las',
|
|
11
13
|
module: 'las',
|
package/dist/las-worker.js
CHANGED
|
@@ -217,8 +217,10 @@
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
// src/las-loader.ts
|
|
220
|
-
var VERSION = true ? "4.2.0-
|
|
220
|
+
var VERSION = true ? "4.2.0-beta.1" : "latest";
|
|
221
221
|
var LASLoader = {
|
|
222
|
+
dataType: null,
|
|
223
|
+
batchType: null,
|
|
222
224
|
name: "LAS",
|
|
223
225
|
id: "las",
|
|
224
226
|
module: "las",
|
|
@@ -19176,6 +19178,7 @@
|
|
|
19176
19178
|
}
|
|
19177
19179
|
instance.readOffset++;
|
|
19178
19180
|
}
|
|
19181
|
+
Module._free(bufRead);
|
|
19179
19182
|
return {
|
|
19180
19183
|
buffer: thisBuf.buffer,
|
|
19181
19184
|
count: pointsRead,
|
|
@@ -19192,6 +19195,7 @@
|
|
|
19192
19195
|
close() {
|
|
19193
19196
|
try {
|
|
19194
19197
|
if (this.instance !== null) {
|
|
19198
|
+
Module._free(this.instance.buf);
|
|
19195
19199
|
this.instance.delete();
|
|
19196
19200
|
this.instance = null;
|
|
19197
19201
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"laslaz-decoder.d.ts","sourceRoot":"","sources":["../../src/lib/laslaz-decoder.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,SAAS,EAAC,uBAAoB;AAa3C,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AA0FF,cAAM,SAAS;IACb,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,MAAM,CAAK;IACvB,MAAM,EAAE,SAAS,CAaf;gBAEU,WAAW,EAAE,WAAW;IAIpC;;OAEG;IACH,IAAI;IAIJ;;;OAGG;IACH,SAAS;IAKT;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;;IA8CpC;;;OAGG;IACH,KAAK;CAKN;AAED;;;GAGG;AACH,cAAM,SAAS;IACb,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,GAAG,CAAQ;IACrB,MAAM,EAAE,SAAS,GAAG,IAAI,CAAQ;gBAEpB,WAAW,EAAE,WAAW;IASpC;;;OAGG;IACH,IAAI,IAAI,OAAO;IAoBf,SAAS,IAAI,SAAS;IActB;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IA0C9D;;;OAGG;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AC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;gBAEJ,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS;IAW/D;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE;CAQ5B;AAED;;GAEG;AACH,qBAAa,OAAO;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAK;IACrB,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B,YAAY,EAAE,OAAO,CAAQ;IAC7B,MAAM,EAAE,OAAO,CAAS;IACxB,OAAO,EAAE,MAAM,CAAK;IACpB,eAAe,EAAE,MAAM,CAAM;gBAEjB,WAAW,EAAE,WAAW;IAiBpC;;OAEG;IACH,eAAe,IAAI,IAAI;IAavB;;;OAGG;IACH,gBAAgB,IAAI,MAAM;IAO1B;;;OAGG;IACH,IAAI,IAAI,IAAI;IAKZ;;;OAGG;IACH,SAAS,IAAI,SAAS;IAItB;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAI7D;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;OACG;IACH,WAAW,IAAI,OAAO,UAAU;CAGjC;AAED,eAAO,MAAM,kBAAkB,QAAQ,CAAC"}
|
|
@@ -248,6 +248,7 @@ class LAZLoader {
|
|
|
248
248
|
}
|
|
249
249
|
instance.readOffset++;
|
|
250
250
|
}
|
|
251
|
+
Module._free(bufRead);
|
|
251
252
|
return {
|
|
252
253
|
buffer: thisBuf.buffer,
|
|
253
254
|
count: pointsRead,
|
|
@@ -265,6 +266,7 @@ class LAZLoader {
|
|
|
265
266
|
close() {
|
|
266
267
|
try {
|
|
267
268
|
if (this.instance !== null) {
|
|
269
|
+
Module._free(this.instance.buf);
|
|
268
270
|
this.instance.delete();
|
|
269
271
|
this.instance = null;
|
|
270
272
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/las",
|
|
3
|
-
"version": "4.2.0-
|
|
3
|
+
"version": "4.2.0-beta.2",
|
|
4
4
|
"description": "Framework-independent loader for the LAS and LAZ formats",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"build-worker": "esbuild src/workers/las-worker.ts --bundle --outfile=dist/las-worker.js --define:__VERSION__=\\\"$npm_package_version\\\""
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@loaders.gl/loader-utils": "4.2.0-
|
|
53
|
-
"@loaders.gl/schema": "4.2.0-
|
|
52
|
+
"@loaders.gl/loader-utils": "4.2.0-beta.2",
|
|
53
|
+
"@loaders.gl/schema": "4.2.0-beta.2",
|
|
54
54
|
"laz-perf": "^0.0.6"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@loaders.gl/core": "^4.0.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "13c03663fec365a4d24c06377d50035cebd7ba9f"
|
|
60
60
|
}
|
package/src/index.ts
CHANGED
|
@@ -13,10 +13,10 @@ export {LASWorkerLoader};
|
|
|
13
13
|
* Loader for the LAS (LASer) point cloud format
|
|
14
14
|
* @note Does not support LAS v1.4
|
|
15
15
|
*/
|
|
16
|
-
export const LASLoader
|
|
16
|
+
export const LASLoader = {
|
|
17
17
|
...LASWorkerLoader,
|
|
18
18
|
parse: async (arrayBuffer: ArrayBuffer, options?: LASLoaderOptions) =>
|
|
19
19
|
parseLAS(arrayBuffer, options),
|
|
20
20
|
parseSync: (arrayBuffer: ArrayBuffer, options?: LASLoaderOptions) =>
|
|
21
21
|
parseLAS(arrayBuffer, options)
|
|
22
|
-
}
|
|
22
|
+
} as const satisfies LoaderWithParser<LASMesh, never, LASLoaderOptions>;
|
package/src/las-loader.ts
CHANGED
|
@@ -12,6 +12,8 @@ export type LASLoaderOptions = LoaderOptions & {
|
|
|
12
12
|
fp64?: boolean;
|
|
13
13
|
skip?: number;
|
|
14
14
|
colorDepth?: number | string;
|
|
15
|
+
/** Override the URL to the worker bundle (by default loads from unpkg.com) */
|
|
16
|
+
workerUrl?: string;
|
|
15
17
|
};
|
|
16
18
|
onProgress?: Function;
|
|
17
19
|
};
|
|
@@ -20,7 +22,10 @@ export type LASLoaderOptions = LoaderOptions & {
|
|
|
20
22
|
* Loader for the LAS (LASer) point cloud format
|
|
21
23
|
* @note Does not support LAS v1.4
|
|
22
24
|
*/
|
|
23
|
-
export const LASLoader
|
|
25
|
+
export const LASLoader = {
|
|
26
|
+
dataType: null as unknown as LASMesh,
|
|
27
|
+
batchType: null as never,
|
|
28
|
+
|
|
24
29
|
name: 'LAS',
|
|
25
30
|
id: 'las',
|
|
26
31
|
module: 'las',
|
|
@@ -39,4 +44,4 @@ export const LASLoader: Loader<LASMesh, never, LASLoaderOptions> = {
|
|
|
39
44
|
colorDepth: 8
|
|
40
45
|
}
|
|
41
46
|
}
|
|
42
|
-
}
|
|
47
|
+
} as const satisfies Loader<LASMesh, never, LASLoaderOptions>;
|
|
@@ -305,7 +305,7 @@ class LAZLoader {
|
|
|
305
305
|
|
|
306
306
|
instance.readOffset++;
|
|
307
307
|
}
|
|
308
|
-
|
|
308
|
+
Module._free(bufRead);
|
|
309
309
|
return {
|
|
310
310
|
buffer: thisBuf.buffer,
|
|
311
311
|
count: pointsRead,
|
|
@@ -323,6 +323,7 @@ class LAZLoader {
|
|
|
323
323
|
close(): boolean {
|
|
324
324
|
try {
|
|
325
325
|
if (this.instance !== null) {
|
|
326
|
+
Module._free(this.instance.buf);
|
|
326
327
|
this.instance.delete();
|
|
327
328
|
this.instance = null;
|
|
328
329
|
}
|