@rings-webgpu/core 1.0.26 → 1.0.27

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.
@@ -427,6 +427,7 @@ export * from "./loader/parser/kmz/dataDef/point";
427
427
  export * from "./loader/parser/kmz/dataDef/template";
428
428
  export * from "./loader/parser/kmz/dataDef/wayline";
429
429
  export * from "./loader/parser/ply/PlyLoader";
430
+ export * from "./loader/parser/ply/PlyParser";
430
431
  export * from "./loader/parser/ply/PlyTypes";
431
432
  export * from "./loader/parser/ply/PlyUtils";
432
433
  export * from "./loader/parser/prefab/PrefabAvatarParser";
@@ -1,9 +1,13 @@
1
- import { PlyHeader, PlyGaussianSplatData } from './PlyTypes';
1
+ import { PlyHeader, PlyGaussianSplatData, PlyMeshData } from './PlyTypes';
2
2
  /**
3
3
  * Parse PLY header from buffer
4
4
  */
5
5
  export declare function parsePlyHeader(buffer: ArrayBuffer): PlyHeader;
6
6
  /**
7
- * Parse PLY binary data for Gaussian Splatting
7
+ * Parse PLY data for Gaussian Splatting (supports both binary and ASCII)
8
8
  */
9
9
  export declare function parsePlyGaussianSplat(buffer: ArrayBuffer): PlyGaussianSplatData;
10
+ /**
11
+ * Parse PLY data for Mesh
12
+ */
13
+ export declare function parsePlyMesh(buffer: ArrayBuffer): PlyMeshData;
@@ -0,0 +1,7 @@
1
+ import { ParserBase } from "../ParserBase";
2
+ import { ParserFormat } from "../ParserFormat";
3
+ export declare class PlyParser extends ParserBase {
4
+ static format: ParserFormat;
5
+ parseBuffer(buffer: ArrayBuffer): Promise<void>;
6
+ verification(): boolean;
7
+ }
@@ -5,14 +5,25 @@ export type PlyProperty = {
5
5
  name: string;
6
6
  type: string;
7
7
  };
8
+ export declare const enum PlyMode {
9
+ Splat = 0,
10
+ PointCloud = 1,
11
+ Mesh = 2
12
+ }
13
+ export declare const splatProperties: string[];
14
+ export declare const splatColorProperties: string[];
8
15
  /**
9
16
  * PLY header information
10
17
  */
11
18
  export type PlyHeader = {
12
19
  format: string;
13
20
  vertexCount: number;
21
+ faceCount: number;
14
22
  properties: PlyProperty[];
23
+ faceProperties?: PlyProperty[];
24
+ textureFiles: string[];
15
25
  headerByteLength: number;
26
+ mode: PlyMode;
16
27
  };
17
28
  /**
18
29
  * Parsed PLY data for Gaussian Splatting
@@ -28,3 +39,17 @@ export type PlyGaussianSplatData = {
28
39
  coeffs: Float32Array;
29
40
  };
30
41
  };
42
+ /**
43
+ * Parsed PLY data for Mesh
44
+ */
45
+ export type PlyMeshData = {
46
+ vertexCount: number;
47
+ faceCount: number;
48
+ position: Float32Array;
49
+ normal: Float32Array;
50
+ color?: Float32Array;
51
+ uv?: Float32Array;
52
+ indices: Uint32Array;
53
+ textureFiles?: string[];
54
+ triangleTexnumbers?: number[];
55
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rings-webgpu/core",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "Rings webgpu Engine",
5
5
  "main": "index.js",
6
6
  "exports": {