@selvajs/compute 1.5.2-beta.6 → 1.5.2-beta.7

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTRLKUOOFcjs = require('./chunk-TRLKUOOF.cjs');require('./chunk-MZGKJZVP.cjs');require('./chunk-VWOEUM7C.cjs');exports.Materials = _chunkTRLKUOOFcjs.f; exports.SCALE_FACTORS = _chunkTRLKUOOFcjs.n; exports.getThreeMeshesFromComputeResponse = _chunkTRLKUOOFcjs.o; exports.initThree = _chunkTRLKUOOFcjs.a; exports.parseMeshBatchObject = _chunkTRLKUOOFcjs.l; exports.updateScene = _chunkTRLKUOOFcjs.b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTRLKUOOFcjs = require('./chunk-TRLKUOOF.cjs');require('./chunk-MZGKJZVP.cjs');require('./chunk-VWOEUM7C.cjs');exports.Materials = _chunkTRLKUOOFcjs.f; exports.SCALE_FACTORS = _chunkTRLKUOOFcjs.n; exports.getThreeMeshesFromComputeResponse = _chunkTRLKUOOFcjs.o; exports.initThree = _chunkTRLKUOOFcjs.a; exports.parseMeshBatchBlob = _chunkTRLKUOOFcjs.m; exports.parseMeshBatchObject = _chunkTRLKUOOFcjs.l; exports.updateScene = _chunkTRLKUOOFcjs.b;
2
2
  //# sourceMappingURL=visualization.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/selva-compute/selva-compute/dist/visualization.cjs"],"names":[],"mappings":"AAAA,iIAA2E,gCAA6B,gCAA6B,8RAA2I","file":"/home/runner/work/selva-compute/selva-compute/dist/visualization.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/selva-compute/selva-compute/dist/visualization.cjs"],"names":[],"mappings":"AAAA,iIAA6E,gCAA6B,gCAA6B,gVAAmK","file":"/home/runner/work/selva-compute/selva-compute/dist/visualization.cjs"}
@@ -201,5 +201,27 @@ declare function parseMeshBatchObject(batch: MeshBatch, options?: {
201
201
  /** Performance start time (optional, for debugging) */
202
202
  perfStart?: number;
203
203
  }): Promise<THREE.Mesh[]>;
204
+ /**
205
+ * Parses a raw binary mesh batch blob (SLVA wire format) and creates Three.js meshes.
206
+ *
207
+ * Use this entry point when the blob arrives as a binary WebSocket frame (Phase 1b transport):
208
+ * the JSON envelope no longer carries `displayData`, so there's nothing to `JSON.parse`. The blob
209
+ * is self-describing — materials, groups, and `sourceComponentId` come from its embedded metadata
210
+ * header.
211
+ *
212
+ * @param blob - Raw blob bytes from a binary WebSocket frame.
213
+ * @param options - Rendering options.
214
+ * @returns Promise resolving to array of Three.js mesh objects.
215
+ */
216
+ declare function parseMeshBatchBlob(blob: ArrayBuffer | Uint8Array, options?: {
217
+ /** Merge meshes with same material into single geometry */
218
+ mergeByMaterial?: boolean;
219
+ /** Apply coordinate system transformations */
220
+ applyTransforms?: boolean;
221
+ /** Scale factor to apply to meshes (e.g., for unit conversion) */
222
+ scaleFactor?: number;
223
+ /** Enable performance monitoring */
224
+ debug?: boolean;
225
+ }): Promise<THREE.Mesh[]>;
204
226
 
