@selvajs/compute 1.5.0
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/LICENSE.md +21 -0
- package/README.md +106 -0
- package/dist/base-dtik4Dlu.d.cts +138 -0
- package/dist/base-dtik4Dlu.d.ts +138 -0
- package/dist/chunk-FRSLCR7G.cjs +2 -0
- package/dist/chunk-FRSLCR7G.cjs.map +1 -0
- package/dist/chunk-IJZNCO5X.cjs +3 -0
- package/dist/chunk-IJZNCO5X.cjs.map +1 -0
- package/dist/chunk-LNIUUPA5.cjs +2 -0
- package/dist/chunk-LNIUUPA5.cjs.map +1 -0
- package/dist/chunk-PZ4HZLFJ.js +2 -0
- package/dist/chunk-PZ4HZLFJ.js.map +1 -0
- package/dist/chunk-VK2TSW7S.js +3 -0
- package/dist/chunk-VK2TSW7S.js.map +1 -0
- package/dist/chunk-WXQGTKU6.js +2 -0
- package/dist/chunk-WXQGTKU6.js.map +1 -0
- package/dist/core.cjs +2 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.cts +140 -0
- package/dist/core.d.ts +140 -0
- package/dist/core.js +2 -0
- package/dist/core.js.map +1 -0
- package/dist/grasshopper.cjs +2 -0
- package/dist/grasshopper.cjs.map +1 -0
- package/dist/grasshopper.d.cts +1014 -0
- package/dist/grasshopper.d.ts +1014 -0
- package/dist/grasshopper.js +2 -0
- package/dist/grasshopper.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas-Ct7lU-IH.d.cts +247 -0
- package/dist/schemas-Ct7lU-IH.d.ts +247 -0
- package/dist/types-B24K2LG4.d.cts +85 -0
- package/dist/types-B24K2LG4.d.ts +85 -0
- package/dist/visualization.cjs +2 -0
- package/dist/visualization.cjs.map +1 -0
- package/dist/visualization.d.cts +205 -0
- package/dist/visualization.d.ts +205 -0
- package/dist/visualization.js +2 -0
- package/dist/visualization.js.map +1 -0
- package/package.json +122 -0
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
interface MeshMetadata {
|
|
15
|
+
name: string;
|
|
16
|
+
/** Layer path for grouping in the scene manager (e.g. 'Structure/Walls') */
|
|
17
|
+
layer: string;
|
|
18
|
+
/** Original index in the GH input tree before material grouping. Combined with
|
|
19
|
+
* MeshBatch.sourceComponentId to uniquely identify the GH source geometry. */
|
|
20
|
+
originalIndex: number;
|
|
21
|
+
vertexCount: number;
|
|
22
|
+
faceCount: number;
|
|
23
|
+
/** Offset in the combined vertex array (in number of floats) */
|
|
24
|
+
vertexOffset: number;
|
|
25
|
+
/** Offset in the combined face index array (in number of integers) */
|
|
26
|
+
faceOffset: number;
|
|
27
|
+
/** Arbitrary key-value pairs from the GH Metadata input */
|
|
28
|
+
metadata?: Record<string, string>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A group of meshes sharing the same material.
|
|
32
|
+
*/
|
|
33
|
+
interface MaterialGroup {
|
|
34
|
+
/** Reference to the material ID in the materials array */
|
|
35
|
+
materialId: number;
|
|
36
|
+
/** Individual meshes in this group */
|
|
37
|
+
meshes: MeshMetadata[];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Batched mesh data optimized for Three.js rendering.
|
|
41
|
+
*/
|
|
42
|
+
interface MeshBatch {
|
|
43
|
+
/** Array of unique materials */
|
|
44
|
+
materials: SerializableMaterial[];
|
|
45
|
+
/** Groups of meshes organized by material */
|
|
46
|
+
groups: MaterialGroup[];
|
|
47
|
+
/** Compressed binary data containing all vertices and faces */
|
|
48
|
+
compressedData: string;
|
|
49
|
+
/** InstanceGuid of the WebDisplay GH component that produced this batch.
|
|
50
|
+
* Combined with MeshMetadata.originalIndex to backtrack any mesh to its GH source. */
|
|
51
|
+
sourceComponentId?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Decompressed mesh data.
|
|
55
|
+
*/
|
|
56
|
+
interface DecompressedMeshData {
|
|
57
|
+
vertices: Float32Array;
|
|
58
|
+
faces: Uint32Array;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Options for parsing mesh batch data.
|
|
62
|
+
*/
|
|
63
|
+
interface MeshBatchParsingOptions {
|
|
64
|
+
/** Merge meshes with same material into single geometry (better performance). Defaults to true. */
|
|
65
|
+
mergeByMaterial?: boolean;
|
|
66
|
+
/** Apply coordinate system transformations (Rhino Z-up to Three.js Y-up). Defaults to true. */
|
|
67
|
+
applyTransforms?: boolean;
|
|
68
|
+
/** Enable performance monitoring in console. Defaults to false. */
|
|
69
|
+
debug?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Options for extracting and processing meshes from compute responses.
|
|
73
|
+
*/
|
|
74
|
+
interface MeshExtractionOptions {
|
|
75
|
+
/** Configuration for parsing mesh batches. */
|
|
76
|
+
parsing?: MeshBatchParsingOptions;
|
|
77
|
+
/** Apply scaling based on model units. Defaults to true. */
|
|
78
|
+
allowScaling?: boolean;
|
|
79
|
+
/** Apply automatic ground offset positioning (Z=0). Defaults to true. */
|
|
80
|
+
allowAutoPosition?: boolean;
|
|
81
|
+
/** Enable verbose logging. Defaults to false. */
|
|
82
|
+
debug?: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export type { DecompressedMeshData as D, MeshExtractionOptions as M, SerializableMaterial as S, MeshBatch as a, MaterialGroup as b, MeshBatchParsingOptions as c, MeshMetadata as d };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkLNIUUPA5cjs = require('./chunk-LNIUUPA5.cjs');var _chunkIJZNCO5Xcjs = require('./chunk-IJZNCO5X.cjs');var _three = require('three'); var i = _interopRequireWildcard(_three); var y = _interopRequireWildcard(_three); var E = _interopRequireWildcard(_three); var b = _interopRequireWildcard(_three);var _OrbitControlsjs = require('three/addons/controls/OrbitControls.js');var _HDRLoaderjs = require('three/addons/loaders/HDRLoader.js');var W=new i.Vector3(0,0,1),P=(e,r,t,n)=>{switch(e){case"mm":return r;case"cm":return t;default:return n}},$= exports.initThree =function(e,r){let t=oe(r||{}),n=ae(t),o=de(t,e),s=he(e,t),a=ue(o,e,t);ce(n,t),le(n,t),_optionalChain([t, 'access', _2 => _2.floor, 'optionalAccess', _3 => _3.enabled])&&fe(n,t);let l=t.events.enableEventHandlers!==!1?me(e,n,o,a,t):{dispose:()=>{},fitToView:()=>{},clearSelection:()=>{}},c=e.parentElement,g=()=>c?{width:c.clientWidth,height:c.clientHeight}:{width:window.innerWidth,height:window.innerHeight},{animate:u,dispose:d}=ie(s,n,o,a,g,t.events.onFrame);u();let m=_optionalChain([t, 'access', _4 => _4.environment, 'optionalAccess', _5 => _5.sceneUp])||W;return n.up.set(m.x,m.y,m.z),{scene:n,camera:o,controls:a,renderer:s,dispose:()=>{d(),l.dispose(),a.dispose(),s.dispose(),n.traverse(h=>{h instanceof i.Mesh&&(_optionalChain([h, 'access', _6 => _6.geometry, 'optionalAccess', _7 => _7.dispose, 'call', _8 => _8()]),Array.isArray(h.material)?h.material.forEach(x=>x.dispose()):_optionalChain([h, 'access', _9 => _9.material, 'optionalAccess', _10 => _10.dispose, 'call', _11 => _11()]))})},fitToView:l.fitToView,clearSelection:l.clearSelection}};function oe(e){let r=e.sceneScale||"m",n={mm:{cameraDistance:20,near:.1,far:2e3,floorSize:100,lightDistance:10,lightHeight:20,minDistance:.1,shadowSize:100,scaleFactor:1e3},cm:{cameraDistance:20,near:.1,far:2e3,floorSize:100,lightDistance:25,lightHeight:50,minDistance:.1,shadowSize:100,scaleFactor:100},m:{cameraDistance:10,near:.01,far:2e3,floorSize:50,lightDistance:25,lightHeight:50,minDistance:.001,shadowSize:100,scaleFactor:1},inches:{cameraDistance:15,near:.1,far:2e3,floorSize:80,lightDistance:20,lightHeight:40,minDistance:.1,shadowSize:80,scaleFactor:39.37},feet:{cameraDistance:8,near:.1,far:2e3,floorSize:40,lightDistance:15,lightHeight:30,minDistance:.1,shadowSize:60,scaleFactor:3.28084}}[r];return{sceneScale:r,camera:{position:_optionalChain([e, 'access', _12 => _12.camera, 'optionalAccess', _13 => _13.position])||new i.Vector3(-n.cameraDistance,n.cameraDistance,n.cameraDistance),fov:_optionalChain([e, 'access', _14 => _14.camera, 'optionalAccess', _15 => _15.fov])||20,near:_optionalChain([e, 'access', _16 => _16.camera, 'optionalAccess', _17 => _17.near])||n.near,far:_optionalChain([e, 'access', _18 => _18.camera, 'optionalAccess', _19 => _19.far])||n.far,target:_optionalChain([e, 'access', _20 => _20.camera, 'optionalAccess', _21 => _21.target])||new i.Vector3(0,0,0)},lighting:{enableSunlight:_nullishCoalesce(_optionalChain([e, 'access', _22 => _22.lighting, 'optionalAccess', _23 => _23.enableSunlight]), () => (!0)),sunlightIntensity:_optionalChain([e, 'access', _24 => _24.lighting, 'optionalAccess', _25 => _25.sunlightIntensity])||1,sunlightPosition:_optionalChain([e, 'access', _26 => _26.lighting, 'optionalAccess', _27 => _27.sunlightPosition])||new i.Vector3(n.lightDistance,n.lightHeight,n.lightDistance),ambientLightColor:_optionalChain([e, 'access', _28 => _28.lighting, 'optionalAccess', _29 => _29.ambientLightColor])||new i.Color(4210752),ambientLightIntensity:_optionalChain([e, 'access', _30 => _30.lighting, 'optionalAccess', _31 => _31.ambientLightIntensity])||1,sunlightColor:_optionalChain([e, 'access', _32 => _32.lighting, 'optionalAccess', _33 => _33.sunlightColor])||16777215},environment:{hdrPath:_optionalChain([e, 'access', _34 => _34.environment, 'optionalAccess', _35 => _35.hdrPath])||"/baseHDR.hdr",backgroundColor:_optionalChain([e, 'access', _36 => _36.environment, 'optionalAccess', _37 => _37.backgroundColor])||new i.Color(15790320),enableEnvironmentLighting:_nullishCoalesce(_optionalChain([e, 'access', _38 => _38.environment, 'optionalAccess', _39 => _39.enableEnvironmentLighting]), () => (!0)),sceneUp:_optionalChain([e, 'access', _40 => _40.environment, 'optionalAccess', _41 => _41.sceneUp])||W,showEnvironment:_nullishCoalesce(_optionalChain([e, 'access', _42 => _42.environment, 'optionalAccess', _43 => _43.showEnvironment]), () => (!1))},floor:{enabled:_nullishCoalesce(_optionalChain([e, 'access', _44 => _44.floor, 'optionalAccess', _45 => _45.enabled]), () => (!1)),size:_optionalChain([e, 'access', _46 => _46.floor, 'optionalAccess', _47 => _47.size])||n.floorSize,color:_optionalChain([e, 'access', _48 => _48.floor, 'optionalAccess', _49 => _49.color])||new i.Color(8421504),roughness:_optionalChain([e, 'access', _50 => _50.floor, 'optionalAccess', _51 => _51.roughness])||.7,metalness:_optionalChain([e, 'access', _52 => _52.floor, 'optionalAccess', _53 => _53.metalness])||0,receiveShadow:_nullishCoalesce(_optionalChain([e, 'access', _54 => _54.floor, 'optionalAccess', _55 => _55.receiveShadow]), () => (!0))},render:{enableShadows:_nullishCoalesce(_optionalChain([e, 'access', _56 => _56.render, 'optionalAccess', _57 => _57.enableShadows]), () => (!0)),shadowMapSize:_optionalChain([e, 'access', _58 => _58.render, 'optionalAccess', _59 => _59.shadowMapSize])||2048,antialias:_nullishCoalesce(_optionalChain([e, 'access', _60 => _60.render, 'optionalAccess', _61 => _61.antialias]), () => (!0)),pixelRatio:_optionalChain([e, 'access', _62 => _62.render, 'optionalAccess', _63 => _63.pixelRatio])||Math.min(window.devicePixelRatio,2),toneMapping:_optionalChain([e, 'access', _64 => _64.render, 'optionalAccess', _65 => _65.toneMapping])||i.NeutralToneMapping,toneMappingExposure:_optionalChain([e, 'access', _66 => _66.render, 'optionalAccess', _67 => _67.toneMappingExposure])||1,preserveDrawingBuffer:_nullishCoalesce(_optionalChain([e, 'access', _68 => _68.render, 'optionalAccess', _69 => _69.preserveDrawingBuffer]), () => (!1))},controls:{enableDamping:_nullishCoalesce(_optionalChain([e, 'access', _70 => _70.controls, 'optionalAccess', _71 => _71.enableDamping]), () => (!1)),dampingFactor:_optionalChain([e, 'access', _72 => _72.controls, 'optionalAccess', _73 => _73.dampingFactor])||.05,autoRotate:_nullishCoalesce(_optionalChain([e, 'access', _74 => _74.controls, 'optionalAccess', _75 => _75.autoRotate]), () => (!1)),autoRotateSpeed:_optionalChain([e, 'access', _76 => _76.controls, 'optionalAccess', _77 => _77.autoRotateSpeed])||.5,enableZoom:_nullishCoalesce(_optionalChain([e, 'access', _78 => _78.controls, 'optionalAccess', _79 => _79.enableZoom]), () => (!0)),enablePan:_nullishCoalesce(_optionalChain([e, 'access', _80 => _80.controls, 'optionalAccess', _81 => _81.enablePan]), () => (!0)),minDistance:_optionalChain([e, 'access', _82 => _82.controls, 'optionalAccess', _83 => _83.minDistance])||n.minDistance,maxDistance:_optionalChain([e, 'access', _84 => _84.controls, 'optionalAccess', _85 => _85.maxDistance])||1/0},events:{onBackgroundClicked:_optionalChain([e, 'access', _86 => _86.events, 'optionalAccess', _87 => _87.onBackgroundClicked]),onObjectSelected:_optionalChain([e, 'access', _88 => _88.events, 'optionalAccess', _89 => _89.onObjectSelected]),onMeshMetadataClicked:_optionalChain([e, 'access', _90 => _90.events, 'optionalAccess', _91 => _91.onMeshMetadataClicked]),onMeshDoubleClicked:_optionalChain([e, 'access', _92 => _92.events, 'optionalAccess', _93 => _93.onMeshDoubleClicked]),selectionColor:_optionalChain([e, 'access', _94 => _94.events, 'optionalAccess', _95 => _95.selectionColor])||"#ff0000",enableEventHandlers:_nullishCoalesce(_optionalChain([e, 'access', _96 => _96.events, 'optionalAccess', _97 => _97.enableEventHandlers]), () => (!0)),enableKeyboardControls:_nullishCoalesce(_optionalChain([e, 'access', _98 => _98.events, 'optionalAccess', _99 => _99.enableKeyboardControls]), () => (!0)),enableClickToFocus:_nullishCoalesce(_optionalChain([e, 'access', _100 => _100.events, 'optionalAccess', _101 => _101.enableClickToFocus]), () => (!0)),enableDoubleClickZoom:_nullishCoalesce(_optionalChain([e, 'access', _102 => _102.events, 'optionalAccess', _103 => _103.enableDoubleClickZoom]), () => (!0)),onReady:_optionalChain([e, 'access', _104 => _104.events, 'optionalAccess', _105 => _105.onReady]),onFrame:_optionalChain([e, 'access', _106 => _106.events, 'optionalAccess', _107 => _107.onFrame])}}}function ae(e){let r=new i.Scene,t=typeof e.environment.backgroundColor=="string"?new i.Color(e.environment.backgroundColor):e.environment.backgroundColor;return r.background=t||null,r}function se(e,r,t,n,o=200){let s=e.position.clone(),a=r.target.clone(),l=performance.now(),c=u=>1-Math.pow(1-u,3),g=()=>{let u=performance.now()-l,d=c(Math.min(u/o,1));e.position.lerpVectors(s,t,d),r.target.lerpVectors(a,n,d),r.update(),d<1&&requestAnimationFrame(g)};requestAnimationFrame(g)}function ie(e,r,t,n,o,s){let a=null,l=performance.now(),c=()=>{let{width:d,height:m}=o();if(d===0||m===0)return;let w=Math.min(window.devicePixelRatio,2),h=Math.round(d*w),x=Math.round(m*w);(e.domElement.width!==h||e.domElement.height!==x)&&(e.setPixelRatio(w),e.setSize(d,m,!1),t.aspect=d/m,t.updateProjectionMatrix())},g=function(){a=requestAnimationFrame(g);let d=performance.now(),m=(d-l)/1e3;l=d,c(),(n.enableDamping||n.autoRotate)&&n.update(),_optionalChain([s, 'optionalCall', _108 => _108(m)]),e.render(r,t)};return{animate:g,dispose:()=>{a!==null&&(cancelAnimationFrame(a),a=null)}}}function ce(e,r){r.environment.enableEnvironmentLighting?new (0, _HDRLoaderjs.HDRLoader)().load(r.environment.hdrPath||"/baseHDR.hdr",function(t){t.mapping=i.EquirectangularReflectionMapping,e.environment=t,r.environment.showEnvironment&&(e.background=t),_optionalChain([r, 'access', _109 => _109.events, 'access', _110 => _110.onReady, 'optionalCall', _111 => _111()])},void 0,function(t){_chunkIJZNCO5Xcjs.e.call(void 0, ).warn("HDR texture could not be loaded, falling back to basic lighting:",t),_optionalChain([r, 'access', _112 => _112.events, 'access', _113 => _113.onReady, 'optionalCall', _114 => _114()])}):_optionalChain([r, 'access', _115 => _115.events, 'access', _116 => _116.onReady, 'optionalCall', _117 => _117()])}function le(e,r){let t=new i.AmbientLight(r.lighting.ambientLightColor,r.lighting.ambientLightIntensity);if(e.add(t),r.lighting.enableSunlight){let n=new i.DirectionalLight(_nullishCoalesce(r.lighting.sunlightColor, () => (16777215)),r.lighting.sunlightIntensity),o=r.lighting.sunlightPosition;if(o&&n.position.set(o.x,o.y,o.z),r.render.enableShadows){n.castShadow=!0;let s=P(r.sceneScale,.1,10,100);n.shadow.camera.left=-s,n.shadow.camera.right=s,n.shadow.camera.top=s,n.shadow.camera.bottom=-s;let a=P(r.sceneScale,.001,.1,.5),l=P(r.sceneScale,1,100,500);n.shadow.camera.near=a,n.shadow.camera.far=l,n.shadow.mapSize.width=r.render.shadowMapSize||2048,n.shadow.mapSize.height=r.render.shadowMapSize||2048,n.shadow.bias=-1e-4,n.shadow.normalBias=.02}e.add(n)}}function fe(e,r){let t=r.floor.size,n=new i.PlaneGeometry(t,t),o=typeof r.floor.color=="string"?new i.Color(r.floor.color):r.floor.color,s=new i.MeshStandardMaterial({color:o,roughness:r.floor.roughness,metalness:r.floor.metalness,side:i.DoubleSide}),a=new i.Mesh(n,s);a.userData.id="floor",a.name="floor",a.rotation.x=-Math.PI/2,a.position.y=0,r.floor.receiveShadow&&r.render.enableShadows&&(a.receiveShadow=!0),e.add(a)}function de(e,r){let t=r.parentElement,n=t?t.clientWidth:window.innerWidth,o=t?t.clientHeight:window.innerHeight,s=new i.PerspectiveCamera(e.camera.fov,n/o,e.camera.near,e.camera.far),a=e.camera.position;return a&&s.position.set(a.x,a.y,a.z),s}function he(e,r){let t=new i.WebGLRenderer({antialias:r.render.antialias,canvas:e,alpha:!0,powerPreference:"high-performance",preserveDrawingBuffer:r.render.preserveDrawingBuffer,logarithmicDepthBuffer:!0}),n=e.parentElement,o=n?n.clientWidth:window.innerWidth,s=n?n.clientHeight:window.innerHeight;return n&&(e.style.width="100%",e.style.height="100%",e.style.display="block"),t.setSize(o,s,!1),t.setPixelRatio(r.render.pixelRatio||Math.min(window.devicePixelRatio,2)),r.render.enableShadows&&(t.shadowMap.enabled=!0,t.shadowMap.type=i.VSMShadowMap),t.toneMapping=r.render.toneMapping,t.toneMappingExposure=r.render.toneMappingExposure||1,t.outputColorSpace=i.SRGBColorSpace,t.sortObjects=!0,t}function me(e,r,t,n,o){let s=new Set,a=new Map,l=new i.Raycaster,c=new i.Vector2,g=new i.Vector2,u=f=>{let R=f;for(;R;){if(!R.visible)return!1;R=R.parent}return!0},d=()=>{let f=new i.Box3;if(r.traverse(D=>{D.visible&&D.userData.id!=="floor"&&D instanceof i.Mesh&&f.expandByObject(D)}),f.isEmpty()){_chunkIJZNCO5Xcjs.e.call(void 0, ).warn("No objects to fit to view");return}let R=f.getCenter(new i.Vector3),M=f.getSize(new i.Vector3),A=Math.max(M.x,M.y,M.z),T=t.fov*(Math.PI/180),v=A/(2*Math.tan(T/2));v*=1.5;let B=t.position.clone().sub(n.target).normalize();t.position.copy(R.clone().add(B.multiplyScalar(v))),n.target.copy(R),n.update()},m=typeof o.events.selectionColor=="string"?new i.Color(o.events.selectionColor):o.events.selectionColor instanceof i.Color?o.events.selectionColor:new i.Color("#ff0000"),w=()=>{s.forEach(f=>{f instanceof i.Mesh&&a.has(f)&&(f.material=a.get(f),a.delete(f))}),s.clear()},h=f=>{g.set(f.clientX,f.clientY)},x=f=>{let R=new i.Vector2(f.clientX,f.clientY);if(g.distanceTo(R)>5)return;let M=e.getBoundingClientRect();c.x=(f.clientX-M.left)/M.width*2-1,c.y=-((f.clientY-M.top)/M.height)*2+1,l.setFromCamera(c,t);let A=l.intersectObjects(r.children,!0).filter(T=>u(T.object));if(A.length>0){let T=A[0].object;if(!s.has(T)){if(w(),s.add(T),T instanceof i.Mesh&&T.material instanceof i.Material){a.set(T,T.material);let v=T.material.clone();v.emissive=m.clone(),T.material=v}_optionalChain([o, 'access', _118 => _118.events, 'optionalAccess', _119 => _119.onObjectSelected, 'optionalCall', _120 => _120(T)]),T instanceof i.Mesh&&Object.keys(T.userData).length>0&&_optionalChain([o, 'access', _121 => _121.events, 'optionalAccess', _122 => _122.onMeshMetadataClicked, 'optionalCall', _123 => _123(T.userData)])}}else w(),_optionalChain([o, 'access', _124 => _124.events, 'optionalAccess', _125 => _125.onBackgroundClicked, 'optionalCall', _126 => _126({x:c.x,y:c.y})])},I=f=>{let R=e.getBoundingClientRect();c.x=(f.clientX-R.left)/R.width*2-1,c.y=-((f.clientY-R.top)/R.height)*2+1,l.setFromCamera(c,t);let M=l.intersectObjects(r.children,!0).filter(ee=>u(ee.object));if(M.length===0)return;let A=M[0].object;if(_optionalChain([o, 'access', _127 => _127.events, 'optionalAccess', _128 => _128.onMeshDoubleClicked, 'optionalCall', _129 => _129(A)]),!_optionalChain([o, 'access', _130 => _130.events, 'optionalAccess', _131 => _131.enableDoubleClickZoom]))return;let T=new i.Box3().setFromObject(A);if(T.isEmpty())return;let v=T.getCenter(new i.Vector3),B=T.getSize(new i.Vector3),D=Math.max(B.x,B.y,B.z),K=t.fov*(Math.PI/180),X=D/(2*Math.tan(K/2))*1.5,J=t.position.clone().sub(n.target).normalize(),Q=v.clone().add(J.multiplyScalar(X));se(t,n,Q,v)},L=f=>{if(_optionalChain([o, 'access', _132 => _132.events, 'optionalAccess', _133 => _133.enableKeyboardControls]))switch(f.key.toLowerCase()){case"f":f.preventDefault(),d();break;case"escape":f.preventDefault(),w();break;case" ":f.preventDefault(),d();break}};return _optionalChain([o, 'access', _134 => _134.events, 'optionalAccess', _135 => _135.enableClickToFocus])&&(e.addEventListener("mousedown",h),e.addEventListener("click",x),e.addEventListener("dblclick",I)),_optionalChain([o, 'access', _136 => _136.events, 'optionalAccess', _137 => _137.enableKeyboardControls])&&(e.setAttribute("tabindex","0"),e.addEventListener("keydown",L)),{dispose:()=>{e.removeEventListener("mousedown",h),e.removeEventListener("click",x),e.removeEventListener("dblclick",I),e.removeEventListener("keydown",L),w()},fitToView:d,clearSelection:w}}function ue(e,r,t){let n=new (0, _OrbitControlsjs.OrbitControls)(e,r),o=t.camera.target;return o&&n.target.set(o.x,o.y,o.z),n.enableDamping=t.controls.enableDamping||!1,n.dampingFactor=t.controls.dampingFactor||.05,n.autoRotate=t.controls.autoRotate||!1,n.autoRotateSpeed=t.controls.autoRotateSpeed||.5,n.enableZoom=_nullishCoalesce(t.controls.enableZoom, () => (!0)),n.enablePan=_nullishCoalesce(t.controls.enablePan, () => (!0)),n.minDistance=t.controls.minDistance||.001,n.maxDistance=t.controls.maxDistance||1/0,n.screenSpacePanning=!1,n.maxPolarAngle=Math.PI,n.update(),n}var C={HUGE_THRESHOLD:1e4,LARGE_THRESHOLD:1e3,SCALE_RATIO_THRESHOLD:100,NEAR_PLANE_FACTOR:{TINY:1e-4,SMALL:.001,NORMAL:.01},FAR_PLANE_FACTOR:{HUGE:100,LARGE:50,NORMAL:20},INITIAL_DISTANCE_MULTIPLIER:4};function j(e,r,t,n,o){if(Ee(e),r.length===0)return;r.forEach(u=>{e.add(u)});let s=F(r),a=s.getCenter(new y.Vector3),l=s.getSize(new y.Vector3),c=Math.max(l.x,l.y,l.z);if(c/Math.min(l.x||1,l.y||1,l.z||1)>C.SCALE_RATIO_THRESHOLD||c>C.HUGE_THRESHOLD?(t.near=c*C.NEAR_PLANE_FACTOR.TINY,t.far=c*C.FAR_PLANE_FACTOR.HUGE):c>C.LARGE_THRESHOLD?(t.near=c*C.NEAR_PLANE_FACTOR.SMALL,t.far=c*C.FAR_PLANE_FACTOR.LARGE):(t.near=Math.max(.01,c*C.NEAR_PLANE_FACTOR.NORMAL),t.far=Math.max(2e3,c*C.FAR_PLANE_FACTOR.NORMAL)),t.updateProjectionMatrix(),o)n.minDistance=t.near*2,n.maxDistance=t.far*.9;else{let u=c*C.INITIAL_DISTANCE_MULTIPLIER;t.position.set(a.x+u*.8,a.y+u,a.z+u*1.2),n.target.copy(a),n.minDistance=t.near*2,n.maxDistance=t.far*.9,n.update()}}function z(e){if(!e||typeof e!="string")return _chunkIJZNCO5Xcjs.e.call(void 0, ).warn(`Invalid color input: ${e}, using white`),new y.Color(16777215);let r=e.trim();if(r.startsWith("#")||/^[0-9A-Fa-f]{6}$/.test(r))try{let t=r.startsWith("#")?r:`#${r}`;return new y.Color(t)}catch (e2){return _chunkIJZNCO5Xcjs.e.call(void 0, ).warn(`Invalid hex color: ${e}, using white`),new y.Color(16777215)}if(r.includes(",")){let t=r.split(",").map(n=>parseInt(n.trim(),10));if(t.length===3&&t.every(n=>!isNaN(n)&&n>=0&&n<=255))return new y.Color(t[0]/255,t[1]/255,t[2]/255)}try{return new y.Color(r.toLowerCase())}catch (e3){return _chunkIJZNCO5Xcjs.e.call(void 0, ).warn(`Invalid color string: ${e}, using white`),new y.Color(16777215)}}function _(e,r){e.forEach(t=>{t.position.y-=r})}function F(e){let r=new y.Box3;return e.length===0||e.forEach(t=>{t.updateMatrixWorld(!0);let n=new y.Box3().setFromObject(t);r.union(n)}),r}function Ee(e){[...e.children].forEach(t=>{t.userData.id!=="floor"&&(t.traverse(n=>{if(!(n instanceof y.Mesh))return;_optionalChain([n, 'access', _138 => _138.geometry, 'optionalAccess', _139 => _139.dispose, 'call', _140 => _140()]),(Array.isArray(n.material)?n.material:[n.material]).forEach(s=>{for(let a of Object.values(s))a instanceof y.Texture&&a.dispose();s.dispose()})}),t.removeFromParent())})}var V={};_chunkIJZNCO5Xcjs.a.call(void 0, V,{CONCRETE_MATERIAL:()=>Re,EMISSIVE_MATERIAL:()=>pe,GLASS_MATERIAL:()=>ye,METAL_MATERIAL:()=>ge,PLASTIC_MATERIAL:()=>Te,RUBBER_MATERIAL:()=>we,WOOD_MATERIAL:()=>be});var pe=new E.MeshPhysicalMaterial({color:0,emissive:new E.Color(16777215),emissiveIntensity:5,metalness:0,roughness:.2,clearcoat:.3,clearcoatRoughness:.2,depthWrite:!0,depthTest:!0,transparent:!1,alphaTest:0,polygonOffset:!0,side:E.FrontSide,dithering:!0}),ge=new E.MeshPhysicalMaterial({color:new E.Color(0),metalness:.9,roughness:.3,envMapIntensity:1.2,clearcoat:.3,clearcoatRoughness:.2,reflectivity:1,ior:2.5,thickness:1,depthWrite:!0,transparent:!1,alphaTest:0,depthTest:!0,polygonOffset:!0,side:E.FrontSide,dithering:!0}),Re=new E.MeshPhysicalMaterial({color:new E.Color(13421772),metalness:0,roughness:.92,envMapIntensity:.15,clearcoat:.05,clearcoatRoughness:.9,reflectivity:.15,transmission:0,ior:1.45,thickness:0,depthWrite:!0,transparent:!1,alphaTest:.5,depthTest:!0,polygonOffset:!0,side:E.FrontSide,dithering:!0}),Te=new E.MeshPhysicalMaterial({color:new E.Color(16777215),metalness:0,roughness:.3,envMapIntensity:.5,clearcoat:.5,clearcoatRoughness:.1,reflectivity:.5,ior:1.4,transmission:0,transparent:!1,depthWrite:!0,side:E.FrontSide,dithering:!0,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:1}),ye=new E.MeshPhysicalMaterial({color:new E.Color(16777215),metalness:0,roughness:0,transmission:.95,transparent:!0,opacity:.3,envMapIntensity:1,clearcoat:1,clearcoatRoughness:0,ior:1.52,reflectivity:.9,thickness:1,side:E.DoubleSide,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:1}),we=new E.MeshPhysicalMaterial({color:new E.Color(1710618),metalness:0,roughness:.9,envMapIntensity:.2,clearcoat:.1,clearcoatRoughness:.8,reflectivity:.2,ior:1.3,transmission:0,depthWrite:!0,side:E.FrontSide,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:1}),be=new E.MeshPhysicalMaterial({color:new E.Color(8934707),metalness:0,roughness:.7,envMapIntensity:.3,clearcoat:.3,clearcoatRoughness:.4,reflectivity:.3,ior:1.3,transmission:0,depthWrite:!0,side:E.FrontSide,dithering:!0,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:1});var _fflate = require('fflate'); var q = _interopRequireWildcard(_fflate);async function Y(e){return new Promise((r,t)=>{try{let n=()=>{try{let o=_chunkLNIUUPA5cjs.c.call(void 0, e),s=q.gunzipSync(o),a=Me(s);r(a)}catch(o){t(new (0, _chunkIJZNCO5Xcjs.d)(o instanceof _chunkIJZNCO5Xcjs.d?o.message:`Failed to decompress batched data: ${o instanceof Error?o.message:String(o)}`,o instanceof _chunkIJZNCO5Xcjs.d?o.code:_chunkIJZNCO5Xcjs.c.VALIDATION_ERROR,{context:{base64StringLength:e.length},originalError:o instanceof Error?o:new Error(String(o))}))}};"requestIdleCallback"in globalThis?globalThis.requestIdleCallback(n,{timeout:5e3}):setTimeout(n,0)}catch(n){t(new (0, _chunkIJZNCO5Xcjs.d)(`Failed to schedule decompression: ${n instanceof Error?n.message:String(n)}`,_chunkIJZNCO5Xcjs.c.VALIDATION_ERROR,{originalError:n instanceof Error?n:new Error(String(n))}))}})}function Me(e){let r=new DataView(e.buffer,e.byteOffset,e.byteLength),t=0;if(t+4>r.byteLength)throw new (0, _chunkIJZNCO5Xcjs.d)("Insufficient data to read the number of vertex floats.",_chunkIJZNCO5Xcjs.c.VALIDATION_ERROR,{context:{expectedBytes:4,availableBytes:r.byteLength,offset:t}});let n=r.getUint32(t,!0);if(t+=4,n%3!==0)throw new (0, _chunkIJZNCO5Xcjs.d)("Invalid number of vertex floats; should be divisible by 3.",_chunkIJZNCO5Xcjs.c.VALIDATION_ERROR,{context:{numVertexFloats:n,remainder:n%3,totalBytes:r.byteLength}});let o=n*Float32Array.BYTES_PER_ELEMENT;if(t+o>r.byteLength)throw new (0, _chunkIJZNCO5Xcjs.d)("Insufficient data to read vertices.",_chunkIJZNCO5Xcjs.c.VALIDATION_ERROR,{context:{expectedBytes:o,availableBytes:r.byteLength-t,offset:t}});let s=new Float32Array(e.buffer.slice(e.byteOffset+t,e.byteOffset+t+o));if(t+=o,t+4>r.byteLength)throw new (0, _chunkIJZNCO5Xcjs.d)("Insufficient data to read the number of face indices.",_chunkIJZNCO5Xcjs.c.VALIDATION_ERROR,{context:{expectedBytes:4,availableBytes:r.byteLength-t,offset:t}});let a=r.getUint32(t,!0);t+=4;let l=a*Uint32Array.BYTES_PER_ELEMENT;if(t+l>r.byteLength)throw new (0, _chunkIJZNCO5Xcjs.d)("Insufficient data to read face indices.",_chunkIJZNCO5Xcjs.c.VALIDATION_ERROR,{context:{expectedBytes:l,availableBytes:r.byteLength-t,offset:t}});let c=new Uint32Array(e.buffer.slice(e.byteOffset+t,e.byteOffset+t+l));return{vertices:s,faces:c}}async function N(e,r){let{mergeByMaterial:t=!0,applyTransforms:n=!0,debug:o=!1}=_nullishCoalesce(r, () => ({})),s=o?performance.now():0,a=0;try{let l=performance.now(),c=JSON.parse(e);return a=performance.now()-l,await k(c,{mergeByMaterial:t,applyTransforms:n,debug:o,parseTime:a,perfStart:s})}catch(l){return _chunkIJZNCO5Xcjs.e.call(void 0, ).error("Error parsing mesh batch:",l),[]}}async function k(e,r){let{mergeByMaterial:t=!0,applyTransforms:n=!0,scaleFactor:o=1,debug:s=!1,parseTime:a=0,perfStart:l=s?performance.now():0}=_nullishCoalesce(r, () => ({})),c=0,g=0;try{let u=performance.now(),{vertices:d,faces:m}=await Y(e.compressedData);c=performance.now()-u;let w=(e.compressedData.length*.75/1024/1024).toFixed(2),h=((d.byteLength+m.byteLength)/1024/1024).toFixed(2),x=((1-parseFloat(w)/parseFloat(h))*100).toFixed(1);s&&(_chunkIJZNCO5Xcjs.e.call(void 0, ).debug("Mesh Batch Stats:"),_chunkIJZNCO5Xcjs.e.call(void 0, ).debug(` Materials: ${e.materials.length} | Groups: ${e.groups.length}`),_chunkIJZNCO5Xcjs.e.call(void 0, ).debug(` Vertices: ${(d.length/3).toLocaleString()} | Faces: ${(m.length/3).toLocaleString()}`),_chunkIJZNCO5Xcjs.e.call(void 0, ).debug(` Compressed: ${w} MB | Uncompressed: ${h} MB`),_chunkIJZNCO5Xcjs.e.call(void 0, ).debug(` Compression Ratio: ${x}%`)),n&&ve(d);let I=performance.now(),L=e.materials.map(xe),S=[];for(let f of e.groups)if(t&&f.meshes.length>1){let R=He(f,d,m,L);R.userData.sourceComponentId=_nullishCoalesce(e.sourceComponentId, () => (null)),S.push(R)}else{let R=Ce(f,d,m,L);for(let M of R)M.userData.sourceComponentId=_nullishCoalesce(e.sourceComponentId, () => (null));S.push(...R)}if(o!==1)for(let f of S)f.scale.set(o,o,o);if(g=performance.now()-I,s){let f=performance.now()-l;_chunkIJZNCO5Xcjs.e.call(void 0, ).debug("Performance:"),a>0&&_chunkIJZNCO5Xcjs.e.call(void 0, ).debug(` Parse JSON: ${a.toFixed(2)}ms`),_chunkIJZNCO5Xcjs.e.call(void 0, ).debug(` Decompress: ${c.toFixed(2)}ms`),_chunkIJZNCO5Xcjs.e.call(void 0, ).debug(` Create Meshes: ${g.toFixed(2)}ms`),_chunkIJZNCO5Xcjs.e.call(void 0, ).debug(` Total: ${f.toFixed(2)}ms`)}return S}catch(u){return _chunkIJZNCO5Xcjs.e.call(void 0, ).error("Error parsing mesh batch object:",u),[]}}function xe(e){let r=z(e.color);return new b.MeshPhysicalMaterial({color:r,metalness:e.metalness,roughness:e.roughness,opacity:e.opacity,transparent:e.transparent,side:b.DoubleSide,polygonOffset:!0,polygonOffsetFactor:.5,polygonOffsetUnits:.5,depthWrite:!0,depthTest:!0})}function He(e,r,t,n){let o=new b.BufferGeometry,s=0,a=0;for(let h of e.meshes)s+=h.vertexCount,a+=h.faceCount;let l=new Float32Array(s),c=new Uint32Array(a),g=0,u=0;for(let h of e.meshes){l.set(r.subarray(h.vertexOffset,h.vertexOffset+h.vertexCount),g);let x=t.subarray(h.faceOffset,h.faceOffset+h.faceCount),I=Math.floor(h.vertexOffset/3),S=Math.floor(g/3)-I;for(let f=0;f<x.length;f++)c[u+f]=x[f]+S;g+=h.vertexCount,u+=h.faceCount}o.setAttribute("position",new b.BufferAttribute(l,3)),o.setIndex(new b.BufferAttribute(c,1)),o.computeVertexNormals();let d=new b.Mesh(o,n[e.materialId]),m=e.meshes[0],w=e.meshes.map(h=>h.name).filter(h=>h&&h.length>0);return d.name=w.length>0?w[0]:`merged_material_${e.materialId}`,d.castShadow=!0,d.receiveShadow=!0,d.userData={name:d.name,layer:_nullishCoalesce(_optionalChain([m, 'optionalAccess', _141 => _141.layer]), () => ("")),originalIndex:_nullishCoalesce(_optionalChain([m, 'optionalAccess', _142 => _142.originalIndex]), () => (0)),metadata:_nullishCoalesce(_optionalChain([m, 'optionalAccess', _143 => _143.metadata]), () => ({})),mergedFrom:e.meshes.slice(1).map(h=>({name:h.name,layer:h.layer,originalIndex:h.originalIndex}))},d}function Ce(e,r,t,n){let o=[];for(let s of e.meshes){let a=new b.BufferGeometry,l=r.subarray(s.vertexOffset,s.vertexOffset+s.vertexCount),c=t.subarray(s.faceOffset,s.faceOffset+s.faceCount),g=Math.floor(s.vertexOffset/3),u=new Uint32Array(c.length);for(let m=0;m<c.length;m++)u[m]=c[m]-g;a.setAttribute("position",new b.BufferAttribute(l,3)),a.setIndex(new b.BufferAttribute(u,1)),a.computeVertexNormals();let d=new b.Mesh(a,n[e.materialId]);d.name=s.name,d.userData={name:s.name,layer:_nullishCoalesce(s.layer, () => ("")),originalIndex:s.originalIndex,metadata:_nullishCoalesce(s.metadata, () => ({}))},d.castShadow=!0,d.receiveShadow=!0,o.push(d)}return o}function ve(e){let r=Math.cos(-Math.PI/2),t=Math.sin(-Math.PI/2);for(let n=0;n<e.length;n+=3){let o=e[n],s=e[n+1],a=e[n+2];e[n]=o,e[n+1]=s*r-a*t,e[n+2]=s*t+a*r}}var U={Millimeters:1/1e3,Centimeters:1/100,Meters:1,Inches:1/39.37,Feet:1/3.28084},Oe="Display";async function Z(e,r){let t=performance.now(),n=[],{allowScaling:o=!0,allowAutoPosition:s=!0,debug:a=!1,parsing:l={}}=_nullishCoalesce(r, () => ({}));try{let c=o?Se(e.modelunits):1;return await Ae(e,n,c,l,a),s&&Le(n),n}catch(c){throw De(c,n),c}finally{a&&Fe(t)}}function Se(e){return _nullishCoalesce(U[e], () => (1))}async function Ae(e,r,t,n,o){for(let s of e.values){let a=s.InnerTree;for(let l in a){let c=a[l];c&&await Ie(c,r,t,n,o)}}}async function Ie(e,r,t,n,o){for(let s of e)if(s.type.includes(Oe)){let a={mergeByMaterial:!0,applyTransforms:!0,debug:!1,...n},l=await N(s.data,a);if(t!==1)for(let c of l)c.scale.set(t,t,t);r.push(...l),o&&_chunkIJZNCO5Xcjs.e.call(void 0, ).debug(`Extracted ${l.length} meshes from batch`)}}function Le(e){if(e.length===0)return;let t=F(e).min.y;_(e,t)}function De(e,r){_chunkIJZNCO5Xcjs.e.call(void 0, ).error("An unexpected error occurred:",e),Be(r)}function Be(e){for(let r of e)r.geometry&&r.geometry.dispose(),r.material&&(Array.isArray(r.material)?r.material.forEach(t=>t.dispose()):r.material.dispose())}function Fe(e){let r=performance.now()-e;_chunkIJZNCO5Xcjs.e.call(void 0, ).info("Time to process meshes:",`${r.toFixed(2)}ms`)}exports.Materials = V; exports.SCALE_FACTORS = U; exports.getThreeMeshesFromComputeResponse = Z; exports.initThree = $; exports.parseMeshBatchObject = k; exports.updateScene = j;
|
|
2
|
+
//# sourceMappingURL=visualization.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["d:\\Coding\\selva-compute\\dist\\visualization.cjs"],"names":[],"mappings":"AAAA,2/BAAwC,wDAA+D,kMAAwB,yEAAwE,gEAA+D,IAAK,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,qBAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAC,CAAC,qBAAC,KAAK,6BAAE,SAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC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AAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA","file":"D:\\Coding\\selva-compute\\dist\\visualization.cjs","sourcesContent":[null]}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
|
|
3
|
+
import { d as GrasshopperComputeResponse } from './schemas-Ct7lU-IH.cjs';
|
|
4
|
+
import { M as MeshExtractionOptions, a as MeshBatch } from './types-B24K2LG4.cjs';
|
|
5
|
+
export { D as DecompressedMeshData, b as MaterialGroup, c as MeshBatchParsingOptions, d as MeshMetadata, S as SerializableMaterial } from './types-B24K2LG4.cjs';
|
|
6
|
+
|
|
7
|
+
type CameraConfig = {
|
|
8
|
+
position?: THREE.Vector3;
|
|
9
|
+
fov?: number;
|
|
10
|
+
near?: number;
|
|
11
|
+
far?: number;
|
|
12
|
+
target?: THREE.Vector3;
|
|
13
|
+
};
|
|
14
|
+
type LightingConfig = {
|
|
15
|
+
enableSunlight?: boolean;
|
|
16
|
+
sunlightIntensity?: number;
|
|
17
|
+
sunlightPosition?: THREE.Vector3;
|
|
18
|
+
ambientLightColor?: THREE.Color;
|
|
19
|
+
ambientLightIntensity?: number;
|
|
20
|
+
sunlightColor?: THREE.Color | number;
|
|
21
|
+
};
|
|
22
|
+
type EnvironmentConfig = {
|
|
23
|
+
hdrPath?: string;
|
|
24
|
+
backgroundColor?: THREE.Color | string;
|
|
25
|
+
enableEnvironmentLighting?: boolean;
|
|
26
|
+
sceneUp?: THREE.Vector3;
|
|
27
|
+
showEnvironment?: boolean;
|
|
28
|
+
};
|
|
29
|
+
type FloorConfig = {
|
|
30
|
+
enabled?: boolean;
|
|
31
|
+
size?: number;
|
|
32
|
+
color?: THREE.Color | string;
|
|
33
|
+
roughness?: number;
|
|
34
|
+
metalness?: number;
|
|
35
|
+
receiveShadow?: boolean;
|
|
36
|
+
};
|
|
37
|
+
type RenderConfig = {
|
|
38
|
+
enableShadows?: boolean;
|
|
39
|
+
shadowMapSize?: number;
|
|
40
|
+
antialias?: boolean;
|
|
41
|
+
pixelRatio?: number;
|
|
42
|
+
toneMapping?: THREE.ToneMapping;
|
|
43
|
+
toneMappingExposure?: number;
|
|
44
|
+
preserveDrawingBuffer?: boolean;
|
|
45
|
+
};
|
|
46
|
+
type ControlsConfig = {
|
|
47
|
+
enableDamping?: boolean;
|
|
48
|
+
dampingFactor?: number;
|
|
49
|
+
autoRotate?: boolean;
|
|
50
|
+
autoRotateSpeed?: number;
|
|
51
|
+
enableZoom?: boolean;
|
|
52
|
+
enablePan?: boolean;
|
|
53
|
+
minDistance?: number;
|
|
54
|
+
maxDistance?: number;
|
|
55
|
+
};
|
|
56
|
+
type ThreeInitializerOptions = {
|
|
57
|
+
sceneScale?: 'mm' | 'cm' | 'm' | 'inches' | 'feet';
|
|
58
|
+
camera?: CameraConfig;
|
|
59
|
+
lighting?: LightingConfig;
|
|
60
|
+
environment?: EnvironmentConfig;
|
|
61
|
+
floor?: FloorConfig;
|
|
62
|
+
render?: RenderConfig;
|
|
63
|
+
controls?: ControlsConfig;
|
|
64
|
+
events?: EventConfig;
|
|
65
|
+
};
|
|
66
|
+
type EventConfig = {
|
|
67
|
+
onBackgroundClicked?: (event: {
|
|
68
|
+
x: number;
|
|
69
|
+
y: number;
|
|
70
|
+
}) => void;
|
|
71
|
+
onObjectSelected?: (object: THREE.Object3D) => void;
|
|
72
|
+
/** Called when a mesh with metadata is clicked. Receives the mesh's metadata object. */
|
|
73
|
+
onMeshMetadataClicked?: (metadata: Record<string, string>) => void;
|
|
74
|
+
/** Called when a mesh is double-clicked. Receives the mesh object. */
|
|
75
|
+
onMeshDoubleClicked?: (object: THREE.Object3D) => void;
|
|
76
|
+
/** Color to use for highlighting selected meshes. Defaults to red (#ff0000). */
|
|
77
|
+
selectionColor?: THREE.Color | string;
|
|
78
|
+
/** Enable all event handlers (click/selection/metadata). Defaults to true. */
|
|
79
|
+
enableEventHandlers?: boolean;
|
|
80
|
+
enableKeyboardControls?: boolean;
|
|
81
|
+
enableClickToFocus?: boolean;
|
|
82
|
+
/** Zoom into a mesh on double-click. Defaults to true. */
|
|
83
|
+
enableDoubleClickZoom?: boolean;
|
|
84
|
+
/** Called once the HDR environment map has finished loading and been applied to the scene. */
|
|
85
|
+
onReady?: () => void;
|
|
86
|
+
/** Called every animation frame, after controls update and before render. Use for custom per-frame logic. */
|
|
87
|
+
onFrame?: (delta: number) => void;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Initializes a Three.js environment with scene, camera, renderer, and event handling.
|
|
92
|
+
*/
|
|
93
|
+
declare const initThree: (canvas: HTMLCanvasElement, options?: ThreeInitializerOptions) => {
|
|
94
|
+
scene: THREE.Scene;
|
|
95
|
+
camera: THREE.PerspectiveCamera;
|
|
96
|
+
controls: OrbitControls;
|
|
97
|
+
renderer: THREE.WebGLRenderer;
|
|
98
|
+
dispose: () => void;
|
|
99
|
+
fitToView: () => void;
|
|
100
|
+
clearSelection: () => void;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Updates the scene with the given meshes and camera settings.
|
|
105
|
+
* If initialPositionSet is false, it positions the camera and sets the controls target based on the bounding boxes of the meshes.
|
|
106
|
+
* @param scene - The THREE.Scene object to update.
|
|
107
|
+
* @param meshes - An array of THREE.Mesh objects to add to the scene.
|
|
108
|
+
* @param camera - The THREE.PerspectiveCamera object to position.
|
|
109
|
+
* @param controls - The OrbitControls object to update.
|
|
110
|
+
* @param initialPositionSet - A boolean indicating whether the initial position of the camera and controls have been set.
|
|
111
|
+
*/
|
|
112
|
+
declare function updateScene(scene: THREE.Scene, meshes: THREE.Mesh[], camera: THREE.PerspectiveCamera, controls: OrbitControls, initialPositionSet: boolean): void;
|
|
113
|
+
|
|
114
|
+
declare const EMISSIVE_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
115
|
+
declare const METAL_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
116
|
+
declare const CONCRETE_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
117
|
+
declare const PLASTIC_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
118
|
+
declare const GLASS_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
119
|
+
declare const RUBBER_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
120
|
+
declare const WOOD_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
121
|
+
|
|
122
|
+
declare const threeMaterials_CONCRETE_MATERIAL: typeof CONCRETE_MATERIAL;
|
|
123
|
+
declare const threeMaterials_EMISSIVE_MATERIAL: typeof EMISSIVE_MATERIAL;
|
|
124
|
+
declare const threeMaterials_GLASS_MATERIAL: typeof GLASS_MATERIAL;
|
|
125
|
+
declare const threeMaterials_METAL_MATERIAL: typeof METAL_MATERIAL;
|
|
126
|
+
declare const threeMaterials_PLASTIC_MATERIAL: typeof PLASTIC_MATERIAL;
|
|
127
|
+
declare const threeMaterials_RUBBER_MATERIAL: typeof RUBBER_MATERIAL;
|
|
128
|
+
declare const threeMaterials_WOOD_MATERIAL: typeof WOOD_MATERIAL;
|
|
129
|
+
declare namespace threeMaterials {
|
|
130
|
+
export { threeMaterials_CONCRETE_MATERIAL as CONCRETE_MATERIAL, threeMaterials_EMISSIVE_MATERIAL as EMISSIVE_MATERIAL, threeMaterials_GLASS_MATERIAL as GLASS_MATERIAL, threeMaterials_METAL_MATERIAL as METAL_MATERIAL, threeMaterials_PLASTIC_MATERIAL as PLASTIC_MATERIAL, threeMaterials_RUBBER_MATERIAL as RUBBER_MATERIAL, threeMaterials_WOOD_MATERIAL as WOOD_MATERIAL };
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare const SCALE_FACTORS: Record<string, number>;
|
|
134
|
+
/**
|
|
135
|
+
* Extracts and processes display meshes from a ComputePointerResponse using the Grasshopper WebDisplay component.
|
|
136
|
+
*
|
|
137
|
+
* This is the primary entry point for extracting mesh geometry from Grasshopper compute responses.
|
|
138
|
+
* It handles all aspects of mesh processing: decompression, coordinate transformation, scaling, and positioning.
|
|
139
|
+
*
|
|
140
|
+
* **Note:** Mesh decompression happens asynchronously in a Web Worker to prevent UI blocking.
|
|
141
|
+
*
|
|
142
|
+
* @param data - The ComputePointerResponse containing Grasshopper output trees.
|
|
143
|
+
* @param options - Configuration for mesh extraction and parsing behavior. All options are optional with sensible defaults.
|
|
144
|
+
* @returns Promise resolving to array of THREE.Mesh objects (may be empty).
|
|
145
|
+
* @throws Rethrows unexpected errors after attempting to dispose any created meshes.
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* - Only works with the WebDisplay component of GHHeadless.
|
|
149
|
+
* - Requires changes to Rhino.Compute (see https://github.com/TheVessen/compute.rhino3d).
|
|
150
|
+
* - Provides a performant way to display mesh data in Three.js.
|
|
151
|
+
* - Decompression is performed in a Web Worker for non-blocking UI updates.
|
|
152
|
+
* - Supports mesh metadata (names, user data) if provided in the compute response.
|
|
153
|
+
*
|
|
154
|
+
* @internal Internal helper: high-level extraction remains public via visualization module, but this
|
|
155
|
+
* function is considered internal implementation detail for mesh extraction.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```ts
|
|
159
|
+
* // Simple usage with defaults (all processing enabled)
|
|
160
|
+
* const meshes = await getThreeMeshesFromComputeResponse(response);
|
|
161
|
+
*
|
|
162
|
+
* // With debugging enabled
|
|
163
|
+
* const meshes = await getThreeMeshesFromComputeResponse(response, { debug: true });
|
|
164
|
+
*
|
|
165
|
+
* // With advanced options
|
|
166
|
+
* const meshes = await getThreeMeshesFromComputeResponse(response, {
|
|
167
|
+
* debug: true,
|
|
168
|
+
* allowScaling: true,
|
|
169
|
+
* allowAutoPosition: false,
|
|
170
|
+
* parsing: {
|
|
171
|
+
* mergeByMaterial: false,
|
|
172
|
+
* applyTransforms: true,
|
|
173
|
+
* debug: true,
|
|
174
|
+
* },
|
|
175
|
+
* });
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
declare function getThreeMeshesFromComputeResponse(data: GrasshopperComputeResponse, options?: MeshExtractionOptions): Promise<THREE.Mesh[]>;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Parses a MeshBatch object and creates Three.js meshes.
|
|
182
|
+
* This is useful when you already have a deserialized MeshBatch object.
|
|
183
|
+
*
|
|
184
|
+
* @internal Low-level mesh parsing — keep internal to `@selvajs/compute`.
|
|
185
|
+
*
|
|
186
|
+
* @param batch - MeshBatch object
|
|
187
|
+
* @param options - Rendering options
|
|
188
|
+
* @returns Promise resolving to array of Three.js mesh objects
|
|
189
|
+
*/
|
|
190
|
+
declare function parseMeshBatchObject(batch: MeshBatch, options?: {
|
|
191
|
+
/** Merge meshes with same material into single geometry*/
|
|
192
|
+
mergeByMaterial?: boolean;
|
|
193
|
+
/** Apply coordinate system transformations */
|
|
194
|
+
applyTransforms?: boolean;
|
|
195
|
+
/** Scale factor to apply to meshes (e.g., for unit conversion) */
|
|
196
|
+
scaleFactor?: number;
|
|
197
|
+
/** Enable performance monitoring */
|
|
198
|
+
debug?: boolean;
|
|
199
|
+
/** Parse time (optional, for debugging) */
|
|
200
|
+
parseTime?: number;
|
|
201
|
+
/** Performance start time (optional, for debugging) */
|
|
202
|
+
perfStart?: number;
|
|
203
|
+
}): Promise<THREE.Mesh[]>;
|
|
204
|
+
|
|
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 };
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
|
|
3
|
+
import { d as GrasshopperComputeResponse } from './schemas-Ct7lU-IH.js';
|
|
4
|
+
import { M as MeshExtractionOptions, a as MeshBatch } from './types-B24K2LG4.js';
|
|
5
|
+
export { D as DecompressedMeshData, b as MaterialGroup, c as MeshBatchParsingOptions, d as MeshMetadata, S as SerializableMaterial } from './types-B24K2LG4.js';
|
|
6
|
+
|
|
7
|
+
type CameraConfig = {
|
|
8
|
+
position?: THREE.Vector3;
|
|
9
|
+
fov?: number;
|
|
10
|
+
near?: number;
|
|
11
|
+
far?: number;
|
|
12
|
+
target?: THREE.Vector3;
|
|
13
|
+
};
|
|
14
|
+
type LightingConfig = {
|
|
15
|
+
enableSunlight?: boolean;
|
|
16
|
+
sunlightIntensity?: number;
|
|
17
|
+
sunlightPosition?: THREE.Vector3;
|
|
18
|
+
ambientLightColor?: THREE.Color;
|
|
19
|
+
ambientLightIntensity?: number;
|
|
20
|
+
sunlightColor?: THREE.Color | number;
|
|
21
|
+
};
|
|
22
|
+
type EnvironmentConfig = {
|
|
23
|
+
hdrPath?: string;
|
|
24
|
+
backgroundColor?: THREE.Color | string;
|
|
25
|
+
enableEnvironmentLighting?: boolean;
|
|
26
|
+
sceneUp?: THREE.Vector3;
|
|
27
|
+
showEnvironment?: boolean;
|
|
28
|
+
};
|
|
29
|
+
type FloorConfig = {
|
|
30
|
+
enabled?: boolean;
|
|
31
|
+
size?: number;
|
|
32
|
+
color?: THREE.Color | string;
|
|
33
|
+
roughness?: number;
|
|
34
|
+
metalness?: number;
|
|
35
|
+
receiveShadow?: boolean;
|
|
36
|
+
};
|
|
37
|
+
type RenderConfig = {
|
|
38
|
+
enableShadows?: boolean;
|
|
39
|
+
shadowMapSize?: number;
|
|
40
|
+
antialias?: boolean;
|
|
41
|
+
pixelRatio?: number;
|
|
42
|
+
toneMapping?: THREE.ToneMapping;
|
|
43
|
+
toneMappingExposure?: number;
|
|
44
|
+
preserveDrawingBuffer?: boolean;
|
|
45
|
+
};
|
|
46
|
+
type ControlsConfig = {
|
|
47
|
+
enableDamping?: boolean;
|
|
48
|
+
dampingFactor?: number;
|
|
49
|
+
autoRotate?: boolean;
|
|
50
|
+
autoRotateSpeed?: number;
|
|
51
|
+
enableZoom?: boolean;
|
|
52
|
+
enablePan?: boolean;
|
|
53
|
+
minDistance?: number;
|
|
54
|
+
maxDistance?: number;
|
|
55
|
+
};
|
|
56
|
+
type ThreeInitializerOptions = {
|
|
57
|
+
sceneScale?: 'mm' | 'cm' | 'm' | 'inches' | 'feet';
|
|
58
|
+
camera?: CameraConfig;
|
|
59
|
+
lighting?: LightingConfig;
|
|
60
|
+
environment?: EnvironmentConfig;
|
|
61
|
+
floor?: FloorConfig;
|
|
62
|
+
render?: RenderConfig;
|
|
63
|
+
controls?: ControlsConfig;
|
|
64
|
+
events?: EventConfig;
|
|
65
|
+
};
|
|
66
|
+
type EventConfig = {
|
|
67
|
+
onBackgroundClicked?: (event: {
|
|
68
|
+
x: number;
|
|
69
|
+
y: number;
|
|
70
|
+
}) => void;
|
|
71
|
+
onObjectSelected?: (object: THREE.Object3D) => void;
|
|
72
|
+
/** Called when a mesh with metadata is clicked. Receives the mesh's metadata object. */
|
|
73
|
+
onMeshMetadataClicked?: (metadata: Record<string, string>) => void;
|
|
74
|
+
/** Called when a mesh is double-clicked. Receives the mesh object. */
|
|
75
|
+
onMeshDoubleClicked?: (object: THREE.Object3D) => void;
|
|
76
|
+
/** Color to use for highlighting selected meshes. Defaults to red (#ff0000). */
|
|
77
|
+
selectionColor?: THREE.Color | string;
|
|
78
|
+
/** Enable all event handlers (click/selection/metadata). Defaults to true. */
|
|
79
|
+
enableEventHandlers?: boolean;
|
|
80
|
+
enableKeyboardControls?: boolean;
|
|
81
|
+
enableClickToFocus?: boolean;
|
|
82
|
+
/** Zoom into a mesh on double-click. Defaults to true. */
|
|
83
|
+
enableDoubleClickZoom?: boolean;
|
|
84
|
+
/** Called once the HDR environment map has finished loading and been applied to the scene. */
|
|
85
|
+
onReady?: () => void;
|
|
86
|
+
/** Called every animation frame, after controls update and before render. Use for custom per-frame logic. */
|
|
87
|
+
onFrame?: (delta: number) => void;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Initializes a Three.js environment with scene, camera, renderer, and event handling.
|
|
92
|
+
*/
|
|
93
|
+
declare const initThree: (canvas: HTMLCanvasElement, options?: ThreeInitializerOptions) => {
|
|
94
|
+
scene: THREE.Scene;
|
|
95
|
+
camera: THREE.PerspectiveCamera;
|
|
96
|
+
controls: OrbitControls;
|
|
97
|
+
renderer: THREE.WebGLRenderer;
|
|
98
|
+
dispose: () => void;
|
|
99
|
+
fitToView: () => void;
|
|
100
|
+
clearSelection: () => void;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Updates the scene with the given meshes and camera settings.
|
|
105
|
+
* If initialPositionSet is false, it positions the camera and sets the controls target based on the bounding boxes of the meshes.
|
|
106
|
+
* @param scene - The THREE.Scene object to update.
|
|
107
|
+
* @param meshes - An array of THREE.Mesh objects to add to the scene.
|
|
108
|
+
* @param camera - The THREE.PerspectiveCamera object to position.
|
|
109
|
+
* @param controls - The OrbitControls object to update.
|
|
110
|
+
* @param initialPositionSet - A boolean indicating whether the initial position of the camera and controls have been set.
|
|
111
|
+
*/
|
|
112
|
+
declare function updateScene(scene: THREE.Scene, meshes: THREE.Mesh[], camera: THREE.PerspectiveCamera, controls: OrbitControls, initialPositionSet: boolean): void;
|
|
113
|
+
|
|
114
|
+
declare const EMISSIVE_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
115
|
+
declare const METAL_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
116
|
+
declare const CONCRETE_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
117
|
+
declare const PLASTIC_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
118
|
+
declare const GLASS_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
119
|
+
declare const RUBBER_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
120
|
+
declare const WOOD_MATERIAL: THREE.MeshPhysicalMaterial;
|
|
121
|
+
|
|
122
|
+
declare const threeMaterials_CONCRETE_MATERIAL: typeof CONCRETE_MATERIAL;
|
|
123
|
+
declare const threeMaterials_EMISSIVE_MATERIAL: typeof EMISSIVE_MATERIAL;
|
|
124
|
+
declare const threeMaterials_GLASS_MATERIAL: typeof GLASS_MATERIAL;
|
|
125
|
+
declare const threeMaterials_METAL_MATERIAL: typeof METAL_MATERIAL;
|
|
126
|
+
declare const threeMaterials_PLASTIC_MATERIAL: typeof PLASTIC_MATERIAL;
|
|
127
|
+
declare const threeMaterials_RUBBER_MATERIAL: typeof RUBBER_MATERIAL;
|
|
128
|
+
declare const threeMaterials_WOOD_MATERIAL: typeof WOOD_MATERIAL;
|
|
129
|
+
declare namespace threeMaterials {
|
|
130
|
+
export { threeMaterials_CONCRETE_MATERIAL as CONCRETE_MATERIAL, threeMaterials_EMISSIVE_MATERIAL as EMISSIVE_MATERIAL, threeMaterials_GLASS_MATERIAL as GLASS_MATERIAL, threeMaterials_METAL_MATERIAL as METAL_MATERIAL, threeMaterials_PLASTIC_MATERIAL as PLASTIC_MATERIAL, threeMaterials_RUBBER_MATERIAL as RUBBER_MATERIAL, threeMaterials_WOOD_MATERIAL as WOOD_MATERIAL };
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare const SCALE_FACTORS: Record<string, number>;
|
|
134
|
+
/**
|
|
135
|
+
* Extracts and processes display meshes from a ComputePointerResponse using the Grasshopper WebDisplay component.
|
|
136
|
+
*
|
|
137
|
+
* This is the primary entry point for extracting mesh geometry from Grasshopper compute responses.
|
|
138
|
+
* It handles all aspects of mesh processing: decompression, coordinate transformation, scaling, and positioning.
|
|
139
|
+
*
|
|
140
|
+
* **Note:** Mesh decompression happens asynchronously in a Web Worker to prevent UI blocking.
|
|
141
|
+
*
|
|
142
|
+
* @param data - The ComputePointerResponse containing Grasshopper output trees.
|
|
143
|
+
* @param options - Configuration for mesh extraction and parsing behavior. All options are optional with sensible defaults.
|
|
144
|
+
* @returns Promise resolving to array of THREE.Mesh objects (may be empty).
|
|
145
|
+
* @throws Rethrows unexpected errors after attempting to dispose any created meshes.
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* - Only works with the WebDisplay component of GHHeadless.
|
|
149
|
+
* - Requires changes to Rhino.Compute (see https://github.com/TheVessen/compute.rhino3d).
|
|
150
|
+
* - Provides a performant way to display mesh data in Three.js.
|
|
151
|
+
* - Decompression is performed in a Web Worker for non-blocking UI updates.
|
|
152
|
+
* - Supports mesh metadata (names, user data) if provided in the compute response.
|
|
153
|
+
*
|
|
154
|
+
* @internal Internal helper: high-level extraction remains public via visualization module, but this
|
|
155
|
+
* function is considered internal implementation detail for mesh extraction.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```ts
|
|
159
|
+
* // Simple usage with defaults (all processing enabled)
|
|
160
|
+
* const meshes = await getThreeMeshesFromComputeResponse(response);
|
|
161
|
+
*
|
|
162
|
+
* // With debugging enabled
|
|
163
|
+
* const meshes = await getThreeMeshesFromComputeResponse(response, { debug: true });
|
|
164
|
+
*
|
|
165
|
+
* // With advanced options
|
|
166
|
+
* const meshes = await getThreeMeshesFromComputeResponse(response, {
|
|
167
|
+
* debug: true,
|
|
168
|
+
* allowScaling: true,
|
|
169
|
+
* allowAutoPosition: false,
|
|
170
|
+
* parsing: {
|
|
171
|
+
* mergeByMaterial: false,
|
|
172
|
+
* applyTransforms: true,
|
|
173
|
+
* debug: true,
|
|
174
|
+
* },
|
|
175
|
+
* });
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
declare function getThreeMeshesFromComputeResponse(data: GrasshopperComputeResponse, options?: MeshExtractionOptions): Promise<THREE.Mesh[]>;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Parses a MeshBatch object and creates Three.js meshes.
|
|
182
|
+
* This is useful when you already have a deserialized MeshBatch object.
|
|
183
|
+
*
|
|
184
|
+
* @internal Low-level mesh parsing — keep internal to `@selvajs/compute`.
|
|
185
|
+
*
|
|
186
|
+
* @param batch - MeshBatch object
|
|
187
|
+
* @param options - Rendering options
|
|
188
|
+
* @returns Promise resolving to array of Three.js mesh objects
|
|
189
|
+
*/
|
|
190
|
+
declare function parseMeshBatchObject(batch: MeshBatch, options?: {
|
|
191
|
+
/** Merge meshes with same material into single geometry*/
|
|
192
|
+
mergeByMaterial?: boolean;
|
|
193
|
+
/** Apply coordinate system transformations */
|
|
194
|
+
applyTransforms?: boolean;
|
|
195
|
+
/** Scale factor to apply to meshes (e.g., for unit conversion) */
|
|
196
|
+
scaleFactor?: number;
|
|
197
|
+
/** Enable performance monitoring */
|
|
198
|
+
debug?: boolean;
|
|
199
|
+
/** Parse time (optional, for debugging) */
|
|
200
|
+
parseTime?: number;
|
|
201
|
+
/** Performance start time (optional, for debugging) */
|
|
202
|
+
perfStart?: number;
|
|
203
|
+
}): Promise<THREE.Mesh[]>;
|
|
204
|
+
|
|
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 };
|