-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Enable both lazperf and laz-rs-wasm
- Loading branch information
Showing
22 changed files
with
21,427 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// loaders.gl | ||
// SPDX-License-Identifier: MIT | ||
// Copyright (c) vis.gl contributors | ||
|
||
// LASER (LAS) FILE FORMAT | ||
import type {LoaderWithParser} from '@loaders.gl/loader-utils'; | ||
import type {LASLoaderOptions} from './las-loader'; | ||
import {LASWorkerLoader} from './las-loader'; | ||
import type {LASMesh} from './lib/las-types'; | ||
import {parseLAS} from './lib/laz-rs-wasm/parse-las'; | ||
import initLazRsWasm from './libs/laz-rs-wasm/laz_rs_wasm'; | ||
|
||
/** | ||
* Loader for the LAS (LASer) point cloud format | ||
*/ | ||
export const LAZRsLoader = { | ||
...LASWorkerLoader, | ||
parse: async (arrayBuffer: ArrayBuffer, options?: LASLoaderOptions) => { | ||
await initLazRsWasm(); | ||
return parseLAS(arrayBuffer, {...options}); | ||
} | ||
} as const satisfies LoaderWithParser<LASMesh, never, LASLoaderOptions>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// loaders.gl | ||
// SPDX-License-Identifier: MIT | ||
// Copyright (c) vis.gl contributors | ||
|
||
// LASER (LAS) FILE FORMAT | ||
import type {LoaderWithParser} from '@loaders.gl/loader-utils'; | ||
import type {LASLoaderOptions} from './las-loader'; | ||
import {LASWorkerLoader} from './las-loader'; | ||
import type {LASMesh} from './lib/las-types'; | ||
import {parseLAS} from './lib/laz-perf/parse-las'; | ||
|
||
/** | ||
* Loader for the LAS (LASer) point cloud format | ||
* @note Does not support LAS v1.4 | ||
*/ | ||
export const LAZPerfLoader = { | ||
...LASWorkerLoader, | ||
parse: async (arrayBuffer: ArrayBuffer, options?: LASLoaderOptions) => | ||
parseLAS(arrayBuffer, options), | ||
parseSync: (arrayBuffer: ArrayBuffer, options?: LASLoaderOptions) => | ||
parseLAS(arrayBuffer, options) | ||
} as const satisfies LoaderWithParser<LASMesh, never, LASLoaderOptions>; |
Oops, something went wrong.