205
- export { type CameraConfig, type ControlsConfig, type EnvironmentConfig, type EventConfig, type FloorConfig, type LightingConfig, threeMaterials as Materials, MeshBatch, MeshExtractionOptions, type RenderConfig, SCALE_FACTORS, type ThreeInitializerOptions, getThreeMeshesFromComputeResponse, initThree, parseMeshBatchObject, updateScene };
227
+ export { type CameraConfig, type ControlsConfig, type EnvironmentConfig, type EventConfig, type FloorConfig, type LightingConfig, threeMaterials as Materials, MeshBatch, MeshExtractionOptions, type RenderConfig, SCALE_FACTORS, type ThreeInitializerOptions, getThreeMeshesFromComputeResponse, initThree, parseMeshBatchBlob, parseMeshBatchObject, updateScene };
@@ -201,5 +201,27 @@ declare function parseMeshBatchObject(batch: MeshBatch, options?: {
201
201
  /** Performance start time (optional, for debugging) */
202
202
  perfStart?: number;
203
203
  }): Promise<THREE.Mesh[]>;
204
+ /**
205
+ * Parses a raw binary mesh batch blob (SLVA wire format) and creates Three.js meshes.
206
+ *
207
+ * Use this entry point when the blob arrives as a binary WebSocket frame (Phase 1b transport):
208
+ * the JSON envelope no longer carries `displayData`, so there's nothing to `JSON.parse`. The blob
209
+ * is self-describing — materials, groups, and `sourceComponentId` come from its embedded metadata
210
+ * header.
211
+ *
212
+ * @param blob - Raw blob bytes from a binary WebSocket frame.
213
+ * @param options - Rendering options.
214
+ * @returns Promise resolving to array of Three.js mesh objects.
215
+ */
216
+ declare function parseMeshBatchBlob(blob: ArrayBuffer | Uint8Array, options?: {
217
+ /** Merge meshes with same material into single geometry */
218
+ mergeByMaterial?: boolean;
219
+ /** Apply coordinate system transformations */
220
+ applyTransforms?: boolean;
221
+ /** Scale factor to apply to meshes (e.g., for unit conversion) */
222
+ scaleFactor?: number;
223
+ /** Enable performance monitoring */
224
+ debug?: boolean;
225
+ }): Promise<THREE.Mesh[]>;
204
226
 
205
- export { type CameraConfig, type ControlsConfig, type EnvironmentConfig, type EventConfig, type FloorConfig, type LightingConfig, threeMaterials as Materials, MeshBatch, MeshExtractionOptions, type RenderConfig, SCALE_FACTORS, type ThreeInitializerOptions, getThreeMeshesFromComputeResponse, initThree, parseMeshBatchObject, updateScene };
227
+ export { type CameraConfig, type ControlsConfig, type EnvironmentConfig, type EventConfig, type FloorConfig, type LightingConfig, threeMaterials as Materials, MeshBatch, MeshExtractionOptions, type RenderConfig, SCALE_FACTORS, type ThreeInitializerOptions, getThreeMeshesFromComputeResponse, initThree, parseMeshBatchBlob, parseMeshBatchObject, updateScene };
@@ -1,2 +1,2 @@
1
- import{a as e,b as o,f as t,l as r,n as i,o as n}from"./chunk-HO6NH6HB.js";import"./chunk-XLHA5YPH.js";import"./chunk-RHULSS7S.js";export{t as Materials,i as SCALE_FACTORS,n as getThreeMeshesFromComputeResponse,e as initThree,r as parseMeshBatchObject,o as updateScene};
1
+ import{a as e,b as o,f as t,l as r,m as i,n,o as s}from"./chunk-HO6NH6HB.js";import"./chunk-XLHA5YPH.js";import"./chunk-RHULSS7S.js";export{t as Materials,n as SCALE_FACTORS,s as getThreeMeshesFromComputeResponse,e as initThree,i as parseMeshBatchBlob,r as parseMeshBatchObject,o as updateScene};
2
2
  //# sourceMappingURL=visualization.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selvajs/compute",
3
- "version": "1.5.2-beta.6",
3
+ "version": "1.5.2-beta.7",
4
4
  "description": "TypeScript library for Rhino Compute Server - Grasshopper and RhinoCommon",
5
5
  "author": "VektorNode",
6
6
  "license": "MIT",