@rings-webgpu/core 1.0.29 → 1.0.31
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/rings.es.js +217 -211
- package/dist/rings.es.js.map +3 -3
- package/dist/rings.es.max.js +717 -123
- package/dist/rings.umd.js +217 -211
- package/dist/rings.umd.js.map +3 -3
- package/dist/rings.umd.max.js +720 -122
- package/dist/types/index.d.ts +4 -0
- package/dist/types/loader/parser/las/LASLoader.d.ts +45 -0
- package/dist/types/loader/parser/las/LASParser.d.ts +39 -0
- package/dist/types/loader/parser/las/LASTypes.d.ts +71 -0
- package/dist/types/loader/parser/las/LASUtils.d.ts +37 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -428,6 +428,10 @@ export * from "./loader/parser/kmz/dataDef/global";
|
|
|
428
428
|
export * from "./loader/parser/kmz/dataDef/point";
|
|
429
429
|
export * from "./loader/parser/kmz/dataDef/template";
|
|
430
430
|
export * from "./loader/parser/kmz/dataDef/wayline";
|
|
431
|
+
export * from "./loader/parser/las/LASLoader";
|
|
432
|
+
export * from "./loader/parser/las/LASParser";
|
|
433
|
+
export * from "./loader/parser/las/LASTypes";
|
|
434
|
+
export * from "./loader/parser/las/LASUtils";
|
|
431
435
|
export * from "./loader/parser/ply/PlyLoader";
|
|
432
436
|
export * from "./loader/parser/ply/PlyParser";
|
|
433
437
|
export * from "./loader/parser/ply/PlyTypes";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LASData, LASBinaryData, LASParsedData } from "./LASTypes";
|
|
2
|
+
/**
|
|
3
|
+
* LAS file loader
|
|
4
|
+
* Parses both ASCII (Log ASCII Standard) and Binary (LIDAR Point Cloud) LAS format files
|
|
5
|
+
*/
|
|
6
|
+
export declare class LASLoader {
|
|
7
|
+
/**
|
|
8
|
+
* Parse LAS file (supports both ASCII text and binary buffer)
|
|
9
|
+
* @param input LAS file content as string or ArrayBuffer
|
|
10
|
+
* @returns Parsed LAS data (ASCII or Binary)
|
|
11
|
+
*/
|
|
12
|
+
parse(input: string | ArrayBuffer): Promise<LASParsedData>;
|
|
13
|
+
/**
|
|
14
|
+
* Parse ASCII LAS (Log ASCII Standard) format
|
|
15
|
+
* @param text LAS file content as string
|
|
16
|
+
* @returns Parsed ASCII LAS data
|
|
17
|
+
*/
|
|
18
|
+
parseText(text: string): Promise<LASData>;
|
|
19
|
+
/**
|
|
20
|
+
* Parse binary LAS (LIDAR Point Cloud) format
|
|
21
|
+
* @param buffer LAS file content as ArrayBuffer
|
|
22
|
+
* @returns Parsed binary LAS data
|
|
23
|
+
*/
|
|
24
|
+
parseBinary(buffer: ArrayBuffer): Promise<LASBinaryData>;
|
|
25
|
+
/**
|
|
26
|
+
* Parse version information section (~VERSION)
|
|
27
|
+
*/
|
|
28
|
+
private parseMetadata;
|
|
29
|
+
/**
|
|
30
|
+
* Parse well information section (~WELL)
|
|
31
|
+
*/
|
|
32
|
+
private parseWellParams;
|
|
33
|
+
/**
|
|
34
|
+
* Parse curve information section (~CURVE)
|
|
35
|
+
*/
|
|
36
|
+
private parseCurveParams;
|
|
37
|
+
/**
|
|
38
|
+
* Parse headers (column names) from curve section
|
|
39
|
+
*/
|
|
40
|
+
private parseHeaders;
|
|
41
|
+
/**
|
|
42
|
+
* Parse ASCII data section (~A)
|
|
43
|
+
*/
|
|
44
|
+
private parseData;
|
|
45
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ParserBase } from "../ParserBase";
|
|
2
|
+
import { ParserFormat } from "../ParserFormat";
|
|
3
|
+
import { LASVisualizationMode } from "./LASTypes";
|
|
4
|
+
/**
|
|
5
|
+
* LAS format parser
|
|
6
|
+
* Organizes parsed LAS data (from LASLoader) into renderable objects
|
|
7
|
+
* Supports multiple visualization modes: point cloud, curve, and well trajectory
|
|
8
|
+
*/
|
|
9
|
+
export declare class LASParser extends ParserBase {
|
|
10
|
+
static format: ParserFormat;
|
|
11
|
+
visualizationMode: LASVisualizationMode;
|
|
12
|
+
parseBuffer(buffer: ArrayBuffer): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Create visualization from parsed LAS data
|
|
15
|
+
*/
|
|
16
|
+
private createVisualization;
|
|
17
|
+
/**
|
|
18
|
+
* Create point cloud visualization from binary LAS data
|
|
19
|
+
*/
|
|
20
|
+
private createBinaryPointCloudVisualization;
|
|
21
|
+
verification(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Create point cloud visualization from LAS data
|
|
24
|
+
* Depth as Z axis, curve values as X/Y axes
|
|
25
|
+
*/
|
|
26
|
+
private createPointCloudVisualization;
|
|
27
|
+
/**
|
|
28
|
+
* Create curve visualization using FatLineRenderer
|
|
29
|
+
* Depth as Z axis, normalized curve value as X axis
|
|
30
|
+
*/
|
|
31
|
+
private createCurveVisualization;
|
|
32
|
+
/**
|
|
33
|
+
* Create well trajectory visualization
|
|
34
|
+
* TODO: Implement when well trajectory data is available
|
|
35
|
+
*/
|
|
36
|
+
private createWellTrajectoryVisualization;
|
|
37
|
+
private normalizeValue;
|
|
38
|
+
private mapValueToColor;
|
|
39
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for LAS format
|
|
3
|
+
* Supports both ASCII (Log ASCII Standard) and Binary (LIDAR Point Cloud) formats
|
|
4
|
+
*/
|
|
5
|
+
export interface LASMetadata {
|
|
6
|
+
version: number;
|
|
7
|
+
wrap: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface LASWellParams {
|
|
10
|
+
[key: string]: {
|
|
11
|
+
unit: string;
|
|
12
|
+
value: string | number;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface LASCurveParams {
|
|
17
|
+
[key: string]: {
|
|
18
|
+
unit: string;
|
|
19
|
+
value: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* ASCII LAS (Log ASCII Standard) data structure
|
|
25
|
+
*/
|
|
26
|
+
export interface LASData {
|
|
27
|
+
headers: string[];
|
|
28
|
+
data: Array<Array<string | number>>;
|
|
29
|
+
wellParams: LASWellParams;
|
|
30
|
+
curveParams: LASCurveParams;
|
|
31
|
+
metadata: LASMetadata;
|
|
32
|
+
nullValue: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Binary LAS (LIDAR Point Cloud) data structure
|
|
36
|
+
*/
|
|
37
|
+
export interface LASBinaryData {
|
|
38
|
+
format: 'binary';
|
|
39
|
+
version: number;
|
|
40
|
+
pointDataFormat: number;
|
|
41
|
+
numPoints: number;
|
|
42
|
+
positions: Float32Array;
|
|
43
|
+
colors: Uint8Array;
|
|
44
|
+
bbox: {
|
|
45
|
+
xMin: number;
|
|
46
|
+
xMax: number;
|
|
47
|
+
yMin: number;
|
|
48
|
+
yMax: number;
|
|
49
|
+
zMin: number;
|
|
50
|
+
zMax: number;
|
|
51
|
+
};
|
|
52
|
+
scale: {
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
z: number;
|
|
56
|
+
};
|
|
57
|
+
offset: {
|
|
58
|
+
x: number;
|
|
59
|
+
y: number;
|
|
60
|
+
z: number;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Union type for both ASCII and Binary LAS data
|
|
65
|
+
*/
|
|
66
|
+
export type LASParsedData = LASData | LASBinaryData;
|
|
67
|
+
export declare enum LASVisualizationMode {
|
|
68
|
+
PointCloud = "pointcloud",// Point cloud mode (depth as Z, curve values as X/Y)
|
|
69
|
+
Curve = "curve",// Curve mode (3D curve using FatLine)
|
|
70
|
+
WellTrajectory = "trajectory"
|
|
71
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for LAS file parsing
|
|
3
|
+
*/
|
|
4
|
+
export declare class LASUtils {
|
|
5
|
+
/**
|
|
6
|
+
* Split array into chunks of specified size
|
|
7
|
+
*/
|
|
8
|
+
static chunk<T>(arr: T[], size: number): T[][];
|
|
9
|
+
/**
|
|
10
|
+
* Remove comments from text (lines starting with #)
|
|
11
|
+
*/
|
|
12
|
+
static removeComment(str: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Convert string to number or string
|
|
15
|
+
* Returns number if string represents a valid number, otherwise returns string
|
|
16
|
+
*/
|
|
17
|
+
static convertToValue(s: string): number | string;
|
|
18
|
+
/**
|
|
19
|
+
* Parse a LAS section from text
|
|
20
|
+
* @param text Full LAS file text
|
|
21
|
+
* @param sectionName Section name (e.g., 'VERSION', 'WELL', 'CURVE')
|
|
22
|
+
* @returns Section content as string
|
|
23
|
+
*/
|
|
24
|
+
static parseSection(text: string, sectionName: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Parse a parameter line from LAS file
|
|
27
|
+
* Format: MNEM.UNIT VALUE :DESCRIPTION
|
|
28
|
+
* @param line Parameter line text
|
|
29
|
+
* @returns Parsed parameter object
|
|
30
|
+
*/
|
|
31
|
+
static parseParameterLine(line: string): {
|
|
32
|
+
mnemonic: string;
|
|
33
|
+
unit: string;
|
|
34
|
+
value: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
}
|