@selvajs/compute 1.5.3 → 2.0.0-beta.1

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.
Files changed (66) hide show
  1. package/dist/chunk-3FH7FKLG.cjs +2 -0
  2. package/dist/chunk-3FH7FKLG.cjs.map +1 -0
  3. package/dist/chunk-DELOBV2Q.js +2 -0
  4. package/dist/chunk-DELOBV2Q.js.map +1 -0
  5. package/dist/chunk-GTTKNF4G.js +4 -0
  6. package/dist/chunk-GTTKNF4G.js.map +1 -0
  7. package/dist/chunk-JFLD2UCY.cjs +2 -0
  8. package/dist/chunk-JFLD2UCY.cjs.map +1 -0
  9. package/dist/chunk-MA6YB3YZ.cjs +4 -0
  10. package/dist/chunk-MA6YB3YZ.cjs.map +1 -0
  11. package/dist/chunk-MKW2KTPT.js +2 -0
  12. package/dist/chunk-MKW2KTPT.js.map +1 -0
  13. package/dist/core.cjs +1 -1
  14. package/dist/core.cjs.map +1 -1
  15. package/dist/core.d.cts +10 -15
  16. package/dist/core.d.ts +10 -15
  17. package/dist/core.js +1 -1
  18. package/dist/grasshopper.cjs +1 -1
  19. package/dist/grasshopper.cjs.map +1 -1
  20. package/dist/grasshopper.d.cts +77 -101
  21. package/dist/grasshopper.d.ts +77 -101
  22. package/dist/grasshopper.js +1 -1
  23. package/dist/handle-files-DsrxHKHP.d.cts +262 -0
  24. package/dist/handle-files-DsrxHKHP.d.ts +262 -0
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +4 -4
  28. package/dist/index.d.ts +4 -4
  29. package/dist/index.js +1 -1
  30. package/dist/{types-Dfeei0dD.d.cts → types-CJ092lxB.d.cts} +116 -73
  31. package/dist/types-D1SkNje_.d.cts +87 -0
  32. package/dist/types-D1SkNje_.d.ts +87 -0
  33. package/dist/{types-Dfeei0dD.d.ts → types-XCUrJGby.d.ts} +116 -73
  34. package/dist/visualization-GU7JIB4V.cjs +2 -0
  35. package/dist/visualization-GU7JIB4V.cjs.map +1 -0
  36. package/dist/visualization-WIUVT2FZ.js +2 -0
  37. package/dist/visualization.cjs +1 -1
  38. package/dist/visualization.cjs.map +1 -1
  39. package/dist/visualization.d.cts +16 -21
  40. package/dist/visualization.d.ts +16 -21
  41. package/dist/visualization.js +1 -1
  42. package/package.json +18 -7
  43. package/dist/chunk-GZYSQSLH.cjs +0 -2
  44. package/dist/chunk-GZYSQSLH.cjs.map +0 -1
  45. package/dist/chunk-JZYEMZZ5.js +0 -2
  46. package/dist/chunk-JZYEMZZ5.js.map +0 -1
  47. package/dist/chunk-OEDLGVIQ.js +0 -2
  48. package/dist/chunk-OEDLGVIQ.js.map +0 -1
  49. package/dist/chunk-OW6HV6QP.js +0 -2
  50. package/dist/chunk-OW6HV6QP.js.map +0 -1
  51. package/dist/chunk-RBNF6MNH.cjs +0 -3
  52. package/dist/chunk-RBNF6MNH.cjs.map +0 -1
  53. package/dist/chunk-SVEXPGHW.cjs +0 -2
  54. package/dist/chunk-SVEXPGHW.cjs.map +0 -1
  55. package/dist/chunk-XBIEAJBK.js +0 -3
  56. package/dist/chunk-XBIEAJBK.js.map +0 -1
  57. package/dist/chunk-ZRQRYG6F.cjs +0 -2
  58. package/dist/chunk-ZRQRYG6F.cjs.map +0 -1
  59. package/dist/errors-CEy4nM1J.d.cts +0 -149
  60. package/dist/errors-CEy4nM1J.d.ts +0 -149
  61. package/dist/types-COCuQEMk.d.cts +0 -93
  62. package/dist/types-COCuQEMk.d.ts +0 -93
  63. package/dist/visualization-ENMBHWIN.js +0 -2
  64. package/dist/visualization-TBPFFBFU.cjs +0 -2
  65. package/dist/visualization-TBPFFBFU.cjs.map +0 -1
  66. /package/dist/{visualization-ENMBHWIN.js.map → visualization-WIUVT2FZ.js.map} +0 -0
@@ -1,93 +0,0 @@
1
- /**
2
- * Material properties for Three.js rendering.
3
- */
4
- interface SerializableMaterial {
5
- color: string;
6
- metalness: number;
7
- roughness: number;
8
- opacity: number;
9
- transparent: boolean;
10
- }
11
- /**
12
- * Metadata for a single mesh within a batch.
13
- *
14
- * Offsets and counts are expressed in **vertex-count units** (not float components) and
15
- * **index-count units**. To address the typed-array storage:
16
- * - vertex component offset = `vertexStart * 3`
17
- * - vertex component count = `vertexCount * 3`
18
- * - index byte offset = `indexStart * 4`
19
- * - index count = `indexCount`
20
- */
21
- interface MeshMetadata {
22
- name: string;
23
- /** Layer path for grouping in the scene manager (e.g. 'Structure/Walls') */
24
- layer: string;
25
- /** Original index in the GH input tree before material grouping. Combined with
26
- * MeshBatch.sourceComponentId to uniquely identify the GH source geometry. */
27
- originalIndex: number;
28
- /** Number of vertices in this mesh (each vertex is 3 components: x, y, z). */
29
- vertexCount: number;
30
- /** Number of indices in this mesh (3 per triangle). */
31
- indexCount: number;
32
- /** Index of this mesh's first vertex in the combined vertex array, in vertex-count units.
33
- * The corresponding component offset into the int16/float32 typed array is `vertexStart * 3`. */
34
- vertexStart: number;
35
- /** Index of this mesh's first index in the combined index array, in index-count units. */
36
- indexStart: number;
37
- /** Arbitrary key-value pairs from the GH Metadata input */
38
- metadata?: Record<string, string>;
39
- }
40
- /**
41
- * A group of meshes sharing the same material.
42
- */
43
- interface MaterialGroup {
44
- /** Reference to the material ID in the materials array */
45
- materialId: number;
46
- /** Individual meshes in this group */
47
- meshes: MeshMetadata[];
48
- }
49
- /**
50
- * Batched mesh data optimized for Three.js rendering.
51
- *
52
- * `compressedData` contains the binary "SLVA" blob (header + metadata JSON + quantized int16 or
53
- * float32 vertices + uint32 indices), base64-encoded for transit inside the values JSON envelope.
54
- * The blob is opaque to the outer JSON: a future binary WebSocket frame can drop the base64 step
55
- * without changing this shape.
56
- */
57
- interface MeshBatch {
58
- /** Array of unique materials */
59
- materials: SerializableMaterial[];
60
- /** Groups of meshes organized by material */
61
- groups: MaterialGroup[];
62
- /** Base64-encoded binary blob (SLVA wire format). */
63
- compressedData: string;
64
- /** InstanceGuid of the WebDisplay GH component that produced this batch.
65
- * Combined with MeshMetadata.originalIndex to backtrack any mesh to its GH source. */
66
- sourceComponentId?: string;
67
- }
68
- /**
69
- * Options for parsing mesh batch data.
70
- */
71
- interface MeshBatchParsingOptions {
72
- /** Merge meshes with same material into single geometry (better performance). Defaults to true. */
73
- mergeByMaterial?: boolean;
74
- /** Apply coordinate system transformations (Rhino Z-up to Three.js Y-up). Defaults to true. */
75
- applyTransforms?: boolean;
76
- /** Enable performance monitoring in console. Defaults to false. */
77
- debug?: boolean;
78
- }
79
- /**
80
- * Options for extracting and processing meshes from compute responses.
81
- */
82
- interface MeshExtractionOptions {
83
- /** Configuration for parsing mesh batches. */
84
- parsing?: MeshBatchParsingOptions;
85
- /** Apply scaling based on model units. Defaults to true. */
86
- allowScaling?: boolean;
87
- /** Apply automatic ground offset positioning (Z=0). Defaults to true. */
88
- allowAutoPosition?: boolean;
89
- /** Enable verbose logging. Defaults to false. */
90
- debug?: boolean;
91
- }
92
-
93
- export type { MeshExtractionOptions as M, MeshBatch as a };
@@ -1,93 +0,0 @@
1
- /**
2
- * Material properties for Three.js rendering.
3
- */
4
- interface SerializableMaterial {
5
- color: string;
6
- metalness: number;
7
- roughness: number;
8
- opacity: number;
9
- transparent: boolean;
10
- }
11
- /**
12
- * Metadata for a single mesh within a batch.
13
- *
14
- * Offsets and counts are expressed in **vertex-count units** (not float components) and
15
- * **index-count units**. To address the typed-array storage:
16
- * - vertex component offset = `vertexStart * 3`
17
- * - vertex component count = `vertexCount * 3`
18
- * - index byte offset = `indexStart * 4`
19
- * - index count = `indexCount`
20
- */
21
- interface MeshMetadata {
22
- name: string;
23
- /** Layer path for grouping in the scene manager (e.g. 'Structure/Walls') */
24
- layer: string;
25
- /** Original index in the GH input tree before material grouping. Combined with
26
- * MeshBatch.sourceComponentId to uniquely identify the GH source geometry. */
27
- originalIndex: number;
28
- /** Number of vertices in this mesh (each vertex is 3 components: x, y, z). */
29
- vertexCount: number;
30
- /** Number of indices in this mesh (3 per triangle). */
31
- indexCount: number;
32
- /** Index of this mesh's first vertex in the combined vertex array, in vertex-count units.
33
- * The corresponding component offset into the int16/float32 typed array is `vertexStart * 3`. */
34
- vertexStart: number;
35
- /** Index of this mesh's first index in the combined index array, in index-count units. */
36
- indexStart: number;
37
- /** Arbitrary key-value pairs from the GH Metadata input */
38
- metadata?: Record<string, string>;
39
- }
40
- /**
41
- * A group of meshes sharing the same material.
42
- */
43
- interface MaterialGroup {
44
- /** Reference to the material ID in the materials array */
45
- materialId: number;
46
- /** Individual meshes in this group */
47
- meshes: MeshMetadata[];
48
- }
49
- /**
50
- * Batched mesh data optimized for Three.js rendering.
51
- *
52
- * `compressedData` contains the binary "SLVA" blob (header + metadata JSON + quantized int16 or
53
- * float32 vertices + uint32 indices), base64-encoded for transit inside the values JSON envelope.
54
- * The blob is opaque to the outer JSON: a future binary WebSocket frame can drop the base64 step
55
- * without changing this shape.
56
- */
57
- interface MeshBatch {
58
- /** Array of unique materials */
59
- materials: SerializableMaterial[];
60
- /** Groups of meshes organized by material */
61
- groups: MaterialGroup[];
62
- /** Base64-encoded binary blob (SLVA wire format). */
63
- compressedData: string;
64
- /** InstanceGuid of the WebDisplay GH component that produced this batch.
65
- * Combined with MeshMetadata.originalIndex to backtrack any mesh to its GH source. */
66
- sourceComponentId?: string;
67
- }
68
- /**
69
- * Options for parsing mesh batch data.
70
- */
71
- interface MeshBatchParsingOptions {
72
- /** Merge meshes with same material into single geometry (better performance). Defaults to true. */
73
- mergeByMaterial?: boolean;
74
- /** Apply coordinate system transformations (Rhino Z-up to Three.js Y-up). Defaults to true. */
75
- applyTransforms?: boolean;
76
- /** Enable performance monitoring in console. Defaults to false. */
77
- debug?: boolean;
78
- }
79
- /**
80
- * Options for extracting and processing meshes from compute responses.
81
- */
82
- interface MeshExtractionOptions {
83
- /** Configuration for parsing mesh batches. */
84
- parsing?: MeshBatchParsingOptions;
85
- /** Apply scaling based on model units. Defaults to true. */
86
- allowScaling?: boolean;
87
- /** Apply automatic ground offset positioning (Z=0). Defaults to true. */
88
- allowAutoPosition?: boolean;
89
- /** Enable verbose logging. Defaults to false. */
90
- debug?: boolean;
91
- }
92
-
93
- export type { MeshExtractionOptions as M, MeshBatch as a };
@@ -1,2 +0,0 @@
1
- import{a as e,b as r,c as o,d as t,e as a,f as s,g as i,h as p,i as n,j as h,k as M,l as f,m,n as B,o as C}from"./chunk-OEDLGVIQ.js";import"./chunk-OW6HV6QP.js";import"./chunk-XBIEAJBK.js";export{i as BINARY_MESH_MAGIC,p as BINARY_MESH_VERSION,n as FLAG_FLOAT32,s as Materials,B as SCALE_FACTORS,t as applyOffset,a as computeCombinedBoundingBox,C as getThreeMeshesFromComputeResponse,e as initThree,h as parseBinaryMeshBatch,o as parseColor,M as parseMeshBatch,m as parseMeshBatchBlob,f as parseMeshBatchObject,r as updateScene};
2
- //# sourceMappingURL=visualization-ENMBHWIN.js.map
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSVEXPGHWcjs = require('./chunk-SVEXPGHW.cjs');require('./chunk-ZRQRYG6F.cjs');require('./chunk-RBNF6MNH.cjs');exports.BINARY_MESH_MAGIC = _chunkSVEXPGHWcjs.g; exports.BINARY_MESH_VERSION = _chunkSVEXPGHWcjs.h; exports.FLAG_FLOAT32 = _chunkSVEXPGHWcjs.i; exports.Materials = _chunkSVEXPGHWcjs.f; exports.SCALE_FACTORS = _chunkSVEXPGHWcjs.n; exports.applyOffset = _chunkSVEXPGHWcjs.d; exports.computeCombinedBoundingBox = _chunkSVEXPGHWcjs.e; exports.getThreeMeshesFromComputeResponse = _chunkSVEXPGHWcjs.o; exports.initThree = _chunkSVEXPGHWcjs.a; exports.parseBinaryMeshBatch = _chunkSVEXPGHWcjs.j; exports.parseColor = _chunkSVEXPGHWcjs.c; exports.parseMeshBatch = _chunkSVEXPGHWcjs.k; exports.parseMeshBatchBlob = _chunkSVEXPGHWcjs.m; exports.parseMeshBatchObject = _chunkSVEXPGHWcjs.l; exports.updateScene = _chunkSVEXPGHWcjs.b;
2
- //# sourceMappingURL=visualization-TBPFFBFU.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/selva-compute/selva-compute/dist/visualization-TBPFFBFU.cjs"],"names":[],"mappings":"AAAA,iIAAqI,gCAA6B,gCAA6B,itBAAoV","file":"/home/runner/work/selva-compute/selva-compute/dist/visualization-TBPFFBFU.cjs"}