@inweb/viewer-three 27.5.0 → 27.6.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.
Files changed (53) hide show
  1. package/dist/extensions/components/LightHelperComponent.js +1 -1
  2. package/dist/extensions/components/LightHelperComponent.js.map +1 -1
  3. package/dist/extensions/components/LightHelperComponent.min.js +1 -1
  4. package/dist/extensions/components/LightHelperComponent.module.js +1 -1
  5. package/dist/extensions/components/LightHelperComponent.module.js.map +1 -1
  6. package/dist/extensions/components/StatsPanelComponent.js +0 -1
  7. package/dist/extensions/components/StatsPanelComponent.js.map +1 -1
  8. package/dist/extensions/components/StatsPanelComponent.min.js +1 -1
  9. package/dist/extensions/components/StatsPanelComponent.module.js +0 -1
  10. package/dist/extensions/components/StatsPanelComponent.module.js.map +1 -1
  11. package/dist/extensions/loaders/GLTFCloudLoader.js +7 -2
  12. package/dist/extensions/loaders/GLTFCloudLoader.js.map +1 -1
  13. package/dist/extensions/loaders/GLTFCloudLoader.min.js +1 -1
  14. package/dist/extensions/loaders/GLTFCloudLoader.module.js +7 -2
  15. package/dist/extensions/loaders/GLTFCloudLoader.module.js.map +1 -1
  16. package/dist/extensions/loaders/GLTFFileLoader.js +2 -1
  17. package/dist/extensions/loaders/GLTFFileLoader.js.map +1 -1
  18. package/dist/extensions/loaders/GLTFFileLoader.min.js +1 -1
  19. package/dist/extensions/loaders/GLTFFileLoader.module.js +2 -1
  20. package/dist/extensions/loaders/GLTFFileLoader.module.js.map +1 -1
  21. package/dist/extensions/loaders/IFCXLoader.js +10 -5
  22. package/dist/extensions/loaders/IFCXLoader.js.map +1 -1
  23. package/dist/extensions/loaders/IFCXLoader.min.js +1 -1
  24. package/dist/extensions/loaders/IFCXLoader.module.js +10 -5
  25. package/dist/extensions/loaders/IFCXLoader.module.js.map +1 -1
  26. package/dist/viewer-three.js +161 -157
  27. package/dist/viewer-three.js.map +1 -1
  28. package/dist/viewer-three.min.js +3 -3
  29. package/dist/viewer-three.module.js +68 -53
  30. package/dist/viewer-three.module.js.map +1 -1
  31. package/extensions/components/LightHelperComponent.ts +1 -1
  32. package/extensions/components/StatsPanelComponent.ts +0 -1
  33. package/extensions/loaders/GLTFCloudLoader.ts +8 -2
  34. package/extensions/loaders/GLTFFileLoader.ts +3 -2
  35. package/extensions/loaders/IFCX/IFCXFileLoader.ts +11 -5
  36. package/lib/Viewer/Viewer.d.ts +1 -1
  37. package/lib/Viewer/measurement/Snapper.d.ts +1 -1
  38. package/package.json +5 -5
  39. package/src/Viewer/Viewer.ts +14 -16
  40. package/src/Viewer/commands/GetSelected2.ts +1 -1
  41. package/src/Viewer/commands/SetSelected.ts +1 -1
  42. package/src/Viewer/components/BackgroundComponent.ts +1 -1
  43. package/src/Viewer/components/CameraComponent.ts +1 -1
  44. package/src/Viewer/components/CanvasRemoveComponent.ts +0 -1
  45. package/src/Viewer/components/HighlighterUtils.ts +2 -2
  46. package/src/Viewer/components/SelectionComponent.ts +4 -2
  47. package/src/Viewer/helpers/SectionsHelper.js +4 -8
  48. package/src/Viewer/helpers/WCSHelper.ts +7 -5
  49. package/src/Viewer/loaders/DynamicGltfLoader/DynamicModelImpl.ts +19 -14
  50. package/src/Viewer/loaders/GLTFBinaryParser.ts +2 -2
  51. package/src/Viewer/loaders/GLTFFileDynamicLoader.ts +2 -2
  52. package/src/Viewer/measurement/Snapper.ts +2 -2
  53. package/src/Viewer/models/ModelImpl.ts +38 -25
@@ -1 +1 @@
1
- {"version":3,"file":"viewer-three.module.js","sources":["../src/Viewer/controls/OrbitControls.js","../src/Viewer/helpers/PlaneHelper2.ts","../src/Viewer/measurement/Snapper.ts","../src/Viewer/draggers/OrbitDragger.ts","../src/Viewer/draggers/CuttingPlaneDragger.ts","../src/Viewer/draggers/CuttingPlaneXAxis.ts","../src/Viewer/draggers/CuttingPlaneYAxis.ts","../src/Viewer/draggers/CuttingPlaneZAxis.ts","../src/Viewer/measurement/UnitConverter.ts","../src/Viewer/measurement/UnitFormatter.ts","../src/Viewer/draggers/MeasureLineDragger.ts","../src/Viewer/draggers/PanDragger.ts","../src/Viewer/controls/WalkControls.ts","../src/Viewer/controls/JoyStickControls.ts","../src/Viewer/draggers/WalkDragger.ts","../src/Viewer/controls/FlyControls.ts","../src/Viewer/draggers/FlyDragger.ts","../src/Viewer/draggers/ZoomDragger.ts","../src/Viewer/draggers/index.ts","../src/Viewer/commands/ApplyModelTransform.ts","../src/Viewer/commands/ClearMarkup.ts","../src/Viewer/commands/ClearSelected.ts","../src/Viewer/commands/ClearSlices.ts","../src/Viewer/commands/GetSnapshot.ts","../src/Viewer/commands/Explode.ts","../src/Viewer/commands/ZoomTo.ts","../src/Viewer/commands/SetDefaultViewPosition.ts","../src/Viewer/commands/GetDefaultViewPositions.ts","../src/Viewer/commands/GetModels.ts","../src/Viewer/commands/GetSelected.ts","../src/Viewer/commands/GetSelected2.ts","../src/Viewer/commands/HideSelected.ts","../src/Viewer/commands/IsolateSelected.ts","../src/Viewer/commands/RegenerateAll.ts","../src/Viewer/commands/ResetView.ts","../src/Viewer/commands/SelectModel.ts","../src/Viewer/commands/SetActiveDragger.ts","../src/Viewer/commands/SetMarkupColor.ts","../src/Viewer/commands/SetSelected.ts","../src/Viewer/commands/SetSelected2.ts","../src/Viewer/commands/ShowAll.ts","../src/Viewer/commands/ZoomToExtents.ts","../src/Viewer/commands/ZoomToObjects.ts","../src/Viewer/commands/ZoomToSelected.ts","../src/Viewer/commands/index.ts","../src/Viewer/components/BackgroundComponent.ts","../src/Viewer/components/CameraComponent.ts","../src/Viewer/components/ExtentsComponent.ts","../src/Viewer/components/LightComponent.ts","../src/Viewer/components/InfoComponent.ts","../src/Viewer/components/CanvasResizeComponent.ts","../src/Viewer/components/CanvasRemoveComponent.ts","../src/Viewer/components/RenderLoopComponent.ts","../src/Viewer/components/HighlighterUtils.ts","../src/Viewer/components/HighlighterComponent.ts","../src/Viewer/components/SelectionComponent.ts","../src/Viewer/components/ClippingPlaneComponent.ts","../src/Viewer/helpers/SectionsHelper.js","../src/Viewer/components/SectionsComponent.ts","../src/Viewer/helpers/WCSHelper.ts","../src/Viewer/components/WCSHelperComponent.ts","../src/Viewer/components/ResetComponent.ts","../src/Viewer/components/index.ts","../src/Viewer/models/ModelImpl.ts","../src/Viewer/loaders/DynamicGltfLoader/DynamicModelImpl.ts","../src/Viewer/loaders/DynamicGltfLoader/GltfStructure.js","../src/Viewer/loaders/DynamicGltfLoader/DynamicGltfLoader.js","../src/Viewer/loaders/GLTFLoadingManager.ts","../src/Viewer/loaders/GLTFBinaryParser.ts","../src/Viewer/loaders/JSONStreamParser.ts","../src/Viewer/loaders/RangesLoader.ts","../src/Viewer/loaders/GLTFFileDynamicLoader.ts","../src/Viewer/loaders/GLTFCloudDynamicLoader.ts","../src/Viewer/loaders/index.ts","../src/Viewer/Viewer.ts"],"sourcesContent":["import { EventDispatcher, MOUSE, Quaternion, Spherical, TOUCH, Vector2, Vector3 } from \"three\";\n\n// OrbitControls performs orbiting, dollying (zooming), and panning.\n// Unlike TrackballControls, it maintains the \"up\" direction object.up (+Y by default).\n//\n// Orbit - left mouse / touch: one-finger move\n// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish\n// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move\n\nconst _changeEvent = { type: \"change\" };\nconst _startEvent = { type: \"start\" };\nconst _endEvent = { type: \"end\" };\n\nconst STATE = {\n NONE: -1,\n ROTATE: 0,\n DOLLY: 1,\n PAN: 2,\n TOUCH_ROTATE: 3,\n TOUCH_PAN: 4,\n TOUCH_DOLLY_PAN: 5,\n TOUCH_DOLLY_ROTATE: 6,\n};\n\nclass OrbitControls extends EventDispatcher {\n constructor(object, domElement) {\n super();\n\n this.object = object;\n this.domElement = domElement;\n this.domElement.style.touchAction = \"none\"; // disable touch scroll\n\n // Set to false to disable this control\n this.enabled = true;\n\n // \"target\" sets the location of focus, where the object orbits around\n this.target = new Vector3();\n\n // How far you can dolly in and out ( PerspectiveCamera only )\n this.minDistance = 0;\n this.maxDistance = Infinity;\n\n // How far you can zoom in and out ( OrthographicCamera only )\n this.minZoom = 0;\n this.maxZoom = Infinity;\n\n // How far you can orbit vertically, upper and lower limits.\n // Range is 0 to Math.PI radians.\n this.minPolarAngle = 0; // radians\n this.maxPolarAngle = Math.PI; // radians\n\n // How far you can orbit horizontally, upper and lower limits.\n // If set, the interval [ min, max ] must be a sub-interval of [ - 2 PI, 2 PI ], with ( max - min < 2 PI )\n this.minAzimuthAngle = -Infinity; // radians\n this.maxAzimuthAngle = Infinity; // radians\n\n // Set to true to enable damping (inertia)\n // If damping is enabled, you must call controls.update() in your animation loop\n this.enableDamping = false;\n this.dampingFactor = 0.05;\n\n // This option actually enables dollying in and out; left as \"zoom\" for backwards compatibility.\n // Set to false to disable zooming\n this.enableZoom = true;\n this.zoomSpeed = 1.0;\n\n // Set to false to disable rotating\n this.enableRotate = true;\n this.rotateSpeed = 1.0;\n\n // Set to false to disable panning\n this.enablePan = true;\n this.panSpeed = 1.0;\n this.screenSpacePanning = true; // if false, pan orthogonal to world-space direction camera.up\n this.keyPanSpeed = 7.0; // pixels moved per arrow key push\n\n // Set to true to automatically rotate around the target\n // If auto-rotate is enabled, you must call controls.update() in your animation loop\n this.autoRotate = false;\n this.autoRotateSpeed = 2.0; // 30 seconds per orbit when fps is 60\n\n // The four arrow keys\n this.keys = { LEFT: \"ArrowLeft\", UP: \"ArrowUp\", RIGHT: \"ArrowRight\", BOTTOM: \"ArrowDown\" };\n\n // Mouse buttons\n this.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.PAN };\n\n // Touch fingers\n this.touches = { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN };\n\n // for reset\n this.target0 = this.target.clone();\n this.position0 = this.object.position.clone();\n this.zoom0 = this.object.zoom;\n\n // the target DOM element for key events\n this._domElementKeyEvents = null;\n\n //\n // public methods\n //\n\n this.getPolarAngle = function () {\n return spherical.phi;\n };\n\n this.getAzimuthalAngle = function () {\n return spherical.theta;\n };\n\n this.getDistance = function () {\n return this.object.position.distanceTo(this.target);\n };\n\n this.listenToKeyEvents = function (domElement) {\n domElement.addEventListener(\"keydown\", onKeyDown);\n this._domElementKeyEvents = domElement;\n };\n\n this.stopListenToKeyEvents = function () {\n this._domElementKeyEvents.removeEventListener(\"keydown\", onKeyDown);\n this._domElementKeyEvents = null;\n };\n\n this.saveState = function () {\n scope.target0.copy(scope.target);\n scope.position0.copy(scope.object.position);\n scope.zoom0 = scope.object.zoom;\n };\n\n this.reset = function () {\n scope.target.copy(scope.target0);\n scope.object.position.copy(scope.position0);\n scope.object.zoom = scope.zoom0;\n\n scope.object.updateProjectionMatrix();\n scope.dispatchEvent(_changeEvent);\n\n scope.update();\n\n scope.state = STATE.NONE;\n };\n\n // this method is exposed, but perhaps it would be better if we can make it private...\n this.update = (function () {\n const offset = new Vector3();\n\n // so camera.up is the orbit axis\n const quat = new Quaternion().setFromUnitVectors(object.up, new Vector3(0, 1, 0));\n const quatInverse = quat.clone().invert();\n\n const lastPosition = new Vector3();\n const lastQuaternion = new Quaternion();\n const lastTargetPosition = new Vector3();\n\n const twoPI = 2 * Math.PI;\n\n return function update() {\n const position = scope.object.position;\n\n offset.copy(position).sub(scope.target);\n\n // rotate offset to \"y-axis-is-up\" space\n offset.applyQuaternion(quat);\n\n // angle from z-axis around y-axis\n spherical.setFromVector3(offset);\n\n if (scope.autoRotate && scope.state === STATE.NONE) {\n rotateLeft(getAutoRotationAngle());\n }\n\n if (scope.enableDamping) {\n spherical.theta += sphericalDelta.theta * scope.dampingFactor;\n spherical.phi += sphericalDelta.phi * scope.dampingFactor;\n } else {\n spherical.theta += sphericalDelta.theta;\n spherical.phi += sphericalDelta.phi;\n }\n\n // restrict theta to be between desired limits\n\n let min = scope.minAzimuthAngle;\n let max = scope.maxAzimuthAngle;\n\n if (isFinite(min) && isFinite(max)) {\n if (min < -Math.PI) min += twoPI;\n else if (min > Math.PI) min -= twoPI;\n\n if (max < -Math.PI) max += twoPI;\n else if (max > Math.PI) max -= twoPI;\n\n if (min <= max) {\n spherical.theta = Math.max(min, Math.min(max, spherical.theta));\n } else {\n spherical.theta =\n spherical.theta > (min + max) / 2 ? Math.max(min, spherical.theta) : Math.min(max, spherical.theta);\n }\n }\n\n // restrict phi to be between desired limits\n spherical.phi = Math.max(scope.minPolarAngle, Math.min(scope.maxPolarAngle, spherical.phi));\n\n spherical.makeSafe();\n\n spherical.radius *= scope.scale;\n\n // restrict radius to be between desired limits\n spherical.radius = Math.max(scope.minDistance, Math.min(scope.maxDistance, spherical.radius));\n\n // move target to panned location\n\n if (scope.enableDamping === true) {\n scope.target.addScaledVector(scope.panOffset, scope.dampingFactor);\n } else {\n scope.target.add(scope.panOffset);\n }\n\n offset.setFromSpherical(spherical);\n\n // rotate offset back to \"camera-up-vector-is-up\" space\n offset.applyQuaternion(quatInverse);\n\n position.copy(scope.target).add(offset);\n\n scope.object.lookAt(scope.target);\n\n if (scope.enableDamping === true) {\n sphericalDelta.theta *= 1 - scope.dampingFactor;\n sphericalDelta.phi *= 1 - scope.dampingFactor;\n\n scope.panOffset.multiplyScalar(1 - scope.dampingFactor);\n } else {\n sphericalDelta.set(0, 0, 0);\n\n scope.panOffset.set(0, 0, 0);\n }\n\n scope.scale = 1;\n\n // update condition is:\n // min(camera displacement, camera rotation in radians)^2 > EPS\n // using small-angle approximation cos(x/2) = 1 - x^2 / 8\n\n if (\n scope.zoomChanged ||\n lastPosition.distanceToSquared(scope.object.position) > EPS ||\n 8 * (1 - lastQuaternion.dot(scope.object.quaternion)) > EPS ||\n lastTargetPosition.distanceToSquared(scope.target) > 0\n ) {\n scope.dispatchEvent(_changeEvent);\n\n lastPosition.copy(scope.object.position);\n lastQuaternion.copy(scope.object.quaternion);\n lastTargetPosition.copy(scope.target);\n\n scope.zoomChanged = false;\n\n return true;\n }\n\n return false;\n };\n })();\n\n this.dispose = function () {\n scope.domElement.removeEventListener(\"contextmenu\", onContextMenu);\n\n scope.domElement.removeEventListener(\"pointerdown\", onPointerDown);\n scope.domElement.removeEventListener(\"pointercancel\", onPointerUp);\n scope.domElement.removeEventListener(\"wheel\", onMouseWheel);\n\n scope.domElement.removeEventListener(\"pointermove\", onPointerMove);\n scope.domElement.removeEventListener(\"pointerup\", onPointerUp);\n\n if (scope._domElementKeyEvents !== null) {\n scope._domElementKeyEvents.removeEventListener(\"keydown\", onKeyDown);\n scope._domElementKeyEvents = null;\n }\n\n //scope.dispatchEvent( { type: 'dispose' } ); // should this be added here?\n };\n\n //\n // internals\n //\n\n const scope = this;\n\n scope.state = STATE.NONE;\n\n const EPS = 0.000001;\n\n // current position in spherical coordinates\n const spherical = new Spherical();\n const sphericalDelta = new Spherical();\n\n scope.scale = 1;\n scope.panOffset = new Vector3();\n scope.zoomChanged = false;\n\n scope.rotateStart = new Vector2();\n scope.rotateEnd = new Vector2();\n scope.rotateDelta = new Vector2();\n\n scope.panStart = new Vector2();\n scope.panEnd = new Vector2();\n scope.panDelta = new Vector2();\n\n scope.dollyStart = new Vector2();\n scope.dollyEnd = new Vector2();\n scope.dollyDelta = new Vector2();\n scope.dollyScale = 0;\n\n scope.pointers = [];\n scope.pointerPositions = {};\n\n function getAutoRotationAngle() {\n return ((2 * Math.PI) / 60 / 60) * scope.autoRotateSpeed;\n }\n\n function getZoomScale() {\n return Math.pow(0.95, scope.zoomSpeed);\n }\n\n function rotateLeft(angle) {\n sphericalDelta.theta -= angle;\n }\n\n function rotateUp(angle) {\n sphericalDelta.phi -= angle;\n }\n\n const panLeft = (function () {\n const v = new Vector3();\n\n return function panLeft(distance, objectMatrix) {\n v.setFromMatrixColumn(objectMatrix, 0); // get X column of objectMatrix\n v.multiplyScalar(-distance);\n\n scope.panOffset.add(v);\n };\n })();\n\n const panUp = (function () {\n const v = new Vector3();\n\n return function panUp(distance, objectMatrix) {\n if (scope.screenSpacePanning === true) {\n v.setFromMatrixColumn(objectMatrix, 1);\n } else {\n v.setFromMatrixColumn(objectMatrix, 0);\n v.crossVectors(scope.object.up, v);\n }\n\n v.multiplyScalar(distance);\n\n scope.panOffset.add(v);\n };\n })();\n\n // deltaX and deltaY are in pixels; right and down are positive\n const pan = (function () {\n const offset = new Vector3();\n\n return function pan(deltaX, deltaY) {\n const element = scope.domElement;\n\n if (scope.object.isPerspectiveCamera) {\n // perspective\n const position = scope.object.position;\n offset.copy(position).sub(scope.target);\n let targetDistance = offset.length();\n\n // half of the fov is center to top of screen\n targetDistance *= Math.tan(((scope.object.fov / 2) * Math.PI) / 180.0);\n\n // we use only clientHeight here so aspect ratio does not distort speed\n panLeft((2 * deltaX * targetDistance) / element.clientHeight, scope.object.matrix);\n panUp((2 * deltaY * targetDistance) / element.clientHeight, scope.object.matrix);\n } else if (scope.object.isOrthographicCamera) {\n // orthographic\n panLeft(\n (deltaX * (scope.object.right - scope.object.left)) / scope.object.zoom / element.clientWidth,\n scope.object.matrix\n );\n panUp(\n (deltaY * (scope.object.top - scope.object.bottom)) / scope.object.zoom / element.clientHeight,\n scope.object.matrix\n );\n } else {\n // camera neither orthographic nor perspective\n console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.\");\n scope.enablePan = false;\n }\n };\n })();\n\n function dollyOut(dollyScale) {\n if (scope.object.isPerspectiveCamera) {\n scope.scale /= dollyScale;\n } else if (scope.object.isOrthographicCamera) {\n scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom * dollyScale));\n scope.object.updateProjectionMatrix();\n scope.zoomChanged = true;\n } else {\n console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.\");\n scope.enableZoom = false;\n }\n }\n\n function dollyIn(dollyScale) {\n if (scope.object.isPerspectiveCamera) {\n scope.scale *= dollyScale;\n } else if (scope.object.isOrthographicCamera) {\n scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom / dollyScale));\n scope.object.updateProjectionMatrix();\n scope.zoomChanged = true;\n } else {\n console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.\");\n scope.enableZoom = false;\n }\n }\n\n //\n // event callbacks - update the object state\n //\n\n function handleMouseDownRotate(event) {\n scope.rotateStart.set(event.clientX, event.clientY);\n }\n\n function handleMouseDownDolly(event) {\n scope.dollyStart.set(event.clientX, event.clientY);\n }\n\n function handleMouseDownPan(event) {\n scope.panStart.set(event.clientX, event.clientY);\n }\n\n function handleMouseMoveRotate(event) {\n scope.rotateEnd.set(event.clientX, event.clientY);\n\n scope.rotateDelta.subVectors(scope.rotateEnd, scope.rotateStart).multiplyScalar(scope.rotateSpeed);\n\n const element = scope.domElement;\n\n rotateLeft((2 * Math.PI * scope.rotateDelta.x) / element.clientHeight); // yes, height\n\n rotateUp((2 * Math.PI * scope.rotateDelta.y) / element.clientHeight);\n\n scope.rotateStart.copy(scope.rotateEnd);\n\n scope.update();\n }\n\n function handleMouseMoveDolly(event) {\n scope.dollyEnd.set(event.clientX, event.clientY);\n\n scope.dollyDelta.subVectors(scope.dollyEnd, scope.dollyStart);\n\n if (scope.dollyDelta.y < 0) {\n scope.dollyScale = 1 / getZoomScale();\n dollyOut(getZoomScale());\n } else if (scope.dollyDelta.y > 0) {\n scope.dollyScale = getZoomScale();\n dollyIn(getZoomScale());\n }\n\n scope.dollyStart.copy(scope.dollyEnd);\n\n scope.update();\n }\n\n function handleMouseMovePan(event) {\n scope.panEnd.set(event.clientX, event.clientY);\n\n scope.panDelta.subVectors(scope.panEnd, scope.panStart).multiplyScalar(scope.panSpeed);\n\n pan(scope.panDelta.x, scope.panDelta.y);\n\n scope.panStart.copy(scope.panEnd);\n\n scope.update();\n }\n\n function handleMouseWheel(event) {\n scope.dollyEnd.set(scope.domElement.clientWidth / 2, scope.domElement.clientHeight / 2);\n\n scope.dollyDelta.set(event.deltaX, event.deltaY);\n\n if (event.deltaY < 0) {\n scope.dollyScale = 1 / getZoomScale();\n dollyIn(getZoomScale());\n } else if (event.deltaY > 0) {\n scope.dollyScale = getZoomScale();\n dollyOut(getZoomScale());\n }\n\n scope.dollyStart.copy(scope.dollyEnd);\n\n scope.update();\n\n if (event.deltaY !== 0) {\n scope.state = STATE.DOLLY;\n scope.dispatchEvent(_changeEvent);\n scope.state = STATE.NONE;\n }\n }\n\n function handleKeyDown(event) {\n let needsUpdate = false;\n\n switch (event.code) {\n case scope.keys.UP:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateUp((2 * Math.PI * scope.rotateSpeed) / scope.domElement.clientHeight);\n } else {\n pan(0, scope.keyPanSpeed);\n }\n\n needsUpdate = true;\n break;\n\n case scope.keys.BOTTOM:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateUp((-2 * Math.PI * scope.rotateSpeed) / scope.domElement.clientHeight);\n } else {\n pan(0, -scope.keyPanSpeed);\n }\n\n needsUpdate = true;\n break;\n\n case scope.keys.LEFT:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateLeft((2 * Math.PI * scope.rotateSpeed) / scope.domElement.clientHeight);\n } else {\n pan(scope.keyPanSpeed, 0);\n }\n\n needsUpdate = true;\n break;\n\n case scope.keys.RIGHT:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateLeft((-2 * Math.PI * scope.rotateSpeed) / scope.domElement.clientHeight);\n } else {\n pan(-scope.keyPanSpeed, 0);\n }\n\n needsUpdate = true;\n break;\n }\n\n if (needsUpdate) {\n // prevent the browser from scrolling on cursor keys\n event.preventDefault();\n\n scope.update();\n }\n }\n\n function handleTouchStartRotate() {\n if (scope.pointers.length === 1) {\n scope.rotateStart.set(scope.pointers[0].pageX, scope.pointers[0].pageY);\n } else {\n const x = 0.5 * (scope.pointers[0].pageX + scope.pointers[1].pageX);\n const y = 0.5 * (scope.pointers[0].pageY + scope.pointers[1].pageY);\n\n scope.rotateStart.set(x, y);\n }\n }\n\n function handleTouchStartPan() {\n if (scope.pointers.length === 1) {\n scope.panStart.set(scope.pointers[0].pageX, scope.pointers[0].pageY);\n } else {\n const x = 0.5 * (scope.pointers[0].pageX + scope.pointers[1].pageX);\n const y = 0.5 * (scope.pointers[0].pageY + scope.pointers[1].pageY);\n\n scope.panStart.set(x, y);\n }\n }\n\n function handleTouchStartDolly() {\n const dx = scope.pointers[0].pageX - scope.pointers[1].pageX;\n const dy = scope.pointers[0].pageY - scope.pointers[1].pageY;\n\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n scope.dollyStart.set(0, distance);\n }\n\n function handleTouchStartDollyPan() {\n if (scope.enableZoom) handleTouchStartDolly();\n\n if (scope.enablePan) handleTouchStartPan();\n }\n\n function handleTouchStartDollyRotate() {\n if (scope.enableZoom) handleTouchStartDolly();\n\n if (scope.enableRotate) handleTouchStartRotate();\n }\n\n function handleTouchMoveRotate(event) {\n if (scope.pointers.length == 1) {\n scope.rotateEnd.set(event.pageX, event.pageY);\n } else {\n const position = getSecondPointerPosition(event);\n\n const x = 0.5 * (event.pageX + position.x);\n const y = 0.5 * (event.pageY + position.y);\n\n scope.rotateEnd.set(x, y);\n }\n\n scope.rotateDelta.subVectors(scope.rotateEnd, scope.rotateStart).multiplyScalar(scope.rotateSpeed);\n\n const element = scope.domElement;\n\n rotateLeft((2 * Math.PI * scope.rotateDelta.x) / element.clientHeight); // yes, height\n\n rotateUp((2 * Math.PI * scope.rotateDelta.y) / element.clientHeight);\n\n scope.rotateStart.copy(scope.rotateEnd);\n }\n\n function handleTouchMovePan(event) {\n if (scope.pointers.length === 1) {\n scope.panEnd.set(event.pageX, event.pageY);\n } else {\n const position = getSecondPointerPosition(event);\n\n const x = 0.5 * (event.pageX + position.x);\n const y = 0.5 * (event.pageY + position.y);\n\n scope.panEnd.set(x, y);\n }\n\n scope.panDelta.subVectors(scope.panEnd, scope.panStart).multiplyScalar(scope.panSpeed);\n\n pan(scope.panDelta.x, scope.panDelta.y);\n\n scope.panStart.copy(scope.panEnd);\n }\n\n function handleTouchMoveDolly(event) {\n const position = getSecondPointerPosition(event);\n\n const dx = event.pageX - position.x;\n const dy = event.pageY - position.y;\n\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n scope.dollyEnd.set(0, distance);\n\n scope.dollyDelta.set(0, Math.pow(scope.dollyEnd.y / scope.dollyStart.y, scope.zoomSpeed));\n\n dollyOut(scope.dollyDelta.y);\n\n scope.dollyStart.copy(scope.dollyEnd);\n }\n\n function handleTouchMoveDollyPan(event) {\n if (scope.enableZoom) handleTouchMoveDolly(event);\n\n if (scope.enablePan) handleTouchMovePan(event);\n }\n\n function handleTouchMoveDollyRotate(event) {\n if (scope.enableZoom) handleTouchMoveDolly(event);\n\n if (scope.enableRotate) handleTouchMoveRotate(event);\n }\n\n //\n // event handlers - FSM: listen for events and reset state\n //\n\n function onPointerDown(event) {\n if (scope.enabled === false) return;\n\n if (scope.pointers.length === 0) {\n scope.domElement.setPointerCapture(event.pointerId);\n\n scope.domElement.addEventListener(\"pointermove\", onPointerMove);\n scope.domElement.addEventListener(\"pointerup\", onPointerUp);\n }\n\n //\n\n addPointer(event);\n\n if (event.pointerType === \"touch\") {\n onTouchStart(event);\n } else {\n onMouseDown(event);\n }\n }\n\n function onPointerMove(event) {\n if (scope.enabled === false) return;\n\n if (event.pointerType === \"touch\") {\n onTouchMove(event);\n } else {\n onMouseMove(event);\n }\n }\n\n function onPointerUp(event) {\n removePointer(event);\n\n if (scope.pointers.length === 0) {\n scope.domElement.releasePointerCapture(event.pointerId);\n\n scope.domElement.removeEventListener(\"pointermove\", onPointerMove);\n scope.domElement.removeEventListener(\"pointerup\", onPointerUp);\n }\n\n scope.dispatchEvent(_endEvent);\n\n scope.state = STATE.NONE;\n }\n\n function onMouseDown(event) {\n let mouseAction;\n\n switch (event.button) {\n case 0:\n mouseAction = scope.mouseButtons.LEFT;\n break;\n\n case 1:\n mouseAction = scope.mouseButtons.MIDDLE;\n break;\n\n case 2:\n mouseAction = scope.mouseButtons.RIGHT;\n break;\n\n default:\n mouseAction = -1;\n }\n\n switch (mouseAction) {\n case MOUSE.DOLLY:\n if (scope.enableZoom === false) return;\n\n handleMouseDownDolly(event);\n\n scope.state = STATE.DOLLY;\n\n break;\n\n case MOUSE.ROTATE:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n if (scope.enablePan === false) return;\n\n handleMouseDownPan(event);\n\n scope.state = STATE.PAN;\n } else {\n if (scope.enableRotate === false) return;\n\n handleMouseDownRotate(event);\n\n scope.state = STATE.ROTATE;\n }\n\n break;\n\n case MOUSE.PAN:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n if (scope.enableRotate === false) return;\n\n handleMouseDownRotate(event);\n\n scope.state = STATE.ROTATE;\n } else {\n if (scope.enablePan === false) return;\n\n handleMouseDownPan(event);\n\n scope.state = STATE.PAN;\n }\n\n break;\n\n default:\n scope.state = STATE.NONE;\n }\n\n if (scope.state !== STATE.NONE) {\n scope.dispatchEvent(_startEvent);\n }\n }\n\n function onMouseMove(event) {\n switch (scope.state) {\n case STATE.ROTATE:\n if (scope.enableRotate === false) return;\n\n handleMouseMoveRotate(event);\n\n break;\n\n case STATE.DOLLY:\n if (scope.enableZoom === false) return;\n\n handleMouseMoveDolly(event);\n\n break;\n\n case STATE.PAN:\n if (scope.enablePan === false) return;\n\n handleMouseMovePan(event);\n\n break;\n }\n }\n\n function onMouseWheel(event) {\n if (scope.enabled === false || scope.enableZoom === false || scope.state !== STATE.NONE) return;\n\n event.preventDefault();\n\n scope.dispatchEvent(_startEvent);\n\n handleMouseWheel(event);\n\n scope.dispatchEvent(_endEvent);\n }\n\n function onKeyDown(event) {\n if (scope.enabled === false || scope.enablePan === false) return;\n\n handleKeyDown(event);\n }\n\n function onTouchStart(event) {\n trackPointer(event);\n\n switch (scope.pointers.length) {\n case 1:\n switch (scope.touches.ONE) {\n case TOUCH.ROTATE:\n if (scope.enableRotate === false) return;\n\n handleTouchStartRotate();\n\n scope.state = STATE.TOUCH_ROTATE;\n\n break;\n\n case TOUCH.PAN:\n if (scope.enablePan === false) return;\n\n handleTouchStartPan();\n\n scope.state = STATE.TOUCH_PAN;\n\n break;\n\n default:\n scope.state = STATE.NONE;\n }\n\n break;\n\n case 2:\n switch (scope.touches.TWO) {\n case TOUCH.DOLLY_PAN:\n if (scope.enableZoom === false && scope.enablePan === false) return;\n\n handleTouchStartDollyPan();\n\n scope.state = STATE.TOUCH_DOLLY_PAN;\n\n break;\n\n case TOUCH.DOLLY_ROTATE:\n if (scope.enableZoom === false && scope.enableRotate === false) return;\n\n handleTouchStartDollyRotate();\n\n scope.state = STATE.TOUCH_DOLLY_ROTATE;\n\n break;\n\n default:\n scope.state = STATE.NONE;\n }\n\n break;\n\n default:\n scope.state = STATE.NONE;\n }\n\n if (scope.state !== STATE.NONE) {\n scope.dispatchEvent(_startEvent);\n }\n }\n\n function onTouchMove(event) {\n trackPointer(event);\n\n switch (scope.state) {\n case STATE.TOUCH_ROTATE:\n if (scope.enableRotate === false) return;\n\n handleTouchMoveRotate(event);\n\n scope.update();\n\n break;\n\n case STATE.TOUCH_PAN:\n if (scope.enablePan === false) return;\n\n handleTouchMovePan(event);\n\n scope.update();\n\n break;\n\n case STATE.TOUCH_DOLLY_PAN:\n if (scope.enableZoom === false && scope.enablePan === false) return;\n\n handleTouchMoveDollyPan(event);\n\n scope.update();\n\n break;\n\n case STATE.TOUCH_DOLLY_ROTATE:\n if (scope.enableZoom === false && scope.enableRotate === false) return;\n\n handleTouchMoveDollyRotate(event);\n\n scope.update();\n\n break;\n\n default:\n scope.state = STATE.NONE;\n }\n }\n\n function onContextMenu(event) {\n if (scope.enabled === false) return;\n\n event.preventDefault();\n }\n\n function addPointer(event) {\n scope.pointers.push(event);\n }\n\n function removePointer(event) {\n delete scope.pointerPositions[event.pointerId];\n\n for (let i = 0; i < scope.pointers.length; i++) {\n if (scope.pointers[i].pointerId == event.pointerId) {\n scope.pointers.splice(i, 1);\n return;\n }\n }\n }\n\n function trackPointer(event) {\n let position = scope.pointerPositions[event.pointerId];\n\n if (position === undefined) {\n position = new Vector2();\n scope.pointerPositions[event.pointerId] = position;\n }\n\n position.set(event.pageX, event.pageY);\n }\n\n function getSecondPointerPosition(event) {\n const pointer = event.pointerId === scope.pointers[0].pointerId ? scope.pointers[1] : scope.pointers[0];\n\n return scope.pointerPositions[pointer.pointerId];\n }\n\n //\n\n scope.domElement.addEventListener(\"contextmenu\", onContextMenu);\n\n scope.domElement.addEventListener(\"pointerdown\", onPointerDown);\n scope.domElement.addEventListener(\"pointercancel\", onPointerUp);\n scope.domElement.addEventListener(\"wheel\", onMouseWheel, { passive: false });\n\n // force an update at start\n\n this.update();\n }\n}\n\nexport { OrbitControls, STATE };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n BufferGeometry,\n DoubleSide,\n Float32BufferAttribute,\n Line,\n LineBasicMaterial,\n Mesh,\n MeshBasicMaterial,\n Object3D,\n Plane,\n} from \"three\";\n\nexport class PlaneHelper2 extends Object3D {\n public plane: Plane;\n public size: number;\n public outline: Line;\n public mesh: Mesh;\n\n constructor(size = 1, color = 0xf0f0f0, opacity = 0.15) {\n super();\n\n (this as any).type = \"PlaneHelper2\";\n this.size = size;\n\n const positions = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0];\n const geometry = new BufferGeometry();\n geometry.setAttribute(\"position\", new Float32BufferAttribute(positions, 3));\n geometry.computeBoundingSphere();\n\n this.outline = new Line(geometry, new LineBasicMaterial({ color, toneMapped: false }));\n\n const positions2 = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0];\n const geometry2 = new BufferGeometry();\n geometry2.setAttribute(\"position\", new Float32BufferAttribute(positions2, 3));\n geometry2.computeBoundingSphere();\n\n this.mesh = new Mesh(\n geometry2,\n new MeshBasicMaterial({\n color,\n opacity,\n transparent: true,\n depthWrite: false,\n toneMapped: false,\n side: DoubleSide,\n })\n );\n\n this.add(this.outline);\n this.add(this.mesh);\n }\n\n dispose() {\n this.outline.geometry.dispose();\n (this.outline.material as LineBasicMaterial).dispose();\n this.mesh.geometry.dispose();\n (this.mesh.material as MeshBasicMaterial).dispose();\n }\n\n override updateMatrixWorld(force: boolean) {\n this.scale.set(0.5 * this.size, 0.5 * this.size, 1);\n super.updateMatrixWorld(force);\n }\n\n getLineMaterial(): LineBasicMaterial {\n return this.outline.material as LineBasicMaterial;\n }\n\n getMeshMaterial(): MeshBasicMaterial {\n return this.mesh.material as MeshBasicMaterial;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n Camera,\n EdgesGeometry,\n Intersection,\n Line3,\n MathUtils,\n Object3D,\n Plane,\n Raycaster,\n Vector2,\n Vector3,\n} from \"three\";\n\nconst DESKTOP_SNAP_DISTANCE = 10;\nconst MOBILE_SNAP_DISTANCE = 50;\n\nconst _vertex = new Vector3();\nconst _start = new Vector3();\nconst _end = new Vector3();\nconst _line = new Line3();\nconst _center = new Vector3();\nconst _projection = new Vector3();\n\nexport class Snapper {\n public camera: Camera;\n public clippingPlanes: Plane[];\n public canvas: HTMLCanvasElement;\n public threshold: number;\n private raycaster: Raycaster;\n private detectRadiusInPixels: number;\n private edgesCache: WeakMap<any, EdgesGeometry>;\n\n constructor(camera: Camera, clippingPlanes: Plane[], canvas: HTMLCanvasElement) {\n this.camera = camera;\n this.clippingPlanes = clippingPlanes;\n this.canvas = canvas;\n\n this.threshold = 0.0001;\n\n this.raycaster = new Raycaster();\n this.detectRadiusInPixels = this.isMobile() ? MOBILE_SNAP_DISTANCE : DESKTOP_SNAP_DISTANCE;\n this.edgesCache = new WeakMap();\n }\n\n isMobile(): boolean {\n if (typeof navigator === \"undefined\") return false;\n\n // ===================== AI-CODE-START ======================\n // Source: Claude Sonnet 4\n // Date: 2025-09-09\n // Reviewer: roman.mochalov@opendesign.com\n // Issue: CLOUD-5799\n\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);\n\n // ===================== AI-CODE-END ======================\n }\n\n getMousePosition(event: MouseEvent, target: Vector2): Vector2 {\n return target.set(event.clientX, event.clientY);\n }\n\n getPointerIntersects(\n mouse: Vector2,\n objects: Object3D[],\n recursive = false,\n clip = true\n ): Array<Intersection<Object3D>> {\n const rect = this.canvas.getBoundingClientRect();\n const x = ((mouse.x - rect.left) / rect.width) * 2 - 1;\n const y = (-(mouse.y - rect.top) / rect.height) * 2 + 1;\n\n const coords = new Vector2(x, y);\n this.raycaster.setFromCamera(coords, this.camera);\n\n this.raycaster.params = {\n Mesh: {},\n Line: { threshold: this.threshold },\n Line2: { threshold: this.threshold },\n LOD: {},\n Points: { threshold: this.threshold },\n Sprite: {},\n };\n\n let intersects = this.raycaster.intersectObjects(objects, recursive);\n\n if (clip) {\n const clippingPlanes = this.clippingPlanes;\n clippingPlanes.forEach((plane: Plane) => {\n intersects = intersects.filter((intersect) => plane.distanceToPoint(intersect.point) >= 0);\n });\n }\n\n return intersects;\n }\n\n getDetectRadius(point: Vector3): number {\n const camera: any = this.camera;\n\n // ===================== AI-CODE-START ======================\n // Source: Gemini 2.5 Pro\n // Date: 2025-08-27\n // Reviewer: roman.mochalov@opendesign.com\n // Issue: CLOUD-5799\n // Notes: Originally AI-generated, modified manually\n\n if (camera.isOrthographicCamera) {\n const fieldHeight = (camera.top - camera.bottom) / camera.zoom;\n\n const canvasHeight = this.canvas.height;\n const worldUnitsPerPixel = fieldHeight / canvasHeight;\n\n return this.detectRadiusInPixels * worldUnitsPerPixel;\n }\n\n if (camera.isPerspectiveCamera) {\n const distance = camera.position.distanceTo(point);\n const fieldHeight = 2 * Math.tan(MathUtils.degToRad(camera.fov * 0.5)) * distance;\n\n const canvasHeight = this.canvas.height;\n const worldUnitsPerPixel = fieldHeight / canvasHeight;\n\n return this.detectRadiusInPixels * worldUnitsPerPixel;\n }\n\n // ===================== AI-CODE-END ======================\n\n return 0.1;\n }\n\n getSnapPoint(mouse: Vector2, objects: Object3D[]): Vector3 {\n const intersections = this.getPointerIntersects(mouse, objects);\n if (intersections.length === 0) return undefined;\n\n // ===================== AI-CODE-START ======================\n // Source: Gemini 2.5 Pro\n // Date: 2025-08-20\n // Reviewer: roman.mochalov@opendesign.com\n // Issue: CLOUD-5799\n // Notes: Originally AI-generated, modified manually\n\n const object: any = intersections[0].object;\n const intersectionPoint = intersections[0].point;\n const localPoint = object.worldToLocal(intersectionPoint.clone());\n\n let snapPoint: Vector3;\n let snapDistance = this.getDetectRadius(intersectionPoint);\n\n const geometry = object.geometry;\n\n const positions = geometry.attributes.position.array;\n for (let i = 0; i < positions.length; i += 3) {\n _vertex.set(positions[i], positions[i + 1], positions[i + 2]);\n const distance = _vertex.distanceTo(localPoint);\n if (distance < snapDistance) {\n snapDistance = distance;\n snapPoint = _vertex.clone();\n }\n }\n if (snapPoint) return object.localToWorld(snapPoint);\n\n let edges = this.edgesCache.get(geometry);\n if (!edges) {\n edges = new EdgesGeometry(geometry);\n this.edgesCache.set(geometry, edges);\n }\n\n const edgePositions = edges.attributes.position.array;\n for (let i = 0; i < edgePositions.length; i += 6) {\n _start.set(edgePositions[i], edgePositions[i + 1], edgePositions[i + 2]);\n _end.set(edgePositions[i + 3], edgePositions[i + 4], edgePositions[i + 5]);\n _line.set(_start, _end);\n\n _line.getCenter(_center);\n const centerDistance = _center.distanceTo(localPoint);\n if (centerDistance < snapDistance) {\n snapDistance = centerDistance;\n snapPoint = _center.clone();\n continue;\n }\n\n _line.closestPointToPoint(localPoint, true, _projection);\n const lineDistance = _projection.distanceTo(localPoint);\n if (lineDistance < snapDistance) {\n snapDistance = lineDistance;\n snapPoint = _projection.clone();\n }\n }\n if (snapPoint) return object.localToWorld(snapPoint);\n\n // ===================== AI-CODE-END ======================\n\n return intersectionPoint.clone();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { MOUSE, TOUCH } from \"three\";\nimport { type IDragger } from \"@inweb/viewer-core\";\n\nimport type { Viewer } from \"../Viewer\";\nimport { OrbitControls, STATE } from \"../controls/OrbitControls.js\";\n\nexport class OrbitDragger implements IDragger {\n protected viewer: Viewer;\n protected orbit: OrbitControls;\n protected changed: boolean;\n\n constructor(viewer: Viewer) {\n this.orbit = new OrbitControls(viewer.camera, viewer.canvas);\n this.orbit.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.PAN, RIGHT: MOUSE.PAN };\n this.orbit.touches = { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN };\n this.orbit.screenSpacePanning = true;\n this.orbit.rotateSpeed = 0.33;\n this.orbit.addEventListener(\"start\", this.controlsStart);\n this.orbit.addEventListener(\"change\", this.controlsChange);\n this.changed = false;\n this.viewer = viewer;\n this.viewer.addEventListener(\"databasechunk\", this.updateControls);\n this.viewer.addEventListener(\"clear\", this.updateControls);\n this.viewer.on(\"viewposition\", this.updateControls);\n this.viewer.addEventListener(\"zoom\", this.updateControls);\n this.viewer.addEventListener(\"drawviewpoint\", this.updateControls);\n this.viewer.addEventListener(\"changecameramode\", this.updateControlsCamera);\n this.viewer.addEventListener(\"optionschange\", this.updateZoomSpeed);\n this.viewer.addEventListener(\"contextmenu\", this.stopContextMenu);\n this.updateControls();\n this.updateControlsCamera();\n }\n\n dispose(): void {\n this.viewer.removeEventListener(\"databasechunk\", this.updateControls);\n this.viewer.removeEventListener(\"clear\", this.updateControls);\n this.viewer.off(\"viewposition\", this.updateControls);\n this.viewer.removeEventListener(\"zoom\", this.updateControls);\n this.viewer.removeEventListener(\"drawviewpoint\", this.updateControls);\n this.viewer.removeEventListener(\"changecameramode\", this.updateControlsCamera);\n this.viewer.removeEventListener(\"optionschange\", this.updateZoomSpeed);\n this.viewer.removeEventListener(\"contextmenu\", this.stopContextMenu);\n\n this.orbit.removeEventListener(\"start\", this.controlsStart);\n this.orbit.removeEventListener(\"change\", this.controlsChange);\n this.orbit.dispose();\n }\n\n updateControls = () => {\n this.orbit.target.copy(this.viewer.target);\n this.orbit.update();\n };\n\n updateControlsCamera = () => {\n this.orbit.maxDistance = this.viewer.camera.far;\n this.orbit.minDistance = this.viewer.camera.near;\n this.orbit.object = this.viewer.camera;\n this.orbit.update();\n };\n\n updateZoomSpeed = ({ data: options }) => {\n this.orbit.zoomSpeed = Math.abs(this.orbit.zoomSpeed) * (options.reverseZoomWheel ? -1 : 1);\n };\n\n controlsStart = () => {\n this.changed = false;\n };\n\n controlsChange = () => {\n this.viewer.target.copy(this.orbit.target);\n this.viewer.update();\n\n switch (this.orbit.state) {\n case STATE.ROTATE:\n case STATE.TOUCH_ROTATE:\n this.viewer.emitEvent({\n type: \"orbit\",\n });\n break;\n\n case STATE.PAN:\n case STATE.TOUCH_PAN:\n this.viewer.emitEvent({\n type: \"pan\",\n x: this.orbit.panEnd.x,\n y: this.orbit.panEnd.y,\n dX: this.orbit.panDelta.x,\n dY: this.orbit.panDelta.y,\n });\n break;\n\n case STATE.DOLLY:\n this.viewer.emitEvent({\n type: \"zoomat\",\n data: this.orbit.dollyScale,\n x: this.orbit.dollyEnd.x,\n y: this.orbit.dollyEnd.y,\n });\n break;\n }\n\n this.viewer.emitEvent({ type: \"changecamera\" });\n\n this.changed = true;\n };\n\n stopContextMenu = (event: PointerEvent) => {\n if (this.changed) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Plane, Quaternion, Vector2, Vector3 } from \"three\";\nimport { TransformControls } from \"three/examples/jsm/controls/TransformControls.js\";\n\nimport type { Viewer } from \"../Viewer\";\nimport { STATE } from \"../controls/OrbitControls.js\";\nimport { PlaneHelper2 } from \"../helpers/PlaneHelper2\";\nimport { Snapper } from \"../measurement/Snapper\";\nimport { OrbitDragger } from \"./OrbitDragger\";\n\nexport class CuttingPlaneDragger extends OrbitDragger {\n protected helpers: PlaneHelper2[] = [];\n protected activeHelper: PlaneHelper2 | undefined = undefined;\n protected snapper: Snapper;\n protected downPosition: Vector2;\n protected position0: Vector3;\n protected quaternion0: Quaternion;\n protected translate: TransformControls;\n protected rotate: TransformControls;\n\n constructor(viewer: Viewer) {\n super(viewer);\n\n viewer.clippingPlanes.forEach((plane) => this.addHelper(plane));\n\n const extentsSize = viewer.extents.getSize(new Vector3()).length() || 1;\n\n this.snapper = new Snapper(viewer.camera, viewer.clippingPlanes, viewer.canvas);\n this.snapper.threshold = extentsSize / 10000;\n\n this.downPosition = new Vector2();\n this.position0 = new Vector3();\n this.quaternion0 = new Quaternion();\n\n this.translate = new TransformControls(viewer.camera, viewer.canvas);\n this.translate.setMode(\"translate\");\n this.translate.setSpace(\"local\");\n this.translate.showX = false;\n this.translate.showY = false;\n this.translate.showZ = true;\n this.translate.addEventListener(\"change\", this.transformUpdate);\n this.translate.addEventListener(\"objectChange\", this.transformChange);\n this.translate.addEventListener(\"dragging-changed\", this.translateDrag);\n this.viewer.helpers.add(this.translate.getHelper());\n\n this.rotate = new TransformControls(viewer.camera, viewer.canvas);\n this.rotate.setMode(\"rotate\");\n this.rotate.setSpace(\"local\");\n this.rotate.showX = true;\n this.rotate.showY = true;\n this.rotate.showZ = false;\n this.rotate.addEventListener(\"change\", this.transformUpdate);\n this.rotate.addEventListener(\"objectChange\", this.transformChange);\n this.rotate.addEventListener(\"dragging-changed\", this.rotateDrag);\n this.viewer.helpers.add(this.rotate.getHelper());\n\n this.setActiveHelper(this.helpers[this.helpers.length - 1]);\n\n this.viewer.addEventListener(\"explode\", this.syncHelpers);\n this.viewer.addEventListener(\"hide\", this.syncHelpers);\n this.viewer.addEventListener(\"isolate\", this.syncHelpers);\n this.viewer.addEventListener(\"show\", this.syncHelpers);\n this.viewer.addEventListener(\"showall\", this.syncHelpers);\n this.viewer.addEventListener(\"clearslices\", this.clearHelpers);\n this.viewer.addEventListener(\"changecameramode\", this.updateTransformCamera);\n\n this.viewer.canvas.addEventListener(\"pointerdown\", this.onPointerDown, true);\n this.viewer.canvas.addEventListener(\"pointerup\", this.onPointerUp, true);\n this.viewer.canvas.addEventListener(\"pointercancel\", this.onPointerCancel, true);\n this.viewer.canvas.addEventListener(\"dblclick\", this.onDoubleClick, true);\n\n window.addEventListener(\"keydown\", this.onKeyDown);\n window.addEventListener(\"keyup\", this.onKeyUp);\n\n this.viewer.update();\n }\n\n override dispose() {\n this.viewer.removeEventListener(\"explode\", this.syncHelpers);\n this.viewer.removeEventListener(\"hide\", this.syncHelpers);\n this.viewer.removeEventListener(\"isolate\", this.syncHelpers);\n this.viewer.removeEventListener(\"show\", this.syncHelpers);\n this.viewer.removeEventListener(\"showall\", this.syncHelpers);\n this.viewer.removeEventListener(\"clearslices\", this.clearHelpers);\n this.viewer.removeEventListener(\"changecameramode\", this.updateTransformCamera);\n\n this.viewer.canvas.removeEventListener(\"pointerdown\", this.onPointerDown, true);\n this.viewer.canvas.removeEventListener(\"pointerup\", this.onPointerUp, true);\n this.viewer.canvas.removeEventListener(\"pointercancel\", this.onPointerCancel, true);\n this.viewer.canvas.removeEventListener(\"dblclick\", this.onDoubleClick, true);\n\n window.removeEventListener(\"keydown\", this.onKeyDown);\n window.removeEventListener(\"keyup\", this.onKeyUp);\n\n this.translate.removeEventListener(\"change\", this.transformUpdate);\n this.translate.removeEventListener(\"objectChange\", this.transformChange);\n this.translate.removeEventListener(\"dragging-changed\", this.translateDrag);\n this.translate.getHelper().removeFromParent();\n this.translate.detach();\n this.translate.dispose();\n\n this.rotate.removeEventListener(\"change\", this.transformUpdate);\n this.rotate.removeEventListener(\"objectChange\", this.transformChange);\n this.rotate.removeEventListener(\"dragging-changed\", this.rotateDrag);\n this.rotate.getHelper().removeFromParent();\n this.rotate.detach();\n this.rotate.dispose();\n\n this.helpers.forEach((helper) => {\n helper.removeFromParent();\n helper.dispose();\n });\n this.helpers.length = 0;\n this.activeHelper = undefined;\n\n super.dispose();\n }\n\n transformUpdate = () => {\n this.viewer.update();\n };\n\n transformChange = () => {\n if (!this.activeHelper) return;\n\n const plane = this.activeHelper.plane;\n plane.normal.copy(new Vector3(0, 0, -1)).applyQuaternion(this.activeHelper.quaternion);\n plane.constant = -this.activeHelper.position.dot(plane.normal);\n\n this.viewer.emitEvent({ type: \"changecuttingplanes\" });\n this.viewer.update();\n\n this.changed = true; // <- cancel context menu\n };\n\n translateDrag = (event) => {\n this.orbit.enabled = !event.value;\n this.rotate.enabled = !event.value;\n };\n\n rotateDrag = (event) => {\n this.orbit.enabled = !event.value;\n this.translate.enabled = !event.value;\n };\n\n syncHelpers = () => {\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n const extentsCenter = this.viewer.extents.getCenter(new Vector3());\n\n this.helpers.forEach((planeHelper) => {\n planeHelper.size = extentsSize;\n planeHelper.position.copy(planeHelper.plane.projectPoint(extentsCenter, new Vector3()));\n });\n\n this.viewer.update();\n };\n\n clearHelpers = () => {\n this.setActiveHelper();\n\n this.helpers.forEach((helper) => {\n helper.removeFromParent();\n helper.dispose();\n });\n this.helpers.length = 0;\n\n this.viewer.update();\n };\n\n updateTransformCamera = () => {\n this.translate.camera = this.viewer.camera;\n this.rotate.camera = this.viewer.camera;\n this.snapper.camera = this.viewer.camera;\n };\n\n onKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Shift\") this.rotate.setRotationSnap(Math.PI / 4);\n if (event.key === \"Delete\" || event.key === \"Backspace\") this.deleteActivePlane();\n if (event.key === \"Escape\" && (this.translate.dragging || this.rotate.dragging)) this.reset();\n };\n\n onKeyUp = (event: KeyboardEvent) => {\n if (event.key === \"Shift\") this.rotate.setRotationSnap(null);\n };\n\n onPointerDown = (event: PointerEvent) => {\n if (event.button !== 0 || !event.isPrimary) return;\n\n this.snapper.getMousePosition(event, this.downPosition);\n this.saveState();\n };\n\n onPointerUp = (event: PointerEvent) => {\n if (event.button !== 0) return;\n\n const upPosition = this.snapper.getMousePosition(event, new Vector2());\n if (upPosition.distanceTo(this.downPosition) !== 0) return;\n\n const intersects = this.snapper.getPointerIntersects(upPosition, this.helpers, true, false);\n if (intersects.length === 0) return;\n\n this.setActiveHelper(intersects[0].object.parent as PlaneHelper2);\n };\n\n onPointerCancel = (event: PointerEvent) => {\n this.viewer.canvas.dispatchEvent(new PointerEvent(\"pointerup\", event));\n };\n\n onDoubleClick = (event: MouseEvent) => {\n if (!this.activeHelper) return;\n\n const mousePosition = this.snapper.getMousePosition(event, new Vector2());\n\n const intersects = this.snapper.getPointerIntersects(mousePosition, [this.activeHelper], true, false);\n if (intersects.length === 0) return;\n\n this.activeHelper.rotateOnAxis(new Vector3(0, 1, 0), Math.PI);\n this.transformChange();\n\n event.stopPropagation();\n };\n\n private addHelper(plane: Plane): PlaneHelper2 {\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n const extentsCenter = this.viewer.extents.getCenter(new Vector3());\n\n const helper = new PlaneHelper2(extentsSize);\n helper.plane = plane;\n helper.position.copy(plane.projectPoint(extentsCenter, new Vector3()));\n helper.quaternion.setFromUnitVectors(new Vector3(0, 0, -1), plane.normal);\n\n this.helpers.push(helper);\n this.viewer.helpers.add(helper);\n\n return helper;\n }\n\n private setActiveHelper(helper?: PlaneHelper2) {\n if (helper === this.activeHelper) return;\n\n if (this.activeHelper) {\n this.activeHelper.getLineMaterial().color.setHex(0xf0f0f0);\n this.activeHelper.getMeshMaterial().opacity = 0.15;\n\n this.translate.detach();\n this.rotate.detach();\n }\n\n this.activeHelper = helper;\n\n if (this.activeHelper) {\n this.activeHelper.getLineMaterial().color.setHex(0xd0d0d0);\n this.activeHelper.getMeshMaterial().opacity = 0.3;\n\n this.translate.attach(this.activeHelper);\n this.rotate.attach(this.activeHelper);\n }\n\n this.viewer.update();\n }\n\n private saveState() {\n if (!this.activeHelper) return;\n\n this.position0.copy(this.activeHelper.position);\n this.quaternion0.copy(this.activeHelper.quaternion);\n }\n\n private reset() {\n if (!this.activeHelper) return;\n\n this.translate.dragging = false;\n this.rotate.dragging = false;\n this.orbit.state = STATE.NONE;\n\n this.activeHelper.position.copy(this.position0);\n this.activeHelper.quaternion.copy(this.quaternion0);\n\n this.transformChange();\n }\n\n addPlane(normal: Vector3) {\n const extentsCenter = this.viewer.extents.getCenter(new Vector3());\n const constant = -extentsCenter.dot(normal);\n\n const plane = new Plane(normal, constant);\n this.viewer.clippingPlanes.push(plane);\n\n const helper = this.addHelper(plane);\n this.setActiveHelper(helper);\n\n this.viewer.emitEvent({ type: \"changecuttingplanes\" });\n }\n\n addPlaneX() {\n this.addPlane(new Vector3(-1, 0, 0));\n }\n\n addPlaneY() {\n this.addPlane(new Vector3(0, -1, 0));\n }\n\n addPlaneZ() {\n this.addPlane(new Vector3(0, 0, -1));\n }\n\n deleteActivePlane() {\n if (!this.activeHelper) return;\n\n const helper = this.activeHelper;\n\n const index = this.viewer.clippingPlanes.indexOf(helper.plane);\n if (index !== -1) this.viewer.clippingPlanes.splice(index, 1);\n\n this.helpers = this.helpers.filter((x) => x !== helper);\n helper.removeFromParent();\n helper.dispose();\n\n this.setActiveHelper(this.helpers[this.helpers.length - 1]);\n\n this.viewer.emitEvent({ type: \"changecuttingplanes\" });\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport { CuttingPlaneDragger } from \"./CuttingPlaneDragger\";\n\nexport class CuttingPlaneXAxisDragger extends CuttingPlaneDragger {\n constructor(viewer: Viewer) {\n super(viewer);\n this.addPlaneX();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport { CuttingPlaneDragger } from \"./CuttingPlaneDragger\";\n\nexport class CuttingPlaneYAxisDragger extends CuttingPlaneDragger {\n constructor(viewer: Viewer) {\n super(viewer);\n this.addPlaneY();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport { CuttingPlaneDragger } from \"./CuttingPlaneDragger\";\n\nexport class CuttingPlaneZAxisDragger extends CuttingPlaneDragger {\n constructor(viewer: Viewer) {\n super(viewer);\n this.addPlaneZ();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\n// Model units for the user to choose from.\n\nexport const DisplayUnits = {\n Meters: { name: \"Meters\", symbol: \"m\", scale: 1.0 },\n Centimeters: { name: \"Centimeters\", symbol: \"cm\", scale: 0.01 },\n Millimeters: { name: \"Millimeters\", symbol: \"mm\", scale: 0.001 },\n Feet: { name: \"Feet\", symbol: \"ft\", scale: 0.3048 },\n Inches: { name: \"Inches\", symbol: \"in\", scale: 0.0254 },\n Yards: { name: \"Yards\", symbol: \"yd\", scale: 0.9144 },\n Kilometers: { name: \"Kilometers\", symbol: \"km\", scale: 1000.0 },\n Miles: { name: \"Miles\", symbol: \"mi\", scale: 1609.344 },\n Micrometers: { name: \"Micrometers\", symbol: \"µm\", scale: 0.000001 },\n Mils: { name: \"Mils\", symbol: \"mil\", scale: 0.0000254 },\n MicroInches: { name: \"Micro-inches\", symbol: \"µin\", scale: 0.0000000254 },\n Default: { name: \"File units\", symbol: \"\", scale: 1.0 },\n};\n\nexport const ModelUnits = {\n Default: { name: \"\", symbol: \"\", scale: 1.0 },\n};\n\nObject.keys(DisplayUnits).forEach((key) => (ModelUnits[key] = DisplayUnits[key]));\nObject.keys(DisplayUnits).forEach((key) => (ModelUnits[DisplayUnits[key].symbol] = DisplayUnits[key]));\n\n// Convert distance from unit to unit.\n\nexport function convertUnits(fromUnits: string, toUnits: string, distance: number) {\n const fromFactor = 1 / (ModelUnits[fromUnits] || ModelUnits.Default).scale;\n const toFactor = (ModelUnits[toUnits] || ModelUnits.Default).scale || 1;\n return distance * fromFactor * toFactor;\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { ModelUnits } from \"./UnitConverter\";\n\n// Returns a standard string representation of the display unit.\n\nexport function getDisplayUnit(units: string) {\n return (ModelUnits[units] || ModelUnits.Default).symbol;\n}\n\n// ===================== AI-CODE-START ======================\n// Source: Claude Sonnet 4.5\n// Date: 2025-10-08\n// Reviewer: roman.mochalov@opendesign.com\n// Issue: CLOUD-5963\n\n// Calculates recommended precision for small values (|value| < 1) to avoid showing \"0.00\".\n\nexport function calculatePrecision(value: number) {\n const distance = Math.abs(value);\n\n if (distance >= 1000) return 0;\n if (distance >= 10) return 1;\n if (distance >= 0.1) return 2;\n if (distance >= 0.001) return 3;\n\n return distance > 0 ? Math.floor(-Math.log10(distance)) + 1 : 2;\n}\n\n// Calculates the minimal distance for the sepecified precision.\n\nexport function calculateDistance(precision: any): number {\n let digits: number;\n\n if (precision === \"Auto\") digits = 2;\n else if (Number.isFinite(precision)) digits = precision;\n else digits = parseFloat(precision);\n\n if (!Number.isFinite(digits) || digits < 0) digits = 2;\n else if (digits > 10) digits = 10;\n\n return Math.pow(10, -digits);\n}\n\n// ===================== AI-CODE-END ======================\n\n// Formats a distance with units.\n\nfunction formatNumber(distance: number, digits: number, precision: any) {\n let result = distance.toFixed(digits);\n if (precision === \"Auto\") result = result.replace(/\\.0+$/, \"\").replace(/\\.$/, \"\");\n if (+result !== distance) result = \"~ \" + result;\n return result;\n}\n\nexport function formatDistance(distance: number, units: string, precision: any = 2) {\n let digits: number;\n\n if (precision === \"Auto\") digits = calculatePrecision(distance);\n else if (Number.isFinite(precision)) digits = precision;\n else digits = parseFloat(precision);\n\n if (!Number.isFinite(digits)) digits = 2;\n else if (digits < 0) digits = 0;\n else if (digits > 10) digits = 10;\n\n if (ModelUnits[units]) {\n return formatNumber(distance, digits, precision) + \" \" + ModelUnits[units].symbol;\n } else if (units) {\n return formatNumber(distance, digits, precision) + \" \" + units;\n } else {\n return formatNumber(distance, digits, precision);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Camera, MathUtils, Matrix4, Object3D, Vector2, Vector3, Vector4 } from \"three\";\n\nimport type { Viewer } from \"../Viewer\";\nimport { OrbitDragger } from \"./OrbitDragger\";\nimport { convertUnits } from \"../measurement/UnitConverter\";\nimport { formatDistance } from \"../measurement/UnitFormatter\";\nimport { Snapper } from \"../measurement/Snapper\";\n\nconst _downPoint = new Vector2();\n\nexport class MeasureLineDragger extends OrbitDragger {\n private overlay: MeasureOverlay;\n private line: MeasureLine;\n private snapper: Snapper;\n private objects: Object3D[];\n private scale = 1.0;\n private units = \"\";\n private precision: any = 2;\n\n constructor(viewer: Viewer) {\n super(viewer);\n\n this.overlay = new MeasureOverlay(viewer.camera, viewer.canvas);\n this.overlay.attach();\n\n this.line = new MeasureLine(this.overlay, this.scale, this.units, this.precision);\n this.overlay.addLine(this.line);\n\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n\n this.snapper = new Snapper(viewer.camera, viewer.clippingPlanes, viewer.canvas);\n this.snapper.threshold = extentsSize / 10000;\n\n this.objects = [];\n this.updateObjects();\n\n this.updateUnits();\n\n this.viewer.canvas.addEventListener(\"pointerdown\", this.onPointerDown);\n this.viewer.canvas.addEventListener(\"pointermove\", this.onPointerMove);\n this.viewer.canvas.addEventListener(\"pointerup\", this.onPointerUp);\n this.viewer.canvas.addEventListener(\"pointercancel\", this.onPointerCancel);\n this.viewer.canvas.addEventListener(\"pointerleave\", this.onPointerLeave);\n\n this.viewer.addEventListener(\"render\", this.renderOverlay);\n this.viewer.addEventListener(\"hide\", this.updateObjects);\n this.viewer.addEventListener(\"isolate\", this.updateObjects);\n this.viewer.addEventListener(\"show\", this.updateObjects);\n this.viewer.addEventListener(\"showall\", this.updateObjects);\n this.viewer.addEventListener(\"changecameramode\", this.updateSnapperCamera);\n this.viewer.addEventListener(\"optionschange\", this.updateUnits);\n }\n\n override dispose() {\n this.viewer.canvas.removeEventListener(\"pointerdown\", this.onPointerDown);\n this.viewer.canvas.removeEventListener(\"pointermove\", this.onPointerMove);\n this.viewer.canvas.removeEventListener(\"pointerup\", this.onPointerUp);\n this.viewer.canvas.removeEventListener(\"pointercancel\", this.onPointerCancel);\n this.viewer.canvas.removeEventListener(\"pointerleave\", this.onPointerLeave);\n\n this.viewer.removeEventListener(\"render\", this.renderOverlay);\n this.viewer.removeEventListener(\"hide\", this.updateObjects);\n this.viewer.removeEventListener(\"isolate\", this.updateObjects);\n this.viewer.removeEventListener(\"show\", this.updateObjects);\n this.viewer.removeEventListener(\"showall\", this.updateObjects);\n this.viewer.removeEventListener(\"changecameramode\", this.updateSnapperCamera);\n this.viewer.removeEventListener(\"optionschange\", this.updateUnits);\n\n this.objects.length = 0;\n\n this.overlay.detach();\n this.overlay.dispose();\n\n super.dispose();\n }\n\n onPointerDown = (event: PointerEvent) => {\n if (event.button !== 0) return;\n\n const mouse = this.snapper.getMousePosition(event, _downPoint);\n this.line.startPoint = this.snapper.getSnapPoint(mouse, this.objects);\n this.line.render();\n\n this.viewer.canvas.setPointerCapture(event.pointerId);\n this.orbit.enabled = !this.line.startPoint;\n };\n\n onPointerMove = (event: PointerEvent) => {\n if (this.orbit.enabled && this.orbit.state !== -1) return;\n\n const mouse = this.snapper.getMousePosition(event, _downPoint);\n const snapPoint = this.snapper.getSnapPoint(mouse, this.objects);\n if (snapPoint && this.line.endPoint && snapPoint.equals(this.line.endPoint)) return;\n\n this.line.endPoint = snapPoint;\n this.line.render();\n\n if (this.line.startPoint) this.changed = true; // <- to prevent context menu\n };\n\n onPointerUp = (event: PointerEvent) => {\n if (this.line.startPoint && this.line.endPoint && this.line.getDistance() > 0) {\n this.line = new MeasureLine(this.overlay, this.scale, this.units, this.precision);\n this.overlay.addLine(this.line);\n } else {\n this.line.startPoint = undefined;\n this.line.endPoint = undefined;\n this.line.render();\n }\n\n this.viewer.canvas.releasePointerCapture(event.pointerId);\n this.orbit.enabled = true;\n };\n\n onPointerCancel = (event: PointerEvent) => {\n this.viewer.canvas.dispatchEvent(new PointerEvent(\"pointerup\", event));\n };\n\n onPointerLeave = () => {\n this.line.endPoint = undefined;\n this.line.render();\n };\n\n clearOverlay = () => {\n this.overlay.clear();\n\n this.line = new MeasureLine(this.overlay, this.scale, this.units, this.precision);\n this.overlay.addLine(this.line);\n };\n\n renderOverlay = () => {\n this.overlay.render();\n };\n\n updateObjects = () => {\n this.objects.length = 0;\n this.viewer.models.forEach((model) => {\n model.getVisibleObjects().forEach((object) => this.objects.push(object));\n });\n };\n\n updateSnapperCamera = () => {\n this.snapper.camera = this.viewer.camera;\n this.overlay.camera = this.viewer.camera;\n };\n\n updateUnits = () => {\n const model = this.viewer.models[0];\n const units = this.viewer.options.rulerUnit ?? \"Default\";\n const precision = this.viewer.options.rulerPrecision ?? \"Default\";\n\n if (!model) {\n this.scale = 1;\n this.units = \"\";\n } else if (units === \"Default\") {\n this.scale = model.getUnitScale();\n this.units = model.getUnitString();\n } else {\n this.scale = convertUnits(model.getUnits(), units, 1);\n this.units = units;\n }\n\n if (!model) this.precision = 2;\n else if (precision === \"Default\") this.precision = model.getPrecision();\n else this.precision = precision;\n\n this.overlay.updateLineUnits(this.scale, this.units, this.precision);\n };\n}\n\nclass MeasureOverlay {\n public camera: Camera;\n public canvas: HTMLCanvasElement;\n public container: HTMLElement;\n public lines: MeasureLine[] = [];\n public projector: MeasureProjector;\n private resizeObserver: ResizeObserver;\n\n constructor(camera: Camera, canvas: HTMLCanvasElement) {\n this.camera = camera;\n this.canvas = canvas;\n this.projector = new MeasureProjector(camera, canvas);\n this.resizeObserver = new ResizeObserver(this.resizeContainer);\n }\n\n dispose() {\n this.clear();\n }\n\n attach() {\n this.container = document.createElement(\"div\");\n this.container.id = \"measure-container\";\n this.container.style.position = \"absolute\";\n this.container.style.outline = \"none\";\n this.container.style.pointerEvents = \"none\";\n this.container.style.overflow = \"hidden\";\n\n if (!this.canvas.parentElement) return;\n\n this.canvas.parentElement.appendChild(this.container);\n this.resizeObserver.observe(this.canvas);\n }\n\n detach() {\n this.resizeObserver.disconnect();\n\n this.container.remove();\n this.container = undefined;\n }\n\n clear() {\n this.lines.forEach((line) => line.dispose());\n this.lines.length = 0;\n }\n\n render() {\n this.projector.setFromCamera(this.camera);\n this.lines.forEach((line) => line.render());\n }\n\n update() {\n this.lines.forEach((line) => line.update());\n }\n\n addLine(line: MeasureLine) {\n this.lines.push(line);\n }\n\n removeLine(line: MeasureLine) {\n this.lines = this.lines.filter((x) => x !== line);\n }\n\n updateLineUnits(scale: number, units: string, precision: any) {\n this.lines.forEach((line) => {\n line.scale = scale;\n line.units = units;\n line.precision = precision;\n });\n }\n\n resizeContainer = () => {\n const { offsetLeft, offsetTop, offsetWidth, offsetHeight } = this.canvas;\n\n if (!offsetWidth || !offsetHeight) return; // <- invisible canvas, or canvas with parent removed\n\n this.container.style.left = `${offsetLeft}px`;\n this.container.style.top = `${offsetTop}px`;\n\n this.container.style.width = `${offsetWidth}px`;\n this.container.style.height = `${offsetHeight}px`;\n };\n}\n\nconst _middlePoint = new Vector3();\n\nclass MeasureLine {\n private overlay: MeasureOverlay;\n\n private elementStartPoint: HTMLElement;\n private elementEndPoint: HTMLElement;\n private elementLine: HTMLElement;\n private elementLabel: HTMLElement;\n\n public startPoint: Vector3;\n public endPoint: Vector3;\n\n public id = MathUtils.generateUUID();\n public scale: number;\n public units: string;\n public precision: any;\n public size = 10.0;\n public lineWidth = 2;\n\n public style = {\n border: \"2px solid #FFFFFF\",\n background: \"#009bff\",\n boxShadow: \"0 0 10px rgba(0,0,0,0.5)\",\n color: \"white\",\n font: \"1rem system-ui\",\n };\n\n constructor(overlay: MeasureOverlay, scale: number, units: string, precision: any) {\n this.overlay = overlay;\n this.scale = scale;\n this.units = units;\n this.precision = precision;\n\n this.elementStartPoint = overlay.container.appendChild(document.createElement(\"div\"));\n this.elementEndPoint = overlay.container.appendChild(document.createElement(\"div\"));\n this.elementLine = overlay.container.appendChild(document.createElement(\"div\"));\n this.elementLabel = overlay.container.appendChild(document.createElement(\"div\"));\n\n this.update();\n }\n\n dispose() {\n this.elementStartPoint.remove();\n this.elementEndPoint.remove();\n this.elementLine.remove();\n this.elementLabel.remove();\n\n this.elementStartPoint = undefined;\n this.elementEndPoint = undefined;\n this.elementLine = undefined;\n this.elementLabel = undefined;\n }\n\n render() {\n const projector = this.overlay.projector;\n\n if (this.startPoint) {\n const { point, visible } = projector.projectPoint(this.startPoint);\n\n this.elementStartPoint.style.display = visible ? \"block\" : \"none\";\n this.elementStartPoint.style.left = `${point.x}px`;\n this.elementStartPoint.style.top = `${point.y}px`;\n } else {\n this.elementStartPoint.style.display = \"none\";\n }\n\n if (this.endPoint) {\n const { point, visible } = projector.projectPoint(this.endPoint);\n\n this.elementEndPoint.style.display = visible ? \"block\" : \"none\";\n this.elementEndPoint.style.left = `${point.x}px`;\n this.elementEndPoint.style.top = `${point.y}px`;\n } else {\n this.elementEndPoint.style.display = \"none\";\n }\n\n if (this.startPoint && this.endPoint) {\n const { point1, point2, visible } = projector.projectLine(this.startPoint, this.endPoint);\n\n point2.sub(point1);\n const angle = point2.angle();\n const width = point2.length();\n\n this.elementLine.style.display = visible ? \"block\" : \"none\";\n this.elementLine.style.left = `${point1.x}px`;\n this.elementLine.style.top = `${point1.y}px`;\n this.elementLine.style.width = `${width}px`;\n this.elementLine.style.transform = `translate(0px, ${-this.lineWidth / 2}px) rotate(${angle}rad)`;\n } else {\n this.elementLine.style.display = \"none\";\n }\n\n if (this.startPoint && this.endPoint) {\n _middlePoint.lerpVectors(this.startPoint, this.endPoint, 0.5);\n const { point, visible } = projector.projectPoint(_middlePoint);\n\n const distance = this.getDistance();\n\n this.elementLabel.style.display = visible && distance > 0 ? \"block\" : \"none\";\n this.elementLabel.style.left = `${point.x}px`;\n this.elementLabel.style.top = `${point.y}px`;\n this.elementLabel.innerHTML = formatDistance(distance, this.units, this.precision);\n } else {\n this.elementLabel.style.display = \"none\";\n }\n }\n\n update() {\n this.elementStartPoint.id = `markup-dot-start-${this.id}`;\n this.elementStartPoint.style.position = \"absolute\";\n this.elementStartPoint.style.zIndex = \"2\";\n this.elementStartPoint.style.width = `${this.size}px`;\n this.elementStartPoint.style.height = `${this.size}px`;\n this.elementStartPoint.style.border = this.style.border;\n this.elementStartPoint.style.borderRadius = `${this.size}px`;\n this.elementStartPoint.style.background = this.style.background;\n this.elementStartPoint.style.boxShadow = this.style.boxShadow;\n this.elementStartPoint.style.transform = \"translate(-50%, -50%)\";\n\n this.elementEndPoint.id = `markup-dot-end-${this.id}`;\n this.elementEndPoint.style.position = \"absolute\";\n this.elementEndPoint.style.zIndex = \"2\";\n this.elementEndPoint.style.width = `${this.size}px`;\n this.elementEndPoint.style.height = `${this.size}px`;\n this.elementEndPoint.style.border = this.style.border;\n this.elementEndPoint.style.borderRadius = `${this.size}px`;\n this.elementEndPoint.style.background = this.style.background;\n this.elementEndPoint.style.boxShadow = this.style.boxShadow;\n this.elementEndPoint.style.transform = \"translate(-50%, -50%)\";\n\n this.elementLine.id = `markup-line-${this.id}`;\n this.elementLine.style.position = \"absolute\";\n this.elementLine.style.zIndex = \"1\";\n this.elementLine.style.height = `${this.lineWidth}px`;\n this.elementLine.style.background = this.style.background;\n this.elementLine.style.boxShadow = this.style.boxShadow;\n this.elementLine.style.transformOrigin = `0px ${this.lineWidth / 2}px`;\n\n this.elementLabel.id = `markup-label-${this.id}`;\n this.elementLabel.style.position = \"absolute\";\n this.elementLabel.style.zIndex = \"3\";\n this.elementLabel.style.padding = \"2px\";\n this.elementLabel.style.paddingInline = \"5px\";\n this.elementLabel.style.borderRadius = \"5px\";\n this.elementLabel.style.background = this.style.background;\n this.elementLabel.style.boxShadow = this.style.boxShadow;\n this.elementLabel.style.color = this.style.color;\n this.elementLabel.style.font = this.style.font;\n this.elementLabel.style.transform = \"translate(-50%, -50%)\";\n }\n\n getDistance(): number {\n return this.startPoint.distanceTo(this.endPoint) / this.scale;\n }\n}\n\nlet _widthHalf: number;\nlet _heightHalf: number;\nconst _viewMatrix = new Matrix4();\nconst _viewProjectionMatrix = new Matrix4();\nconst _vector = new Vector3();\nconst _vector1 = new Vector4();\nconst _vector2 = new Vector4();\nconst point = new Vector2();\nconst point1 = new Vector2();\nconst point2 = new Vector2();\n\nclass MeasureProjector {\n public camera: Camera;\n private canvas: HTMLElement;\n\n constructor(camera: Camera, canvas: HTMLCanvasElement) {\n this.camera = camera;\n this.canvas = canvas;\n }\n\n setFromCamera(camera: Camera) {\n this.camera = camera;\n this.updateProjectionMatrix();\n }\n\n updateProjectionMatrix() {\n const rect = this.canvas.getBoundingClientRect();\n _widthHalf = rect.width / 2;\n _heightHalf = rect.height / 2;\n\n _viewMatrix.copy(this.camera.matrixWorldInverse);\n _viewProjectionMatrix.multiplyMatrices(this.camera.projectionMatrix, _viewMatrix);\n }\n\n projectPoint(p: Vector3) {\n _vector.copy(p).applyMatrix4(_viewProjectionMatrix);\n const visible = _vector.z >= -1 && _vector.z <= 1;\n\n point.x = (_vector.x + 1) * _widthHalf;\n point.y = (-_vector.y + 1) * _heightHalf;\n\n return { point, visible };\n }\n\n projectLine(p1: Vector3, p2: Vector3) {\n let visible: boolean;\n\n _vector1.copy(p1 as any).applyMatrix4(_viewProjectionMatrix);\n _vector2.copy(p2 as any).applyMatrix4(_viewProjectionMatrix);\n\n // see three/examples/jsm/renderers/Projector.js/clipLine for more details\n\n const bc1near = _vector1.z + _vector1.w;\n const bc2near = _vector2.z + _vector2.w;\n const bc1far = -_vector1.z + _vector1.w;\n const bc2far = -_vector2.z + _vector2.w;\n\n if (bc1near >= 0 && bc2near >= 0 && bc1far >= 0 && bc2far >= 0) visible = true;\n else if ((bc1near < 0 && bc2near < 0) || (bc1far < 0 && bc2far < 0)) visible = false;\n else {\n let alpha1 = 0;\n let alpha2 = 1;\n\n if (bc1near < 0) alpha1 = Math.max(alpha1, bc1near / (bc1near - bc2near));\n else if (bc2near < 0) alpha2 = Math.min(alpha2, bc1near / (bc1near - bc2near));\n\n if (bc1far < 0) alpha1 = Math.max(alpha1, bc1far / (bc1far - bc2far));\n else if (bc2far < 0) alpha2 = Math.min(alpha2, bc1far / (bc1far - bc2far));\n\n visible = alpha2 >= alpha1;\n\n if (visible) {\n _vector1.lerp(_vector2, alpha1);\n _vector2.lerp(_vector1, 1 - alpha2);\n }\n }\n\n _vector1.multiplyScalar(1 / _vector1.w);\n _vector2.multiplyScalar(1 / _vector2.w);\n\n point1.x = (_vector1.x + 1) * _widthHalf;\n point1.y = (-_vector1.y + 1) * _heightHalf;\n\n point2.x = (_vector2.x + 1) * _widthHalf;\n point2.y = (-_vector2.y + 1) * _heightHalf;\n\n return { point1, point2, visible };\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { MOUSE } from \"three\";\n\nimport { OrbitDragger } from \"./OrbitDragger\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class PanDragger extends OrbitDragger {\n constructor(viewer: Viewer) {\n super(viewer);\n this.orbit.mouseButtons = { LEFT: MOUSE.PAN, MIDDLE: MOUSE.PAN, RIGHT: MOUSE.PAN };\n // this.controls.touches = { ONE: TOUCH.PAN, TWO: TOUCH.DOLLY_ROTATE };\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3, Clock, Camera, Controls, Quaternion, Vector2, Vector3, Raycaster, Object3D, MathUtils } from \"three\";\n\ninterface WalkControlsEventMap {\n change: { type: \"change\" };\n walkspeedchange: { type: \"walkspeedchange\"; data: number };\n}\n\nexport class WalkControls extends Controls<WalkControlsEventMap> {\n readonly EYE_HEIGHT = 1.7;\n readonly FAILING_DISTANCE = 2;\n readonly GROUND_FOLLOWING_SKIP_FRAMES = 3;\n readonly GROUND_FOLLOWING_SPEED = 0.4;\n readonly LOOK_SPEED = 0.1;\n readonly WALK_SPEED_DELIMITER = 4;\n readonly WHEEL_SPEED_DELIMITER = 15000;\n\n public movementSpeed = 0.1;\n public multiplier = 3;\n private groundFollowingSkippedFrames = 0;\n\n readonly GROUND_BOX_HALF_SIZE = 20;\n readonly GROUND_BOX_REFRESH_THRESHOLD = 0.3;\n\n private raycaster: Raycaster;\n private groundObjects: Object3D[];\n private _groundObjectBoxes = new Map<Object3D, Box3>();\n private _activeGroundObjects: Object3D[] = [];\n private _groundBox = new Box3();\n private _groundBoxCenter = new Vector3();\n\n private moveKeys: Set<string>;\n private moveWheel = 0;\n private moveClock: Clock;\n\n private quaternion: Quaternion;\n private downPosition: Vector2;\n private mouseDragOn = false;\n public rotateDelta: Vector2;\n\n private camera: Camera;\n\n private readonly _up = new Vector3();\n private readonly _forward = new Vector3();\n private readonly _sideways = new Vector3();\n\n constructor(camera: Camera, canvas: HTMLElement, groundObjects: Object3D[]) {\n super(camera, canvas);\n this.camera = camera;\n\n this.groundObjects = groundObjects;\n for (const obj of groundObjects) {\n this._groundObjectBoxes.set(obj, new Box3().setFromObject(obj));\n }\n const pos = this.object.position;\n this._rebuildGroundBox(pos);\n\n this.raycaster = new Raycaster();\n this.raycaster.near = 0;\n this.raycaster.far = this.EYE_HEIGHT + this.FAILING_DISTANCE;\n this.raycaster.params = {\n Mesh: {},\n Line: { threshold: 0 },\n Line2: { threshold: 0 },\n LOD: { threshold: 0 },\n Points: { threshold: 0 },\n Sprite: { threshold: 0 },\n };\n\n this.moveKeys = new Set();\n this.moveClock = new Clock();\n\n this.quaternion = camera.quaternion.clone();\n this.downPosition = new Vector2(0, 0);\n this.rotateDelta = new Vector2(0, 0);\n\n this.domElement.addEventListener(\"pointerdown\", this.onPointerDown);\n this.domElement.addEventListener(\"pointermove\", this.onPointerMove);\n this.domElement.addEventListener(\"pointerup\", this.onPointerUp);\n this.domElement.addEventListener(\"pointercancel\", this.onPointerCancel);\n this.domElement.addEventListener(\"wheel\", this.onWheel);\n\n window.addEventListener(\"keydown\", this.onKeyDown);\n window.addEventListener(\"keyup\", this.onKeyUp);\n }\n\n override dispose() {\n this.domElement.removeEventListener(\"pointerdown\", this.onPointerDown);\n this.domElement.removeEventListener(\"pointermove\", this.onPointerMove);\n this.domElement.removeEventListener(\"pointerup\", this.onPointerUp);\n this.domElement.removeEventListener(\"pointercancel\", this.onPointerCancel);\n this.domElement.removeEventListener(\"wheel\", this.onWheel);\n\n window.removeEventListener(\"keydown\", this.onKeyDown);\n window.removeEventListener(\"keyup\", this.onKeyUp);\n\n super.dispose();\n }\n\n onPointerDown = (event: PointerEvent) => {\n if (event.button !== 0) return;\n\n this.domElement.setPointerCapture(event.pointerId);\n this.downPosition.set(event.clientX, event.clientY);\n this.quaternion.copy(this.object.quaternion);\n this.mouseDragOn = true;\n };\n\n onPointerMove = (event: PointerEvent) => {\n if (!this.mouseDragOn) return;\n\n const movePosition = new Vector2(event.clientX, event.clientY);\n if (this.downPosition.distanceTo(movePosition) === 0) return;\n\n this.rotateDelta.copy(this.downPosition).sub(movePosition);\n this.rotateCamera(this.rotateDelta);\n this.dispatchEvent({ type: \"change\" });\n };\n\n onPointerUp = (event: PointerEvent) => {\n this.domElement.releasePointerCapture(event.pointerId);\n this.mouseDragOn = false;\n };\n\n onPointerCancel = (event: PointerEvent) => {\n this.domElement.dispatchEvent(new PointerEvent(\"pointerup\", event));\n };\n\n onWheel = (event: WheelEvent) => {\n this.moveWheel = event.deltaY;\n this.update();\n };\n\n onKeyDown = (event: KeyboardEvent) => {\n switch (event.code) {\n case \"NumpadSubtract\":\n case \"Minus\":\n if (this.multiplier > 1) {\n this.multiplier = this.multiplier - 1;\n this.dispatchEvent({ type: \"walkspeedchange\", data: this.multiplier });\n }\n break;\n\n case \"NumpadAdd\":\n case \"Equal\":\n if (this.multiplier < 10) {\n this.multiplier = this.multiplier + 1;\n this.dispatchEvent({ type: \"walkspeedchange\", data: this.multiplier });\n }\n break;\n\n case \"ArrowLeft\":\n case \"ArrowRight\":\n case \"ArrowUp\":\n case \"ArrowDown\":\n case \"KeyW\":\n case \"KeyS\":\n case \"KeyA\":\n case \"KeyD\":\n case \"KeyQ\":\n case \"KeyE\":\n this.moveKeys.add(event.code);\n this.update();\n break;\n }\n };\n\n onKeyUp = (event: KeyboardEvent) => {\n if (this.moveKeys.delete(event.code)) {\n if (this.moveKeys.size === 0) {\n this._rebuildGroundBox(this.object.position);\n }\n this.update();\n }\n };\n\n private _rebuildGroundBox(center: Vector3) {\n const h = this.GROUND_BOX_HALF_SIZE;\n this._groundBoxCenter.copy(center);\n this._groundBox.set(\n new Vector3(center.x - h, center.y - h * 4, center.z - h),\n new Vector3(center.x + h, center.y + h * 4, center.z + h)\n );\n\n this._activeGroundObjects = this.groundObjects.filter((obj) => {\n const objectBox = this._groundObjectBoxes.get(obj);\n return objectBox !== undefined && this._groundBox.intersectsBox(objectBox);\n });\n }\n\n private _needsGroundBoxRebuild(pos: Vector3): boolean {\n if (this._activeGroundObjects.length === 0 && this.groundObjects.length > 0) return true;\n const threshold = this.GROUND_BOX_HALF_SIZE * this.GROUND_BOX_REFRESH_THRESHOLD;\n return (\n Math.abs(pos.x - this._groundBoxCenter.x) > threshold || Math.abs(pos.z - this._groundBoxCenter.z) > threshold\n );\n }\n\n private updateGroundFollowing() {\n const pos = this.object.position;\n\n if (this._needsGroundBoxRebuild(pos)) {\n this._rebuildGroundBox(pos);\n }\n\n this._up.copy(this.camera.up).negate();\n this.raycaster.set(pos, this._up);\n\n const intersects = this.raycaster.intersectObjects(this._activeGroundObjects, false);\n if (intersects.length > 0) {\n const groundY = intersects[0].point.y;\n const targetY = groundY + this.EYE_HEIGHT;\n\n // Smoothly interpolate the camera's y position to the target height\n this.object.position.y = MathUtils.lerp(this.object.position.y, targetY, this.GROUND_FOLLOWING_SPEED);\n }\n }\n\n override update() {\n let moved = false;\n let upgradeGroundFollowing = false;\n const forward = this._forward;\n const sideways = this._sideways;\n\n if (this.moveKeys.size > 0) {\n upgradeGroundFollowing = true;\n const timeDelta = this.moveClock.getDelta();\n const moveDelta = (timeDelta * this.multiplier * this.movementSpeed) / this.WALK_SPEED_DELIMITER;\n\n this.object.getWorldDirection(forward);\n forward.y = 0;\n forward.normalize();\n\n sideways.setFromMatrixColumn(this.object.matrix, 0);\n sideways.y = 0;\n sideways.normalize();\n\n if (this.moveKeys.has(\"KeyW\")) {\n this.object.position.addScaledVector(forward, moveDelta);\n }\n if (this.moveKeys.has(\"KeyS\")) {\n this.object.position.addScaledVector(forward, -moveDelta);\n }\n\n if (this.moveKeys.has(\"KeyA\")) {\n this.object.position.addScaledVector(sideways, -moveDelta);\n }\n if (this.moveKeys.has(\"KeyD\")) {\n this.object.position.addScaledVector(sideways, moveDelta);\n }\n\n if (this.moveKeys.has(\"KeyQ\")) {\n this.object.translateY(moveDelta);\n upgradeGroundFollowing = false;\n }\n if (this.moveKeys.has(\"KeyE\")) {\n this.object.translateY(-moveDelta);\n upgradeGroundFollowing = false;\n }\n\n const lookDelta = this.LOOK_SPEED + (this.multiplier - 1);\n\n if (this.moveKeys.has(\"ArrowUp\")) this.rotateCamera(this.rotateDelta.add(new Vector2(0, -lookDelta / 2)));\n if (this.moveKeys.has(\"ArrowDown\")) this.rotateCamera(this.rotateDelta.add(new Vector2(0, lookDelta / 2)));\n if (this.moveKeys.has(\"ArrowLeft\")) this.rotateCamera(this.rotateDelta.add(new Vector2(lookDelta, 0)));\n if (this.moveKeys.has(\"ArrowRight\")) this.rotateCamera(this.rotateDelta.add(new Vector2(-lookDelta, 0)));\n\n this.moveWheel = 0;\n moved = true;\n }\n\n if (this.moveWheel !== 0) {\n const moveDelta = (this.moveWheel * this.multiplier * this.movementSpeed) / this.WHEEL_SPEED_DELIMITER;\n\n this.object.getWorldDirection(forward);\n forward.y = 0;\n forward.normalize();\n this.object.position.addScaledVector(forward, -moveDelta);\n\n this.moveWheel += -1 * Math.sign(this.moveWheel);\n moved = true;\n }\n\n this.groundFollowingSkippedFrames++;\n if (upgradeGroundFollowing && this.groundFollowingSkippedFrames >= this.GROUND_FOLLOWING_SKIP_FRAMES) {\n this.groundFollowingSkippedFrames = 0;\n this.updateGroundFollowing();\n }\n\n if (moved) {\n this.dispatchEvent({ type: \"change\" });\n }\n\n if (this.moveKeys.size === 0 && this.moveWheel === 0) {\n this.moveClock.stop();\n this.moveClock.autoStart = true;\n }\n }\n\n rotateCamera(delta: Vector2) {\n const rotateX = (Math.PI * delta.x) / this.domElement.clientWidth;\n const rotateY = (Math.PI * delta.y) / this.domElement.clientHeight;\n\n const xRotation = new Quaternion();\n xRotation.setFromAxisAngle(this.object.up, rotateX);\n\n const yRotation = new Quaternion();\n yRotation.setFromAxisAngle(new Vector3(1, 0, 0), rotateY);\n\n const quaternion = this.quaternion.clone();\n quaternion.premultiply(xRotation).multiply(yRotation).normalize();\n\n this.object.setRotationFromQuaternion(quaternion);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\n// ===================== AI-CODE-FILE ======================\n// Source: Claude Sonnet 4.5\n// Date: 2025-10-07\n// Reviewer: vitaly.ivanov@opendesign.com\n// Issue: CLOUD-5851\n// Notes: Originally AI-generated, modified manually\n// =========================================================\n\nimport { Camera, Clock, Controls, Vector2, Vector3, Raycaster, Object3D, MathUtils } from \"three\";\n\ninterface JoyStickControlsEventMap {\n change: { type: \"change\" };\n}\n\nexport class JoyStickControls extends Controls<JoyStickControlsEventMap> {\n readonly EYE_HEIGHT = 1.7;\n readonly FAILING_DISTANCE = 2;\n readonly GROUND_FOLLOWING_SPEED = 0.05;\n readonly WALK_SPEED_DELIMITER = 4;\n\n public movementSpeed = 0.1;\n public multiplier = 3;\n\n private raycaster: Raycaster;\n private groundObjects: Object3D[];\n\n private canvas: HTMLCanvasElement;\n private overlayElement: HTMLDivElement;\n private joyStickCanvas: HTMLCanvasElement;\n private context: CanvasRenderingContext2D;\n\n private moveClock: Clock;\n private camera: Camera;\n\n private joyStickPosition: Vector2;\n private isActive: boolean = false;\n\n private readonly MAX_JOYSTICK_DISTANCE = 100;\n private readonly INTERNAL_RADIUS = 35;\n private readonly MAX_MOVE_STICK = 40;\n private readonly EXTERNAL_RADIUS = 65;\n private readonly CANVAS_SIZE = 200;\n\n private centerX: number;\n private centerY: number;\n private pressed: boolean = false;\n\n constructor(camera: Camera, domElement: HTMLElement, canvasElement: HTMLCanvasElement, groundObjects: Object3D[]) {\n super(camera, domElement);\n this.camera = camera;\n this.canvas = canvasElement;\n this.moveClock = new Clock(false);\n this.joyStickPosition = new Vector2(0, 0);\n\n this.groundObjects = groundObjects;\n this.raycaster = new Raycaster();\n this.raycaster.near = 0;\n this.raycaster.far = this.EYE_HEIGHT + this.FAILING_DISTANCE;\n\n this.centerX = this.CANVAS_SIZE / 2;\n this.centerY = this.CANVAS_SIZE / 2;\n\n this.overlayElement = document.createElement(\"div\");\n this.overlayElement.id = \"joyStickDiv\";\n this.overlayElement.style.background = \"rgba(0,0,0,0)\";\n this.overlayElement.style.position = \"fixed\";\n this.overlayElement.style.zIndex = \"0\";\n this.overlayElement.style.touchAction = \"none\";\n canvasElement.parentElement.appendChild(this.overlayElement);\n\n this.joyStickCanvas = document.createElement(\"canvas\");\n this.joyStickCanvas.id = \"joyStickCanvas\";\n this.joyStickCanvas.width = this.CANVAS_SIZE;\n this.joyStickCanvas.height = this.CANVAS_SIZE;\n this.overlayElement.appendChild(this.joyStickCanvas);\n this.context = this.joyStickCanvas.getContext(\"2d\")!;\n\n this.joyStickCanvas.addEventListener(\"pointerdown\", this.onPointerDown);\n document.addEventListener(\"pointermove\", this.onPointerMove);\n document.addEventListener(\"pointerup\", this.onPointerUp);\n\n window.addEventListener(\"resize\", this.onResize);\n document.addEventListener(\"fullscreenchange\", this.onResize);\n\n this.updateVisibility();\n this.updatePosition();\n this.draw();\n }\n\n override dispose() {\n this.joyStickCanvas.removeEventListener(\"pointerdown\", this.onPointerDown);\n document.removeEventListener(\"pointermove\", this.onPointerMove);\n document.removeEventListener(\"pointerup\", this.onPointerUp);\n\n window.removeEventListener(\"resize\", this.onResize);\n document.removeEventListener(\"fullscreenchange\", this.onResize);\n\n this.overlayElement.remove();\n super.dispose();\n }\n\n private onPointerDown = (event: PointerEvent) => {\n event.preventDefault();\n this.pressed = true;\n };\n\n private onPointerMove = (event: PointerEvent) => {\n event.preventDefault();\n if (!this.pressed) return;\n\n let movedX = event.pageX;\n let movedY = event.pageY;\n\n if (\n this.joyStickCanvas.offsetParent &&\n (this.joyStickCanvas.offsetParent as HTMLElement).tagName.toUpperCase() === \"BODY\"\n ) {\n movedX -= this.joyStickCanvas.offsetLeft;\n movedY -= this.joyStickCanvas.offsetTop;\n } else if (this.joyStickCanvas.offsetParent) {\n movedX -= (this.joyStickCanvas.offsetParent as HTMLElement).offsetLeft;\n movedY -= (this.joyStickCanvas.offsetParent as HTMLElement).offsetTop;\n }\n\n const x = 100 * ((movedX - this.centerX) / this.MAX_MOVE_STICK);\n const y = 100 * ((movedY - this.centerY) / this.MAX_MOVE_STICK) * -1;\n\n const distance = Math.sqrt(x * x + y * y);\n if (distance > 20) {\n this.joyStickPosition.set(x, y);\n this.isActive = true;\n } else {\n this.joyStickPosition.set(0, 0);\n this.isActive = false;\n }\n\n this.draw();\n this.moveClock.start();\n this.update();\n };\n\n private onPointerUp = (event: PointerEvent) => {\n event.preventDefault();\n this.pressed = false;\n this.joyStickPosition.set(0, 0);\n this.isActive = false;\n this.moveClock.stop();\n this.draw();\n };\n\n private onResize = () => {\n this.updateVisibility();\n this.updatePosition();\n };\n\n private updateVisibility() {\n const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n const isNarrowScreen = window.innerWidth < 1024;\n\n if (isMobile || isNarrowScreen) {\n this.overlayElement.style.display = \"block\";\n } else {\n this.overlayElement.style.display = \"none\";\n }\n }\n\n private updatePosition() {\n const rect = this.canvas.getBoundingClientRect();\n this.overlayElement.style.top = `${rect.height - this.CANVAS_SIZE}px`;\n this.overlayElement.style.left = `${rect.left}px`;\n this.overlayElement.style.width = `${this.CANVAS_SIZE}px`;\n this.overlayElement.style.height = `${this.CANVAS_SIZE}px`;\n }\n\n private draw() {\n this.context.clearRect(0, 0, this.CANVAS_SIZE, this.CANVAS_SIZE);\n\n // Draw external circle\n this.context.beginPath();\n this.context.arc(this.centerX, this.centerY, this.EXTERNAL_RADIUS, 0, 2 * Math.PI, false);\n this.context.lineWidth = 2;\n this.context.strokeStyle = \"#35436E\";\n this.context.globalAlpha = 0.5;\n this.context.stroke();\n\n // Draw internal circle\n let movedX = this.centerX + (this.joyStickPosition.x * this.MAX_MOVE_STICK) / 100;\n let movedY = this.centerY - (this.joyStickPosition.y * this.MAX_MOVE_STICK) / 100;\n\n movedX = Math.max(this.MAX_MOVE_STICK, Math.min(this.CANVAS_SIZE - this.MAX_MOVE_STICK, movedX));\n movedY = Math.max(this.MAX_MOVE_STICK, Math.min(this.CANVAS_SIZE - this.MAX_MOVE_STICK, movedY));\n\n this.context.beginPath();\n this.context.arc(movedX, movedY, this.INTERNAL_RADIUS, 0, 2 * Math.PI, false);\n this.context.fillStyle = \"#35436E\";\n this.context.lineWidth = 2;\n this.context.strokeStyle = \"#35436E\";\n this.context.globalAlpha = 0.5;\n this.context.fill();\n this.context.stroke();\n }\n\n private updateGroundFollowing() {\n const up = new Vector3().copy(this.camera.up);\n this.raycaster.set(this.camera.position, up.negate());\n\n this.raycaster.params = this.raycaster.params = {\n Mesh: {},\n Line: { threshold: 0 },\n Line2: { threshold: 0 },\n LOD: { threshold: 0 },\n Points: { threshold: 0 },\n Sprite: { threshold: 0 },\n };\n\n const intersects = this.raycaster.intersectObjects(this.groundObjects, false);\n if (intersects.length > 0) {\n const groundY = intersects[0].point.y;\n const targetY = groundY + this.EYE_HEIGHT;\n\n // Smoothly interpolate the camera's y position to the target height\n this.camera.position.y = MathUtils.lerp(this.camera.position.y, targetY, this.GROUND_FOLLOWING_SPEED);\n }\n }\n\n override update() {\n if (!this.isActive) return;\n\n const forwardInput = this.joyStickPosition.y / this.MAX_JOYSTICK_DISTANCE;\n const rightInput = this.joyStickPosition.x / this.MAX_JOYSTICK_DISTANCE;\n\n const timeDelta = this.moveClock.getDelta();\n const moveDelta = (timeDelta * this.multiplier * this.movementSpeed) / this.WALK_SPEED_DELIMITER;\n\n const forward = new Vector3();\n const sideways = new Vector3();\n\n this.camera.getWorldDirection(forward);\n if (this.groundObjects.length > 0) {\n forward.y = 0;\n }\n forward.normalize();\n\n sideways.setFromMatrixColumn(this.camera.matrix, 0);\n if (this.groundObjects.length > 0) {\n sideways.y = 0;\n }\n sideways.normalize();\n\n if (forwardInput !== 0) {\n this.camera.position.addScaledVector(forward, moveDelta * forwardInput);\n }\n if (rightInput !== 0) {\n this.camera.position.addScaledVector(sideways, moveDelta * rightInput);\n }\n\n if (forwardInput !== 0 || rightInput !== 0) {\n if (this.groundObjects.length > 0) this.updateGroundFollowing();\n this.dispatchEvent({ type: \"change\" });\n }\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Mesh, Vector3 } from \"three\";\nimport { type IDragger } from \"@inweb/viewer-core\";\n\nimport type { Viewer } from \"../Viewer\";\nimport { WalkControls } from \"../controls/WalkControls\";\nimport { JoyStickControls } from \"../controls/JoyStickControls\";\n\nexport class WalkDragger implements IDragger {\n protected viewer: Viewer;\n public controls: WalkControls;\n private joyStickControls: JoyStickControls;\n\n constructor(viewer: Viewer) {\n const meshOnlyGround: Mesh[] = [];\n viewer.models.forEach((model) =>\n model.getVisibleObjects().forEach((obj) => {\n if (obj instanceof Mesh) {\n meshOnlyGround.push(obj);\n }\n })\n );\n this.controls = new WalkControls(viewer.camera, viewer.canvas, meshOnlyGround);\n this.controls.addEventListener(\"change\", this.controlsChange);\n this.controls.addEventListener(\"walkspeedchange\", this.walkspeedChange);\n\n this.joyStickControls = new JoyStickControls(viewer.camera, viewer.canvas, viewer.canvas, meshOnlyGround);\n this.joyStickControls.addEventListener(\"change\", this.controlsChange);\n\n this.viewer = viewer;\n this.viewer.addEventListener(\"animate\", this.animate);\n this.viewer.addEventListener(\"render\", this.viewerRender);\n this.viewer.addEventListener(\"zoom\", this.viewerZoom);\n this.viewer.addEventListener(\"changecameramode\", this.updateControlsCamera);\n\n this.updateControls();\n }\n\n dispose() {\n this.viewer.removeEventListener(\"animate\", this.animate);\n this.viewer.removeEventListener(\"render\", this.viewerRender);\n this.viewer.removeEventListener(\"zoom\", this.viewerZoom);\n this.viewer.removeEventListener(\"changecameramode\", this.updateControlsCamera);\n\n this.controls.removeEventListener(\"walkspeedchange\", this.walkspeedChange);\n this.controls.removeEventListener(\"change\", this.controlsChange);\n this.controls.dispose();\n\n this.joyStickControls.removeEventListener(\"change\", this.controlsChange);\n this.joyStickControls.dispose();\n }\n\n updateControls = () => {\n const size = this.viewer.extents.getSize(new Vector3());\n this.controls.movementSpeed = Math.min(size.x, size.y, size.z) / 2 || 1;\n this.joyStickControls.movementSpeed = this.controls.movementSpeed;\n this.joyStickControls.multiplier = this.controls.multiplier;\n };\n\n updateControlsCamera = () => {\n this.controls.object = this.viewer.camera;\n };\n\n controlsChange = () => {\n this.viewer.update();\n this.viewer.emitEvent({ type: \"changecamera\" });\n };\n\n walkspeedChange = (event: any) => {\n this.viewer.emitEvent(event);\n this.joyStickControls.multiplier = this.controls.multiplier;\n };\n\n viewerRender = () => {\n this.joyStickControls.update();\n };\n\n viewerZoom = () => {\n this.controls.rotateDelta.set(0, 0);\n };\n\n animate = () => {\n this.controls.update();\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Clock, Camera, Controls, Quaternion, Vector2, Vector3 } from \"three\";\n\ninterface FlyControlsEventMap {\n change: { type: \"change\" };\n flyspeedchange: { type: \"flyspeedchange\"; data: number };\n}\n\nexport class FlyControls extends Controls<FlyControlsEventMap> {\n public movementSpeed = 0.2;\n public lookSpeed = 5;\n public multiplier = 5;\n\n private moveKeys: Set<string>;\n private moveWheel = 0;\n private moveClock: Clock;\n\n private quaternion: Quaternion;\n private downPosition: Vector2;\n private mouseDragOn = false;\n public rotateDelta: Vector2;\n\n constructor(camera: Camera, canvas: HTMLElement) {\n super(camera, canvas);\n\n this.moveKeys = new Set();\n this.moveClock = new Clock();\n\n this.quaternion = camera.quaternion.clone();\n this.downPosition = new Vector2(0, 0);\n this.rotateDelta = new Vector2(0, 0);\n\n this.domElement.addEventListener(\"pointerdown\", this.onPointerDown);\n this.domElement.addEventListener(\"pointermove\", this.onPointerMove);\n this.domElement.addEventListener(\"pointerup\", this.onPointerUp);\n this.domElement.addEventListener(\"pointercancel\", this.onPointerCancel);\n this.domElement.addEventListener(\"wheel\", this.onWheel);\n\n window.addEventListener(\"keydown\", this.onKeyDown);\n window.addEventListener(\"keyup\", this.onKeyUp);\n }\n\n override dispose() {\n this.domElement.removeEventListener(\"pointerdown\", this.onPointerDown);\n this.domElement.removeEventListener(\"pointermove\", this.onPointerMove);\n this.domElement.removeEventListener(\"pointerup\", this.onPointerUp);\n this.domElement.removeEventListener(\"pointercancel\", this.onPointerCancel);\n this.domElement.removeEventListener(\"wheel\", this.onWheel);\n\n window.removeEventListener(\"keydown\", this.onKeyDown);\n window.removeEventListener(\"keyup\", this.onKeyUp);\n\n super.dispose();\n }\n\n onPointerDown = (event: PointerEvent) => {\n if (event.button !== 0) return;\n\n this.domElement.setPointerCapture(event.pointerId);\n this.downPosition.set(event.clientX, event.clientY);\n this.quaternion.copy(this.object.quaternion);\n this.mouseDragOn = true;\n };\n\n onPointerMove = (event: PointerEvent) => {\n if (!this.mouseDragOn) return;\n\n const movePosition = new Vector2(event.clientX, event.clientY);\n if (this.downPosition.distanceTo(movePosition) === 0) return;\n\n this.rotateDelta.copy(this.downPosition).sub(movePosition);\n this.rotateCamera(this.rotateDelta);\n this.dispatchEvent({ type: \"change\" });\n };\n\n onPointerUp = (event: PointerEvent) => {\n this.domElement.releasePointerCapture(event.pointerId);\n this.mouseDragOn = false;\n };\n\n onPointerCancel = (event: PointerEvent) => {\n this.domElement.dispatchEvent(new PointerEvent(\"pointerup\", event));\n };\n\n onWheel = (event: WheelEvent) => {\n this.moveWheel = event.deltaY;\n this.update();\n };\n\n onKeyDown = (event: KeyboardEvent) => {\n switch (event.code) {\n case \"NumpadSubtract\":\n case \"Minus\":\n if (this.multiplier > 1) {\n this.multiplier = this.multiplier - 1;\n this.dispatchEvent({ type: \"flyspeedchange\", data: this.multiplier });\n }\n break;\n\n case \"NumpadAdd\":\n case \"Equal\":\n if (this.multiplier < 10) {\n this.multiplier = this.multiplier + 1;\n this.dispatchEvent({ type: \"flyspeedchange\", data: this.multiplier });\n }\n break;\n\n case \"ArrowLeft\":\n case \"ArrowRight\":\n case \"ArrowUp\":\n case \"ArrowDown\":\n case \"KeyW\":\n case \"KeyS\":\n case \"KeyA\":\n case \"KeyD\":\n case \"KeyQ\":\n case \"KeyE\":\n this.moveKeys.add(event.code);\n this.update();\n break;\n }\n };\n\n onKeyUp = (event: KeyboardEvent) => {\n if (this.moveKeys.delete(event.code)) this.update();\n };\n\n override update() {\n if (this.moveKeys.size > 0) {\n const timeDelta = this.moveClock.getDelta();\n const moveDelta = timeDelta * this.movementSpeed * this.multiplier;\n\n if (this.moveKeys.has(\"KeyW\")) this.object.translateZ(-moveDelta);\n if (this.moveKeys.has(\"KeyS\")) this.object.translateZ(moveDelta);\n\n if (this.moveKeys.has(\"KeyA\")) this.object.translateX(-moveDelta);\n if (this.moveKeys.has(\"KeyD\")) this.object.translateX(moveDelta);\n\n if (this.moveKeys.has(\"KeyQ\")) this.object.translateY(moveDelta);\n if (this.moveKeys.has(\"KeyE\")) this.object.translateY(-moveDelta);\n\n const lookDelta = this.lookSpeed + (this.multiplier - 1);\n\n if (this.moveKeys.has(\"ArrowUp\")) this.rotateCamera(this.rotateDelta.add(new Vector2(0, -lookDelta / 2)));\n if (this.moveKeys.has(\"ArrowDown\")) this.rotateCamera(this.rotateDelta.add(new Vector2(0, lookDelta / 2)));\n\n if (this.moveKeys.has(\"ArrowLeft\")) this.rotateCamera(this.rotateDelta.add(new Vector2(lookDelta, 0)));\n if (this.moveKeys.has(\"ArrowRight\")) this.rotateCamera(this.rotateDelta.add(new Vector2(-lookDelta, 0)));\n\n this.moveWheel = 0;\n this.dispatchEvent({ type: \"change\" });\n }\n\n if (this.moveWheel !== 0) {\n const moveDelta = this.moveWheel * 0.0001 * this.movementSpeed * this.multiplier;\n\n this.object.translateZ(-moveDelta);\n this.moveWheel += -1 * Math.sign(this.moveWheel);\n this.dispatchEvent({ type: \"change\" });\n }\n\n if (this.moveKeys.size === 0 && this.moveWheel === 0) {\n this.moveClock.stop();\n this.moveClock.autoStart = true;\n }\n }\n\n rotateCamera(delta: Vector2) {\n const rotateX = (Math.PI * delta.x) / this.domElement.clientWidth;\n const rotateY = (Math.PI * delta.y) / this.domElement.clientHeight;\n\n const xRotation = new Quaternion();\n xRotation.setFromAxisAngle(this.object.up, rotateX);\n\n const yRotation = new Quaternion();\n yRotation.setFromAxisAngle(new Vector3(1, 0, 0), rotateY);\n\n const quaternion = this.quaternion.clone();\n quaternion.premultiply(xRotation).multiply(yRotation).normalize();\n\n this.object.setRotationFromQuaternion(quaternion);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Vector3 } from \"three\";\nimport { type IDragger } from \"@inweb/viewer-core\";\n\nimport type { Viewer } from \"../Viewer\";\nimport { FlyControls } from \"../controls/FlyControls\";\nimport { JoyStickControls } from \"../controls/JoyStickControls\";\n\nexport class FlyDragger implements IDragger {\n protected viewer: Viewer;\n public controls: FlyControls;\n private joyStickControls: JoyStickControls;\n\n constructor(viewer: Viewer) {\n this.controls = new FlyControls(viewer.camera, viewer.canvas);\n this.controls.addEventListener(\"change\", this.controlsChange);\n this.controls.addEventListener(\"flyspeedchange\", this.flyspeedChange);\n\n this.joyStickControls = new JoyStickControls(viewer.camera, viewer.canvas, viewer.canvas, []);\n this.joyStickControls.addEventListener(\"change\", this.controlsChange);\n\n this.viewer = viewer;\n this.viewer.addEventListener(\"animate\", this.animate);\n this.viewer.addEventListener(\"render\", this.viewerRender);\n this.viewer.addEventListener(\"zoom\", this.viewerZoom);\n this.viewer.addEventListener(\"changecameramode\", this.updateControlsCamera);\n\n this.updateControls();\n }\n\n dispose() {\n this.viewer.removeEventListener(\"animate\", this.animate);\n this.viewer.removeEventListener(\"render\", this.viewerRender);\n this.viewer.removeEventListener(\"zoom\", this.viewerZoom);\n this.viewer.removeEventListener(\"changecameramode\", this.updateControlsCamera);\n\n this.controls.removeEventListener(\"flyspeedchange\", this.flyspeedChange);\n this.controls.removeEventListener(\"change\", this.controlsChange);\n this.controls.dispose();\n\n this.joyStickControls.removeEventListener(\"change\", this.controlsChange);\n this.joyStickControls.dispose();\n }\n\n updateControls = () => {\n const size = this.viewer.extents.getSize(new Vector3());\n this.controls.movementSpeed = Math.min(size.x, size.y, size.z) / 2 || 1;\n this.joyStickControls.movementSpeed = this.controls.movementSpeed;\n this.joyStickControls.multiplier = this.controls.multiplier;\n };\n\n updateControlsCamera = () => {\n this.controls.object = this.viewer.camera;\n };\n\n controlsChange = () => {\n this.viewer.update();\n this.viewer.emitEvent({ type: \"changecamera\" });\n };\n\n flyspeedChange = (event: any) => {\n this.viewer.emitEvent(event);\n this.joyStickControls.multiplier = this.controls.multiplier;\n };\n\n viewerRender = () => {\n this.joyStickControls.update();\n };\n\n viewerZoom = () => {\n this.controls.rotateDelta.set(0, 0);\n };\n\n animate = () => {\n this.controls.update();\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { MOUSE } from \"three\";\n\nimport { OrbitDragger } from \"./OrbitDragger\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class ZoomDragger extends OrbitDragger {\n constructor(viewer: Viewer) {\n super(viewer);\n this.orbit.mouseButtons = { LEFT: MOUSE.DOLLY, MIDDLE: MOUSE.PAN, RIGHT: MOUSE.PAN };\n // this.controls.touches = { ONE: TOUCH.DOLLY_PAN, TWO: TOUCH.DOLLY_PAN };\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IDraggersRegistry, draggersRegistry } from \"@inweb/viewer-core\";\n\nimport { CuttingPlaneDragger } from \"./CuttingPlaneDragger\";\nimport { CuttingPlaneXAxisDragger } from \"./CuttingPlaneXAxis\";\nimport { CuttingPlaneYAxisDragger } from \"./CuttingPlaneYAxis\";\nimport { CuttingPlaneZAxisDragger } from \"./CuttingPlaneZAxis\";\nimport { MeasureLineDragger } from \"./MeasureLineDragger\";\nimport { OrbitDragger } from \"./OrbitDragger\";\nimport { PanDragger } from \"./PanDragger\";\nimport { WalkDragger } from \"./WalkDragger\";\nimport { FlyDragger } from \"./FlyDragger\";\nimport { ZoomDragger } from \"./ZoomDragger\";\n\n/**\n * Viewer draggers registry. Use this registry to register custom draggers.\n *\n * To implement custom dragger:\n *\n * 1. Define a dragger class implements {@link IDragger}.\n * 2. Define a constructor with a `viewer` parameter and add mouse event listeners for the specified viewer.\n * 3. Define the dragger logic in the event listeners. For example, listen for the `mousemove` event and\n * zoom in/out when the left mouse button is pressed.\n * 4. Override {@link IDragger.dispose} and remove mouse event listeners from the viewer.\n * 5. Register dragger provider in the draggers registry by calling the {@link draggers.registerDragger}.\n *\n * @example Implementing a custom dragger.\n *\n * ```javascript\n * import { IDragger, draggers, Viewer } from \"@inweb/viewer-three\";\n *\n * class MyDragger implements IDragger {\n * protected viewer: Viewer;\n *\n * constructor(viewer: Viewer) {\n * this.viewer = viewer;\n * this.viewer.addEventListener(\"pointermove\", this.onPointerMove);\n * }\n *\n * override dispose() {\n * this.viewer.removeEventListener(\"pointermove\", this.onPointerMove);\n * }\n *\n * onPointerMove = (event: PointerEvent) => {\n * // place custom logic here\n * };\n * }\n *\n * draggers.registerDragger(\"MyDragger\", (viewer): IDragger => new MyDragger(viewer));\n * ```\n *\n * @example Activating a custom dragger.\n *\n * ```javascript\n * viewer.setActiveDragger(\"MyDragger\");\n * ```\n */\nexport const draggers: IDraggersRegistry = draggersRegistry(\"threejs\");\n\n// build-in draggers\n\ndraggers.registerDragger(\"Pan\", (viewer) => new PanDragger(viewer));\ndraggers.registerDragger(\"Orbit\", (viewer) => new OrbitDragger(viewer));\ndraggers.registerDragger(\"Zoom\", (viewer) => new ZoomDragger(viewer));\ndraggers.registerDragger(\"MeasureLine\", (viewer) => new MeasureLineDragger(viewer));\ndraggers.registerDragger(\"CuttingPlane\", (viewer) => new CuttingPlaneDragger(viewer));\ndraggers.registerDragger(\"CuttingPlaneXAxis\", (viewer) => new CuttingPlaneXAxisDragger(viewer));\ndraggers.registerDragger(\"CuttingPlaneYAxis\", (viewer) => new CuttingPlaneYAxisDragger(viewer));\ndraggers.registerDragger(\"CuttingPlaneZAxis\", (viewer) => new CuttingPlaneZAxisDragger(viewer));\ndraggers.registerDragger(\"Walk\", (viewer) => new WalkDragger(viewer));\ndraggers.registerDragger(\"Fly\", (viewer) => new FlyDragger(viewer));\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Model, File, Assembly } from \"@inweb/client\";\nimport type { Viewer } from \"../Viewer\";\n\nexport function applyModelTransform(viewer: Viewer, model: Model | File | Assembly) {\n console.warn(\"applyModelTransform not implemented\");\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function clearMarkup(viewer: Viewer) {\n viewer.clearOverlay();\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport type { SelectionComponent } from \"../components/SelectionComponent\";\n\nexport function clearSelected(viewer: Viewer): void {\n const selection = viewer.getComponent(\"SelectionComponent\") as SelectionComponent;\n selection.clearSelection();\n\n viewer.update();\n\n viewer.emitEvent({ type: \"select\", handles: [] });\n viewer.emitEvent({ type: \"select2\", handles: [] });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function clearSlices(viewer: Viewer) {\n viewer.clearSlices();\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function getSnapshot(viewer: Viewer, type?: string, quality?: number): string {\n viewer.update(true);\n\n const mimeType = type ?? viewer.options.snapshotMimeType ?? \"image/jpeg\";\n const imageQuality = quality ?? viewer.options.snapshotQuality ?? 0.25;\n\n if (viewer.markup) {\n return viewer.markup.getSnapshot(mimeType, imageQuality);\n }\n\n return viewer.canvas.toDataURL(mimeType, imageQuality);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function explode(viewer: Viewer, index = 0): void {\n viewer.models.forEach((model) => model.explode(index));\n\n viewer.update();\n viewer.emitEvent({ type: \"explode\", data: index });\n}\n\nexport function collect(viewer: Viewer) {\n explode(viewer, 0);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3, MathUtils, Vector2, Vector3 } from \"three\";\nimport type { Viewer } from \"../Viewer\";\n\nexport function zoomTo(viewer: Viewer, box: Box3): void {\n if (box.isEmpty()) return;\n\n const boxCenter = box.getCenter(new Vector3());\n const boxSize = box.getSize(new Vector3()).length() || 1;\n\n const rendererSize = viewer.renderer.getSize(new Vector2());\n const aspectRatio = rendererSize.x / rendererSize.y;\n\n const camera = viewer.camera as any;\n\n if (camera.isPerspectiveCamera) {\n const offset = new Vector3(0, 0, 1)\n .applyQuaternion(camera.quaternion)\n .multiplyScalar(boxSize / (2 * Math.tan(MathUtils.degToRad(camera.fov * 0.5))));\n\n camera.position.copy(offset).add(boxCenter);\n camera.updateMatrixWorld();\n }\n if (camera.isOrthographicCamera) {\n camera.top = boxSize / 2;\n camera.bottom = -boxSize / 2;\n camera.left = camera.bottom * aspectRatio;\n camera.right = camera.top * aspectRatio;\n camera.zoom = 1;\n camera.updateProjectionMatrix();\n\n const offset = new Vector3(0, 0, 1)\n .applyQuaternion(camera.quaternion)\n .multiplyScalar(viewer.extents.getSize(new Vector3()).length() || 1);\n\n camera.position.copy(offset).add(boxCenter);\n camera.updateMatrixWorld();\n }\n\n viewer.target.copy(boxCenter);\n\n viewer.update();\n viewer.emitEvent({ type: \"zoom\" });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Quaternion, Vector3 } from \"three\";\nimport type { Viewer } from \"../Viewer\";\nimport { zoomTo } from \"./ZoomTo\";\n\nexport const defaultViewPositions = {\n front: new Vector3(0, 0, -1),\n back: new Vector3(0, 0, 1),\n left: new Vector3(1, 0, 0),\n right: new Vector3(-1, 0, 0),\n bottom: new Vector3(0, -1, 0),\n top: new Vector3(0, 1, 0),\n se: new Vector3(-1, 1, -1).normalize(),\n sw: new Vector3(1, 1, -1).normalize(),\n ne: new Vector3(-1, 1, 1).normalize(),\n nw: new Vector3(1, 1, 1).normalize(),\n};\n\nexport function setDefaultViewPosition(viewer: Viewer, position = \"sw\"): void {\n const extentsCenter = viewer.extents.getCenter(new Vector3());\n const extentsSize = viewer.extents.getSize(new Vector3()).length() || 1;\n\n const upY = new Vector3(0, 1, 0);\n const offsetY = defaultViewPositions[position] || defaultViewPositions[\"sw\"];\n\n const up = new Vector3().copy(viewer.camera.up);\n const quaternion = new Quaternion().setFromUnitVectors(upY, up);\n const offset = new Vector3().copy(offsetY).applyQuaternion(quaternion);\n\n const camera = viewer.camera;\n camera.position.copy(offset).multiplyScalar(extentsSize).add(extentsCenter);\n camera.lookAt(extentsCenter);\n camera.updateMatrixWorld();\n\n viewer.target.copy(extentsCenter);\n\n viewer.update();\n viewer.emit({ type: \"viewposition\", data: position });\n\n zoomTo(viewer, viewer.extents);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { defaultViewPositions } from \"./SetDefaultViewPosition\";\n\nexport function getDefaultViewPositions(): string[] {\n return Object.keys(defaultViewPositions);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function getModels(viewer: Viewer): string[] {\n return viewer.models.map((model) => model.id);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function getSelected(viewer: Viewer): string[] {\n const handles2 = viewer.executeCommand(\"getSelected2\");\n const handles = handles2.map((handle) => handle.slice(handle.indexOf(\":\") + 1));\n return handles;\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function getSelected2(viewer: Viewer): string[] {\n const handles2 = [];\n\n viewer.models.forEach((model) => {\n handles2.push(model.getHandlesByObjects(viewer.selected));\n });\n\n return handles2.flat();\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport type { SelectionComponent } from \"../components/SelectionComponent\";\n\nexport function hideSelected(viewer: Viewer): void {\n viewer.models.forEach((model) => model.hideObjects(viewer.selected));\n\n const selection = viewer.getComponent(\"SelectionComponent\") as SelectionComponent;\n selection.clearSelection();\n\n viewer.update();\n\n viewer.emitEvent({ type: \"hide\" });\n viewer.emitEvent({ type: \"select\", handles: [] });\n viewer.emitEvent({ type: \"select2\", handles: [] });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function isolateSelected(viewer: Viewer): void {\n viewer.models.forEach((model) => model.isolateObjects(viewer.selected));\n\n viewer.update();\n viewer.emitEvent({ type: \"isolate\" });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function regenerateAll(viewer: Viewer): void {\n viewer.emit({ type: \"regenerateall\" });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function resetView(viewer: Viewer): void {\n viewer.executeCommand(\"setActiveDragger\");\n viewer.executeCommand(\"clearSlices\");\n viewer.executeCommand(\"clearOverlay\");\n viewer.executeCommand(\"setMarkupColor\");\n viewer.executeCommand(\"clearSelected\");\n viewer.executeCommand(\"showAll\");\n viewer.executeCommand(\"explode\", 0);\n viewer.executeCommand(\"zoomToExtents\", true);\n\n viewer.emit({ type: \"resetview\" });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport type { SelectionComponent } from \"../components/SelectionComponent\";\n\nexport function selectModel(viewer: Viewer, id: string): void {\n const selection = viewer.getComponent(\"SelectionComponent\") as SelectionComponent;\n selection.clearSelection();\n\n viewer.models.filter((model) => model.id === id).forEach((model) => selection.select(model.getObjects(), model));\n\n viewer.update();\n\n viewer.emitEvent({ type: \"select\", handles: viewer.getSelected() });\n viewer.emitEvent({ type: \"select2\", handles: viewer.getSelected2() });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function setActiveDragger(viewer: Viewer, dragger = \"\") {\n viewer.setActiveDragger(dragger);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function setMarkupColor(viewer: Viewer, r = 255, g = 0, b = 0) {\n viewer.markup.setMarkupColor(r, g, b);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function setSelected(viewer: Viewer, handles: string[] = []): void {\n const handles2 = [];\n\n handles.forEach((handle) => {\n if (handle.includes(\":\")) {\n handles2.push(handle);\n } else\n viewer.models.forEach((model) => {\n handles2.push(`${model.id}:${handle}`);\n });\n });\n\n viewer.executeCommand(\"setSelected2\", handles2);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport type { SelectionComponent } from \"../components/SelectionComponent\";\n\nexport function setSelected2(viewer: Viewer, handles: string[] = []): void {\n const selectionComponent = viewer.getComponent(\"SelectionComponent\") as SelectionComponent;\n selectionComponent.clearSelection();\n\n viewer.models.forEach((model) => {\n const objects = model.getObjectsByHandles(handles);\n model.showObjects(objects);\n selectionComponent.select(objects, model);\n });\n\n viewer.update();\n\n viewer.emitEvent({ type: \"show\" });\n viewer.emitEvent({ type: \"select\", data: undefined, handles: viewer.getSelected() });\n viewer.emitEvent({ type: \"select2\", data: undefined, handles });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function showAll(viewer: Viewer): void {\n viewer.models.forEach((model) => model.showAllObjects());\n\n viewer.update();\n viewer.emitEvent({ type: \"showall\" });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport { zoomTo } from \"./ZoomTo\";\n\nexport function zoomToExtents(viewer: Viewer): void {\n zoomTo(viewer, viewer.extents);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3 } from \"three\";\nimport type { Viewer } from \"../Viewer\";\nimport { zoomTo } from \"./ZoomTo\";\n\nexport function zoomToObjects(viewer: Viewer, handles: string[] = []): void {\n const extents = new Box3();\n\n viewer.models.forEach((model) => {\n const objects = model.getObjectsByHandles(handles);\n objects.forEach((object) => extents.expandByObject(object));\n });\n if (extents.isEmpty()) extents.copy(viewer.extents);\n\n zoomTo(viewer, extents);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3 } from \"three\";\nimport type { Viewer } from \"../Viewer\";\nimport { zoomTo } from \"./ZoomTo\";\n\nexport function zoomToSelected(viewer: Viewer): void {\n const extents = new Box3();\n\n viewer.selected.forEach((object) => extents.expandByObject(object));\n if (extents.isEmpty()) extents.copy(viewer.extents);\n\n zoomTo(viewer, extents);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { ICommandsRegistry, commandsRegistry } from \"@inweb/viewer-core\";\n\nimport { applyModelTransform } from \"./ApplyModelTransform\";\nimport { clearMarkup } from \"./ClearMarkup\";\nimport { clearSelected } from \"./ClearSelected\";\nimport { clearSlices } from \"./ClearSlices\";\nimport { getSnapshot } from \"./GetSnapshot\";\nimport { explode, collect } from \"./Explode\";\nimport { getDefaultViewPositions } from \"./GetDefaultViewPositions\";\nimport { getModels } from \"./GetModels\";\nimport { getSelected } from \"./GetSelected\";\nimport { getSelected2 } from \"./GetSelected2\";\nimport { hideSelected } from \"./HideSelected\";\nimport { isolateSelected } from \"./IsolateSelected\";\nimport { regenerateAll } from \"./RegenerateAll\";\nimport { resetView } from \"./ResetView\";\nimport { selectModel } from \"./SelectModel\";\nimport { setActiveDragger } from \"./SetActiveDragger\";\nimport { setDefaultViewPosition } from \"./SetDefaultViewPosition\";\nimport { setMarkupColor } from \"./SetMarkupColor\";\nimport { setSelected } from \"./SetSelected\";\nimport { setSelected2 } from \"./SetSelected2\";\nimport { showAll } from \"./ShowAll\";\nimport { zoomToExtents } from \"./ZoomToExtents\";\nimport { zoomToObjects } from \"./ZoomToObjects\";\nimport { zoomToSelected } from \"./ZoomToSelected\";\n\n/**\n * Viewer commands registry. Use this registry to register custom commands.\n *\n * To implement custom command:\n *\n * 1. Define a command handler with a first `viewer` parameter.\n * 2. Register command handler in the commands registry by calling the {@link commands.registerCommand}.\n *\n * @example Implementing a custom command.\n *\n * ```javascript\n * import { commands, Viewer } from \"@inweb/viewer-three\";\n *\n * function commandHandler(viewer: Viewer, name = \"world\"): void {\n * console.log(`Hello ${name}!!!`);\n * }\n *\n * commands.registerCommand(\"sayHello\", commandHandler);\n * ```\n *\n * @example Calling a custom command.\n *\n * ```javascript\n * viewer.executeCommand(\"sayHello\", \"user\");\n * ```\n */\nexport const commands: ICommandsRegistry = commandsRegistry(\"threejs\");\n\n// build-in commands\n\ncommands.registerCommand(\"applyModelTransform\", applyModelTransform);\ncommands.registerCommand(\"clearMarkup\", clearMarkup);\ncommands.registerCommand(\"clearSelected\", clearSelected);\ncommands.registerCommand(\"clearSlices\", clearSlices);\ncommands.registerCommand(\"collect\", collect);\ncommands.registerCommand(\"getSnapshot\", getSnapshot);\ncommands.registerCommand(\"explode\", explode);\ncommands.registerCommand(\"getDefaultViewPositions\", getDefaultViewPositions);\ncommands.registerCommand(\"getModels\", getModels);\ncommands.registerCommand(\"getSelected\", getSelected);\ncommands.registerCommand(\"getSelected2\", getSelected2);\ncommands.registerCommand(\"hideSelected\", hideSelected);\ncommands.registerCommand(\"isolateSelected\", isolateSelected);\ncommands.registerCommand(\"regenerateAll\", regenerateAll);\ncommands.registerCommand(\"resetView\", resetView);\ncommands.registerCommand(\"selectModel\", selectModel);\ncommands.registerCommand(\"setActiveDragger\", setActiveDragger);\ncommands.registerCommand(\"setDefaultViewPosition\", setDefaultViewPosition);\ncommands.registerCommand(\"setMarkupColor\", setMarkupColor);\ncommands.registerCommand(\"setSelected\", setSelected);\ncommands.registerCommand(\"setSelected2\", setSelected2);\ncommands.registerCommand(\"showAll\", showAll);\ncommands.registerCommand(\"zoomToExtents\", zoomToExtents);\ncommands.registerCommand(\"zoomToObjects\", zoomToObjects);\ncommands.registerCommand(\"zoomToSelected\", zoomToSelected);\n\ncommands.registerCommand(\"top\", (viewer) => setDefaultViewPosition(viewer, \"top\"));\ncommands.registerCommand(\"bottom\", (viewer) => setDefaultViewPosition(viewer, \"bottom\"));\ncommands.registerCommand(\"left\", (viewer) => setDefaultViewPosition(viewer, \"left\"));\ncommands.registerCommand(\"right\", (viewer) => setDefaultViewPosition(viewer, \"right\"));\ncommands.registerCommand(\"front\", (viewer) => setDefaultViewPosition(viewer, \"front\"));\ncommands.registerCommand(\"back\", (viewer) => setDefaultViewPosition(viewer, \"back\"));\ncommands.registerCommand(\"se\", (viewer) => setDefaultViewPosition(viewer, \"se\"));\ncommands.registerCommand(\"sw\", (viewer) => setDefaultViewPosition(viewer, \"sw\"));\ncommands.registerCommand(\"ne\", (viewer) => setDefaultViewPosition(viewer, \"ne\"));\ncommands.registerCommand(\"nw\", (viewer) => setDefaultViewPosition(viewer, \"nw\"));\n\ncommands.registerCommandAlias(\"clearMarkup\", \"clearOverlay\");\ncommands.registerCommandAlias(\"clearSelected\", \"unselect\");\ncommands.registerCommandAlias(\"getSnapshot\", \"createPreview\");\ncommands.registerCommandAlias(\"zoomToExtents\", \"zoomExtents\");\n\ncommands.registerCommandAlias(\"top\", \"k3DViewTop\");\ncommands.registerCommandAlias(\"bottom\", \"k3DViewBottom\");\ncommands.registerCommandAlias(\"left\", \"k3DViewLeft\");\ncommands.registerCommandAlias(\"right\", \"k3DViewRight\");\ncommands.registerCommandAlias(\"front\", \"k3DViewFront\");\ncommands.registerCommandAlias(\"back\", \"k3DViewBack\");\ncommands.registerCommandAlias(\"se\", \"k3DViewSE\");\ncommands.registerCommandAlias(\"sw\", \"k3DViewSW\");\ncommands.registerCommandAlias(\"ne\", \"k3DViewNE\");\ncommands.registerCommandAlias(\"nw\", \"k3DViewNW\");\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Color } from \"three\";\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class BackgroundComponent implements IComponent {\n protected viewer: Viewer;\n protected backgroundColor: Color;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n\n this.backgroundColor = new Color(0xffffff);\n\n this.viewer.renderer.setClearColor(this.backgroundColor);\n this.viewer.scene.background = this.backgroundColor;\n this.viewer.addEventListener(\"optionschange\", this.syncOptions);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"optionschange\", this.syncOptions);\n this.viewer.scene.background = undefined;\n }\n\n syncOptions = () => {\n this.backgroundColor.setHex(0xffffff);\n this.viewer.renderer.setClearColor(this.backgroundColor);\n this.viewer.update();\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { MathUtils, OrthographicCamera, PerspectiveCamera, Vector2, Vector3 } from \"three\";\n\nimport { CameraMode, IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class CameraComponent implements IComponent {\n protected viewer: Viewer;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.viewer.addEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.addEventListener(\"optionschange\", this.syncOptions);\n this.viewer.addEventListener(\"initialize\", this.syncOptions);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.removeEventListener(\"optionschange\", this.syncOptions);\n this.viewer.removeEventListener(\"initialize\", this.syncOptions);\n }\n\n getCameraMode(camera: any): CameraMode {\n return camera.isOrthographicCamera ? \"orthographic\" : \"perspective\";\n }\n\n switchCamera(camera: any) {\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n const rendererSize = this.viewer.renderer.getSize(new Vector2());\n const aspectRatio = rendererSize.x / rendererSize.y;\n\n if (camera.isPerspectiveCamera) {\n camera.aspect = aspectRatio;\n camera.near = extentsSize / 1000;\n camera.far = extentsSize * 1000;\n }\n if (camera.isOrthographicCamera) {\n camera.left = camera.bottom * aspectRatio;\n camera.right = camera.top * aspectRatio;\n camera.near = -extentsSize * 1000;\n camera.far = extentsSize * 1000;\n }\n\n camera.updateProjectionMatrix();\n\n this.viewer.camera = camera;\n this.viewer.renderPass.camera = camera;\n this.viewer.ssaaRenderPass.camera = camera;\n\n this.viewer.update();\n }\n\n switchCameraMode(mode: CameraMode) {\n if (!mode) return;\n\n const currentCamera: any = this.viewer.camera;\n if (mode === this.getCameraMode(currentCamera)) return;\n\n const target = this.viewer.target.clone();\n\n let camera: PerspectiveCamera | OrthographicCamera;\n\n if (currentCamera.isOrthographicCamera) {\n const fov = currentCamera.userData.fov || 45;\n const fieldHeight = (currentCamera.top - currentCamera.bottom) / currentCamera.zoom;\n const distance = fieldHeight / (2 * Math.tan(MathUtils.degToRad(fov) / 2));\n const direction = new Vector3().subVectors(currentCamera.position, target).normalize();\n\n camera = new PerspectiveCamera(fov);\n camera.position.copy(direction).multiplyScalar(distance).add(target);\n }\n if (currentCamera.isPerspectiveCamera) {\n const fov = currentCamera.fov;\n const distance = currentCamera.position.distanceTo(target);\n const fieldHeight = 2 * Math.tan(MathUtils.degToRad(fov * 0.5)) * distance;\n\n camera = new OrthographicCamera();\n camera.top = fieldHeight / 2;\n camera.bottom = -fieldHeight / 2;\n camera.position.copy(currentCamera.position);\n\n camera.userData.fov = fov;\n }\n if (!camera) return;\n\n camera.up.copy(currentCamera.up);\n camera.quaternion.copy(currentCamera.quaternion);\n\n this.switchCamera(camera);\n\n this.viewer.emitEvent({ type: \"changecameramode\", mode });\n }\n\n syncOptions = () => {\n this.switchCameraMode(this.viewer.options.cameraMode);\n };\n\n geometryEnd = () => {\n // do not change the camera after opening the second file in assembly\n if (this.viewer.models.length > 1) {\n this.switchCamera(this.viewer.camera);\n return;\n }\n\n let camera: any;\n\n this.viewer.scene.traverse((object: any) => {\n if (object.isCamera)\n if (!camera) camera = object;\n else if (object.isPerspectiveCamera && camera.isOrthographicCamera) camera = object;\n });\n\n if (camera) {\n camera.userData.isDefaultCamera = true;\n camera.scale.set(1, 1, 1); // <- Visualize fix\n\n this.switchCamera(camera);\n\n const mode = this.getCameraMode(camera);\n\n this.viewer.options.cameraMode = mode;\n this.viewer.emitEvent({ type: \"changecameramode\", mode });\n } else {\n this.switchCamera(this.viewer.camera);\n this.viewer.executeCommand(\"setDefaultViewPosition\");\n }\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3 } from \"three\";\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class ExtentsComponent implements IComponent {\n private viewer: Viewer;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.viewer.addEventListener(\"databasechunk\", this.syncExtents);\n this.viewer.addEventListener(\"clear\", this.syncExtents);\n this.viewer.on(\"explode\", this.syncExtents);\n this.viewer.on(\"hide\", this.syncExtents);\n this.viewer.on(\"isolate\", this.syncExtents);\n this.viewer.on(\"show\", this.syncExtents);\n this.viewer.on(\"showall\", this.syncExtents);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"databasechunk\", this.syncExtents);\n this.viewer.removeEventListener(\"clear\", this.syncExtents);\n this.viewer.off(\"explode\", this.syncExtents);\n this.viewer.off(\"hide\", this.syncExtents);\n this.viewer.off(\"isolate\", this.syncExtents);\n this.viewer.off(\"show\", this.syncExtents);\n this.viewer.off(\"showall\", this.syncExtents);\n }\n\n syncExtents = (event) => {\n const extents = new Box3();\n this.viewer.models.forEach((model) => model.getExtents(extents));\n this.viewer.extents.copy(extents);\n\n if (event.type !== \"databasechunk\" && event.target !== \"clear\") return;\n if (this.viewer.models.length > 1) return; // do not change target in assembly mode\n\n this.viewer.extents.getCenter(this.viewer.target);\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { AmbientLight, DirectionalLight, HemisphereLight, Quaternion, Vector3 } from \"three\";\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class LightComponent implements IComponent {\n protected viewer: Viewer;\n protected ambientLight: AmbientLight;\n protected directionalLight: DirectionalLight;\n protected frontLight: DirectionalLight;\n protected hemisphereLight: HemisphereLight;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n\n this.ambientLight = new AmbientLight(0xffffff, 1.5);\n this.directionalLight = new DirectionalLight(0xffffff, 1.0);\n this.frontLight = new DirectionalLight(0xffffff, 1.25);\n this.hemisphereLight = new HemisphereLight(0xffffff, 0x444444, 1.25);\n\n this.viewer.addEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.addEventListener(\"clear\", this.geometryEnd);\n }\n\n dispose(): void {\n this.ambientLight.removeFromParent();\n this.ambientLight.dispose();\n\n this.directionalLight.removeFromParent();\n this.directionalLight.dispose();\n\n this.frontLight.removeFromParent();\n this.frontLight.dispose();\n\n this.hemisphereLight.removeFromParent();\n this.hemisphereLight.dispose();\n\n this.viewer.removeEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.removeEventListener(\"clear\", this.geometryEnd);\n }\n\n geometryEnd = () => {\n this.ambientLight.removeFromParent();\n this.directionalLight.removeFromParent();\n this.frontLight.removeFromParent();\n this.hemisphereLight.removeFromParent();\n\n if (this.viewer.extents.isEmpty()) return;\n\n const extentsCenter = this.viewer.extents.getCenter(new Vector3());\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n\n const upY = new Vector3(0, 1, 0);\n const frontY = new Vector3(0, 0, -1);\n\n const up = new Vector3().copy(this.viewer.camera.up);\n const quaternion = new Quaternion().setFromUnitVectors(upY, up);\n const front = new Vector3().copy(frontY).applyQuaternion(quaternion).negate();\n\n this.directionalLight.position\n .copy(up)\n .applyAxisAngle(front, (-Math.PI * 30) / 180)\n .multiplyScalar(extentsSize)\n .add(extentsCenter);\n this.directionalLight.target.position.copy(extentsCenter);\n\n this.frontLight.position.copy(front).multiplyScalar(extentsSize).add(extentsCenter);\n this.frontLight.target.position.copy(extentsCenter);\n\n this.hemisphereLight.position\n .copy(front)\n .multiplyScalar(extentsSize * 1.5)\n .add(extentsCenter);\n\n this.viewer.scene.add(this.ambientLight);\n this.viewer.scene.add(this.directionalLight);\n this.viewer.scene.add(this.frontLight);\n this.viewer.scene.add(this.hemisphereLight);\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { REVISION } from \"three\";\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class InfoComponent implements IComponent {\n protected viewer: Viewer;\n private startTime: number;\n private beginTime: number;\n private prevTime: number;\n private frames: number;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.startTime = 0;\n this.beginTime = performance.now();\n this.prevTime = performance.now();\n this.frames = 0;\n this.viewer.addEventListener(\"initialize\", this.initialize);\n this.viewer.addEventListener(\"clear\", this.clear);\n this.viewer.addEventListener(\"optionschange\", this.syncOptions);\n this.viewer.addEventListener(\"geometrystart\", this.geometryStart);\n this.viewer.addEventListener(\"databasechunk\", this.databaseChunk);\n this.viewer.addEventListener(\"geometryend\", this.geometryEnd);\n this.viewer.addEventListener(\"resize\", this.resize);\n this.viewer.addEventListener(\"render\", this.render);\n this.viewer.addEventListener(\"animate\", this.animate);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"initialize\", this.initialize);\n this.viewer.removeEventListener(\"clear\", this.clear);\n this.viewer.removeEventListener(\"optionschange\", this.syncOptions);\n this.viewer.removeEventListener(\"geometrystart\", this.geometryStart);\n this.viewer.removeEventListener(\"databasechunk\", this.databaseChunk);\n this.viewer.removeEventListener(\"geometryend\", this.geometryEnd);\n this.viewer.removeEventListener(\"resize\", this.resize);\n this.viewer.removeEventListener(\"render\", this.render);\n this.viewer.addEventListener(\"animate\", this.animate);\n }\n\n initialize = () => {\n try {\n const gl = this.viewer.renderer.getContext();\n const dbgInfo = gl.getExtension(\"WEBGL_debug_renderer_info\");\n if (dbgInfo) {\n this.viewer.info.system.webglRenderer = gl.getParameter(dbgInfo.UNMASKED_RENDERER_WEBGL);\n this.viewer.info.system.webglVendor = gl.getParameter(dbgInfo.UNMASKED_VENDOR_WEBGL);\n }\n } catch (error) {\n console.error(\"Error reading WebGL info.\", error);\n }\n\n console.log(\"THREE.WebGLRenderer:\", REVISION);\n console.log(\"WebGL Renderer:\", this.viewer.info.system.webglRenderer);\n console.log(\"WebGL Vendor:\", this.viewer.info.system.webglVendor);\n\n this.resize();\n\n this.syncOptions({ data: this.viewer.options });\n };\n\n clear = () => {\n this.viewer.info.performance.timeToFirstRender = 0;\n this.viewer.info.performance.loadTime = 0;\n\n this.viewer.info.scene.objects = 0;\n this.viewer.info.scene.triangles = 0;\n this.viewer.info.scene.points = 0;\n this.viewer.info.scene.lines = 0;\n this.viewer.info.scene.edges = 0;\n\n this.viewer.info.optimizedScene.objects = 0;\n this.viewer.info.optimizedScene.triangles = 0;\n this.viewer.info.optimizedScene.points = 0;\n this.viewer.info.optimizedScene.lines = 0;\n this.viewer.info.optimizedScene.edges = 0;\n\n this.viewer.info.memory.geometries = 0;\n this.viewer.info.memory.geometryBytes = 0;\n this.viewer.info.memory.optimizedGeometryBytes = 0;\n this.viewer.info.memory.textures = 0;\n this.viewer.info.memory.textureBytes = 0;\n this.viewer.info.memory.materials = 0;\n this.viewer.info.memory.totalEstimatedGpuBytes = 0;\n this.viewer.info.memory.usedJSHeapSize = 0;\n };\n\n syncOptions = ({ data: options }) => {\n if (options.antialiasing === false) this.viewer.info.render.antialiasing = \"\";\n else if (options.antialiasing === true) this.viewer.info.render.antialiasing = \"mxaa\";\n else this.viewer.info.render.antialiasing = options.antialiasing;\n };\n\n geometryStart = () => {\n this.startTime = performance.now();\n };\n\n databaseChunk = () => {\n this.viewer.info.performance.timeToFirstRender += performance.now() - this.startTime;\n\n console.log(\"Time to first render:\", this.viewer.info.performance.timeToFirstRender, \"ms\");\n };\n\n geometryEnd = () => {\n const model = this.viewer.models[this.viewer.models.length - 1];\n const info = model.getInfo();\n\n this.viewer.info.scene.objects += info.scene.objects;\n this.viewer.info.scene.triangles += info.scene.triangles;\n this.viewer.info.scene.points += info.scene.points;\n this.viewer.info.scene.lines += info.scene.lines;\n this.viewer.info.scene.edges += info.scene.edges;\n\n this.viewer.info.optimizedScene.objects += info.optimizedScene.objects;\n this.viewer.info.optimizedScene.triangles += info.optimizedScene.triangles;\n this.viewer.info.optimizedScene.points += info.optimizedScene.points;\n this.viewer.info.optimizedScene.lines += info.optimizedScene.lines;\n this.viewer.info.optimizedScene.edges += info.optimizedScene.edges;\n\n this.viewer.info.memory.geometries += info.memory.geometries;\n this.viewer.info.memory.geometryBytes += info.memory.geometryBytes;\n this.viewer.info.memory.optimizedGeometryBytes += info.memory.optimizedGeometryBytes;\n this.viewer.info.memory.textures += info.memory.textures;\n this.viewer.info.memory.textureBytes += info.memory.textureBytes;\n this.viewer.info.memory.materials += info.memory.materials;\n this.viewer.info.memory.totalEstimatedGpuBytes += info.memory.totalEstimatedGpuBytes;\n\n const memory = performance[\"memory\"];\n if (memory) this.viewer.info.memory.usedJSHeapSize = memory.usedJSHeapSize;\n\n this.viewer.info.performance.loadTime += performance.now() - this.startTime;\n\n console.log(\"Number of objects:\", info.scene.objects);\n console.log(\"Number of objects after optimization:\", info.optimizedScene.objects);\n console.log(\"Geometry size:\", info.memory.geometryBytes / (1024 * 1024), \"MB\");\n console.log(\"Optimized geometry size:\", info.memory.optimizedGeometryBytes / (1024 * 1024), \"MB\");\n console.log(\"Estimated GPU used:\", info.memory.totalEstimatedGpuBytes / (1024 * 1024), \"MB\");\n\n console.log(\"File load time:\", this.viewer.info.performance.loadTime, \"ms\");\n };\n\n resize = () => {\n const { width, height } = this.viewer.canvas;\n this.viewer.info.render.viewport.width = width;\n this.viewer.info.render.viewport.height = height;\n };\n\n render = () => {\n this.viewer.info.render.drawCalls = this.viewer.renderer.info.render.calls;\n this.viewer.info.render.triangles = this.viewer.renderer.info.render.triangles;\n this.viewer.info.render.points = this.viewer.renderer.info.render.points;\n this.viewer.info.render.lines = this.viewer.renderer.info.render.lines;\n };\n\n animate = () => {\n const time = performance.now();\n\n this.viewer.info.performance.frameTime = Math.round(time - this.beginTime);\n this.beginTime = time;\n\n this.frames++;\n if (time - this.prevTime >= 1000) {\n this.viewer.info.performance.fps = Math.round((this.frames * 1000) / (time - this.prevTime));\n this.prevTime = time;\n this.frames = 0;\n }\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class CanvasResizeComponent implements IComponent {\n protected viewer: Viewer;\n protected resizeObserver: ResizeObserver;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.resizeObserver = new ResizeObserver(this.resizeViewer);\n this.resizeObserver.observe(viewer.canvas.parentElement);\n }\n\n dispose() {\n this.resizeObserver.disconnect();\n }\n\n resizeViewer = (entries: ResizeObserverEntry[]) => {\n const { width, height } = entries[0].contentRect;\n\n if (!width || !height) return; // <- invisible viewer, or viewer with parent removed\n\n this.viewer.setSize(width, height);\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class CanvasRemoveComponent implements IComponent {\n protected viewer: Viewer;\n protected mutationObserver: MutationObserver;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.mutationObserver = new MutationObserver(this.cleanupViewer);\n this.mutationObserver.observe(document, { childList: true, subtree: true });\n }\n\n dispose() {\n this.mutationObserver.disconnect();\n this.mutationObserver = undefined;\n }\n\n cleanupViewer = (mutations: MutationRecord[]) => {\n for (const mutation of mutations) {\n if (mutation.type === \"childList\" && mutation.removedNodes.length > 0) {\n for (const node of mutation.removedNodes) {\n if (node === this.viewer.canvas || node.contains(this.viewer.canvas)) {\n this.viewer.emitEvent({ type: \"canvasremoved\" });\n this.viewer.dispose();\n return;\n }\n }\n }\n }\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class RenderLoopComponent implements IComponent {\n protected viewer: Viewer;\n protected requestId: number;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.requestId = requestAnimationFrame(this.animate);\n }\n\n dispose() {\n cancelAnimationFrame(this.requestId);\n }\n\n animate = (time: number) => {\n this.requestId = requestAnimationFrame(this.animate);\n\n this.viewer.render(time);\n this.viewer.emitEvent({ type: \"animate\", time });\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { LineSegmentsGeometry } from \"three/examples/jsm/lines/LineSegmentsGeometry.js\";\n\nexport class HighlighterUtils {\n static isBreak(positions: Float32Array, i: number) {\n return (\n isNaN(positions[i]) ||\n isNaN(positions[i + 1]) ||\n isNaN(positions[i + 2]) ||\n positions[i] === Infinity ||\n positions[i] === -Infinity ||\n positions[i + 1] === Infinity ||\n positions[i + 1] === -Infinity ||\n positions[i + 2] === Infinity ||\n positions[i + 2] === -Infinity\n );\n }\n\n static fromIndexedLine(positions: Float32Array, indices: number[]) {\n const lineGeometry = new LineSegmentsGeometry();\n const segments = [];\n\n for (let i = 0; i < indices.length; i += 2) {\n const idx1 = indices[i] * 3;\n const idx2 = indices[i + 1] * 3;\n\n if (indices[i] === -1 || indices[i + 1] === -1) {\n continue;\n }\n\n segments.push(\n positions[idx1],\n positions[idx1 + 1],\n positions[idx1 + 2],\n positions[idx2],\n positions[idx2 + 1],\n positions[idx2 + 2]\n );\n }\n\n if (segments.length === 0) return null;\n\n lineGeometry.setPositions(segments);\n return lineGeometry;\n }\n\n static fromNonIndexedLine(positions: Float32Array, isLineSegments: boolean) {\n const lineGeometry = new LineSegmentsGeometry();\n const segments = [];\n\n if (isLineSegments) {\n for (let i = 0; i < positions.length; i += 6) {\n if (i + 5 >= positions.length) break;\n\n if (HighlighterUtils.isBreak(positions, i) || HighlighterUtils.isBreak(positions, i + 3)) continue;\n\n segments.push(\n positions[i],\n positions[i + 1],\n positions[i + 2],\n positions[i + 3],\n positions[i + 4],\n positions[i + 5]\n );\n }\n } else {\n let lastValidIndex = -1;\n\n for (let i = 0; i < positions.length; i += 3) {\n if (HighlighterUtils.isBreak(positions, i)) {\n lastValidIndex = -1;\n continue;\n }\n\n if (lastValidIndex !== -1) {\n segments.push(\n positions[lastValidIndex],\n positions[lastValidIndex + 1],\n positions[lastValidIndex + 2],\n positions[i],\n positions[i + 1],\n positions[i + 2]\n );\n }\n lastValidIndex = i;\n }\n }\n\n if (segments.length === 0) return null;\n\n lineGeometry.setPositions(segments);\n return lineGeometry;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n EdgesGeometry,\n LineBasicMaterial,\n MeshPhongMaterial,\n Object3D,\n RGBAFormat,\n UnsignedByteType,\n Vector2,\n WebGLRenderTarget,\n} from \"three\";\nimport { LineSegmentsGeometry } from \"three/examples/jsm/lines/LineSegmentsGeometry.js\";\nimport { Wireframe } from \"three/examples/jsm/lines/Wireframe.js\";\nimport { LineMaterial } from \"three/examples/jsm/lines/LineMaterial.js\";\n\nimport { IComponent, Options, ResizeEvent } from \"@inweb/viewer-core\";\nimport { Viewer } from \"../Viewer\";\nimport { HighlighterUtils } from \"./HighlighterUtils\";\n\nexport class HighlighterComponent implements IComponent {\n protected viewer: Viewer;\n public renderTarget: WebGLRenderTarget;\n public facesMaterial: MeshPhongMaterial;\n public edgesMaterial: LineMaterial;\n public lineMaterial: LineBasicMaterial;\n public lineGlowMaterial: LineMaterial;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n\n const gl2 = viewer.canvas.getContext(\"webgl2\");\n if (gl2) {\n const size = viewer.renderer.getSize(new Vector2());\n this.renderTarget = new WebGLRenderTarget(size.x, size.y, {\n format: RGBAFormat,\n stencilBuffer: false,\n samples: 4,\n type: UnsignedByteType,\n });\n }\n\n this.viewer.addEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.addEventListener(\"optionschange\", this.syncOptions);\n this.viewer.addEventListener(\"resize\", this.viewerResize);\n\n this.geometryEnd();\n }\n\n dispose() {\n this.viewer.removeEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.removeEventListener(\"optionschange\", this.syncOptions);\n this.viewer.removeEventListener(\"resize\", this.viewerResize);\n }\n\n highlight(objects: Object3D | Object3D[]) {\n const { edgesVisibility } = this.viewer.options;\n\n if (!Array.isArray(objects)) objects = [objects];\n if (objects.length === 0) return;\n\n objects\n .filter((object) => !object.userData.isEdge) // <- filtering server generated edges\n .forEach((object: any) => {\n if (object.userData.isHighlighted) return;\n\n if (object.isLine || object.isLineSegments) {\n const positions = object.geometry.attributes.position.array;\n const indices = object.geometry.index ? object.geometry.index.array : null;\n const lineGeometry = indices\n ? HighlighterUtils.fromIndexedLine(positions, indices)\n : HighlighterUtils.fromNonIndexedLine(positions, object.isLineSegments);\n\n const wireframe = new Wireframe(lineGeometry, this.lineGlowMaterial);\n wireframe.visible = edgesVisibility;\n wireframe.userData.isHighlightWireframe = true;\n\n object.add(wireframe);\n object.userData.highlightWireframe = wireframe;\n object.userData.originalMaterial = object.material;\n object.material = this.lineMaterial;\n object.userData.isHighlighted = true;\n } else if (object.isMesh) {\n const edgesGeometry = new EdgesGeometry(object.geometry, 89);\n const lineGeometry = new LineSegmentsGeometry().fromEdgesGeometry(edgesGeometry);\n\n const wireframe = new Wireframe(lineGeometry, this.edgesMaterial);\n wireframe.visible = edgesVisibility;\n wireframe.userData.isHighlightWireframe = true;\n\n object.add(wireframe);\n object.userData.highlightWireframe = wireframe;\n object.userData.originalMaterial = object.material;\n object.material = this.facesMaterial;\n object.userData.isHighlighted = true;\n }\n });\n }\n\n unhighlight(objects: Object3D | Object3D[]) {\n if (!Array.isArray(objects)) objects = [objects];\n if (objects.length === 0) return;\n\n objects.forEach((object: any) => {\n if (!object.userData.isHighlighted) return;\n\n object.material = object.userData.originalMaterial;\n object.userData.highlightWireframe.removeFromParent();\n\n delete object.userData.isHighlighted;\n delete object.userData.originalMaterial;\n delete object.userData.highlightWireframe;\n });\n }\n\n geometryEnd = () => {\n this.facesMaterial = new MeshPhongMaterial({\n transparent: true,\n specular: 0x222222,\n shininess: 10,\n reflectivity: 0.05,\n polygonOffset: true,\n polygonOffsetFactor: 1,\n polygonOffsetUnits: 1,\n clippingPlanes: this.viewer.clippingPlanes,\n });\n\n this.edgesMaterial = new LineMaterial({\n linewidth: 1.5,\n resolution: new Vector2(window.innerWidth, window.innerHeight),\n clippingPlanes: this.viewer.clippingPlanes,\n });\n\n this.lineMaterial = new LineBasicMaterial({\n transparent: true,\n depthTest: true,\n depthWrite: true,\n clippingPlanes: this.viewer.clippingPlanes,\n });\n\n this.lineGlowMaterial = new LineMaterial({\n linewidth: 1.5,\n transparent: true,\n opacity: 0.8,\n resolution: new Vector2(window.innerWidth, window.innerHeight),\n clippingPlanes: this.viewer.clippingPlanes,\n });\n\n this.syncHighlightColors();\n };\n\n syncOptions = () => {\n this.syncHighlightColors();\n this.viewer.update();\n };\n\n syncHighlightColors() {\n const options = this.viewer.options.enableCustomHighlight ? this.viewer.options : Options.defaults();\n\n const { facesColor, facesTransparancy, facesOverlap } = options;\n const { edgesColor, edgesVisibility, edgesOverlap } = options;\n\n this.facesMaterial.color.setRGB(facesColor.r / 255, facesColor.g / 255, facesColor.b / 255);\n this.facesMaterial.opacity = (255 - facesTransparancy) / 255;\n this.facesMaterial.depthTest = !facesOverlap;\n this.facesMaterial.depthWrite = !facesOverlap;\n\n this.edgesMaterial.color.setRGB(edgesColor.r / 255, edgesColor.g / 255, edgesColor.b / 255);\n this.edgesMaterial.depthTest = !edgesOverlap;\n this.edgesMaterial.depthWrite = !edgesOverlap;\n\n this.lineMaterial.color.setRGB(facesColor.r / 255, facesColor.g / 255, facesColor.b / 255);\n\n this.lineGlowMaterial.color.setRGB(edgesColor.r / 255, edgesColor.g / 255, edgesColor.b / 255);\n this.lineGlowMaterial.depthTest = !edgesOverlap;\n this.lineGlowMaterial.depthWrite = !edgesOverlap;\n\n this.viewer.selected.forEach((selected) => {\n const wireframe = selected.userData.highlightWireframe;\n if (wireframe) wireframe.visible = edgesVisibility;\n });\n }\n\n viewerResize = (event: ResizeEvent) => {\n this.renderTarget?.setSize(event.width, event.height);\n this.edgesMaterial?.resolution.set(event.width, event.height);\n this.lineGlowMaterial?.resolution.set(event.width, event.height);\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Object3D, Vector2, Vector3 } from \"three\";\n\nimport type { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\nimport type { IModelImpl } from \"../models/IModelImpl\";\nimport type { HighlighterComponent } from \"./HighlighterComponent\";\nimport { Snapper } from \"../measurement/Snapper\";\n\nexport class SelectionComponent implements IComponent {\n protected viewer: Viewer;\n protected downPosition: Vector2;\n protected highlighter: HighlighterComponent;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.downPosition = new Vector2();\n\n this.viewer.addEventListener(\"pointerdown\", this.onPointerDown);\n this.viewer.addEventListener(\"pointerup\", this.onPointerUp);\n this.viewer.addEventListener(\"dblclick\", this.onDoubleClick);\n this.viewer.addEventListener(\"initialize\", this.initHighlighter);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"pointerdown\", this.onPointerDown);\n this.viewer.removeEventListener(\"pointerup\", this.onPointerUp);\n this.viewer.removeEventListener(\"dblclick\", this.onDoubleClick);\n this.viewer.removeEventListener(\"initialize\", this.initHighlighter);\n }\n\n onPointerDown = (event: PointerEvent) => {\n if (!event.isPrimary || event.button !== 0) return;\n\n this.getMousePosition(event, this.downPosition);\n };\n\n onPointerUp = (event: PointerEvent) => {\n if (!event.isPrimary || event.button !== 0) return;\n\n const upPosition = this.getMousePosition(event, new Vector2());\n if (upPosition.distanceTo(this.downPosition) !== 0) return;\n\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n\n const snapper = new Snapper(this.viewer.camera, this.viewer.clippingPlanes, this.viewer.canvas);\n snapper.threshold = extentsSize / 10000;\n\n let intersections = [];\n this.viewer.models.forEach((model) => {\n const objects = model.getVisibleObjects();\n const intersects = snapper.getPointerIntersects(upPosition, objects);\n if (intersects.length > 0) intersections.push({ ...intersects[0], model });\n });\n intersections = intersections.sort((a, b) => a.distance - b.distance);\n\n if (!event.shiftKey) this.clearSelection();\n\n if (intersections.length > 0) {\n const model = intersections[0].model;\n const handles = model.getHandlesByObjects(intersections[0].object);\n const objects = model.getObjectsByHandles(handles);\n\n if (!event.shiftKey) this.select(objects, model);\n else this.toggleSelection(objects, model);\n }\n\n this.viewer.update();\n\n this.viewer.emitEvent({ type: \"select\", data: undefined, handles: this.viewer.getSelected() });\n this.viewer.emitEvent({ type: \"select2\", data: undefined, handles: this.viewer.getSelected2() });\n };\n\n onDoubleClick = (event: MouseEvent) => {\n if (event.button !== 0) return;\n\n this.viewer.executeCommand(\"zoomToSelected\");\n };\n\n getMousePosition(event: MouseEvent, target: Vector2): Vector2 {\n return target.set(event.clientX, event.clientY);\n }\n\n select(objects: Object3D | Object3D[], model?: IModelImpl) {\n if (!model) {\n this.viewer.models.forEach((model) => this.select(objects, model));\n return;\n }\n\n if (!Array.isArray(objects)) objects = [objects];\n if (objects.length === 0) return;\n\n model.highlightObjects(objects);\n this.highlighter.highlight(objects);\n\n objects.forEach((object) => this.viewer.selected.push(object));\n objects.forEach((object) => (object.userData.isSelected = true));\n }\n\n deselect(objects: Object3D | Object3D[], model?: IModelImpl) {\n if (!model) {\n this.viewer.models.forEach((model) => this.select(objects, model));\n return;\n }\n\n if (!Array.isArray(objects)) objects = [objects];\n if (objects.length === 0) return;\n\n model.unhighlightObjects(objects);\n this.highlighter.unhighlight(objects);\n\n this.viewer.selected = this.viewer.selected.filter((x) => !objects.includes(x));\n objects.forEach((object) => (object.userData.isSelected = false));\n }\n\n toggleSelection(objects: Object3D | Object3D[], model?: IModelImpl) {\n if (!Array.isArray(objects)) objects = [objects];\n if (objects.length === 0) return;\n\n if (objects[0].userData.isSelected) this.deselect(objects, model);\n else this.select(objects, model);\n }\n\n clearSelection() {\n if (this.viewer.selected.length === 0) return;\n\n this.viewer.models.forEach((model) => model.unhighlightObjects(this.viewer.selected));\n this.highlighter.unhighlight(this.viewer.selected);\n\n this.viewer.selected.forEach((object) => (object.userData.isSelected = false));\n this.viewer.selected.length = 0;\n }\n\n initHighlighter = () => {\n this.highlighter = this.viewer.getComponent(\"HighlighterComponent\") as HighlighterComponent;\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class ClippingPlaneComponent implements IComponent {\n protected viewer: Viewer;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n\n this.viewer.addEventListener(\"geometryend\", this.applyClippingPlanes);\n this.viewer.addEventListener(\"changecuttingplanes\", this.applyClippingPlanes);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"geometryend\", this.applyClippingPlanes);\n this.viewer.removeEventListener(\"changecuttingplanes\", this.applyClippingPlanes);\n }\n\n applyClippingPlanes = () => {\n this.viewer.models.forEach((model) => {\n model.scene.traverse((object: any) => {\n if (object.material) {\n const materials = Array.isArray(object.material) ? object.material : [object.material];\n materials.forEach((material) => (material.clippingPlanes = this.viewer.clippingPlanes));\n }\n });\n });\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n Box3,\n BufferGeometry,\n Color,\n DoubleSide,\n Float32BufferAttribute,\n Mesh,\n Object3D,\n Points,\n PointsMaterial,\n ShaderMaterial,\n ShapeUtils,\n Sphere,\n Vector2,\n Vector3,\n} from \"three\";\nimport { LineSegmentsGeometry } from \"three/examples/jsm/lines/LineSegmentsGeometry.js\";\nimport { LineMaterial } from \"three/examples/jsm/lines/LineMaterial.js\";\nimport { LineSegments2 } from \"three/examples/jsm/lines/LineSegments2.js\";\n\n// ============================================================================\n// MATH UTILITY CLASS\n// ============================================================================\n\n/**\n * Spatial Hash Grid class. Used for merging vertices that are practically at the same coordinate (within\n * the given tolerance). This is critical for eliminating gaps caused by floating-point precision\n * errors.\n */\nclass PointHashGrid {\n constructor(tolerance = 1e-5) {\n // Tolerance dictates how close two points must be to be considered identical\n this.tolerance = tolerance;\n\n // Array holding the actual Three.Vector3 objects\n this.points = [];\n\n // Map storing cell string keys to an array of point indices\n this.grid = new Map();\n }\n\n // Creates a unique string key based on integer cell coordinates\n _hash(hx, hy, hz) {\n return `${hx},${hy},${hz}`;\n }\n\n // Adds a vector to the grid, or returns the index of an existing identical vector\n add(v) {\n // Divide coordinates by tolerance and round to get integer grid coordinates\n const hx = Math.round(v.x / this.tolerance);\n const hy = Math.round(v.y / this.tolerance);\n const hz = Math.round(v.z / this.tolerance);\n\n // Search the current cell and all 26 adjacent cells to ensure\n // we catch points that fall exactly on cell boundaries\n for (let i = -1; i <= 1; i++) {\n for (let j = -1; j <= 1; j++) {\n for (let k = -1; k <= 1; k++) {\n // Calculate the hash key for the neighbor cell\n const hash = this._hash(hx + i, hy + j, hz + k);\n\n // Retrieve the cell array from the grid\n const cell = this.grid.get(hash);\n\n if (cell) {\n // Iterate over point IDs present in this cell\n for (const id of cell) {\n // If distance is within tolerance, it's a duplicate. Return the existing ID.\n if (this.points[id].distanceTo(v) <= this.tolerance) return id;\n }\n }\n }\n }\n }\n\n // If point does not exist, assign a new index based on array length\n const id = this.points.length;\n\n // Clone the vector to prevent reference mutations and push to array\n this.points.push(v.clone());\n\n // Get the hash for the central cell\n const centerHash = this._hash(hx, hy, hz);\n\n // Initialize an empty array for the cell if it doesn't exist\n if (!this.grid.has(centerHash)) this.grid.set(centerHash, []);\n\n // Push the new point ID into the respective cell\n this.grid.get(centerHash).push(id);\n\n return id;\n }\n}\n\n// ---------------------------------------------------------------------\n// Sections Helper Class\n// Manages all meshes related to clipping planes: Fill (Caps), Outlines, and Debug Points\n// ---------------------------------------------------------------------\nclass SectionsHelper extends Object3D {\n constructor() {\n super();\n\n this.type = \"SectionsHelper\";\n\n // Configuration flags for visual settings\n this.flags = {\n fillEnabled: true,\n fillColor: \"#fffde7\",\n hatchEnabled: true,\n hatchColor: \"#000000\",\n hatchScale: 8.0,\n outlineEnabled: true,\n outlineColor: \"#000000\",\n outlineWidth: 2,\n boundaryOnly: true,\n showDebugSeams: false,\n showDebugPoints: false,\n showDebugSegments: false,\n showDebugGaps: false,\n showDebugInfo: false,\n useObjFillColor: false,\n useObjOutlineColor: false,\n };\n\n // Arrays storing corresponding meshes for each clipping plane\n this._caps = [];\n this._outlines = [];\n this._debugPoints = [];\n this._debugSegments = [];\n this._debugGaps = [];\n\n // Pre-allocated vectors to prevent excessive object instantiation during render loops\n this._vA = new Vector3();\n this._vB = new Vector3();\n this._vC = new Vector3();\n\n // Pre-allocated bounding box object\n this._worldBox = new Box3();\n }\n\n // Cleanup method to properly dispose of geometries and materials and free GPU memory\n dispose() {\n // Helper arrow function to dispose an individual item\n const disposeMesh = (item) => {\n if (item.geometry) item.geometry.dispose();\n if (item.material) item.material.dispose();\n this.remove(item);\n };\n\n // Execute cleanup for all mesh arrays\n this._caps.forEach(disposeMesh);\n this._outlines.forEach(disposeMesh);\n this._debugPoints.forEach(disposeMesh);\n this._debugSegments.forEach(disposeMesh);\n this._debugGaps.forEach(disposeMesh);\n\n // Clear the internal array references\n this._caps.length = 0;\n this._outlines.length = 0;\n this._debugPoints.length = 0;\n this._debugSegments.length = 0;\n this._debugGaps.length = 0;\n }\n\n // Update the resolution uniform for fat lines when viewport changes\n setSize(width, height) {\n this._outlines.forEach((o) => {\n if (o.material.resolution) o.material.resolution.set(width, height);\n });\n\n this._debugSegments.forEach((s) => {\n if (s.material.resolution) s.material.resolution.set(width, height);\n });\n }\n\n // Creates necessary helper meshes based on the amount of active clipping planes\n _ensureHelpersCount(count) {\n // Custom vertex shader for caps rendering\n // Extracts screen-space position into world-space format to allow steady hatch drawing\n const hatchVertexShader = `\n #include <common>\n #include <logdepthbuf_pars_vertex>\n #include <clipping_planes_pars_vertex>\n \n attribute float aHatchDir; \n attribute vec3 aFillColor;\n \n varying vec3 vWP; \n varying float vHatchDir; \n varying vec3 vFillColor;\n \n void main() { \n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n #include <clipping_planes_vertex>\n \n vWP = (modelMatrix * vec4(position, 1.0)).xyz;\n vHatchDir = aHatchDir; \n vFillColor = aFillColor;\n \n gl_Position = projectionMatrix * mvPosition; \n #include <logdepthbuf_vertex>\n }\n `;\n\n // Custom fragment shader for caps rendering\n // Uses modulo arithmetic to draw alternating hatch lines independent of zoom level\n const hatchFragmentShader = `\n #include <common>\n #include <logdepthbuf_pars_fragment>\n #include <clipping_planes_pars_fragment>\n \n uniform vec3 lineColor; \n uniform float uHatchScale; \n uniform float uHatchEnabled;\n \n varying vec3 vWP; \n varying float vHatchDir; \n varying vec3 vFillColor;\n \n void main() { \n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n \n float v1 = mod(gl_FragCoord.x + gl_FragCoord.y, uHatchScale);\n float v2 = mod(gl_FragCoord.x - gl_FragCoord.y, uHatchScale);\n float v = mix(v1, v2, vHatchDir);\n \n float hatchMask = step(v, 1.5) * uHatchEnabled;\n gl_FragColor = vec4(mix(vFillColor, lineColor, hatchMask), 1.0); \n }\n `;\n\n // Generate new meshes if the active plane count exceeds our pool\n while (this._caps.length < count) {\n // Cap material defining the cross-section surface\n const capMat = new ShaderMaterial({\n uniforms: {\n lineColor: { value: new Color() },\n uHatchScale: { value: 10.0 },\n uHatchEnabled: { value: 1.0 },\n },\n vertexShader: hatchVertexShader,\n fragmentShader: hatchFragmentShader,\n side: DoubleSide,\n clipping: true,\n depthTest: true,\n // STABLE LOGIC: Disabling depth write forces the fill to render,\n // but not push to Z-buffer, allowing Outline meshes (rendered later) to naturally\n // sit perfectly on top without struggling with Z-fighting.\n depthWrite: false,\n });\n\n const capMesh = new Mesh(new BufferGeometry(), capMat);\n // Render fills early\n capMesh.renderOrder = 5;\n this.add(capMesh);\n this._caps.push(capMesh);\n\n // Material for the thick intersection contour\n const lineMat = new LineMaterial({\n color: 0xffffff,\n linewidth: 2,\n resolution: new Vector2(window.innerWidth, window.innerHeight),\n depthTest: true,\n clipping: true,\n vertexColors: true,\n });\n\n const lineObj = new LineSegments2(new LineSegmentsGeometry(), lineMat);\n // Render outlines late so they sit atop the non-depth-writing fill mesh\n lineObj.renderOrder = 100;\n this.add(lineObj);\n this._outlines.push(lineObj);\n\n // Material for rendering discrete intersection points (Debugging)\n const ptsMat = new PointsMaterial({\n color: 0x00aaff,\n size: 6,\n sizeAttenuation: false,\n depthTest: false,\n transparent: true,\n depthWrite: false,\n });\n\n const pointsObj = new Points(new BufferGeometry(), ptsMat);\n pointsObj.renderOrder = 200;\n this.add(pointsObj);\n this._debugPoints.push(pointsObj);\n\n // Material for rendering discrete unconnected intersection segments (Debugging)\n const debugSegMat = new LineMaterial({\n color: 0x00ff00,\n linewidth: 4,\n resolution: new Vector2(window.innerWidth, window.innerHeight),\n depthTest: false,\n transparent: true,\n depthWrite: false,\n clipping: true,\n });\n\n const debugSegObj = new LineSegments2(new LineSegmentsGeometry(), debugSegMat);\n debugSegObj.renderOrder = 150;\n this.add(debugSegObj);\n this._debugSegments.push(debugSegObj);\n\n // Material to display failure points where loops didn't close (Debugging)\n const gapPtsMat = new PointsMaterial({\n size: 6,\n sizeAttenuation: false,\n depthTest: false,\n transparent: true,\n depthWrite: false,\n vertexColors: true,\n });\n\n const gapsObj = new Points(new BufferGeometry(), gapPtsMat);\n gapsObj.renderOrder = 250;\n this.add(gapsObj);\n this._debugGaps.push(gapsObj);\n }\n\n // If planes were disabled, hide their associated meshes from the scene\n for (let i = count; i < this._caps.length; i++) {\n this._caps[i].visible = false;\n this._outlines[i].visible = false;\n this._debugPoints[i].visible = false;\n this._debugSegments[i].visible = false;\n this._debugGaps[i].visible = false;\n }\n }\n\n // Main update loop processing geometry intersections\n update(objects, extents, planes) {\n const t0 = performance.now();\n\n // Initialize the correct amount of helper meshes\n this._ensureHelpersCount(planes.length);\n\n // Exit early if no planes are active\n if (planes.length === 0) return;\n\n // Determine mathematical bounding radius\n const sphere = extents.getBoundingSphere(new Sphere());\n const globalRadius = Math.max(sphere.radius, 1e-3);\n\n // Bias prevents geometry cut surfaces and generated caps from competing mathematically\n const clippingBias = globalRadius * 1e-4;\n\n // Prepare a slightly shifted copy of planes specifically for clipping the caps\n const biasedPlanes = planes.map((p) => {\n const bp = p.clone();\n bp.constant += clippingBias;\n return bp;\n });\n\n // Gather all relevant mesh objects from the scene hierarchy\n const targetMeshes = [];\n objects.forEach((obj) => {\n if (obj.isMesh && obj.material) {\n const mats = Array.isArray(obj.material) ? obj.material : [obj.material];\n if (mats.some((m) => m.clippingPlanes)) targetMeshes.push(obj);\n }\n });\n\n // Iterate over every active clipping plane\n planes.forEach((plane, pIdx) => {\n // Fetch corresponding helper objects\n const capMesh = this._caps[pIdx];\n const outlineMesh = this._outlines[pIdx];\n const debugPtsMesh = this._debugPoints[pIdx];\n const debugSegsMesh = this._debugSegments[pIdx];\n const debugGapsMesh = this._debugGaps[pIdx];\n\n // Cap shader writes the values straight into the framebuffer, so we need\n // to bypass Three.js's sRGB→linear color management and push sRGB values\n // to the GPU because the Viewer uses LinearSRGBColorSpace.\n const hatchColor = new Color(this.flags.hatchColor);\n hatchColor.convertLinearToSRGB();\n\n // Set uniforms\n capMesh.material.uniforms.lineColor.value.set(hatchColor);\n capMesh.material.uniforms.uHatchScale.value = this.flags.hatchScale;\n capMesh.material.uniforms.uHatchEnabled.value = this.flags.hatchEnabled ? 1.0 : 0.0;\n outlineMesh.material.linewidth = this.flags.outlineWidth;\n\n // Exclude current plane from array to avoid self-clipping\n const otherBiasedPlanes = biasedPlanes.filter((_, i) => i !== pIdx);\n\n capMesh.material.clippingPlanes = otherBiasedPlanes;\n outlineMesh.material.clippingPlanes = otherBiasedPlanes;\n debugSegsMesh.material.clippingPlanes = otherBiasedPlanes;\n\n // Establish 2D Local Space on the plane surface using Cross Products\n const n = plane.normal;\n const planeOrigin = n.clone().multiplyScalar(-plane.constant);\n\n const up = new Vector3(0, 1, 0);\n\n // Fallback 'up' vector if plane is completely horizontal\n if (Math.abs(n.dot(up)) > 0.999) up.set(1, 0, 0);\n\n // Create U and V axis vectors laying perfectly flat on the clipping plane\n const uAxis = new Vector3().crossVectors(up, n).normalize();\n const vAxis = new Vector3().crossVectors(n, uAxis).normalize();\n\n // Initialize arrays collecting vertex data across all intercepted meshes\n const positions = [];\n const indices = [];\n const hatchDirs = [];\n const fillColors = [];\n const combinedOutlinePoints = [];\n const combinedOutlineColors = [];\n const rawPts = [];\n const rawSegs = [];\n const rawGaps = [];\n const rawGapColors = [];\n\n // Scan every object in the model to see if it intercepts this plane\n targetMeshes.forEach((mesh, meshIndex) => {\n // Compute bounding structures if missing\n if (!mesh.geometry.boundingBox) mesh.geometry.computeBoundingBox();\n if (!mesh.geometry.boundingSphere) mesh.geometry.computeBoundingSphere();\n\n // Execute broad-phase culling\n this._worldBox.copy(mesh.geometry.boundingBox).applyMatrix4(mesh.matrixWorld);\n if (!plane.intersectsBox(this._worldBox)) return;\n\n // Compute contextual tolerances based on scale\n const localScale = new Vector3().setFromMatrixScale(mesh.matrixWorld);\n const maxScale = Math.max(localScale.x, localScale.y, localScale.z);\n const localRadius = Math.max(mesh.geometry.boundingSphere.radius * maxScale, 1e-3);\n\n // Adaptive tolerances to maintain mathematical precision\n const localHashTolerance = Math.max(localRadius * 1e-4, 1e-6);\n const localEps = Math.max(localRadius * 1e-5, 1e-7);\n\n // Capture object color to optionally apply to the cross section\n const baseColor = new Color(0xffffff);\n const om = mesh.userData.originalMaterial; // <- highlighted object\n const mm = om ?? (Array.isArray(mesh.material) ? mesh.material[0] : mesh.material);\n if (mm.color) baseColor.copy(mm.color);\n\n // Darken base colors slightly for better contrast on section faces\n const objFillColor = baseColor.clone().lerp(new Color(0x000000), 0.2);\n const objOutlineColor = baseColor.clone().lerp(new Color(0x000000), 0.85);\n\n // Create distinct color ID for debug views\n const hue = ((meshIndex * 137.5) % 360) / 360;\n const meshGapColor = new Color().setHSL(hue, 1.0, 0.5);\n\n // Alternate hatching direction index\n const currentHatchDir = meshIndex % 2 === 0 ? 0.0 : 1.0;\n\n // Map desired color based on user UI flag.\n const fillColor = this.flags.useObjFillColor ? objFillColor : new Color(this.flags.fillColor);\n const outlineColor = this.flags.useObjOutlineColor ? objOutlineColor : new Color(this.flags.outlineColor);\n\n // Cap and outline shaders write the values straight into the framebuffer, so we\n // need to bypass Three.js's sRGB→linear color management and push sRGB values\n // to the GPU because the Viewer uses LinearSRGBColorSpace.\n meshGapColor.convertLinearToSRGB();\n fillColor.convertLinearToSRGB();\n outlineColor.convertLinearToSRGB();\n\n // Map tracking frequency of line segments and Spatial grid for points\n const localEdgeStats = new Map();\n const localPointGrid = new PointHashGrid(localHashTolerance);\n\n // Gather intersections\n this._calculateMeshSegmentsUndirected(mesh, plane, localEdgeStats, localPointGrid, localEps);\n\n if (localEdgeStats.size > 0) {\n const boundaryEdges = [];\n\n // Iterate over gathered edges to find outer boundaries\n for (const [key, stat] of localEdgeStats.entries()) {\n // Segments appearing an odd number of times represent the outermost silhouette\n const isBoundary = stat.count % 2 !== 0;\n const ids = key.split(\"-\");\n const id0 = Number(ids[0]);\n const id1 = Number(ids[1]);\n\n // Fetch corresponding vector structures\n const p1 = localPointGrid.points[id0];\n const p2 = localPointGrid.points[id1];\n\n // Determine if this edge should be pushed to the active visual outline\n if (this.flags.showDebugSeams || (this.flags.boundaryOnly ? isBoundary : true)) {\n combinedOutlinePoints.push(p1.x, p1.y, p1.z, p2.x, p2.y, p2.z);\n combinedOutlineColors.push(outlineColor.r, outlineColor.g, outlineColor.b);\n combinedOutlineColors.push(outlineColor.r, outlineColor.g, outlineColor.b);\n }\n\n if (isBoundary) boundaryEdges.push([id0, id1]);\n\n if (this.flags.showDebugSegments) rawSegs.push(p1.x, p1.y, p1.z, p2.x, p2.y, p2.z);\n }\n\n if (this.flags.showDebugPoints) {\n for (const p of localPointGrid.points) rawPts.push(p.x, p.y, p.z);\n }\n\n // If we have enough edges to form a polygon, proceed to loop-building\n if (this.flags.fillEnabled && boundaryEdges.length >= 3) {\n const currentAdj = new Map();\n\n // Populate adjacency map to build node-to-node relationships\n for (const edge of boundaryEdges) {\n const a = edge[0];\n const b = edge[1];\n if (!currentAdj.has(a)) currentAdj.set(a, []);\n if (!currentAdj.has(b)) currentAdj.set(b, []);\n currentAdj.get(a).push(b);\n currentAdj.get(b).push(a);\n }\n\n const degree1 = [];\n\n // Detect vertices that have only 1 neighbor (unclosed chains)\n for (const [node, neighbors] of currentAdj.entries()) {\n if (neighbors.length === 1) degree1.push(node);\n }\n\n const stitchTol = Math.max(localRadius * 0.05, 1e-4);\n\n // Attempt to auto-stitch dead ends by snapping them to the nearest valid edge\n for (let i = 0; i < degree1.length; i++) {\n const n1 = degree1[i];\n if (currentAdj.get(n1).length !== 1) continue;\n\n const p1 = localPointGrid.points[n1];\n let bestEdgeIdx = -1;\n let bestProj = null;\n let bestT = 0;\n let minDist = stitchTol;\n\n const edgeCount = boundaryEdges.length;\n\n for (let eIdx = 0; eIdx < edgeCount; eIdx++) {\n const edge = boundaryEdges[eIdx];\n const eA = edge[0];\n const eB = edge[1];\n if (eA === n1 || eB === n1) continue;\n\n const pA = localPointGrid.points[eA];\n const pB = localPointGrid.points[eB];\n\n const lineVec = new Vector3().subVectors(pB, pA);\n const lineLenSq = lineVec.lengthSq();\n\n let proj;\n let t;\n\n // Line Math: Find the closest projected point on the segment\n if (lineLenSq < 1e-12) {\n proj = pA.clone();\n t = 0;\n } else {\n const ptVec = new Vector3().subVectors(p1, pA);\n t = ptVec.dot(lineVec) / lineLenSq;\n t = Math.max(0, Math.min(1, t));\n proj = new Vector3().copy(pA).addScaledVector(lineVec, t);\n }\n\n const dist = p1.distanceTo(proj);\n\n // Track the absolute best matching candidate\n if (dist < minDist) {\n minDist = dist;\n bestEdgeIdx = eIdx;\n bestProj = proj;\n bestT = t;\n }\n }\n\n // If a candidate was found, merge nodes and inject into adjacency logic\n if (bestEdgeIdx !== -1) {\n const edge = boundaryEdges[bestEdgeIdx];\n const eA = edge[0];\n const eB = edge[1];\n\n if (bestT < 0.001) {\n boundaryEdges.push([n1, eA]);\n currentAdj.get(n1).push(eA);\n currentAdj.get(eA).push(n1);\n p1.copy(localPointGrid.points[eA]);\n } else if (bestT > 0.999) {\n boundaryEdges.push([n1, eB]);\n currentAdj.get(n1).push(eB);\n currentAdj.get(eB).push(n1);\n p1.copy(localPointGrid.points[eB]);\n } else {\n const newNodeId = localPointGrid.add(bestProj);\n\n edge[1] = newNodeId;\n boundaryEdges.push([newNodeId, eB]);\n boundaryEdges.push([n1, newNodeId]);\n\n const neighborsA = currentAdj.get(eA);\n neighborsA[neighborsA.indexOf(eB)] = newNodeId;\n\n const neighborsB = currentAdj.get(eB);\n neighborsB[neighborsB.indexOf(eA)] = newNodeId;\n\n if (!currentAdj.has(newNodeId)) currentAdj.set(newNodeId, []);\n currentAdj.get(newNodeId).push(eA, eB, n1);\n\n currentAdj.get(n1).push(newNodeId);\n p1.copy(bestProj);\n }\n }\n }\n\n // Mark still unresolved vertices for debugging purposes\n if (this.flags.showDebugGaps) {\n for (const [node, neighbors] of currentAdj.entries()) {\n if (neighbors.length !== 2) {\n const p = localPointGrid.points[node];\n rawGaps.push(p.x, p.y, p.z);\n rawGapColors.push(meshGapColor.r, meshGapColor.g, meshGapColor.b);\n }\n }\n }\n\n // Chain edges to discover sequential closed loops\n const loops = this._assembleLoopsUndirected(boundaryEdges, localPointGrid, uAxis, vAxis);\n\n if (loops.length > 0) {\n // Submit valid loops for earcutting (Triangulation) to create solid geometry\n this._triangulateTreeOptimized(\n loops,\n planeOrigin,\n uAxis,\n vAxis,\n positions,\n indices,\n localRadius,\n fillColor,\n currentHatchDir,\n hatchDirs,\n fillColors\n );\n }\n }\n }\n });\n\n // Build and apply Fill BufferGeometry\n if (indices.length > 0) {\n capMesh.geometry.dispose();\n capMesh.geometry = new BufferGeometry();\n capMesh.geometry.setAttribute(\"position\", new Float32BufferAttribute(positions, 3));\n capMesh.geometry.setAttribute(\"aHatchDir\", new Float32BufferAttribute(hatchDirs, 1));\n capMesh.geometry.setAttribute(\"aFillColor\", new Float32BufferAttribute(fillColors, 3));\n capMesh.geometry.setIndex(indices);\n capMesh.geometry.computeVertexNormals();\n capMesh.visible = this.flags.fillEnabled;\n } else {\n capMesh.visible = false;\n }\n\n // Build and apply Outline BufferGeometry\n if (outlineMesh.geometry) outlineMesh.geometry.dispose();\n outlineMesh.geometry = new LineSegmentsGeometry();\n\n if (this.flags.outlineEnabled && combinedOutlinePoints.length >= 6) {\n outlineMesh.geometry.setPositions(new Float32Array(combinedOutlinePoints));\n outlineMesh.geometry.setColors(new Float32Array(combinedOutlineColors));\n outlineMesh.visible = true;\n } else {\n outlineMesh.visible = false;\n }\n\n // Push Debugging visual data if toggled\n if (this.flags.showDebugPoints && rawPts.length > 0) {\n debugPtsMesh.geometry.setAttribute(\"position\", new Float32BufferAttribute(rawPts, 3));\n debugPtsMesh.visible = true;\n } else {\n debugPtsMesh.visible = false;\n }\n\n if (debugSegsMesh.geometry) debugSegsMesh.geometry.dispose();\n debugSegsMesh.geometry = new LineSegmentsGeometry();\n\n if (this.flags.showDebugSegments && rawSegs.length >= 6) {\n debugSegsMesh.geometry.setPositions(new Float32Array(rawSegs));\n debugSegsMesh.visible = true;\n } else {\n debugSegsMesh.visible = false;\n }\n\n if (debugGapsMesh.geometry) debugGapsMesh.geometry.dispose();\n debugGapsMesh.geometry = new BufferGeometry();\n\n if (this.flags.showDebugGaps && rawGaps.length > 0) {\n debugGapsMesh.geometry.setAttribute(\"position\", new Float32BufferAttribute(rawGaps, 3));\n debugGapsMesh.geometry.setAttribute(\"color\", new Float32BufferAttribute(rawGapColors, 3));\n debugGapsMesh.visible = true;\n } else {\n debugGapsMesh.visible = false;\n }\n });\n\n if (this.flags.showDebugInfo) {\n console.log(`[SectionsHelper] v7.00 Updated in ${(performance.now() - t0).toFixed(2)} ms`);\n }\n }\n\n // Walks connected nodes to trace out distinct polygon paths\n _assembleLoopsUndirected(edges, pointGrid, uAxis, vAxis) {\n const adj = new Map();\n\n // Construct basic adjacency array list\n for (const edge of edges) {\n const a = edge[0];\n const b = edge[1];\n\n if (!adj.has(a)) adj.set(a, []);\n if (!adj.has(b)) adj.set(b, []);\n\n adj.get(a).push(b);\n adj.get(b).push(a);\n }\n\n const loops = [];\n\n // Keep resolving paths until node map is depleted\n while (adj.size > 0) {\n let startNode = -1;\n\n for (const key of adj.keys()) {\n if (adj.get(key).length > 0) {\n startNode = key;\n break;\n }\n }\n\n if (startNode === -1) break;\n\n let current = startNode;\n let prev = -1;\n const path = [];\n const pathIndices = new Map();\n\n while (true) {\n path.push(current);\n pathIndices.set(current, path.length - 1);\n\n const neighbors = adj.get(current);\n if (!neighbors || neighbors.length === 0) break;\n\n let nextIdx = 0;\n\n // Sharpest turn heuristic mapping for resolving complex overlapping intersections\n if (neighbors.length > 1 && prev !== -1) {\n const pPrev = pointGrid.points[prev];\n const pCurr = pointGrid.points[current];\n\n const vIn = new Vector3().subVectors(pCurr, pPrev);\n const in2d = new Vector2(vIn.dot(uAxis), vIn.dot(vAxis));\n\n if (in2d.lengthSq() > 1e-10) {\n in2d.normalize();\n let minAngle = Infinity;\n\n for (let i = 0; i < neighbors.length; i++) {\n const pNext = pointGrid.points[neighbors[i]];\n const vOut = new Vector3().subVectors(pNext, pCurr);\n const out2d = new Vector2(vOut.dot(uAxis), vOut.dot(vAxis));\n\n if (out2d.lengthSq() > 1e-10) {\n out2d.normalize();\n const angle = Math.atan2(in2d.cross(out2d), in2d.dot(out2d));\n\n if (angle < minAngle) {\n minAngle = angle;\n nextIdx = i;\n }\n }\n }\n }\n }\n\n const next = neighbors[nextIdx];\n neighbors.splice(nextIdx, 1);\n\n const nextNeighbors = adj.get(next);\n if (nextNeighbors) {\n const revIdx = nextNeighbors.indexOf(current);\n if (revIdx !== -1) nextNeighbors.splice(revIdx, 1);\n }\n\n prev = current;\n current = next;\n\n // Circular logic check - If we've seen this node before, slice out the loop\n if (pathIndices.has(current)) {\n const loopStartIdx = pathIndices.get(current);\n const loopNodes = path.slice(loopStartIdx);\n\n if (loopNodes.length >= 3) loops.push(loopNodes.map((id) => pointGrid.points[id]));\n\n for (let i = loopStartIdx; i < path.length; i++) pathIndices.delete(path[i]);\n\n path.length = loopStartIdx;\n prev = path.length > 1 ? path[path.length - 2] : -1;\n }\n }\n\n // Cleanup isolated node references\n for (const key of adj.keys()) {\n if (adj.get(key).length === 0) adj.delete(key);\n }\n }\n\n return loops;\n }\n\n // Determines hole/boundary hierarchy and triangulates accordingly via Earcut algorithm\n _triangulateTreeOptimized(\n loops,\n planeOrigin,\n uAxis,\n vAxis,\n positionsBuffer,\n indicesBuffer,\n localRadius,\n fillColor,\n hatchDir,\n hatchDirsBuffer,\n fillColorsBuffer\n ) {\n const shapesData = [];\n const minArea = localRadius * 1e-5 * (localRadius * 1e-5);\n\n // Reduce 3D vectors to 2D coordinates residing strictly on the cutting plane\n loops.forEach((loop) => {\n const pts2d = loop.map((p) => {\n const pv = p.clone().sub(planeOrigin);\n return new Vector2(pv.dot(uAxis), pv.dot(vAxis));\n });\n\n const cleaned = [];\n for (let k = 0; k < pts2d.length; k++) {\n const prev = k === 0 ? pts2d[pts2d.length - 1] : pts2d[k - 1];\n if (pts2d[k].distanceTo(prev) > 1e-5) cleaned.push(pts2d[k]);\n }\n if (cleaned.length < 3) return;\n\n const area = ShapeUtils.area(cleaned);\n\n // Bypass rendering microscopic artifacts\n if (Math.abs(area) > minArea) {\n shapesData.push({ pts2d: cleaned, absArea: Math.abs(area), depth: 0, parent: -1, holes: [] });\n }\n });\n\n // Largest boundaries process first\n shapesData.sort((a, b) => b.absArea - a.absArea);\n\n // Process Parent-Child Hierarchies\n for (let i = 0; i < shapesData.length; i++) {\n for (let j = i - 1; j >= 0; j--) {\n if (shapesData[i].absArea > shapesData[j].absArea * 0.98) continue;\n\n // If bounds encompass the child completely, it dictates its depth\n if (this._isLoopInside(shapesData[i].pts2d, shapesData[j].pts2d, localRadius)) {\n shapesData[i].parent = j;\n shapesData[i].depth = shapesData[j].depth + 1;\n break;\n }\n }\n }\n\n // Push odd depths into parent as holes\n for (let i = 0; i < shapesData.length; i++) {\n const shape = shapesData[i];\n if (shape.depth % 2 === 1 && shape.parent !== -1) {\n shapesData[shape.parent].holes.push(shape.pts2d);\n }\n }\n\n // Dispatch triangulation execution\n for (let i = 0; i < shapesData.length; i++) {\n const shapeData = shapesData[i];\n\n if (shapeData.depth % 2 !== 0) continue;\n\n // Reverse vertex winding order correctly\n if (ShapeUtils.area(shapeData.pts2d) < 0) {\n shapeData.pts2d.reverse();\n }\n\n shapeData.holes.forEach((h) => {\n if (ShapeUtils.area(h) > 0) h.reverse();\n });\n\n const allPoints = [...shapeData.pts2d];\n shapeData.holes.forEach((h) => allPoints.push(...h));\n\n const faces = ShapeUtils.triangulateShape(shapeData.pts2d, shapeData.holes);\n const vertexOffset = positionsBuffer.length / 3;\n\n // Extrapolate resulting 2D triangles back into absolute World 3D coordinates\n for (const pt of allPoints) {\n const p3d = planeOrigin.clone().addScaledVector(uAxis, pt.x).addScaledVector(vAxis, pt.y);\n\n positionsBuffer.push(p3d.x, p3d.y, p3d.z);\n hatchDirsBuffer.push(hatchDir);\n fillColorsBuffer.push(fillColor.r, fillColor.g, fillColor.b);\n }\n\n for (let f = 0; f < faces.length; f++) {\n indicesBuffer.push(vertexOffset + faces[f][0], vertexOffset + faces[f][1], vertexOffset + faces[f][2]);\n }\n }\n }\n\n // Ray-Casting algorithm for point-in-polygon checks\n _isPointInPoly(pt, poly) {\n let inside = false;\n const py = pt.y + 1.119e-7;\n const px = pt.x;\n\n for (let i = 0, j = poly.length - 1; i < poly.length; j = i++) {\n if (\n poly[i].y > py !== poly[j].y > py &&\n px < ((poly[j].x - poly[i].x) * (py - poly[i].y)) / (poly[j].y - poly[i].y) + poly[i].x\n ) {\n inside = !inside;\n }\n }\n\n return inside;\n }\n\n // Checks whether an entire polygon resides within another\n _isLoopInside(child, parent, localRadius) {\n let minX1 = Infinity;\n let maxX1 = -Infinity;\n let minY1 = Infinity;\n let maxY1 = -Infinity;\n\n for (const p of child) {\n if (p.x < minX1) minX1 = p.x;\n if (p.x > maxX1) maxX1 = p.x;\n if (p.y < minY1) minY1 = p.y;\n if (p.y > maxY1) maxY1 = p.y;\n }\n\n let minX2 = Infinity;\n let maxX2 = -Infinity;\n let minY2 = Infinity;\n let maxY2 = -Infinity;\n\n for (const p of parent) {\n if (p.x < minX2) minX2 = p.x;\n if (p.x > maxX2) maxX2 = p.x;\n if (p.y < minY2) minY2 = p.y;\n if (p.y > maxY2) maxY2 = p.y;\n }\n\n const margin = Math.max(localRadius * 1e-4, 1e-5);\n\n // Box rejection filter\n if (minX1 < minX2 - margin || maxX1 > maxX2 + margin || minY1 < minY2 - margin || maxY1 > maxY2 + margin) {\n return false;\n }\n\n let insideCount = 0;\n\n // Verify actual point casting array\n for (let i = 0; i < child.length; i++) {\n if (this._isPointInPoly(child[i], parent)) {\n insideCount++;\n }\n }\n\n // 85% rule avoids rejecting geometry that strictly overlaps edges precisely\n return insideCount >= child.length * 0.85;\n }\n\n // High volume segment calculation extracting lines where geometry intercepts plane\n _calculateMeshSegmentsUndirected(mesh, plane, edgeStats, grid, eps) {\n const geom = mesh.geometry;\n const pos = geom.attributes.position;\n const index = geom.index;\n const world = mesh.matrixWorld;\n const count = index ? index.count : pos.count;\n\n for (let i = 0; i < count; i += 3) {\n const i1 = index ? index.getX(i) : i;\n const i2 = index ? index.getX(i + 1) : i + 1;\n const i3 = index ? index.getX(i + 2) : i + 2;\n\n const v1 = this._vA.fromBufferAttribute(pos, i1).applyMatrix4(world);\n const v2 = this._vB.fromBufferAttribute(pos, i2).applyMatrix4(world);\n const v3 = this._vC.fromBufferAttribute(pos, i3).applyMatrix4(world);\n\n let d1 = plane.distanceToPoint(v1);\n let d2 = plane.distanceToPoint(v2);\n let d3 = plane.distanceToPoint(v3);\n\n if (Math.abs(d1) <= eps) d1 = eps;\n if (Math.abs(d2) <= eps) d2 = eps;\n if (Math.abs(d3) <= eps) d3 = eps;\n\n const s1 = d1 > 0 ? 1 : -1;\n const s2 = d2 > 0 ? 1 : -1;\n const s3 = d3 > 0 ? 1 : -1;\n\n // Discard entirely invisible triangles naturally bypassed by the plane\n if (s1 === s2 && s2 === s3) continue;\n\n const intersections = [];\n\n if (s1 !== s2) {\n intersections.push(new Vector3().lerpVectors(v1, v2, Math.abs(d1) / (Math.abs(d1) + Math.abs(d2))));\n }\n if (s2 !== s3) {\n intersections.push(new Vector3().lerpVectors(v2, v3, Math.abs(d2) / (Math.abs(d2) + Math.abs(d3))));\n }\n if (s3 !== s1) {\n intersections.push(new Vector3().lerpVectors(v3, v1, Math.abs(d3) / (Math.abs(d3) + Math.abs(d1))));\n }\n\n if (intersections.length >= 2) {\n const id1 = grid.add(intersections[0]);\n const id2 = grid.add(intersections[1]);\n\n if (id1 !== id2) {\n const key = id1 < id2 ? `${id1}-${id2}` : `${id2}-${id1}`;\n const stat = edgeStats.get(key) || { count: 0 };\n stat.count++;\n edgeStats.set(key, stat);\n }\n }\n }\n }\n}\n\nexport { SectionsHelper };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// private by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent, RGB, ResizeEvent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\nimport { SectionsHelper } from \"../helpers/SectionsHelper.js\";\nimport { Object3D } from \"three\";\n\nexport class SectionsComponent implements IComponent {\n private viewer: Viewer;\n private sectionsHelper: SectionsHelper;\n private updateTimerId = 0;\n private updateDelay = 250;\n\n constructor(viewer: Viewer) {\n this.sectionsHelper = new SectionsHelper();\n\n this.viewer = viewer;\n this.viewer.addEventListener(\"initialize\", this.syncHelper);\n this.viewer.addEventListener(\"databasechunk\", this.syncHelper);\n this.viewer.addEventListener(\"drawviewpoint\", this.syncHelper);\n this.viewer.addEventListener(\"changecuttingplanes\", this.syncSections);\n this.viewer.addEventListener(\"explode\", this.syncSections);\n this.viewer.addEventListener(\"hide\", this.syncSections);\n this.viewer.addEventListener(\"isolate\", this.syncSections);\n this.viewer.addEventListener(\"show\", this.syncSections);\n this.viewer.addEventListener(\"showall\", this.syncSections);\n this.viewer.addEventListener(\"resize\", this.viewerResize);\n this.viewer.addEventListener(\"optionschange\", this.syncOptions);\n\n this.syncOptions();\n }\n\n dispose() {\n clearTimeout(this.updateTimerId);\n\n this.sectionsHelper.removeFromParent();\n this.sectionsHelper.dispose();\n\n this.viewer.removeEventListener(\"initialize\", this.syncHelper);\n this.viewer.removeEventListener(\"databasechunk\", this.syncHelper);\n this.viewer.removeEventListener(\"drawviewpoint\", this.syncHelper);\n this.viewer.removeEventListener(\"changecuttingplanes\", this.syncSections);\n this.viewer.removeEventListener(\"explode\", this.syncSections);\n this.viewer.removeEventListener(\"hide\", this.syncSections);\n this.viewer.removeEventListener(\"isolate\", this.syncSections);\n this.viewer.removeEventListener(\"show\", this.syncSections);\n this.viewer.removeEventListener(\"showall\", this.syncSections);\n this.viewer.removeEventListener(\"resize\", this.viewerResize);\n this.viewer.removeEventListener(\"optionschange\", this.syncOptions);\n }\n\n syncOptions = () => {\n function rgbToHex(c: any): string {\n const hex = (v = 0) => v.toString(16).padStart(2, \"0\");\n return \"#\" + hex(c.r) + hex(c.g) + hex(c.b);\n }\n\n const options = this.viewer.options;\n const flags = this.sectionsHelper.flags;\n\n flags.fillEnabled = options.enableSectionFill;\n flags.fillColor = rgbToHex(options.sectionFillColor);\n flags.useObjFillColor = options.sectionUseObjectColor;\n flags.hatchEnabled = options.enableSectionHatch;\n flags.hatchColor = rgbToHex(options.sectionHatchColor);\n flags.hatchScale = options.sectionHatchScale;\n flags.outlineEnabled = options.enableSectionOutline;\n flags.outlineColor = rgbToHex(options.sectionOutlineColor);\n flags.outlineWidth = options.sectionOutlineWidth;\n\n this.syncSections();\n };\n\n syncHelper = () => {\n this.sectionsHelper.removeFromParent();\n this.viewer.helpers.add(this.sectionsHelper);\n };\n\n syncSections = () => {\n this.sectionsHelper.visible = false;\n clearTimeout(this.updateTimerId);\n this.updateTimerId = window.setTimeout(this.updateSections, this.updateDelay);\n };\n\n viewerResize = (event: ResizeEvent) => {\n this.sectionsHelper.setSize(event.width, event.height);\n };\n\n updateSections = () => {\n const objects: Object3D[][] = [];\n this.viewer.models.forEach((model) => objects.push(model.getVisibleObjects()));\n const objects2 = objects.flat();\n\n this.sectionsHelper.update(objects2, this.viewer.extents, this.viewer.clippingPlanes);\n this.sectionsHelper.visible = true;\n this.viewer.update();\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n Camera,\n CylinderGeometry,\n CanvasTexture,\n Color,\n Mesh,\n MeshBasicMaterial,\n Object3D,\n OrthographicCamera,\n Sprite,\n SpriteMaterial,\n SRGBColorSpace,\n Vector4,\n WebGLRenderer,\n} from \"three\";\n\nexport class WCSHelper extends Object3D {\n public camera: Camera;\n private orthoCamera: OrthographicCamera;\n public size: number;\n\n constructor(camera: Camera) {\n super();\n\n (this as any).type = \"WCSHelper\";\n this.camera = camera;\n this.size = 160;\n\n this.orthoCamera = new OrthographicCamera(-2, 2, 2, -2, 0, 4);\n this.orthoCamera.position.set(0, 0, 2);\n\n const matRed = new MeshBasicMaterial({ toneMapped: false, color: \"#dd0000\" });\n const matGreen = new MeshBasicMaterial({ toneMapped: false, color: \"#00dd00\" });\n const matBlue = new MeshBasicMaterial({ toneMapped: false, color: \"#0000dd\" });\n\n const spriteRed = this.getSpriteMaterial(matRed.color, \"X\");\n const spriteGreen = this.getSpriteMaterial(matGreen.color, \"Y\");\n const spriteBlue = this.getSpriteMaterial(matBlue.color, \"Z\");\n\n const lineGeometry = new CylinderGeometry(0.01, 0.01, 1, 3);\n lineGeometry.translate(0, 0.5, 0);\n\n const arrowGeometry = new CylinderGeometry(0, 0.1, 0.25, 12);\n arrowGeometry.translate(0, 0.625, 0);\n\n const axesMap = {\n X: [\n [new Mesh(arrowGeometry, matRed), [0.5, 0, 0], [0, 0, -Math.PI / 2]],\n [new Mesh(lineGeometry, matRed), [0, 0, 0], [0, 0, -Math.PI / 2]],\n [new Sprite(spriteRed), [1.55, 0, 0]],\n ],\n Y: [\n [new Mesh(arrowGeometry, matGreen), [0, 0.5, 0], null],\n [new Mesh(lineGeometry, matGreen), null, null],\n [new Sprite(spriteGreen), [0, 1.55, 0]],\n ],\n Z: [\n [new Mesh(arrowGeometry, matBlue), [0, 0, 0.5], [Math.PI / 2, 0, 0]],\n [new Mesh(lineGeometry, matBlue), null, [Math.PI / 2, 0, 0]],\n [new Sprite(spriteBlue), [0, 0, 1.55]],\n ],\n };\n\n Object.keys(axesMap).forEach((key) => {\n axesMap[key].forEach((objects: any) => {\n const object = objects[0];\n const position = objects[1];\n const rotation = objects[2];\n\n object.name = key;\n if (position) object.position.set(position[0], position[1], position[2]);\n if (rotation) object.rotation.set(rotation[0], rotation[1], rotation[2]);\n object.updateMatrixWorld();\n\n this.add(object);\n });\n });\n }\n\n dispose() {\n this.traverse((object: any) => {\n if (object.geometry) object.geometry.dispose();\n if (object.material) object.material.dispose();\n });\n }\n\n getSpriteMaterial(color: Color, text: string) {\n const canvas = document.createElement(\"canvas\");\n canvas.width = 64;\n canvas.height = 64;\n\n const context = canvas.getContext(\"2d\");\n context.clearRect(0, 0, 64, 64);\n context.font = \"24px Arial\";\n context.textAlign = \"center\";\n context.fillStyle = color.getStyle();\n context.fillText(text, 32, 41);\n\n const texture = new CanvasTexture(canvas);\n texture.colorSpace = SRGBColorSpace;\n\n return new SpriteMaterial({ map: texture, toneMapped: false });\n }\n\n render(renderer: WebGLRenderer) {\n this.quaternion.copy(this.camera.quaternion).invert();\n this.updateMatrixWorld();\n\n const oldAutoClear = renderer.autoClear;\n const oldClippingPlanes = renderer.clippingPlanes;\n const oldViewport = renderer.getViewport(new Vector4());\n\n renderer.autoClear = false;\n renderer.clippingPlanes = [];\n renderer.setViewport(this.position.x, this.position.y, this.size, this.size);\n renderer.clearDepth();\n renderer.render(this, this.orthoCamera);\n\n renderer.setViewport(oldViewport);\n renderer.clippingPlanes = oldClippingPlanes;\n renderer.autoClear = oldAutoClear;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\nimport { WCSHelper } from \"../helpers/WCSHelper\";\n\nexport class WCSHelperComponent implements IComponent {\n private viewer: Viewer;\n private wcsHelper: WCSHelper;\n\n constructor(viewer: Viewer) {\n this.wcsHelper = new WCSHelper(viewer.camera);\n\n this.viewer = viewer;\n this.viewer.addEventListener(\"databasechunk\", this.syncHelper);\n this.viewer.addEventListener(\"drawviewpoint\", this.syncHelper);\n this.viewer.addEventListener(\"render\", this.viewerRender);\n this.viewer.addEventListener(\"changecameramode\", this.updateHelperCamera);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"databasechunk\", this.syncHelper);\n this.viewer.removeEventListener(\"drawviewpoint\", this.syncHelper);\n this.viewer.removeEventListener(\"render\", this.viewerRender);\n this.viewer.removeEventListener(\"changecameramode\", this.updateHelperCamera);\n\n this.wcsHelper.dispose();\n }\n\n syncHelper = () => {\n this.wcsHelper.dispose();\n this.wcsHelper = new WCSHelper(this.viewer.camera);\n };\n\n viewerRender = () => {\n if (!this.viewer.options.showWCS) return;\n\n this.wcsHelper.render(this.viewer.renderer);\n };\n\n updateHelperCamera = () => {\n this.wcsHelper.camera = this.viewer.camera;\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\n// ===================== AI-CODE-FILE ======================\n// Source: Claude Sonnet 4\n// Date: 2025-09-10\n// Reviewer: vitaly.ivanov@opendesign.com\n// Issue: CLOUD-5835\n// Notes: Originally AI-generated, modified manually 2025-09-11\n// =========================================================\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\nimport { Vector3 } from \"three\";\n\nexport class ResetComponent implements IComponent {\n private viewer: Viewer;\n private savedCameraPosition: any = null;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.viewer.addEventListener(\"databasechunk\", this.onDatabaseChunk);\n this.viewer.on(\"resetview\", this.resetCameraPosition);\n }\n\n dispose() {\n this.viewer.off(\"resetview\", this.resetCameraPosition);\n this.viewer.removeEventListener(\"databasechunk\", this.onDatabaseChunk);\n }\n\n onDatabaseChunk = () => {\n this.savedCameraPosition = {\n position: this.viewer.camera.position.clone(),\n up: this.viewer.camera.up.clone(),\n direction: this.viewer.camera.getWorldDirection(new Vector3()),\n };\n };\n\n resetCameraPosition = () => {\n if (this.savedCameraPosition) {\n this.viewer.camera.position.copy(this.savedCameraPosition.position);\n this.viewer.camera.up.copy(this.savedCameraPosition.up);\n this.viewer.camera.lookAt(this.savedCameraPosition.position.clone().add(this.savedCameraPosition.direction));\n this.viewer.camera.updateProjectionMatrix();\n }\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponentsRegistry, componentsRegistry } from \"@inweb/viewer-core\";\n\nimport { BackgroundComponent } from \"./BackgroundComponent\";\nimport { CameraComponent } from \"./CameraComponent\";\nimport { ExtentsComponent } from \"./ExtentsComponent\";\nimport { LightComponent } from \"./LightComponent\";\nimport { InfoComponent } from \"./InfoComponent\";\nimport { CanvasResizeComponent } from \"./CanvasResizeComponent\";\nimport { CanvasRemoveComponent } from \"./CanvasRemoveComponent\";\nimport { RenderLoopComponent } from \"./RenderLoopComponent\";\nimport { HighlighterComponent } from \"./HighlighterComponent\";\nimport { SelectionComponent } from \"./SelectionComponent\";\nimport { ClippingPlaneComponent } from \"./ClippingPlaneComponent\";\nimport { SectionsComponent } from \"./SectionsComponent\";\nimport { WCSHelperComponent } from \"./WCSHelperComponent\";\nimport { ResetComponent } from \"./ResetComponent\";\n\n/**\n * Viewer components registry. Use this registry to register custom components.\n *\n * To implement custom component:\n *\n * 1. Define a component class implements {@link IComponent}.\n * 2. Define a constructor with a `viewer` parameter and add mouse event listeners for the specified viewer.\n * 3. Define the component logic in the event listeners. For example, listen for the `geometryend` event and\n * implement post-processing logic for the model.\n * 4. Override {@link IComponent.dispose} and remove mouse event listeners from the viewer.\n * 5. Register component provider in the components registry by calling the\n * {@link components.registerComponent}.\n *\n * @example Implementing a custom component.\n *\n * ```javascript\n * import { IComponent, components, Viewer } from \"@inweb/viewer-three\";\n *\n * class MyComponent implements IComponent {\n * protected viewer: Viewer;\n *\n * constructor(viewer: Viewer) {\n * this.viewer = viewer;\n * this.viewer.addEventListener(\"geometryend\", this.onGeometryEnd);\n * }\n *\n * override dispose() {\n * this.viewer.removeEventListener(\"geometryend\", this.onGeometryEnd);\n * }\n *\n * onGeometryEnd = (event: MouseEvent) => {\n * this.viewer.executeCommand(\"zoomToExtents\");\n * };\n * }\n *\n * components.registerComponent(\"MyComponent\", (viewer): IComponent => new MyComponent(viewer));\n * ```\n */\nexport const components: IComponentsRegistry = componentsRegistry(\"threejs\");\n\n// build-in components\n\ncomponents.registerComponent(\"ExtentsComponent\", (viewer) => new ExtentsComponent(viewer));\ncomponents.registerComponent(\"CameraComponent\", (viewer) => new CameraComponent(viewer));\ncomponents.registerComponent(\"BackgroundComponent\", (viewer) => new BackgroundComponent(viewer));\ncomponents.registerComponent(\"LightComponent\", (viewer) => new LightComponent(viewer));\ncomponents.registerComponent(\"InfoComponent\", (viewer) => new InfoComponent(viewer));\ncomponents.registerComponent(\"CanvasResizeComponent\", (viewer) => new CanvasResizeComponent(viewer));\ncomponents.registerComponent(\"CanvasRemoveComponent\", (viewer) => new CanvasRemoveComponent(viewer));\ncomponents.registerComponent(\"RenderLoopComponent\", (viewer) => new RenderLoopComponent(viewer));\ncomponents.registerComponent(\"HighlighterComponent\", (viewer) => new HighlighterComponent(viewer));\ncomponents.registerComponent(\"SelectionComponent\", (viewer) => new SelectionComponent(viewer));\ncomponents.registerComponent(\"ClippingPlaneComponent\", (viewer) => new ClippingPlaneComponent(viewer));\ncomponents.registerComponent(\"SectionsComponent\", (viewer) => new SectionsComponent(viewer));\ncomponents.registerComponent(\"WCSHelperComponent\", (viewer) => new WCSHelperComponent(viewer));\ncomponents.registerComponent(\"ResetComponent\", (viewer) => new ResetComponent(viewer));\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3, Object3D, Vector3 } from \"three\";\nimport { IInfo, Info } from \"@inweb/viewer-core\";\n\nimport { IModelImpl } from \"./IModelImpl\";\nimport { convertUnits } from \"../measurement/UnitConverter\";\nimport { getDisplayUnit } from \"../measurement/UnitFormatter\";\n\nexport class ModelImpl implements IModelImpl {\n public id: string;\n public scene: Object3D;\n\n private handleToObjects: Map<any, Set<Object3D>>;\n private originalObjects: Set<Object3D>;\n\n constructor(scene: Object3D) {\n this.id = \"\";\n this.scene = scene;\n\n this.handleToObjects = new Map();\n this.originalObjects = new Set();\n\n this.scene.traverse((object) => {\n this.originalObjects.add(object);\n\n const handle = object.userData.handle;\n if (!handle) return;\n\n let objects = this.handleToObjects.get(handle);\n if (!objects) {\n objects = new Set();\n this.handleToObjects.set(handle, objects);\n }\n\n objects.add(object);\n });\n }\n\n dispose() {\n function disposeMaterial(material: any) {\n // if (material.alphaMap) material.alphaMap.dispose();\n // if (material.anisotropyMap) material.anisotropyMap.dispose();\n // if (material.aoMap) material.aoMap.dispose();\n // if (material.bumpMap) material.bumpMap.dispose();\n // if (material.clearcoatMap) material.clearcoatMap.dispose();\n // if (material.clearcoatNormalMap) material.clearcoatNormalMap.dispose();\n // if (material.clearcoatRoughnessMap) material.clearcoatRoughnessMap.dispose();\n // if (material.displacementMap) material.displacementMap.dispose();\n // if (material.emissiveMap) material.emissiveMap.dispose();\n // if (material.gradientMap) material.gradientMap.dispose();\n // if (material.envMap) material.envMap.dispose();\n // if (material.iridescenceMap) material.iridescenceMap.dispose();\n // if (material.lightMap) material.lightMap.dispose();\n // if (material.map) material.map.dispose();\n // if (material.metalnessMap) material.metalnessMap.dispose();\n // if (material.normalMap) material.normalMap.dispose();\n // if (material.roughnessMap) material.roughnessMap.dispose();\n // if (material.sheenColorMap) material.sheenColorMap.dispose();\n // if (material.sheenRoughnessMap) material.sheenRoughnessMap.dispose();\n // if (material.specularMap) material.specularMap.dispose();\n // if (material.thicknessMap) material.thicknessMap.dispose();\n // if (material.transmissionMap) material.transmissionMap.dispose();\n material.dispose();\n }\n\n function disposeMaterials(material: any) {\n const materials = Array.isArray(material) ? material : [material];\n materials.forEach((material: any) => disposeMaterial(material));\n }\n\n function disposeObject(object: any) {\n if (object.geometry) object.geometry.dispose();\n if (object.material) disposeMaterials(object.material);\n }\n\n this.handleToObjects = undefined;\n this.originalObjects = undefined;\n\n this.scene.traverse(disposeObject);\n this.scene.clear();\n }\n\n getUnits(): string {\n return \"Meters\";\n }\n\n getUnitScale(): number {\n return convertUnits(this.getUnits(), \"Meters\", 1);\n }\n\n getUnitString(): string {\n return getDisplayUnit(this.getUnits());\n }\n\n getPrecision(): number {\n return 2;\n }\n\n getInfo(): IInfo {\n // ===================== AI-CODE-START ======================\n // Source: Claude Sonnet 4.5\n // Date: 2025-10-02\n // Reviewer: roman.mochalov@opendesign.com\n // Issue: CLOUD-5738\n\n const geometries = new Set();\n const materials = new Set();\n const textures = new Set();\n\n let totalObjects = 0;\n let totalTriangles = 0;\n let totalPoints = 0;\n let totalLines = 0;\n let totalEdges = 0;\n let geometryBytes = 0;\n let textureBytes = 0;\n\n this.scene.traverse((object: any) => {\n totalObjects++;\n\n if (object.geometry) {\n const geometry = object.geometry;\n\n if (!geometries.has(geometry)) {\n geometries.add(geometry);\n\n if (geometry.attributes) {\n for (const name in geometry.attributes) {\n const attribute = geometry.attributes[name];\n if (attribute && attribute.array) {\n geometryBytes += attribute.array.byteLength;\n }\n }\n }\n\n if (geometry.index && geometry.index.array) {\n geometryBytes += geometry.index.array.byteLength;\n }\n }\n\n if (geometry.index) {\n const indexCount = geometry.index.count;\n\n if (object.isLine || object.isLineSegments) {\n totalLines += indexCount / 2;\n } else if (object.isPoints) {\n totalPoints += indexCount;\n } else {\n totalTriangles += indexCount / 3;\n }\n } else if (geometry.attributes && geometry.attributes.position) {\n const positionCount = geometry.attributes.position.count;\n\n if (object.isLine || object.isLineSegments) {\n totalLines += positionCount / 2;\n } else if (object.isPoints) {\n totalPoints += positionCount;\n } else {\n totalTriangles += positionCount / 3;\n }\n }\n\n if (object.isLineSegments && geometry.attributes.position) {\n totalEdges += geometry.attributes.position.count / 2;\n }\n }\n\n if (object.material) {\n const materialsArray = Array.isArray(object.material) ? object.material : [object.material];\n\n materialsArray.forEach((material: any) => {\n materials.add(material);\n\n if (material.map && !textures.has(material.map)) {\n textures.add(material.map);\n textureBytes += estimateTextureSize(material.map);\n }\n\n const textureProps = [\n \"alphaMap\",\n \"aoMap\",\n \"bumpMap\",\n \"displacementMap\",\n \"emissiveMap\",\n \"envMap\",\n \"lightMap\",\n \"metalnessMap\",\n \"normalMap\",\n \"roughnessMap\",\n \"specularMap\",\n \"clearcoatMap\",\n \"clearcoatNormalMap\",\n \"clearcoatRoughnessMap\",\n \"iridescenceMap\",\n \"sheenColorMap\",\n \"sheenRoughnessMap\",\n \"thicknessMap\",\n \"transmissionMap\",\n \"anisotropyMap\",\n \"gradientMap\",\n ];\n\n textureProps.forEach((prop) => {\n const texture = material[prop];\n if (texture && !textures.has(texture)) {\n textures.add(texture);\n textureBytes += estimateTextureSize(texture);\n }\n });\n });\n }\n });\n\n function estimateTextureSize(texture: any): number {\n if (!texture.image) return 0;\n\n const width = texture.image.width || 0;\n const height = texture.image.height || 0;\n\n // Estimate bytes per pixel (RGBA = 4 bytes)\n const bytesPerPixel = 4;\n\n // Account for mipmaps (adds ~33% more memory)\n const mipmapMultiplier = texture.generateMipmaps ? 1.33 : 1;\n\n return width * height * bytesPerPixel * mipmapMultiplier;\n }\n\n // ===================== AI-CODE-END ======================\n\n const info = new Info();\n\n info.scene.objects = totalObjects;\n info.scene.triangles = Math.floor(totalTriangles);\n info.scene.points = Math.floor(totalPoints);\n info.scene.lines = Math.floor(totalLines);\n info.scene.edges = Math.floor(totalEdges);\n\n info.memory.geometries = geometries.size;\n info.memory.geometryBytes = geometryBytes;\n info.memory.optimizedGeometryBytes = 0;\n info.memory.textures = textures.size;\n info.memory.textureBytes = Math.floor(textureBytes);\n info.memory.materials = materials.size;\n info.memory.totalEstimatedGpuBytes = geometryBytes + Math.floor(textureBytes);\n\n info.optimizedScene.objects = info.scene.objects;\n info.optimizedScene.triangles = info.scene.triangles;\n info.optimizedScene.points = info.scene.points;\n info.optimizedScene.lines = info.scene.lines;\n info.optimizedScene.edges = info.scene.edges;\n\n return info;\n }\n\n getExtents(target: Box3): Box3 {\n const _box = new Box3();\n\n function expandByObject(object: any, target: Box3) {\n if (!object.geometry) return;\n\n object.updateWorldMatrix(false, false);\n\n // Use object bounds for the BatchedMesh, InstancedMesh and SkinnedMesh, use geometry\n // bounds for others. See Box3.expandByObject() for more details.\n\n if (object.boundingBox !== undefined) {\n if (object.boundingBox === null) object.computeBoundingBox();\n _box.copy(object.boundingBox);\n } else {\n if (object.geometry.boundingBox === null) object.geometry.computeBoundingBox();\n _box.copy(object.geometry.boundingBox);\n }\n\n _box.applyMatrix4(object.matrixWorld);\n\n target.union(_box);\n }\n\n this.scene.traverseVisible((object) => expandByObject(object, target));\n return target;\n }\n\n getObjects(): Object3D[] {\n return Array.from(this.originalObjects);\n }\n\n getVisibleObjects(): Object3D[] {\n const objects = [];\n this.scene.traverseVisible((object) => object.userData.handle && objects.push(object));\n return objects;\n }\n\n getObjectsByHandles(handles: string | string[]): Object3D[] {\n if (!Array.isArray(handles)) handles = [handles];\n\n const ownHandles = [];\n handles.forEach((handle) => {\n const index = handle.indexOf(\":\");\n if (index !== -1) {\n if (handle.slice(0, index) !== this.id) return;\n handle = handle.slice(index + 1);\n }\n ownHandles.push(handle);\n });\n\n const handlesSet = new Set<string>(ownHandles);\n\n const objects = [];\n handlesSet.forEach((handle) => {\n objects.push(Array.from(this.handleToObjects.get(handle) || []));\n });\n\n return objects.flat();\n }\n\n getHandlesByObjects(objects: Object3D | Object3D[]): string[] {\n if (!Array.isArray(objects)) objects = [objects];\n\n const handleSet = new Set<string>();\n objects\n .filter((object) => this.originalObjects.has(object))\n .forEach((object) => {\n handleSet.add(`${this.id}:${object.userData.handle}`);\n });\n\n return Array.from(handleSet);\n }\n\n hideObjects(objects: Object3D | Object3D[]): this {\n if (!Array.isArray(objects)) objects = [objects];\n\n objects\n .filter((object) => this.originalObjects.has(object))\n .forEach((object) => {\n object.visible = false;\n });\n\n return this;\n }\n\n hideAllObjects(): this {\n return this.isolateObjects([]);\n }\n\n isolateObjects(objects: Object3D | Object3D[]): this {\n if (!Array.isArray(objects)) objects = [objects];\n\n const visibleSet = new Set(objects);\n objects\n .filter((object) => this.originalObjects.has(object))\n .forEach((object) => {\n object.traverseAncestors((parent) => visibleSet.add(parent));\n });\n\n this.scene.traverse((object) => (object.visible = visibleSet.has(object)));\n\n return this;\n }\n\n showObjects(objects: Object3D | Object3D[]): this {\n if (!Array.isArray(objects)) objects = [objects];\n\n objects\n .filter((object) => this.originalObjects.has(object))\n .forEach((object) => {\n object.visible = true;\n object.traverseAncestors((parent) => (parent.visible = true));\n });\n\n return this;\n }\n\n showAllObjects(): this {\n this.scene.traverse((object) => (object.visible = true));\n return this;\n }\n\n highlightObjects(objects: Object3D | Object3D[]): this {\n return this;\n }\n\n unhighlightObjects(objects: Object3D | Object3D[]): this {\n return this;\n }\n\n explode(scale = 0, coeff = 4): this {\n const centersCache = new Map();\n\n const calcObjectCenter = (object: Object3D, target: Vector3): Vector3 => {\n const extents = new Box3().setFromObject(object);\n\n const handle = object.userData.handle;\n if (!handle) return extents.getCenter(target);\n\n const center = centersCache.get(handle);\n if (center) return target.copy(center);\n\n const objects = this.getObjectsByHandles(handle);\n objects.forEach((x: Object3D) => extents.expandByObject(x));\n extents.getCenter(target);\n\n centersCache.set(handle, target.clone());\n\n return target;\n };\n\n function calcExplodeDepth(object: Object3D, depth: number): number {\n let result = depth;\n\n object.children.forEach((x: Object3D) => {\n const objectDepth = calcExplodeDepth(x, depth + 1);\n if (result < objectDepth) result = objectDepth;\n });\n\n object.userData.originalPosition = object.position.clone();\n object.userData.originalCenter = calcObjectCenter(object, new Vector3());\n\n return result;\n }\n\n const explodeScale = scale / 100;\n const explodeRoot = this.scene;\n\n if (!explodeRoot.userData.explodeDepth) {\n explodeRoot.userData.explodeDepth = calcExplodeDepth(explodeRoot, 1);\n }\n\n const maxDepth = explodeRoot.userData.explodeDepth;\n const scaledExplodeDepth = explodeScale * maxDepth + 1;\n const explodeDepth = 0 | scaledExplodeDepth;\n const currentSegmentFraction = scaledExplodeDepth - explodeDepth;\n\n function explodeObject(object: any, depth: number) {\n if (object.isCamera) return;\n if (object.userData.isHighlightWireframe) return;\n\n object.position.copy(object.userData.originalPosition);\n\n if (depth > 0 && depth <= explodeDepth) {\n let objectScale = explodeScale * coeff;\n if (depth === explodeDepth) objectScale *= currentSegmentFraction;\n\n const parentCenter = object.parent.userData.originalCenter;\n const objectCenter = object.userData.originalCenter;\n const localOffset = objectCenter.clone().sub(parentCenter).multiplyScalar(objectScale);\n\n object.position.add(localOffset);\n }\n\n object.children.forEach((x: Object3D) => explodeObject(x, depth + 1));\n }\n\n explodeObject(explodeRoot, 0);\n this.scene.updateMatrixWorld();\n\n return this;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3, Matrix4, Object3D, Vector3 } from \"three\";\nimport { IInfo, Info } from \"@inweb/viewer-core\";\n\nimport { ModelImpl } from \"../../models/ModelImpl\";\nimport { DynamicGltfLoader } from \"./DynamicGltfLoader.js\";\n\n// Dynamic model implementation.\n\nexport class DynamicModelImpl extends ModelImpl {\n public gltfLoader: DynamicGltfLoader;\n\n override getInfo(): IInfo {\n const stats = this.gltfLoader.getStats();\n\n const info = new Info();\n\n info.scene.objects = stats.scene.beforeOptimization.objects;\n info.scene.triangles = stats.scene.beforeOptimization.triangles;\n info.scene.lines = stats.scene.beforeOptimization.lines;\n info.scene.edges = stats.scene.beforeOptimization.edges;\n\n info.optimizedScene.objects = stats.scene.afterOptimization.objects;\n info.optimizedScene.triangles = stats.scene.afterOptimization.triangles;\n info.optimizedScene.lines = stats.scene.afterOptimization.lines;\n info.optimizedScene.edges = stats.scene.afterOptimization.edges;\n\n info.memory.geometries = stats.memory.geometries.count;\n info.memory.geometryBytes = stats.memory.geometries.bytes;\n info.memory.optimizedGeometryBytes = stats.memory.geometries.optimizedBytes;\n info.memory.textures = stats.memory.textures.count;\n info.memory.materials = stats.memory.materials.count;\n info.memory.totalEstimatedGpuBytes = stats.memory.totalEstimatedGpuBytes;\n\n return info;\n }\n\n override getExtents(target: Box3): Box3 {\n return target.union(this.gltfLoader.getTotalGeometryExtent());\n }\n\n override getObjects(): Object3D[] {\n const objects = [];\n this.gltfLoader.originalObjects.forEach((object: Object3D) => {\n objects.push(object);\n });\n return objects;\n }\n\n override getVisibleObjects(): Object3D[] {\n return this.gltfLoader.getOriginalObjectForSelect();\n }\n\n override getObjectsByHandles(handles: string | string[]): Object3D[] {\n if (!Array.isArray(handles)) handles = [handles];\n\n const handlesSet = new Set(handles);\n\n const objects = [];\n handlesSet.forEach((handle) => {\n objects.push(this.gltfLoader.getObjectsByHandle(handle));\n });\n\n return objects.flat();\n }\n\n override getHandlesByObjects(objects: Object3D | Object3D[]): string[] {\n if (!Array.isArray(objects)) objects = [objects];\n\n const handleSet = new Set<string>();\n objects\n .filter((object) => this.gltfLoader.originalObjects.has(object))\n .forEach((object) => {\n handleSet.add(object.userData.handle);\n });\n\n return Array.from(handleSet);\n }\n\n override hideObjects(objects: Object3D | Object3D[]): this {\n const handles = this.getHandlesByObjects(objects);\n this.gltfLoader.hideObjects(handles);\n return this;\n }\n\n override isolateObjects(objects: Object3D | Object3D[]): this {\n const handles = this.getHandlesByObjects(objects);\n this.gltfLoader.isolateObjects(new Set(handles));\n return this;\n }\n\n override showObjects(objects: Object3D | Object3D[]): this {\n const handles = this.getHandlesByObjects(objects);\n this.gltfLoader.showObjects(handles);\n return this;\n }\n\n override showAllObjects(): this {\n this.gltfLoader.showAllHiddenObjects();\n return this;\n }\n\n override highlightObjects(objects: Object3D | Object3D[]): this {\n this.gltfLoader.showOriginalObjects(objects);\n return this;\n }\n\n override unhighlightObjects(objects: Object3D | Object3D[]): this {\n this.gltfLoader.hideOriginalObjects(objects);\n return this;\n }\n\n override explode(scale = 0, coeff = 4): this {\n const centersCache = new Map();\n\n const calcObjectCenter = (object: Object3D, target: Vector3): Vector3 => {\n const extents = new Box3().setFromObject(object);\n\n const handle = object.userData.handle;\n if (!handle) return extents.getCenter(target);\n\n const center = centersCache.get(handle);\n if (center) return target.copy(center);\n\n const objects = this.getObjectsByHandles(handle);\n objects.forEach((x: Object3D) => extents.expandByObject(x));\n extents.getCenter(target);\n\n centersCache.set(handle, target.clone());\n\n return target;\n };\n\n const calcObjectDepth = (object: Object3D): number => {\n if (object.userData.depth !== undefined) return object.userData.depth;\n\n const parent = object.parent;\n const depth = parent && object !== explodeRoot ? calcObjectDepth(parent) + 1 : 0;\n\n object.userData.depth = depth;\n object.userData.originalPosition = object.position.clone();\n object.userData.originalCenter = calcObjectCenter(object, new Vector3());\n\n return depth;\n };\n\n const explodeScale = scale / 100;\n const explodeRoot = this.scene.children[0];\n\n if (!explodeRoot.userData.explodeDepth) {\n let maxDepth = 0;\n\n this.gltfLoader.originalObjects.forEach((object: Object3D) => {\n const depth = calcObjectDepth(object);\n if (depth > maxDepth) maxDepth = depth;\n });\n\n explodeRoot.userData.explodeDepth = maxDepth;\n }\n\n const maxDepth = explodeRoot.userData.explodeDepth;\n const scaledExplodeDepth = explodeScale * maxDepth + 1;\n const explodeDepth = 0 | scaledExplodeDepth;\n const currentSegmentFraction = scaledExplodeDepth - explodeDepth;\n\n const offsetCache = new Map();\n\n const calcObjectOffset = (object: Object3D, target: Vector3): Vector3 => {\n if (offsetCache.has(object)) return target.copy(offsetCache.get(object));\n\n const parent = object.parent;\n if (parent && object !== explodeRoot) calcObjectOffset(parent, target);\n\n const depth = object.userData.depth;\n\n if (depth > 0 && depth <= explodeDepth) {\n let objectScale = explodeScale * coeff;\n if (depth === explodeDepth) objectScale *= currentSegmentFraction;\n\n const parentCenter = parent.userData.originalCenter;\n const objectCenter = object.userData.originalCenter;\n const localOffset = objectCenter.clone().sub(parentCenter).multiplyScalar(objectScale);\n\n target.add(localOffset);\n }\n\n offsetCache.set(object, target.clone());\n\n return target;\n };\n\n const transformMap = new Map();\n\n this.gltfLoader.originalObjects.forEach((object: Object3D) => {\n const globalOffset = calcObjectOffset(object, new Vector3());\n transformMap.set(object, new Matrix4().makeTranslation(globalOffset));\n });\n\n this.gltfLoader.applyObjectTransforms(transformMap);\n this.scene.updateMatrixWorld();\n\n return this;\n }\n}\n","import {\n TextureLoader,\n BufferAttribute,\n Color,\n DoubleSide,\n MeshPhongMaterial,\n MeshStandardMaterial,\n PointsMaterial,\n LineBasicMaterial,\n RepeatWrapping,\n ClampToEdgeWrapping,\n MirroredRepeatWrapping,\n NearestFilter,\n NearestMipmapNearestFilter,\n NearestMipmapLinearFilter,\n LinearFilter,\n LinearMipmapNearestFilter,\n LinearMipmapLinearFilter,\n SRGBColorSpace,\n} from \"three\";\n\nconst GL_TO_THREE_WRAP = {\n 33071: ClampToEdgeWrapping,\n 33648: MirroredRepeatWrapping,\n 10497: RepeatWrapping,\n};\n\nconst GL_TO_THREE_FILTER = {\n 9728: NearestFilter,\n 9729: LinearFilter,\n 9984: NearestMipmapNearestFilter,\n 9985: LinearMipmapNearestFilter,\n 9986: NearestMipmapLinearFilter,\n 9987: LinearMipmapLinearFilter,\n};\n\nexport const GL_COMPONENT_TYPES = {\n 5120: Int8Array,\n 5121: Uint8Array,\n 5122: Int16Array,\n 5123: Uint16Array,\n 5125: Uint32Array,\n 5126: Float32Array,\n};\n\nexport const GL_CONSTANTS = {\n FLOAT: 5126,\n //FLOAT_MAT2: 35674,\n FLOAT_MAT3: 35675,\n FLOAT_MAT4: 35676,\n FLOAT_VEC2: 35664,\n FLOAT_VEC3: 35665,\n FLOAT_VEC4: 35666,\n LINEAR: 9729,\n REPEAT: 10497,\n SAMPLER_2D: 35678,\n POINTS: 0,\n LINES: 1,\n LINE_LOOP: 2,\n LINE_STRIP: 3,\n TRIANGLES: 4,\n TRIANGLE_STRIP: 5,\n TRIANGLE_FAN: 6,\n UNSIGNED_BYTE: 5121,\n UNSIGNED_SHORT: 5123,\n};\n\nconst MAX_GAP = 128 * 1024; // 128 KB\nconst MAX_CHUNK = 30 * 1024 * 1024; // 100 MB\n\nexport class GltfStructure {\n constructor(id, loadController) {\n this.id = `${id}`;\n this.json = null;\n this.loadController = loadController;\n this.loader = null;\n this.batchDelay = 10;\n this.maxBatchSize = 5 * 1024 * 1024;\n this.maxRangesPerRequest = 512;\n this.pendingRequests = [];\n this.batchTimeout = null;\n this.textureLoader = new TextureLoader();\n this.textureLoader.crossOrigin = \"anonymous\";\n this.materials = new Map();\n this.textureCache = new Map();\n this.materialCache = new Map();\n this.uri = \"\";\n this._nextObjectId = 1;\n this.loadingAborted = false;\n this.criticalError = null;\n // Holds decoded base64 buffer when the .gltf has an embedded data URI\n this.embeddedBinaryChunk = null;\n }\n\n async initialize(loader) {\n const json = await this.loadController.loadJson();\n\n if (json.asset === undefined || json.asset.version[0] < 2) {\n throw new Error(\"DynamicLoader: Unsupported asset. glTF versions >=2.0 are supported.\");\n }\n\n this.json = json;\n this.loader = loader;\n\n const bufferUri = this.json.buffers?.[0]?.uri || \"\";\n\n // Detect embedded data URI (e.g. \"data:application/octet-stream;base64,...\")\n // and decode it once into memory. The buffer URI is then cleared so that\n // scheduleRequest serves data from memory instead of doing network requests.\n if (bufferUri.startsWith(\"data:\")) {\n this.embeddedBinaryChunk = await this._decodeDataUri(bufferUri);\n this.uri = \"\";\n } else {\n this.uri = bufferUri;\n }\n }\n\n // Decode a data URI to ArrayBuffer using the browser's native fetch() —\n // much faster than atob() + JS loop for large (10+ MB) base64 buffers.\n async _decodeDataUri(dataUri) {\n try {\n const response = await fetch(dataUri);\n return await response.arrayBuffer();\n } catch (e) {\n throw new Error(`DynamicLoader: Failed to decode embedded data URI: ${e.message}`);\n }\n }\n\n clear() {\n if (this.batchTimeout) {\n clearTimeout(this.batchTimeout);\n this.batchTimeout = null;\n }\n\n this._rejectPendingRequests();\n\n if (this.disposeMaterials) {\n try {\n this.disposeMaterials();\n } catch (e) {\n console.warn(\"DynamicLoader: error during disposeMaterials in clear():\", e);\n }\n }\n if (this.textureCache) this.textureCache.clear();\n if (this.materials) this.materials.clear();\n\n this.embeddedBinaryChunk = null;\n this.json = null;\n this.loadController = null;\n this.uri = \"\";\n\n this.activeChunkLoads = 0;\n this.chunkQueue = [];\n this.loadingAborted = false;\n this.criticalError = null;\n }\n\n _rejectPendingRequests() {\n const pending = this.pendingRequests;\n this.pendingRequests = [];\n if (!pending || pending.length === 0) return;\n\n const cancelError = new Error(\"DynamicLoader: Structure cleared while requests pending\");\n for (let i = 0; i < pending.length; i++) {\n const item = pending[i];\n if (item && typeof item._reject === \"function\") {\n try {\n item._reject(cancelError);\n } catch {\n // Consumer may have already been disposed\n }\n }\n }\n }\n\n getJson() {\n return this.json;\n }\n\n scheduleRequest(request) {\n // Fast path: buffer was an embedded data URI, decoded once into memory\n if (this.embeddedBinaryChunk && !this.uri) {\n return Promise.resolve({\n buffer: this.embeddedBinaryChunk,\n relOffset: request.offset,\n length: request.length,\n });\n }\n\n return new Promise((resolve, reject) => {\n if (this.loadingAborted) {\n reject(\n this.criticalError || new Error(\"DynamicLoader: Structure loading has been aborted due to critical error\")\n );\n return;\n }\n this.pendingRequests.push({\n ...request,\n _resolve: resolve,\n _reject: reject,\n });\n });\n }\n\n isCriticalHttpError(error) {\n if (!error) return false;\n\n const status = error.status || error.statusCode || error.code;\n\n if (typeof status === \"number\") {\n return status >= 400 && status < 600;\n }\n\n if (error.message) {\n const match = error.message.match(/HTTP\\s+(\\d{3})/i);\n if (match) {\n const code = parseInt(match[1], 10);\n return code >= 400 && code < 600;\n }\n }\n\n return false;\n }\n\n abortLoading(error) {\n if (this.loadingAborted) {\n return;\n }\n\n this.loadingAborted = true;\n this.criticalError = error;\n\n const requests = [...this.pendingRequests];\n this.pendingRequests = [];\n\n for (const req of requests) {\n if (req._reject) {\n req._reject(error);\n }\n }\n\n console.error(\n `DynamicLoader: Critical error for structure \"${this.id}\". All further loading aborted.`,\n `\\n Error: ${error.message || error}`,\n `\\n Rejected ${requests.length} pending chunk requests.`\n );\n\n throw error;\n }\n\n async flushBufferRequests() {\n if (!this.pendingRequests || this.pendingRequests.length === 0) return;\n const requests = [...this.pendingRequests];\n this.pendingRequests = [];\n\n requests.sort((a, b) => a.offset - b.offset);\n const mergedRanges = [];\n let current = {\n start: requests[0].offset,\n end: requests[0].offset + requests[0].length,\n requests: [requests[0]],\n };\n for (let i = 1; i < requests.length; i++) {\n const req = requests[i];\n const gap = req.offset - current.end;\n const newEnd = Math.max(current.end, req.offset + req.length);\n const projectedSize = newEnd - current.start;\n if (gap <= MAX_GAP && projectedSize <= MAX_CHUNK) {\n current.end = newEnd;\n current.requests.push(req);\n } else {\n mergedRanges.push(current);\n current = {\n start: req.offset,\n end: req.offset + req.length,\n requests: [req],\n };\n }\n }\n mergedRanges.push(current);\n const finalRanges = [];\n for (const range of mergedRanges) {\n let { start, end, requests } = range;\n while (end - start > MAX_CHUNK) {\n let splitIdx = 0;\n for (let i = 0; i < requests.length; i++) {\n if (requests[i].offset + requests[i].length - start > MAX_CHUNK) {\n break;\n }\n splitIdx = i;\n }\n const chunkRequests = requests.slice(0, splitIdx + 1);\n const chunkEnd =\n chunkRequests[chunkRequests.length - 1].offset + chunkRequests[chunkRequests.length - 1].length;\n finalRanges.push({\n start,\n end: chunkEnd,\n requests: chunkRequests,\n });\n requests = requests.slice(splitIdx + 1);\n if (requests.length > 0) {\n start = requests[0].offset;\n end = requests[0].offset + requests[0].length;\n for (let i = 1; i < requests.length; i++) {\n end = Math.max(end, requests[i].offset + requests[i].length);\n }\n }\n }\n if (requests.length > 0) {\n finalRanges.push({ start, end, requests });\n }\n }\n\n const promises = finalRanges.map(async (range, index) => {\n if (this.loadingAborted) {\n for (const req of range.requests) {\n req._reject(this.criticalError || new Error(\"DynamicLoader: Structure loading aborted\"));\n }\n return;\n }\n\n await this.loader.waitForChunkSlot();\n\n try {\n const length = range.end - range.start;\n const buffer = await this.loadController.loadBinaryData([{ offset: range.start, length }], this.uri);\n\n for (const req of range.requests) {\n const relOffset = req.offset - range.start;\n try {\n req._resolve({ buffer, relOffset, length: req.length });\n } catch (e) {\n req._reject(e);\n }\n }\n } catch (error) {\n for (const req of range.requests) {\n req._reject(error);\n }\n\n if (this.isCriticalHttpError(error)) {\n this.abortLoading(error);\n } else {\n console.warn(\n `DynamicLoader: Failed to load chunk ${index + 1}/${finalRanges.length} (${range.start}-${range.end}):`,\n error\n );\n }\n } finally {\n this.loader.releaseChunkSlot();\n }\n });\n\n await Promise.all(promises);\n\n this.pendingRequests = [];\n }\n\n getBufferView(byteOffset, byteLength, componentType) {\n return this.scheduleRequest({\n offset: byteOffset,\n length: byteLength,\n componentType,\n });\n }\n\n createTypedArray(buffer, offset, length, componentType) {\n try {\n if (!buffer || !(buffer instanceof ArrayBuffer)) {\n throw new Error(\"DynamicLoader: Invalid buffer\");\n }\n\n let elementSize;\n switch (componentType) {\n case 5120:\n case 5121:\n elementSize = 1;\n break; // BYTE, UNSIGNED_BYTE\n case 5122:\n case 5123:\n elementSize = 2;\n break; // SHORT, UNSIGNED_SHORT\n case 5125:\n case 5126:\n elementSize = 4;\n break; // UNSIGNED_INT, FLOAT\n default:\n throw new Error(`DynamicLoader: Unsupported component type: ${componentType}`);\n }\n\n const numElements = length / elementSize;\n if (!Number.isInteger(numElements)) {\n throw new Error(`DynamicLoader: Invalid length ${length} for component type ${componentType}`);\n }\n\n if (length > buffer.byteLength) {\n throw new Error(\n `DynamicLoader: Buffer too small: need ${length} bytes, but buffer is ${buffer.byteLength} bytes`\n );\n }\n\n const ArrayType = GL_COMPONENT_TYPES[componentType];\n return new ArrayType(buffer, offset, numElements);\n } catch (error) {\n if (error.name !== \"AbortError\") {\n console.warn(\"DynamicLoader: Error creating typed array:\", {\n bufferSize: buffer?.byteLength,\n offset,\n length,\n componentType,\n error,\n });\n }\n throw error;\n }\n }\n\n async createBufferAttribute(accessorIndex) {\n if (!this.json) {\n throw new Error(\"DynamicLoader: No GLTF structure loaded\");\n }\n\n const gltf = this.json;\n const accessor = gltf.accessors[accessorIndex];\n const bufferView = gltf.bufferViews[accessor.bufferView];\n\n try {\n const byteOffset = (bufferView.byteOffset || 0) + (accessor.byteOffset || 0);\n const components = this.getNumComponents(accessor.type);\n const count = accessor.count;\n const byteLength = count * components * this.getComponentSize(accessor.componentType);\n\n const array = await this.getBufferView(byteOffset, byteLength, accessor.componentType);\n\n const attribute = new BufferAttribute(array, components);\n\n if (accessor.min !== undefined) attribute.min = accessor.min;\n if (accessor.max !== undefined) attribute.max = accessor.max;\n\n return attribute;\n } catch (error) {\n if (error.name !== \"AbortError\") {\n console.warn(\"DynamicLoader: Error creating buffer attribute:\", {\n error,\n accessor,\n bufferView,\n });\n }\n\n throw error;\n }\n }\n\n getComponentSize(componentType) {\n switch (componentType) {\n case 5120: // BYTE\n case 5121: // UNSIGNED_BYTE\n return 1;\n case 5122: // SHORT\n case 5123: // UNSIGNED_SHORT\n return 2;\n case 5125: // UNSIGNED_INT\n case 5126: // FLOAT\n return 4;\n default:\n throw new Error(`DynamicLoader: Unknown component type: ${componentType}`);\n }\n }\n\n getNumComponents(type) {\n switch (type) {\n case \"SCALAR\":\n return 1;\n case \"VEC2\":\n return 2;\n case \"VEC3\":\n return 3;\n case \"VEC4\":\n return 4;\n case \"MAT2\":\n return 4;\n case \"MAT3\":\n return 9;\n case \"MAT4\":\n return 16;\n default:\n throw new Error(`DynamicLoader: Unknown type: ${type}`);\n }\n }\n\n async loadTextures() {\n if (!this.json.textures) return;\n\n const loadTexture = async (imageIndex) => {\n let textureName = `index_${imageIndex}`;\n try {\n const image = this.json.images[imageIndex];\n textureName = image.uri || image.name || textureName;\n\n if (image.uri) {\n const fullUrl = await this.loadController.resolveURL(image.uri);\n return await this.textureLoader.loadAsync(fullUrl);\n } else if (image.bufferView !== undefined) {\n const bufferView = this.json.bufferViews[image.bufferView];\n const { buffer, relOffset } = await this.getBufferView(\n bufferView.byteOffset || 0,\n bufferView.byteLength,\n 5121\n );\n const imageBytes = new Uint8Array(buffer, relOffset, bufferView.byteLength);\n const blob = new Blob([imageBytes], { type: image.mimeType });\n const url = URL.createObjectURL(blob);\n const texture = await this.textureLoader.loadAsync(url);\n URL.revokeObjectURL(url);\n return texture;\n }\n } catch {\n console.warn(`DynamicLoader: Error loading texture ${textureName}`);\n }\n };\n\n const texturePromises = [];\n for (let i = 0; i < this.json.textures.length; i++) {\n texturePromises.push(\n loadTexture(this.json.textures[i].source).then((texture) => {\n if (texture) {\n // Apply sampler settings, mapping WebGL constants to Three.js constants\n const samplerDef =\n this.json.textures[i].sampler !== undefined && this.json.samplers\n ? this.json.samplers[this.json.textures[i].sampler]\n : {};\n\n texture.magFilter = GL_TO_THREE_FILTER[samplerDef.magFilter] || LinearFilter;\n texture.minFilter = GL_TO_THREE_FILTER[samplerDef.minFilter] || LinearMipmapLinearFilter;\n\n // glTF spec: default wrap is REPEAT (10497) when not specified\n texture.wrapS = GL_TO_THREE_WRAP[samplerDef.wrapS] || RepeatWrapping;\n texture.wrapT = GL_TO_THREE_WRAP[samplerDef.wrapT] || RepeatWrapping;\n\n // glTF textures use non-flipped Y convention\n texture.flipY = false;\n texture.needsUpdate = true;\n }\n this.textureCache.set(i, texture);\n })\n );\n }\n await this.flushBufferRequests();\n await Promise.all(texturePromises);\n }\n\n loadMaterials() {\n if (!this.json.materials) return this.materials;\n\n for (let i = 0; i < this.json.materials.length; i++) {\n const materialDef = this.json.materials[i];\n\n const materialCacheKey = `material_${i}`;\n this.materialCache.set(materialCacheKey, {\n mesh: this.createMaterial(materialDef, GL_CONSTANTS.TRIANGLES),\n points: this.createMaterial(materialDef, GL_CONSTANTS.POINTS),\n lines: this.createMaterial(materialDef, GL_CONSTANTS.LINES),\n });\n\n this.materialCache.get(materialCacheKey).mesh.name = materialDef.name;\n this.materialCache.get(materialCacheKey).points.name = materialDef.name;\n this.materialCache.get(materialCacheKey).lines.name = materialDef.name;\n\n this.materials.set(i, this.materialCache.get(materialCacheKey).mesh);\n }\n return this.materials;\n }\n\n createMaterial(materialDef, primitiveMode = undefined) {\n const params = {};\n\n if (materialDef.pbrMetallicRoughness) {\n const pbr = materialDef.pbrMetallicRoughness;\n if (pbr.baseColorFactor) {\n params.color = new Color().fromArray(pbr.baseColorFactor);\n params.opacity = pbr.baseColorFactor[3];\n if (params.opacity < 1.0) params.transparent = true;\n }\n\n if (pbr.baseColorTexture !== undefined) {\n const texture = this.textureCache.get(pbr.baseColorTexture.index);\n if (texture) {\n params.map = texture;\n // Set color to white if map is present and baseColorFactor is not,\n // or else texture will be tinted with default color\n if (!pbr.baseColorFactor) {\n params.color = new Color(0xffffff);\n }\n }\n }\n }\n\n if (materialDef.emissiveFactor) {\n params.emissive = new Color().fromArray(materialDef.emissiveFactor);\n }\n\n if (materialDef.alphaMode === \"BLEND\") {\n params.transparent = true;\n }\n\n if (materialDef.doubleSided) {\n params.side = DoubleSide;\n }\n let material;\n\n if (primitiveMode === GL_CONSTANTS.POINTS) {\n params.sizeAttenuation = false;\n material = new PointsMaterial(params);\n material.sizeAttenuation = false;\n } else if (\n primitiveMode === GL_CONSTANTS.LINES ||\n primitiveMode === GL_CONSTANTS.LINE_STRIP ||\n primitiveMode === GL_CONSTANTS.LINE_LOOP\n ) {\n material = new LineBasicMaterial(params);\n } else {\n params.specular = 0x222222;\n params.shininess = 10;\n params.reflectivity = 0.05;\n params.polygonOffset = true;\n params.polygonOffsetFactor = 1;\n params.polygonOffsetUnits = 1;\n\n // Ensure color is white if only map is present so it renders the texture properly\n if (params.map && !materialDef.pbrMetallicRoughness?.baseColorFactor) {\n params.color = new Color(0xffffff);\n }\n\n if (materialDef.normalTexture !== undefined) {\n const normalMap = this.textureCache.get(materialDef.normalTexture.index);\n if (normalMap) {\n params.normalMap = normalMap;\n }\n }\n\n // Emissive texture\n if (materialDef.emissiveTexture !== undefined) {\n const emissiveMap = this.textureCache.get(materialDef.emissiveTexture.index);\n if (emissiveMap) {\n params.emissiveMap = emissiveMap;\n }\n }\n\n // Metallic-roughness texture\n // Check if we need MeshStandardMaterial for full PBR support or we can use MeshPhongMaterial\n // Use MeshStandardMaterial only if there are PBR textures present to optimize rendering performance.\n // If only factors are present, MeshPhongMaterial is enough for basic lighting.\n const usePBR = materialDef.pbrMetallicRoughness?.metallicRoughnessTexture !== undefined;\n\n if (usePBR) {\n // Apply default values if not specified\n params.metalness =\n materialDef.pbrMetallicRoughness?.metallicFactor !== undefined\n ? materialDef.pbrMetallicRoughness.metallicFactor\n : 1.0;\n params.roughness =\n materialDef.pbrMetallicRoughness?.roughnessFactor !== undefined\n ? materialDef.pbrMetallicRoughness.roughnessFactor\n : 1.0;\n\n if (materialDef.pbrMetallicRoughness?.metallicRoughnessTexture !== undefined) {\n const map = this.textureCache.get(materialDef.pbrMetallicRoughness.metallicRoughnessTexture.index);\n if (map) {\n params.metalnessMap = map;\n params.roughnessMap = map;\n }\n }\n material = new MeshStandardMaterial(params);\n } else {\n material = new MeshPhongMaterial(params);\n }\n\n // Additional maps setup (needs to happen after instantiation for some properties)\n if (material.map) material.map.colorSpace = SRGBColorSpace;\n if (material.emissiveMap) material.emissiveMap.colorSpace = SRGBColorSpace;\n\n if (material.normalMap) {\n if (materialDef.normalTexture?.scale !== undefined) {\n material.normalScale.set(materialDef.normalTexture.scale, materialDef.normalTexture.scale);\n }\n }\n if (materialDef.occlusionTexture !== undefined) {\n const aoMap = this.textureCache.get(materialDef.occlusionTexture.index);\n if (aoMap) {\n material.aoMap = aoMap;\n if (materialDef.occlusionTexture.strength !== undefined) {\n material.aoMapIntensity = materialDef.occlusionTexture.strength;\n }\n }\n }\n }\n\n return material;\n }\n\n getCachedMaterial(materialIndex, primitiveMode) {\n const materialCacheKey = `material_${materialIndex}`;\n const materialCache = this.materialCache.get(materialCacheKey);\n\n if (materialCache) {\n if (primitiveMode === GL_CONSTANTS.POINTS) {\n return materialCache.points;\n } else if (\n primitiveMode === GL_CONSTANTS.LINES ||\n primitiveMode === GL_CONSTANTS.LINE_STRIP ||\n primitiveMode === GL_CONSTANTS.LINE_LOOP\n ) {\n return materialCache.lines;\n } else {\n return materialCache.mesh;\n }\n }\n\n return null;\n }\n\n disposeMaterials() {\n this.textureCache.forEach((texture) => texture.dispose());\n this.textureCache.clear();\n\n this.materials.forEach((material) => {\n if (material.map) material.map.dispose();\n if (material.lightMap) material.lightMap.dispose();\n if (material.bumpMap) material.bumpMap.dispose();\n if (material.normalMap) material.normalMap.dispose();\n if (material.specularMap) material.specularMap.dispose();\n if (material.envMap) material.envMap.dispose();\n if (material.aoMap) material.aoMap.dispose();\n if (material.metalnessMap) material.metalnessMap.dispose();\n if (material.roughnessMap) material.roughnessMap.dispose();\n if (material.emissiveMap) material.emissiveMap.dispose();\n material.dispose();\n });\n this.materials.clear();\n\n this.materialCache.forEach((materialCache) => {\n if (materialCache.mesh) {\n if (materialCache.mesh.map) materialCache.mesh.map.dispose();\n if (materialCache.mesh.lightMap) materialCache.mesh.lightMap.dispose();\n if (materialCache.mesh.bumpMap) materialCache.mesh.bumpMap.dispose();\n if (materialCache.mesh.normalMap) materialCache.mesh.normalMap.dispose();\n if (materialCache.mesh.specularMap) materialCache.mesh.specularMap.dispose();\n if (materialCache.mesh.envMap) materialCache.mesh.envMap.dispose();\n if (materialCache.mesh.aoMap) materialCache.mesh.aoMap.dispose();\n if (materialCache.mesh.metalnessMap) materialCache.mesh.metalnessMap.dispose();\n if (materialCache.mesh.roughnessMap) materialCache.mesh.roughnessMap.dispose();\n if (materialCache.mesh.emissiveMap) materialCache.mesh.emissiveMap.dispose();\n materialCache.mesh.dispose();\n }\n\n if (materialCache.points) {\n if (materialCache.points.map) materialCache.points.map.dispose();\n materialCache.points.dispose();\n }\n\n if (materialCache.lines) {\n if (materialCache.lines.map) materialCache.lines.map.dispose();\n materialCache.lines.dispose();\n }\n });\n this.materialCache.clear();\n }\n\n estimateNodeSize(meshIndex) {\n if (!this.json.meshes) return 0;\n\n const meshDef = this.json.meshes[meshIndex];\n if (!meshDef || !meshDef.primitives) return 0;\n\n let totalSize = 0;\n for (const primitive of meshDef.primitives) {\n if (primitive.attributes) {\n for (const [, accessorIndex] of Object.entries(primitive.attributes)) {\n if (accessorIndex === undefined) continue;\n\n const accessor = this.json.accessors[accessorIndex];\n if (!accessor) continue;\n\n const numComponents = this.getNumComponents(accessor.type);\n const bytesPerComponent = this.getComponentSize(accessor.componentType);\n totalSize += accessor.count * numComponents * bytesPerComponent;\n }\n }\n\n if (primitive.indices !== undefined) {\n const accessor = this.json.accessors[primitive.indices];\n if (accessor) {\n const bytesPerComponent = this.getComponentSize(accessor.componentType);\n totalSize += accessor.count * bytesPerComponent;\n }\n }\n }\n\n return totalSize;\n }\n}\n","import {\n BufferGeometry,\n PointsMaterial,\n Points,\n Mesh,\n TriangleStripDrawMode,\n TriangleFanDrawMode,\n LineSegments,\n Line,\n LineLoop,\n Group,\n Vector3,\n Vector2,\n Quaternion,\n Matrix4,\n Box3,\n MeshPhongMaterial,\n Color,\n MathUtils,\n PerspectiveCamera,\n OrthographicCamera,\n NormalBlending,\n BufferAttribute,\n LineBasicMaterial,\n DataTexture,\n RGBAFormat,\n FloatType,\n NearestFilter,\n} from \"three\";\nimport { GL_CONSTANTS } from \"./GltfStructure.js\";\nimport { mergeGeometries } from \"three/examples/jsm/utils/BufferGeometryUtils.js\";\n\nconst DRACO_EXTENSION_NAME = \"KHR_draco_mesh_compression\";\n\nconst STRUCTURE_ID_SEPARATOR = \":\";\n\n//#AI-GENERATED using Gemini 2.5 Pro, Claude-4-sonnet\n//#Reviewed and adapted by dborysov@opendesign.com\n\nexport class DynamicGltfLoader {\n constructor(camera, scene, renderer) {\n this.camera = camera;\n this.scene = scene;\n this.renderer = renderer;\n\n this.eventHandlers = {\n geometryprogress: [],\n databasechunk: [],\n geometryend: [],\n geometryerror: [],\n update: [],\n geometrymemory: [],\n optimizationprogress: [],\n };\n\n this.loadDistance = 100;\n this.unloadDistance = 150;\n this.checkInterval = 1000;\n\n this.nodes = new Map();\n this.loadedMeshes = new Map();\n this.nodesToLoad = [];\n this.edgeNodes = [];\n this.structures = [];\n this.structureRoots = new Map();\n\n this.memoryLimit = this.getAvailableMemory();\n this.optimizationMemoryMultiplier = 5;\n this.memoryEstimationFactor = 1.7;\n this.loadedGeometrySize = 0;\n this.geometryCache = new Map();\n this.materialCache = new Map();\n this.textureCache = new Map();\n this.currentMemoryUsage = 0;\n this.pendingMemoryUsage = 0;\n\n this.updateMemoryIndicator();\n\n this.loadedMaterials = new Map();\n this.abortController = new AbortController();\n\n this.batchSize = 10000;\n this.frameDelay = 0;\n\n this.graphicsObjectLimit = 10000;\n this.totalLoadedObjects = 0;\n\n this.handleToObjects = new Map();\n\n this.originalObjects = new Set();\n this.originalObjectsToSelection = new Set();\n\n this.optimizedOriginalMap = new Map();\n this.mergedMesh = new Set();\n this.mergedLines = new Set();\n this.mergedLineSegments = new Set();\n this.mergedPoints = new Set();\n\n this.isolatedObjects = [];\n //!!window.WebGL2RenderingContext && this.renderer.getContext() instanceof WebGL2RenderingContext\n this.useVAO = false;\n this.visibleEdges = true;\n\n this.handleToOptimizedObjects = new Map();\n\n this.hiddenHandles = new Set();\n this.newOptimizedObjects = new Set();\n this.oldOptimizeObjects = new Set();\n\n // Transform system for exploded view - works directly with original objects\n this.objectTransforms = new Map(); // originalObject -> Matrix4\n this.transformedGeometries = new Map(); // mergedObject.uuid -> original position data\n\n // TODO: Remove when highlight is implemented via shader.\n // Sync transforms to original (hidden) objects so GeometryHighlighter\n // wireframes follow the exploded positions.\n this.syncTransformsToOriginalObjects = true;\n this._originalObjectMatrices = new Map(); // object -> original matrix (for restore)\n\n this.activeChunkLoads = 0;\n this.chunkQueue = [];\n\n // GPU-accelerated visibility system\n this.objectIdToIndex = new Map(); // objectId -> index\n this.maxObjectId = 0; // Maximum object ID\n this.objectVisibility = new Float32Array(); // Array of visibility flags for each object\n\n // Chunk loading configuration\n this.maxConcurrentChunks = 6; // Default limit\n\n // Merged geometry tracking\n this.mergedObjectMap = new Map(); // objectId -> {mergedObject, startIndex, endIndex, vertexCount}\n this.mergedGeometryVisibility = new Map(); // mergedObject -> visibility array\n\n this._webglInfoCache = null;\n\n // Transform texture support\n this.transformTextureSize = 1024;\n this.transformTexture = this.createDummyTexture();\n this.transformData = null;\n this.identityTransformData = null;\n this.visibilityMaterials = new Set(); // Keep track of materials to update uniforms\n\n // KHR_draco_mesh_compression support — DRACOLoader is injected from\n // the outside via setDracoLoader() so this module doesn't carry a hard\n // dependency on three/examples/jsm/loaders/DRACOLoader.js (which has no\n // CommonJS build and is awkward to consume in non-ESM environments).\n this._dracoLoader = null;\n }\n\n // Inject an externally-configured DRACOLoader instance. The caller is\n // responsible for setting the decoder path / decoder config / worker pool\n // size before passing it in. Pass `null` to detach.\n //\n // Usage:\n // import { DRACOLoader } from \"three/examples/jsm/loaders/DRACOLoader.js\";\n // const draco = new DRACOLoader();\n // draco.setDecoderPath(\"https://www.gstatic.com/draco/v1/decoders/\");\n // loader.setDracoLoader(draco);\n setDracoLoader(loader = null) {\n this._dracoLoader = loader || null;\n }\n\n // Decode a Draco-compressed primitive into a BufferGeometry. The caller\n // (loadNode) guarantees this._dracoLoader is set — see the early check at\n // the top of loadNode().\n //\n // Important detail: DRACOLoader.decodeGeometry() uses the *keys* of\n // taskConfig.attributeIDs verbatim as attribute names on the resulting\n // BufferGeometry. So if we pass dracoExt.attributes directly (POSITION,\n // NORMAL, TEXCOORD_0…) the geometry ends up with those uppercase names\n // and downstream code that expects three.js conventions (position,\n // normal, uv) breaks. We pre-translate the keys here.\n async _decodeDracoPrimitive(structure, primitive, dracoBufferData) {\n const dracoExt = primitive.extensions[DRACO_EXTENSION_NAME];\n const loader = this._dracoLoader;\n\n const attributeIDs = {};\n const attributeTypes = {};\n // glTF attribute name → three.js name, used both for re-keying the\n // DRACOLoader config and for re-mapping bounds afterwards.\n const gltfNameToThreeName = new Map();\n // three.js attribute name → glTF accessor index (for normalized flag,\n // bounds, and post-decode dequantization).\n const threeNameToAccessor = new Map();\n\n for (const [gltfAttrName, dracoUniqueId] of Object.entries(dracoExt.attributes)) {\n const threeName = this._gltfAttributeNameToThreeName(gltfAttrName);\n attributeIDs[threeName] = dracoUniqueId;\n gltfNameToThreeName.set(gltfAttrName, threeName);\n\n const accessorIdx = primitive.attributes[gltfAttrName];\n if (accessorIdx !== undefined) {\n const accessor = structure.json.accessors[accessorIdx];\n attributeTypes[threeName] = this._gltfComponentTypeToTypedArrayName(accessor.componentType);\n threeNameToAccessor.set(threeName, accessor);\n }\n }\n\n const geometry = await loader.decodeGeometry(dracoBufferData, {\n attributeIDs,\n attributeTypes,\n useUniqueIDs: true,\n });\n\n // DRACOLoader doesn't carry the accessor.normalized flag through, so\n // we apply it manually. This also matters for KHR_mesh_quantization +\n // Draco combined files (rare, but spec-compliant).\n for (const [threeName, accessor] of threeNameToAccessor) {\n const attribute = geometry.getAttribute(threeName);\n if (!attribute) continue;\n if (accessor.normalized === true) {\n attribute.normalized = true;\n }\n // Min/max bounds — used by computeBoundingBox/Sphere fast-path.\n if (accessor.min) attribute.min = accessor.min;\n if (accessor.max) attribute.max = accessor.max;\n }\n\n // Mirror the dequantization done in _createGeometryAttribute() for\n // ordinary glTF attributes: convert any normalized integer attributes\n // into a tightly-packed Float32Array so that BufferGeometryUtils\n // .mergeGeometries() (used by this loader for batched draw calls) sees\n // a consistent layout across all primitives.\n for (const [threeName, accessor] of threeNameToAccessor) {\n const attribute = geometry.getAttribute(threeName);\n if (!attribute || !attribute.normalized) continue;\n const denom = this._normalizedDenominator(accessor.componentType);\n if (denom <= 0) continue;\n const src = attribute.array;\n const inv = 1 / denom;\n const isSigned = accessor.componentType === 5120 || accessor.componentType === 5122;\n const out = new Float32Array(src.length);\n for (let i = 0; i < src.length; i++) {\n let v = src[i] * inv;\n if (isSigned && v < -1) v = -1;\n out[i] = v;\n }\n const newAttr = new BufferAttribute(out, attribute.itemSize, false);\n if (accessor.min) newAttr.min = accessor.min;\n if (accessor.max) newAttr.max = accessor.max;\n geometry.setAttribute(threeName, newAttr);\n }\n\n return geometry;\n }\n\n _gltfComponentTypeToTypedArrayName(componentType) {\n switch (componentType) {\n case 5120:\n return \"Int8Array\";\n case 5121:\n return \"Uint8Array\";\n case 5122:\n return \"Int16Array\";\n case 5123:\n return \"Uint16Array\";\n case 5125:\n return \"Uint32Array\";\n case 5126:\n return \"Float32Array\";\n default:\n return \"Float32Array\";\n }\n }\n\n // glTF normalization denominators (per glTF 2.0 spec, accessor.normalized).\n _normalizedDenominator(componentType) {\n switch (componentType) {\n case 5120:\n return 127; // BYTE\n case 5121:\n return 255; // UBYTE\n case 5122:\n return 32767; // SHORT\n case 5123:\n return 65535; // USHORT\n default:\n return 0; // not normalizable\n }\n }\n\n // Map glTF attribute names to three.js BufferGeometry attribute names.\n _gltfAttributeNameToThreeName(name) {\n switch (name) {\n case \"POSITION\":\n return \"position\";\n case \"NORMAL\":\n return \"normal\";\n case \"TANGENT\":\n return \"tangent\";\n case \"TEXCOORD_0\":\n return \"uv\";\n case \"TEXCOORD_1\":\n return \"uv2\";\n case \"COLOR_0\":\n return \"color\";\n case \"JOINTS_0\":\n return \"skinIndex\";\n case \"WEIGHTS_0\":\n return \"skinWeight\";\n default:\n return name.toLowerCase();\n }\n }\n\n // Build a buffer request for an accessor that correctly accounts for\n // bufferView.byteStride (interleaved attributes — common in quantized models\n // produced via KHR_mesh_quantization / gltfpack).\n _buildAccessorRequest(structure, accessorIndex, type, primIdx) {\n const accessor = structure.json.accessors[accessorIndex];\n const bufferView = structure.json.bufferViews[accessor.bufferView];\n const components = structure.getNumComponents(accessor.type);\n const componentSize = structure.getComponentSize(accessor.componentType);\n const itemBytes = components * componentSize;\n const accessorByteOffset = accessor.byteOffset || 0;\n const bvByteOffset = bufferView.byteOffset || 0;\n const byteStride = bufferView.byteStride || 0;\n const interleaved = byteStride !== 0 && byteStride !== itemBytes;\n\n const offset = bvByteOffset + accessorByteOffset;\n let length;\n if (interleaved) {\n // For interleaved data the last element begins at (count-1)*stride\n // and spans itemBytes from there. Fetch only that tight extent.\n length = (accessor.count - 1) * byteStride + itemBytes;\n } else {\n length = accessor.count * itemBytes;\n }\n\n return {\n offset,\n length,\n componentType: accessor.componentType,\n accessorIndex,\n type,\n primIdx,\n // Metadata used by the geometry-assembly pass below.\n _accessor: accessor,\n _components: components,\n _componentSize: componentSize,\n _itemBytes: itemBytes,\n _byteStride: byteStride,\n _interleaved: interleaved,\n };\n }\n\n // Create a plain BufferAttribute, handling two transformations that\n // KHR_mesh_quantization-encoded glTF files commonly require:\n // 1. Deinterleave when the accessor lives inside a strided bufferView.\n // 2. Dequantize (integer typed array + accessor.normalized=true) into\n // a tightly-packed Float32Array in [-1,1] / [0,1] range.\n //\n // Reasons for always emitting a non-strided, non-normalized Float32Array\n // attribute:\n // * BufferGeometryUtils.mergeGeometries() (used heavily in this loader\n // to batch draw calls) refuses to merge InterleavedBufferAttribute\n // and requires identical TypedArray + `normalized` across primitives.\n // Eagerly dequantizing here lets us mix quantized and non-quantized\n // primitives in the same merged buffer.\n // * Geometry-local bounds (boundingBox, processNodeHierarchy extents)\n // and per-vertex CPU-side traversal can then assume float values.\n //\n // The trade-off is some extra CPU memory (4 bytes per component instead of\n // 1/2). The download size benefit of quantization is preserved.\n _createGeometryAttribute(req) {\n const accessor = req._accessor;\n const components = req._components;\n const count = accessor.count;\n const stride = req._interleaved ? req._byteStride / req._componentSize : components;\n const normalized = accessor.normalized === true;\n const componentType = req.componentType;\n const src = req.data;\n\n // Fast path: tightly-packed, non-normalized data — no copy needed.\n // Covers the common cases: non-quantized FLOAT attributes and integer\n // indices. The `req.data` view already has the correct length & type.\n if (!req._interleaved && !normalized) {\n return new BufferAttribute(src, components, false);\n }\n\n // Normalized integer attribute (KHR_mesh_quantization) → dequantize to\n // Float32 in [-1,1] / [0,1] range. This keeps merge/bounds simple.\n if (normalized) {\n const denom = this._normalizedDenominator(componentType);\n if (denom > 0) {\n const out = new Float32Array(count * components);\n const inv = 1 / denom;\n const isSignedNormalized = componentType === 5120 || componentType === 5122;\n for (let i = 0; i < count; i++) {\n const srcBase = i * stride;\n const dstBase = i * components;\n for (let c = 0; c < components; c++) {\n let v = src[srcBase + c] * inv;\n if (isSignedNormalized && v < -1) v = -1; // glTF spec clamp\n out[dstBase + c] = v;\n }\n }\n return new BufferAttribute(out, components, false);\n }\n }\n\n // Interleaved + non-normalized: deinterleave but preserve original\n // typed-array type (rare, but handle it for completeness).\n const TypedArrayCtor = src.constructor;\n const out = new TypedArrayCtor(count * components);\n for (let i = 0; i < count; i++) {\n const srcBase = i * stride;\n const dstBase = i * components;\n for (let c = 0; c < components; c++) {\n out[dstBase + c] = src[srcBase + c];\n }\n }\n return new BufferAttribute(out, components, false);\n }\n\n createDummyTexture() {\n // Create 1x1 dummy texture with identity matrix to prevent shader crash/black screen\n const data = new Float32Array(16); // 4x4 matrix\n const identity = new Matrix4();\n identity.toArray(data);\n\n // Correct dummy size: 4x1 to hold at least one matrix\n const dummyData = new Float32Array(16);\n identity.toArray(dummyData);\n const dummyTexture = new DataTexture(dummyData, 4, 1, RGBAFormat, FloatType);\n\n dummyTexture.minFilter = NearestFilter;\n dummyTexture.magFilter = NearestFilter;\n dummyTexture.needsUpdate = true;\n return dummyTexture;\n }\n\n initTransformTexture() {\n if (this.transformTexture) {\n this.transformTexture.dispose();\n }\n\n // Logic from BatchedMesh.js _initMatricesTexture\n // layout (1 matrix = 4 pixels)\n // RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)\n const maxInstanceCount = this.maxObjectId + 1;\n let size = Math.sqrt(maxInstanceCount * 4); // 4 pixels needed for 1 matrix\n size = Math.ceil(size / 4) * 4;\n size = Math.max(size, 4);\n\n this.transformTextureSize = size;\n const arraySize = size * size * 4; // 4 floats per RGBA pixel\n this.transformData = new Float32Array(arraySize);\n\n // Create and cache identity matrices for fast reset\n this.identityTransformData = new Float32Array(arraySize);\n for (let i = 0; i <= this.maxObjectId; i++) {\n const base = i * 16;\n if (base + 15 < arraySize) {\n this.identityTransformData[base + 0] = 1; // m00\n this.identityTransformData[base + 5] = 1; // m11\n this.identityTransformData[base + 10] = 1; // m22\n this.identityTransformData[base + 15] = 1; // m33\n }\n }\n\n // Initialize with identity matrices\n this._resetTransformData(false);\n\n this.transformTexture = new DataTexture(this.transformData, size, size, RGBAFormat, FloatType);\n\n this.transformTexture.needsUpdate = true;\n this.transformTexture.generateMipmaps = false;\n\n console.log(`Initialized transform texture: ${size}x${size} for ${maxInstanceCount} objects`);\n\n this.updateMaterialUniforms();\n\n // Force all visibility materials to update\n this.visibilityMaterials.forEach((material) => {\n material.needsUpdate = true;\n });\n }\n\n // Fast reset to Identity matrices without creating Matrix4 objects\n _resetTransformData(updateTexture = true) {\n if (!this.transformData || !this.identityTransformData) return;\n\n // Fast copy from cached identity array\n this.transformData.set(this.identityTransformData);\n\n if (updateTexture) {\n this.updateTransformTexture();\n }\n }\n\n updateMaterialUniforms() {\n // Only update if the texture actually changed\n if (\n this._lastTransformTexture === this.transformTexture &&\n this._lastTransformTextureSize === this.transformTextureSize\n ) {\n return;\n }\n\n this._lastTransformTexture = this.transformTexture;\n this._lastTransformTextureSize = this.transformTextureSize;\n\n this.visibilityMaterials.forEach((material) => {\n if (material.userData && material.userData.visibilityUniforms) {\n material.userData.visibilityUniforms.transformTexture.value = this.transformTexture;\n material.userData.visibilityUniforms.transformTextureSize.value = this.transformTextureSize;\n }\n });\n }\n\n updateTransformTexture() {\n if (!this.transformTexture) return;\n this.transformTexture.needsUpdate = true;\n }\n\n setVisibleEdges(visible = true) {\n this.visibleEdges = visible;\n }\n\n getAvailableMemory() {\n let memoryLimit = 6 * 1024 * 1024 * 1024;\n try {\n if (navigator.deviceMemory) {\n memoryLimit = navigator.deviceMemory * 1024 * 1024 * 1024;\n } else if (performance.memory) {\n const jsHeapSizeLimit = performance.memory.jsHeapSizeLimit;\n if (jsHeapSizeLimit) {\n memoryLimit = Math.min(memoryLimit, jsHeapSizeLimit);\n }\n }\n\n memoryLimit = Math.min(memoryLimit, 16 * 1024 * 1024 * 1024);\n memoryLimit = Math.max(memoryLimit, 2 * 1024 * 1024 * 1024);\n\n console.log(`Available memory set to ${Math.round(memoryLimit / (1024 * 1024 * 1024))}GB`);\n } catch (error) {\n console.warn(\"DynamicLoader: Error detecting available memory:\", error);\n }\n\n return memoryLimit;\n }\n\n getAbortController() {\n return this.abortController;\n }\n\n abortLoading() {\n this.abortController.abort();\n }\n\n getOptimizedGeometrySize() {\n let total = 0;\n const addSize = (obj) => {\n if (obj && obj.geometry) total += this.estimateGeometrySize(obj);\n };\n this.mergedMesh?.forEach(addSize);\n this.mergedLines?.forEach(addSize);\n this.mergedLineSegments?.forEach(addSize);\n this.mergedPoints?.forEach(addSize);\n return total;\n }\n\n updateMemoryIndicator() {\n const optimizedUsage = this.getOptimizedGeometrySize();\n const totalUsage = this.currentMemoryUsage + optimizedUsage;\n const totalUsageEstimate = Math.round(totalUsage * this.memoryEstimationFactor);\n this.dispatchEvent(\"geometrymemory\", {\n currentUsage: this.currentMemoryUsage,\n optimizedUsage,\n totalUsage,\n totalUsageEstimate,\n limit: this.memoryLimit,\n });\n }\n\n setMemoryLimit(bytesLimit) {\n // this.memoryLimit = bytesLimit;\n //this.updateMemoryIndicator();\n // console.log(`Memory limit set to ${Math.round(bytesLimit / (1024 * 1024))}MB`);\n }\n\n estimateGeometrySize(nodeGroup) {\n let totalSize = 0;\n nodeGroup.traverse((child) => {\n if (child.geometry) {\n if (this.abortController.signal.aborted) {\n throw new DOMException(\"Loading aborted\", \"AbortError\");\n }\n const geometry = child.geometry;\n\n if (geometry.attributes) {\n Object.values(geometry.attributes).forEach((attribute) => {\n if (attribute && attribute.array) {\n totalSize += attribute.array.byteLength;\n }\n });\n }\n\n if (geometry.index && geometry.index.array) {\n totalSize += geometry.index.array.byteLength;\n }\n }\n });\n\n return totalSize;\n }\n\n recalculateScene() {\n const geometries = [];\n this.scene.traverse((object) => {\n if (this.abortController.signal.aborted) {\n throw new DOMException(\"Loading aborted\", \"AbortError\");\n }\n\n if (object.geometry && !this.geometryCache.has(object.geometry.uuid)) {\n const size = this.estimateGeometrySize(object);\n this.geometryCache.set(object.geometry.uuid, size);\n geometries.push({\n object,\n size,\n distance: object.position.distanceTo(this.camera.position),\n });\n }\n });\n\n if (this.abortController.signal.aborted) {\n throw new DOMException(\"Loading aborted\", \"AbortError\");\n }\n\n geometries.sort((a, b) => b.distance - a.distance);\n\n let currentMemoryUsage = 0;\n for (const geo of geometries) {\n currentMemoryUsage += geo.size;\n }\n\n const effectiveLimitForEviction = this.memoryLimit / this.memoryEstimationFactor;\n if (currentMemoryUsage > effectiveLimitForEviction) {\n console.log(\n `Memory usage (${Math.round((currentMemoryUsage * this.memoryEstimationFactor) / (1024 * 1024))}MB est.) exceeds limit`\n );\n\n for (const geo of geometries) {\n if (currentMemoryUsage <= effectiveLimitForEviction) break;\n\n if (this.abortController.signal.aborted) {\n throw new DOMException(\"Loading aborted\", \"AbortError\");\n }\n\n const object = geo.object;\n if (object.geometry) {\n currentMemoryUsage -= geo.size;\n this.geometryCache.delete(object.geometry.uuid);\n object.geometry.dispose();\n object.visible = false;\n }\n }\n }\n\n this.currentMemoryUsage = currentMemoryUsage;\n this.updateMemoryIndicator();\n\n console.log(`Final memory usage: ${Math.round(currentMemoryUsage / (1024 * 1024))}MB`);\n }\n\n getStats() {\n let totalObjects = 0;\n let renderedObjects = 0;\n let totalTriangles = 0;\n let renderedTriangles = 0;\n let totalLines = 0;\n let renderedLines = 0;\n let totalEdges = 0;\n let renderedEdges = 0;\n\n this.scene.traverse((object) => {\n totalObjects++;\n\n const geometry = object.geometry;\n if (!geometry) return;\n\n let triCount = 0;\n if (geometry.index) {\n triCount = Math.floor(geometry.index.count / 3);\n } else if (geometry.attributes && geometry.attributes.position) {\n triCount = Math.floor(geometry.attributes.position.count / 3);\n }\n totalTriangles += triCount;\n\n let lineCount = 0;\n if (geometry.index) {\n lineCount = Math.floor(geometry.index.count / 2);\n } else if (geometry.attributes && geometry.attributes.position) {\n lineCount = Math.floor(geometry.attributes.position.count / 2);\n }\n\n if (object.type === \"Line\" || object.type === \"LineSegments\" || object.type === \"LineLoop\") {\n if (object.userData.isEdge) {\n totalEdges += lineCount;\n } else {\n totalLines += lineCount;\n }\n }\n\n if (object.visible !== false) {\n if (object.isMesh || object.isLine || object.isPoints) {\n renderedObjects++;\n if (object.isMesh) {\n renderedTriangles += triCount;\n } else if (object.type === \"Line\" || object.type === \"LineSegments\" || object.type === \"LineLoop\") {\n if (object.userData.isEdge) {\n renderedEdges += lineCount;\n } else {\n renderedLines += lineCount;\n }\n }\n }\n }\n });\n\n const geometryCount = this.geometryCache ? this.geometryCache.size : 0;\n const geometryMemoryBytes = Array.from(this.geometryCache?.values?.() || []).reduce((a, b) => a + b, 0);\n\n const uniqueMaterialIds = new Set();\n const uniqueTextureIds = new Set();\n if (Array.isArray(this.structures)) {\n for (const structure of this.structures) {\n try {\n for (const entry of structure.materialCache.values()) {\n if (entry?.mesh?.uuid) uniqueMaterialIds.add(entry.mesh.uuid);\n if (entry?.points?.uuid) uniqueMaterialIds.add(entry.points.uuid);\n if (entry?.lines?.uuid) uniqueMaterialIds.add(entry.lines.uuid);\n }\n } catch (exp) {\n console.warn(\"DynamicLoader: Error collecting material stats\", exp);\n }\n }\n }\n const materialCount = uniqueMaterialIds.size;\n const textureCount = uniqueTextureIds.size;\n const optimizedUsageBytes = this.getOptimizedGeometrySize();\n const totalUsageBytes = geometryMemoryBytes + optimizedUsageBytes;\n const estimatedGpuMemoryBytes = Math.round(totalUsageBytes * this.memoryEstimationFactor);\n\n if (!this._webglInfoCache) {\n try {\n const gl = this.renderer.getContext();\n const dbgInfo = gl.getExtension(\"WEBGL_debug_renderer_info\");\n if (dbgInfo) {\n const rendererStr = gl.getParameter(dbgInfo.UNMASKED_RENDERER_WEBGL);\n const vendorStr = gl.getParameter(dbgInfo.UNMASKED_VENDOR_WEBGL);\n this._webglInfoCache = { renderer: rendererStr, vendor: vendorStr };\n } else {\n this._webglInfoCache = { renderer: null, vendor: null };\n }\n } catch (e) {\n console.warn(\"DynamicLoader: Error getting webgl info\", e);\n this._webglInfoCache = { renderer: null, vendor: null };\n }\n }\n\n const size = new Vector2();\n if (this.renderer && this.renderer.getSize) {\n this.renderer.getSize(size);\n }\n\n return {\n scene: {\n beforeOptimization: {\n objects: totalObjects - renderedObjects,\n triangles: totalTriangles - renderedTriangles,\n lines: totalLines - renderedLines,\n edges: totalEdges - renderedEdges,\n },\n\n afterOptimization: {\n objects: renderedObjects,\n triangles: renderedTriangles,\n lines: renderedLines,\n edges: renderedEdges,\n },\n },\n memory: {\n geometries: {\n count: geometryCount,\n bytes: geometryMemoryBytes,\n optimizedBytes: optimizedUsageBytes,\n totalRawBytes: totalUsageBytes,\n },\n textures: { count: textureCount },\n materials: { count: materialCount },\n totalEstimatedGpuBytes: estimatedGpuMemoryBytes,\n },\n system: {\n webglRenderer: this._webglInfoCache?.renderer || \"\",\n webglVendor: this._webglInfoCache?.vendor || \"\",\n viewport: { width: size.x || 0, height: size.y || 0 },\n },\n };\n }\n\n async loadNode(nodeId, onLoadFinishCb, reservedEstimatedSize = 0) {\n const node = this.nodes.get(nodeId);\n if (!node || node.loaded || node.loading) {\n this.pendingMemoryUsage = Math.max(0, this.pendingMemoryUsage - reservedEstimatedSize);\n return;\n }\n\n node.loading = true;\n const meshDef = node.structure.getJson().meshes[node.meshIndex];\n\n try {\n // Fail fast: if any primitive in this mesh requires Draco but no\n // DRACOLoader was injected, abort with a single descriptive error\n // *before* we fetch any buffers. Otherwise downstream code\n // (estimateGeometrySize, mesh assembly, etc.) would hit secondary\n // null-deref crashes that mask the real cause. The throw is caught\n // by the surrounding try/catch and logged once via the standard\n // \"Error loading node N\" channel.\n if (\n !this._dracoLoader &&\n meshDef.primitives &&\n meshDef.primitives.some((p) => p.extensions && p.extensions[DRACO_EXTENSION_NAME])\n ) {\n throw new Error(\n \"primitive uses KHR_draco_mesh_compression but no DRACOLoader is configured. \" +\n \"Inject one via dynamicLoader.setDracoLoader(new DRACOLoader()) before opening the file.\"\n );\n }\n\n const bufferRequests = [];\n const primitiveReqMap = new Map();\n const dracoPrimitives = new Map(); // primIdx -> { req: {offset, length}, primitive }\n\n for (let primIdx = 0; primIdx < meshDef.primitives.length; primIdx++) {\n const primitive = meshDef.primitives[primIdx];\n const reqs = [];\n\n // KHR_draco_mesh_compression: load the entire compressed bufferView\n // and skip the per-attribute requests below.\n const dracoExt = primitive.extensions && primitive.extensions[DRACO_EXTENSION_NAME];\n if (dracoExt) {\n const bufferView = node.structure.json.bufferViews[dracoExt.bufferView];\n const byteOffset = bufferView.byteOffset || 0;\n const byteLength = bufferView.byteLength;\n const dracoReq = {\n offset: byteOffset,\n length: byteLength,\n componentType: 5121, // raw bytes\n type: \"draco\",\n primIdx,\n };\n reqs.push(dracoReq);\n dracoPrimitives.set(primIdx, { req: dracoReq, primitive });\n primitiveReqMap.set(primIdx, reqs);\n bufferRequests.push(...reqs);\n continue;\n }\n\n if (primitive.attributes.POSITION !== undefined) {\n reqs.push(this._buildAccessorRequest(node.structure, primitive.attributes.POSITION, \"position\", primIdx));\n }\n if (primitive.attributes.NORMAL !== undefined) {\n reqs.push(this._buildAccessorRequest(node.structure, primitive.attributes.NORMAL, \"normal\", primIdx));\n }\n if (primitive.attributes.TEXCOORD_0 !== undefined) {\n reqs.push(this._buildAccessorRequest(node.structure, primitive.attributes.TEXCOORD_0, \"uv\", primIdx));\n }\n if (primitive.indices !== undefined) {\n reqs.push(this._buildAccessorRequest(node.structure, primitive.indices, \"index\", primIdx));\n }\n\n primitiveReqMap.set(primIdx, reqs);\n bufferRequests.push(...reqs);\n }\n\n if (bufferRequests.length === 0) {\n node.loaded = true;\n node.loading = false;\n this.pendingMemoryUsage = Math.max(0, this.pendingMemoryUsage - reservedEstimatedSize);\n return;\n }\n bufferRequests.sort((a, b) => a.offset - b.offset);\n const minOffset = bufferRequests[0].offset;\n const maxOffset = Math.max(...bufferRequests.map((r) => r.offset + r.length));\n const totalLength = maxOffset - minOffset;\n\n const { buffer, relOffset: baseRelOffset } = await node.structure.scheduleRequest({\n offset: minOffset,\n length: totalLength,\n componentType: null,\n });\n\n for (const req of bufferRequests) {\n const relOffset = req.offset - minOffset;\n req.data = node.structure.createTypedArray(buffer, baseRelOffset + relOffset, req.length, req.componentType);\n }\n\n for (let primIdx = 0; primIdx < meshDef.primitives.length; primIdx++) {\n const primitive = meshDef.primitives[primIdx];\n const reqs = primitiveReqMap.get(primIdx);\n let geometry;\n\n // Handle Draco-compressed primitives\n if (dracoPrimitives.has(primIdx)) {\n const dracoReq = reqs.find((r) => r.type === \"draco\");\n // Build a clean ArrayBuffer for the DRACO decoder.\n // dracoReq.data is a Uint8Array view into the larger shared buffer.\n const dracoBytes = new Uint8Array(dracoReq.data.buffer, dracoReq.data.byteOffset, dracoReq.data.byteLength);\n const dracoBuffer = dracoBytes.slice().buffer; // copy to standalone ArrayBuffer\n // Any decode failure (e.g. corrupted compressed data) will bubble\n // up to the outer try/catch and be reported once via the standard\n // \"Error loading node N\" channel rather than a misleading\n // \"skipping primitive\" warning followed by a downstream null deref.\n geometry = await this._decodeDracoPrimitive(node.structure, primitive, dracoBuffer);\n } else {\n geometry = new BufferGeometry();\n\n if (primitive.attributes.POSITION !== undefined) {\n const req = reqs.find((r) => r.type === \"position\" && r.accessorIndex === primitive.attributes.POSITION);\n geometry.setAttribute(\"position\", this._createGeometryAttribute(req));\n }\n\n if (primitive.attributes.NORMAL !== undefined) {\n const req = reqs.find((r) => r.type === \"normal\" && r.accessorIndex === primitive.attributes.NORMAL);\n geometry.setAttribute(\"normal\", this._createGeometryAttribute(req));\n }\n\n if (primitive.attributes.TEXCOORD_0 !== undefined) {\n const req = reqs.find((r) => r.type === \"uv\" && r.accessorIndex === primitive.attributes.TEXCOORD_0);\n geometry.setAttribute(\"uv\", this._createGeometryAttribute(req));\n }\n\n if (primitive.indices !== undefined) {\n const req = reqs.find((r) => r.type === \"index\" && r.accessorIndex === primitive.indices);\n // Indices are never interleaved per glTF spec, but use the same\n // helper for consistency (it falls back to BufferAttribute).\n geometry.setIndex(this._createGeometryAttribute(req));\n }\n }\n\n let material;\n if (primitive.material !== undefined) {\n material = node.structure.getCachedMaterial(primitive.material, primitive.mode);\n\n if (!material) {\n const materialDef = node.structure.json.materials[primitive.material];\n material = node.structure.createMaterial(materialDef, primitive.mode);\n }\n } else {\n material = this.createDefaultMaterial(primitive.mode);\n }\n\n let mesh;\n if (primitive.mode === GL_CONSTANTS.POINTS) {\n mesh = new Points(geometry, material);\n } else if (\n primitive.mode === GL_CONSTANTS.TRIANGLES ||\n primitive.mode === GL_CONSTANTS.TRIANGLE_STRIP ||\n primitive.mode === GL_CONSTANTS.TRIANGLE_FAN ||\n primitive.mode === undefined\n ) {\n mesh = new Mesh(geometry, material);\n if (primitive.mode === GL_CONSTANTS.TRIANGLE_STRIP) {\n mesh.drawMode = TriangleStripDrawMode;\n } else if (primitive.mode === GL_CONSTANTS.TRIANGLE_FAN) {\n mesh.drawMode = TriangleFanDrawMode;\n }\n } else if (primitive.mode === GL_CONSTANTS.LINES) {\n mesh = new LineSegments(geometry, material);\n } else if (primitive.mode === GL_CONSTANTS.LINE_STRIP) {\n mesh = new Line(geometry, material);\n } else if (primitive.mode === GL_CONSTANTS.LINE_LOOP) {\n mesh = new LineLoop(geometry, material);\n }\n\n if (node.extras) {\n mesh.userData = { ...mesh.userData, ...node.extras };\n }\n if (meshDef.extras) {\n mesh.userData = { ...mesh.userData, ...meshDef.extras };\n }\n if (primitive.extras) {\n mesh.userData = { ...mesh.userData, ...primitive.extras };\n }\n\n if (node.handle) {\n mesh.userData.handle = node.handle;\n } else {\n mesh.userData.handle = this.getFullHandle(node.structure.id, mesh.userData.handle);\n }\n\n if (mesh.material.name === \"edges\") {\n mesh.userData.isEdge = true;\n } else {\n mesh.userData.isEdge = false;\n }\n\n this.registerObjectWithHandle(mesh, mesh.userData.handle);\n\n mesh.position.copy(node.position);\n if (!geometry.attributes.normal) {\n geometry.computeVertexNormals();\n }\n if (material.aoMap && geometry.attributes.uv) {\n geometry.setAttribute(\"uv2\", geometry.attributes.uv);\n }\n if (node.group) {\n node.group.add(mesh);\n } else {\n this.scene.add(mesh);\n }\n node.object = mesh;\n this.totalLoadedObjects++;\n mesh.visible = this.totalLoadedObjects < this.graphicsObjectLimit;\n }\n node.loaded = true;\n node.loading = false;\n this.pendingMemoryUsage = Math.max(0, this.pendingMemoryUsage - reservedEstimatedSize);\n const geometrySize = this.estimateGeometrySize(node.object);\n this.geometryCache.set(node.object.uuid, geometrySize);\n this.currentMemoryUsage += geometrySize;\n if (onLoadFinishCb) {\n onLoadFinishCb();\n }\n } catch (error) {\n node.loading = false;\n this.pendingMemoryUsage = Math.max(0, this.pendingMemoryUsage - reservedEstimatedSize);\n\n if (error.name === \"AbortError\") {\n return;\n }\n\n if (node.structure && node.structure.loadingAborted) {\n return;\n }\n\n console.warn(`DynamicLoader: Error loading node ${nodeId}:`, error);\n }\n }\n\n unloadNode(nodeId) {\n const node = this.nodes.get(nodeId);\n if (!node || !node.loaded) return;\n\n if (node.object) {\n if (node.object.parent) {\n node.object.parent.remove(node.object);\n } else {\n this.scene.remove(node.object);\n }\n\n node.object.traverse((child) => {\n if (child.geometry) {\n const geometrySize = this.geometryCache.get(child.geometry.uuid) || 0;\n this.currentMemoryUsage -= geometrySize;\n this.geometryCache.delete(child.geometry.uuid);\n child.geometry.dispose();\n }\n });\n\n node.object = null;\n node.loaded = false;\n this.updateMemoryIndicator();\n console.log(`Unloaded node: ${nodeId}`);\n }\n }\n\n checkDistances() {\n const cameraPosition = this.camera.position;\n\n this.nodes.forEach((node, nodeId) => {\n const distance = cameraPosition.distanceTo(node.position);\n\n if (node.loaded) {\n if (distance > this.unloadDistance) {\n this.unloadNode(nodeId);\n }\n } else if (!node.loading) {\n if (distance < this.loadDistance) {\n this.loadNode(nodeId);\n }\n }\n });\n }\n\n async loadStructure(structures) {\n this.clear();\n\n const structureArray = Array.isArray(structures) ? structures : [structures];\n\n for (const structure of structureArray) {\n await structure.initialize(this);\n this.structures.push(structure);\n }\n\n for (const structure of this.structures) {\n try {\n await structure.loadTextures();\n await structure.loadMaterials();\n } catch (error) {\n console.error(\"DynamicLoader: Error loading materials:\", error);\n throw error;\n }\n }\n\n await this.processSceneHierarchy();\n }\n\n async processSceneHierarchy() {\n if (this.structures.length === 0) {\n throw new Error(\"DynamicLoader: No GLTF structures loaded\");\n }\n\n this.nodesToLoad = [];\n\n let estimatedSize = 0;\n\n for (const structure of this.structures) {\n const gltf = structure.getJson();\n\n if (!gltf.scenes || !gltf.scenes.length) {\n console.warn(\"DynamicLoader: No scenes found in GLTF structure\");\n continue;\n }\n\n estimatedSize += gltf.buffers[0].byteLength;\n\n const rootGroup = new Group();\n rootGroup.name = `structure_${structure.id}_root`;\n this.scene.add(rootGroup);\n this.structureRoots.set(structure.id, rootGroup);\n\n const scene = gltf.scenes[gltf.scene || 0];\n\n for (const nodeIndex of scene.nodes) {\n await this.processNodeHierarchy(structure, nodeIndex, rootGroup);\n }\n }\n\n const ignoreEdges = estimatedSize * 2 > this.memoryLimit;\n\n this.nodesToLoad.sort((a, b) => {\n const nodeA = this.nodes.get(a);\n const nodeB = this.nodes.get(b);\n\n if (!nodeA?.geometryExtents || !nodeB?.geometryExtents) {\n return 0;\n }\n\n const sizeA = nodeA.geometryExtents.getSize(new Vector3());\n const sizeB = nodeB.geometryExtents.getSize(new Vector3());\n const volumeA = sizeA.x * sizeA.y * sizeA.z;\n const volumeB = sizeB.x * sizeB.y * sizeB.z;\n\n return volumeB - volumeA;\n });\n\n if (!ignoreEdges && this.visibleEdges) {\n this.nodesToLoad.push(...this.edgeNodes);\n }\n\n this.dispatchEvent(\"databasechunk\", {\n totalNodes: this.nodesToLoad.length,\n structures: this.structures.map((s) => ({\n id: s.id,\n nodeCount: this.nodesToLoad.filter((nodeId) => nodeId.startsWith(s.id)).length,\n })),\n });\n }\n\n getFullHandle(structureId, originalHandle) {\n return `${structureId}${STRUCTURE_ID_SEPARATOR}${originalHandle}`;\n }\n\n async processNodeHierarchy(structure, nodeId, parentGroup) {\n const nodeDef = structure.json.nodes[nodeId];\n let nodeGroup = null;\n\n let handle = null;\n if (nodeDef.extras?.handle) {\n handle = this.getFullHandle(structure.id, nodeDef.extras.handle);\n }\n\n if (nodeDef.camera !== undefined) {\n const camera = this.loadCamera(structure, nodeDef.camera, nodeDef);\n if (nodeDef.extras) {\n camera.userData = { ...camera.userData, ...nodeDef.extras };\n }\n this.scene.add(camera);\n return;\n }\n\n const needsGroup = this.needsGroupForNode(structure, nodeDef);\n\n if (needsGroup) {\n nodeGroup = new Group();\n nodeGroup.name = nodeDef.name || `node_${nodeId}`;\n\n if (nodeDef.extras) {\n nodeGroup.userData = { ...nodeDef.extras };\n if (nodeGroup.userData.handle) {\n nodeGroup.userData.handle = this.getFullHandle(structure.id, nodeGroup.userData.handle);\n }\n }\n\n if (nodeDef.matrix) {\n nodeGroup.matrix.fromArray(nodeDef.matrix);\n nodeGroup.matrixAutoUpdate = false;\n } else if (nodeDef.translation || nodeDef.rotation || nodeDef.scale) {\n const position = nodeDef.translation ? new Vector3().fromArray(nodeDef.translation) : new Vector3();\n const quaternion = nodeDef.rotation ? new Quaternion().fromArray(nodeDef.rotation) : new Quaternion();\n const scale = nodeDef.scale ? new Vector3().fromArray(nodeDef.scale) : new Vector3(1, 1, 1);\n nodeGroup.matrix.compose(position, quaternion, scale);\n nodeGroup.matrixAutoUpdate = false;\n }\n\n if (parentGroup) {\n parentGroup.add(nodeGroup);\n }\n }\n\n if (nodeDef.mesh !== undefined) {\n const nodeMatrix = new Matrix4();\n const uniqueNodeId = `${structure.id}_${nodeId}`;\n const meshDef = structure.json.meshes[nodeDef.mesh];\n\n // Some glTF files may reference a mesh index that has no primitives\n // (or no mesh at all). Skip this mesh node gracefully.\n if (!meshDef || !meshDef.primitives || meshDef.primitives.length === 0) {\n if (nodeDef.children) {\n for (const childId of nodeDef.children) {\n await this.processNodeHierarchy(structure, childId, nodeGroup || parentGroup);\n }\n }\n return nodeGroup;\n }\n\n const geometryExtents = new Box3();\n\n for (const primitive of meshDef.primitives) {\n if (!primitive.attributes) continue;\n const positionAccessor = structure.json.accessors[primitive.attributes.POSITION];\n if (positionAccessor && positionAccessor.min && positionAccessor.max) {\n // For KHR_mesh_quantization (normalized integer accessors) min/max\n // are stored in quantized integer space (e.g. -32767..32767). The\n // BufferGeometry's local space, however, is the *normalized* range\n // (-1..1 or 0..1) because the GPU performs dequantization via the\n // `normalized` attribute flag. Convert here so geometryExtents is\n // in geometry-local (post-normalization) space.\n const minVec = new Vector3().fromArray(positionAccessor.min);\n const maxVec = new Vector3().fromArray(positionAccessor.max);\n if (positionAccessor.normalized === true) {\n const denom = this._normalizedDenominator(positionAccessor.componentType);\n if (denom > 0) {\n minVec.divideScalar(denom);\n maxVec.divideScalar(denom);\n // For signed types the result is clamped to [-1, 1] per spec.\n if (positionAccessor.componentType === 5120 || positionAccessor.componentType === 5122) {\n minVec.x = Math.max(minVec.x, -1);\n minVec.y = Math.max(minVec.y, -1);\n minVec.z = Math.max(minVec.z, -1);\n maxVec.x = Math.max(maxVec.x, -1);\n maxVec.y = Math.max(maxVec.y, -1);\n maxVec.z = Math.max(maxVec.z, -1);\n }\n }\n }\n geometryExtents.union(new Box3(minVec, maxVec));\n }\n }\n\n let isEdge = false;\n const firstPrimitive = meshDef.primitives[0];\n if (firstPrimitive && firstPrimitive.material !== undefined) {\n const material = structure.json.materials[firstPrimitive.material];\n if (material?.name === \"edges\") {\n isEdge = true;\n }\n }\n\n if (!isEdge) {\n this.nodesToLoad.push(uniqueNodeId);\n } else {\n this.edgeNodes.push(uniqueNodeId);\n }\n\n if (meshDef.extras && meshDef.extras.handle) {\n handle = this.getFullHandle(structure.id, meshDef.extras.handle);\n }\n\n this.nodes.set(uniqueNodeId, {\n position: nodeGroup ? nodeGroup.position.clone() : new Vector3().setFromMatrixPosition(nodeMatrix),\n nodeIndex: nodeId,\n meshIndex: nodeDef.mesh,\n loaded: false,\n loading: false,\n object: null,\n group: nodeGroup || parentGroup,\n structure,\n extras: nodeDef.extras,\n geometryExtents,\n handle: handle || this.getFullHandle(structure.id, structure._nextObjectId++),\n });\n }\n\n if (nodeDef.children) {\n for (const childId of nodeDef.children) {\n await this.processNodeHierarchy(structure, childId, nodeGroup || parentGroup);\n }\n }\n\n return nodeGroup;\n }\n\n needsGroupForNode(structure, nodeDef) {\n const hasTransforms = nodeDef.matrix || nodeDef.translation || nodeDef.rotation || nodeDef.scale;\n\n const hasMultiplePrimitives =\n nodeDef.mesh !== undefined && structure.json.meshes[nodeDef.mesh].primitives.length > 1;\n\n return hasTransforms !== undefined || hasMultiplePrimitives;\n }\n\n async processNodes() {\n const nodesToLoad = this.nodesToLoad;\n let loadedCount = 0;\n let lastLoadedCount = 0;\n const totalNodes = nodesToLoad.length;\n const progressTotal = { value: totalNodes };\n\n const loadProgress = async () => {\n loadedCount++;\n const total = progressTotal.value;\n const percentage = total > 0 ? Math.min(100, Math.round((loadedCount / total) * 100)) : 0;\n if (loadedCount - lastLoadedCount > 1000) {\n lastLoadedCount = loadedCount;\n this.updateMemoryIndicator();\n this.dispatchEvent(\"geometryprogress\", {\n percentage,\n loaded: loadedCount,\n total,\n });\n\n this.dispatchEvent(\"update\");\n\n await new Promise((resolve) => {\n setTimeout(resolve, 0);\n });\n }\n };\n\n try {\n const loadOperations = [];\n let memoryLimitReached = false;\n for (const nodeId of nodesToLoad) {\n if (this.abortController.signal.aborted) {\n throw new DOMException(\"Loading aborted\", \"AbortError\");\n }\n\n const estimatedSize = await this.estimateNodeSize(nodeId);\n const estimated = Number(estimatedSize) || 0;\n const effectiveLimit = this.memoryLimit / this.optimizationMemoryMultiplier / this.memoryEstimationFactor;\n\n if (this.currentMemoryUsage + this.pendingMemoryUsage + estimated > effectiveLimit) {\n memoryLimitReached = true;\n progressTotal.value = loadOperations.length;\n console.log(`Memory limit reached after scheduling ${loadOperations.length} nodes`);\n break;\n }\n\n this.pendingMemoryUsage += estimated;\n loadOperations.push(this.loadNode(nodeId, loadProgress, estimated));\n }\n\n for (const structure of this.structures) {\n loadOperations.push(structure.flushBufferRequests());\n }\n\n await Promise.all(loadOperations);\n\n this.dispatchEvent(\"geometryend\", {\n totalLoaded: loadedCount,\n totalNodes: progressTotal.value,\n memoryLimitReached,\n });\n\n return loadedCount;\n } catch (error) {\n this.dispatchEvent(\"geometryerror\", { error });\n throw error;\n }\n }\n\n async loadNodes() {\n console.time(\"Process nodes\");\n await this.processNodes();\n console.timeEnd(\"Process nodes\");\n\n console.time(\"Optimize scene\");\n await this.optimizeScene();\n console.timeEnd(\"Optimize scene\");\n }\n\n cleanupPartialLoad() {\n this.nodesToLoad.forEach((nodeId) => {\n const node = this.nodes.get(nodeId);\n if (node && node.loading) {\n this.unloadNode(nodeId);\n }\n });\n }\n\n createDefaultMaterial(primitiveMode = undefined) {\n if (primitiveMode === GL_CONSTANTS.POINTS) {\n return new PointsMaterial({\n color: new Color(0x808080),\n size: 0.05,\n sizeAttenuation: false,\n alphaTest: 0.5,\n transparent: true,\n vertexColors: false,\n blending: NormalBlending,\n depthWrite: false,\n depthTest: true,\n });\n } else if (\n primitiveMode === GL_CONSTANTS.LINES ||\n primitiveMode === GL_CONSTANTS.LINE_STRIP ||\n primitiveMode === GL_CONSTANTS.LINE_LOOP\n ) {\n return new LineBasicMaterial({\n color: 0x808080,\n linewidth: 1.0,\n alphaTest: 0.1,\n depthTest: true,\n depthWrite: true,\n transparent: true,\n opacity: 1.0,\n });\n } else {\n return new MeshPhongMaterial({\n color: 0x808080,\n specular: 0x222222,\n shininess: 10,\n });\n }\n }\n\n async estimateNodeSize(nodeId) {\n const node = this.nodes.get(nodeId);\n if (!node) return 0;\n return await node.structure.estimateNodeSize(node.meshIndex);\n }\n\n getTotalGeometryExtent() {\n const totalExtent = new Box3();\n\n for (const node of this.nodes.values()) {\n if (!node.geometryExtents) continue;\n\n if (node.object && this.hiddenHandles.has(node.object.userData.handle)) continue;\n\n const transformedBox = node.geometryExtents.clone();\n const structureRoot = node.structure ? this.structureRoots.get(node.structure.id) : null;\n\n if (node.group) {\n const relativeMatrix = new Matrix4();\n let currentObject = node.group;\n\n while (currentObject && currentObject !== structureRoot) {\n relativeMatrix.premultiply(currentObject.matrix);\n currentObject = currentObject.parent;\n }\n\n if (!relativeMatrix.equals(new Matrix4())) {\n transformedBox.applyMatrix4(relativeMatrix);\n }\n }\n\n if (structureRoot && structureRoot.matrix) {\n transformedBox.applyMatrix4(structureRoot.matrix);\n }\n\n const transform = this.objectTransforms.get(node.object);\n if (transform) {\n transformedBox.applyMatrix4(transform);\n }\n\n totalExtent.union(transformedBox);\n }\n\n if (this.scene && this.scene.matrix && !totalExtent.isEmpty()) {\n totalExtent.applyMatrix4(this.scene.matrix);\n }\n\n return totalExtent;\n }\n\n loadCamera(structure, cameraIndex, nodeDef) {\n const cameraDef = structure.getJson().cameras[cameraIndex];\n const params = cameraDef[cameraDef.type];\n\n let camera;\n if (cameraDef.type === \"perspective\") {\n camera = new PerspectiveCamera(\n MathUtils.radToDeg(params.yfov),\n params.aspectRatio || 1,\n params.znear || 1,\n params.zfar || 2e6\n );\n } else if (cameraDef.type === \"orthographic\") {\n camera = new OrthographicCamera(\n params.xmag / -2,\n params.xmag / 2,\n params.ymag / 2,\n params.ymag / -2,\n params.znear,\n params.zfar\n );\n }\n\n if (nodeDef.matrix) {\n camera.matrix.fromArray(nodeDef.matrix);\n camera.matrix.decompose(camera.position, camera.quaternion, camera.scale);\n } else {\n if (nodeDef.translation) {\n camera.position.fromArray(nodeDef.translation);\n }\n if (nodeDef.rotation) {\n camera.quaternion.fromArray(nodeDef.rotation);\n }\n if (nodeDef.scale) {\n camera.scale.fromArray(nodeDef.scale);\n }\n }\n\n return camera;\n }\n\n clearNodesToLoad() {\n this.nodesToLoad = [];\n }\n\n removeOptimization() {\n this.originalObjects.forEach((obj) => (obj.visible = true));\n\n const disposeMerged = (obj) => {\n if (obj.parent) {\n obj.parent.remove(obj);\n }\n if (obj.geometry) {\n obj.geometry.dispose();\n }\n };\n\n if (this.structureGroups) {\n for (const group of this.structureGroups.values()) {\n group.meshes.forEach(disposeMerged);\n group.lines.forEach(disposeMerged);\n group.lineSegments.forEach(disposeMerged);\n group.meshes.clear();\n group.lines.clear();\n group.lineSegments.clear();\n }\n }\n this.optimizedOriginalMap.clear();\n this.mergedMesh.clear();\n this.mergedLines.clear();\n this.mergedLineSegments.clear();\n this.originalObjects.clear();\n this.originalObjectsToSelection.clear();\n }\n\n initializeObjectVisibility() {\n if (this.maxObjectId > 0) {\n this.objectVisibility = new Float32Array(this.maxObjectId);\n for (let i = 0; i < this.maxObjectId; i++) {\n this.objectVisibility[i] = 1.0;\n }\n }\n }\n\n createVisibilityMaterial(material) {\n this.visibilityMaterials.add(material);\n\n const uniforms = {\n transformTexture: { value: this.transformTexture },\n transformTextureSize: { value: this.transformTextureSize },\n };\n material.userData.visibilityUniforms = uniforms;\n\n material.onBeforeCompile = (shader) => {\n shader.uniforms.transformTexture = uniforms.transformTexture;\n shader.uniforms.transformTextureSize = uniforms.transformTextureSize;\n\n // 1. Common Definitions\n shader.vertexShader = shader.vertexShader.replace(\n \"#include <common>\",\n `\n #include <common>\n \n attribute float visibility;\n attribute float objectId;\n varying float vVisibility;\n uniform highp sampler2D transformTexture;\n uniform float transformTextureSize;\n\n mat4 getTransformMatrix(float instanceId) {\n int size = int(transformTextureSize);\n int index = int(instanceId) * 4;\n \n int x0 = index % size;\n int y0 = index / size;\n \n vec4 row0 = texelFetch(transformTexture, ivec2(x0, y0), 0);\n vec4 row1 = texelFetch(transformTexture, ivec2(x0 + 1, y0), 0);\n vec4 row2 = texelFetch(transformTexture, ivec2(x0 + 2, y0), 0);\n vec4 row3 = texelFetch(transformTexture, ivec2(x0 + 3, y0), 0);\n \n return mat4(row0, row1, row2, row3);\n }\n `\n );\n\n // 2. Inject matrix retrieval at start of main()\n shader.vertexShader = shader.vertexShader.replace(\n \"void main() {\",\n `\n void main() {\n mat4 batchingMatrix = getTransformMatrix(objectId);\n vVisibility = visibility;\n `\n );\n\n // 3. Transform Normal (and Tangent, when present).\n //\n // We replace the standard `beginnormal_vertex` chunk because we need\n // to apply the per-object batching matrix to the normal. The original\n // three.js chunk also conditionally declares `objectTangent` under\n // `#ifdef USE_TANGENT` — that define is enabled automatically by\n // three.js whenever the material uses a normalMap (or clearcoat\n // normalMap) AND the geometry has a `tangent` attribute (e.g.\n // Avocado/BoomBox glTF samples). If our replacement omits that\n // declaration, downstream chunks (`defaultnormal_vertex`, etc.) fail\n // to compile with \"objectTangent: undeclared identifier\".\n //\n // We mirror three.js' own `skinnormal_vertex` convention: the same\n // per-vertex matrix that rotates the normal also rotates the tangent.\n if (shader.vertexShader.includes(\"#include <beginnormal_vertex>\")) {\n shader.vertexShader = shader.vertexShader.replace(\n \"#include <beginnormal_vertex>\",\n `\n vec3 objectNormal = vec3( normal );\n mat3 bm = mat3( batchingMatrix );\n objectNormal = bm * objectNormal;\n #ifdef USE_TANGENT\n vec3 objectTangent = vec3( tangent.xyz );\n objectTangent = bm * objectTangent;\n #endif\n `\n );\n }\n\n // 4. Transform Position\n shader.vertexShader = shader.vertexShader.replace(\n \"#include <begin_vertex>\",\n `\n vec3 transformed = vec3( position );\n transformed = ( batchingMatrix * vec4( transformed, 1.0 ) ).xyz;\n `\n );\n\n // 5. Fragment Shader\n shader.fragmentShader = shader.fragmentShader\n .replace(\n \"#include <common>\",\n `\n #include <common>\n varying float vVisibility;\n `\n )\n .replace(\n \"void main() {\",\n `\n void main() {\n if (vVisibility < 0.5) discard;\n `\n );\n\n //console.log(\"!vertex\", shader.vertexShader);\n };\n // Ensure the material recompiles to pick up changes\n material.needsUpdate = true;\n return material;\n }\n\n clear() {\n this.chunkQueue = [];\n\n this.structures.forEach((structure) => {\n if (structure) {\n structure.clear();\n }\n });\n this.structures = [];\n\n this.nodes.forEach((node) => {\n if (node.object) {\n if (node.object.parent) {\n node.object.parent.remove(node.object);\n }\n if (node.object.geometry) {\n node.object.geometry.dispose();\n }\n if (node.object.material) {\n if (Array.isArray(node.object.material)) {\n node.object.material.forEach((material) => material.dispose());\n } else {\n node.object.material.dispose();\n }\n }\n }\n });\n this.nodes.clear();\n\n this.loadedMeshes.forEach((mesh) => {\n if (mesh.geometry) mesh.geometry.dispose();\n if (mesh.material) {\n if (Array.isArray(mesh.material)) {\n mesh.material.forEach((material) => material.dispose());\n } else {\n mesh.material.dispose();\n }\n }\n });\n this.loadedMeshes.clear();\n\n this.structureRoots.forEach((rootGroup) => {\n if (rootGroup) {\n rootGroup.traverse((child) => {\n if (child.geometry) child.geometry.dispose();\n if (child.material) {\n if (Array.isArray(child.material)) {\n child.material.forEach((material) => material.dispose());\n } else {\n child.material.dispose();\n }\n }\n });\n if (rootGroup.parent) {\n rootGroup.parent.remove(rootGroup);\n }\n }\n });\n this.structureRoots.clear();\n\n this.mergedMesh.forEach((mesh) => {\n if (mesh.geometry) mesh.geometry.dispose();\n if (mesh.material) {\n if (Array.isArray(mesh.material)) {\n mesh.material.forEach((material) => material.dispose());\n } else {\n mesh.material.dispose();\n }\n }\n if (mesh.parent) mesh.parent.remove(mesh);\n });\n this.mergedMesh.clear();\n\n this.mergedLines.forEach((line) => {\n if (line.geometry) line.geometry.dispose();\n if (line.material) line.material.dispose();\n if (line.parent) line.parent.remove(line);\n });\n this.mergedLines.clear();\n\n this.mergedLineSegments.forEach((lineSegment) => {\n if (lineSegment.geometry) lineSegment.geometry.dispose();\n if (lineSegment.material) lineSegment.material.dispose();\n if (lineSegment.parent) lineSegment.parent.remove(lineSegment);\n });\n this.mergedLineSegments.clear();\n\n this.mergedPoints.forEach((points) => {\n if (points.geometry) points.geometry.dispose();\n if (points.material) points.material.dispose();\n if (points.parent) points.parent.remove(points);\n });\n this.mergedPoints.clear();\n\n this.geometryCache.clear();\n this.materialCache.clear();\n this.textureCache.clear();\n this.loadedMaterials.clear();\n\n this.nodesToLoad = [];\n this.handleToObjects.clear();\n this.originalObjects.clear();\n this.originalObjectsToSelection.clear();\n this.optimizedOriginalMap.clear();\n this.handleToOptimizedObjects.clear();\n this.hiddenHandles.clear();\n this.newOptimizedObjects.clear();\n this.oldOptimizeObjects.clear();\n this.isolatedObjects = [];\n\n this.objectTransforms.clear();\n this.transformedGeometries.clear();\n this._originalObjectMatrices.clear();\n\n this.totalLoadedObjects = 0;\n this.currentMemoryUsage = 0;\n this.pendingMemoryUsage = 0;\n this.loadedGeometrySize = 0;\n\n this.abortController = new AbortController();\n this.updateMemoryIndicator();\n\n this.objectIdToIndex.clear();\n this.maxObjectId = 0;\n this.objectVisibility = new Float32Array();\n this.meshToNodeMap = null;\n this.visibilityMaterials.clear();\n\n // NOTE: do *not* drop this._dracoLoader here. The DRACOLoader is owned\n // by the caller (injected via setDracoLoader) and should survive across\n // clear()/reload cycles — the loader keeps its worker pool warm and is\n // typically configured once at app startup.\n }\n\n setStructureTransform(structureId, matrix) {\n const rootGroup = this.structureRoots.get(structureId);\n if (rootGroup) {\n rootGroup.matrix.copy(matrix);\n rootGroup.matrix.decompose(rootGroup.position, rootGroup.quaternion, rootGroup.scale);\n return true;\n }\n return false;\n }\n\n getStructureRootGroup(structureId) {\n return this.structureRoots.get(structureId);\n }\n\n addEventListener(event, handler) {\n if (this.eventHandlers[event]) {\n this.eventHandlers[event].push(handler);\n }\n }\n\n removeEventListener(event, handler) {\n if (this.eventHandlers[event]) {\n this.eventHandlers[event] = this.eventHandlers[event].filter((h) => h !== handler);\n }\n }\n\n dispatchEvent(event, data) {\n if (this.eventHandlers[event]) {\n this.eventHandlers[event].forEach((handler) => handler(data));\n }\n }\n\n registerObjectWithHandle(object, handle) {\n if (!handle) return;\n\n const fullHandle = object.userData.handle;\n if (!this.handleToObjects.has(fullHandle)) {\n this.handleToObjects.set(fullHandle, new Set());\n }\n this.handleToObjects.get(fullHandle).add(object);\n\n object.userData.structureId = object.userData.handle.split(STRUCTURE_ID_SEPARATOR)[0];\n }\n\n getObjectsByHandle(handle) {\n if (!handle) return [];\n return Array.from(this.handleToObjects.get(handle) || []);\n }\n\n getHandlesByObjects(objects) {\n if (!objects.length) return [];\n const handles = new Set();\n objects.forEach((obj) => {\n if (this.originalObjects.has(obj)) handles.add(obj.userData.handle);\n });\n return Array.from(handles);\n }\n\n getMaterialId(material, index) {\n const props = {\n type: material.type,\n color: material.color?.getHex(),\n map: material.map?.uuid,\n transparent: material.transparent,\n opacity: material.opacity,\n side: material.side,\n index: index ? 1 : 0,\n };\n return JSON.stringify(props);\n }\n\n addToMaterialGroup(object, groupsMap, optimizeGroupList) {\n const VERTEX_LIMIT = 100_000;\n const INDEX_LIMIT = 100_000;\n\n const objectGeometryVertexCount = object.geometry.attributes.position.count;\n const objectGeometryIndexCount = object.geometry.index ? object.geometry.index.count : 0;\n\n const material = object.material;\n let materialId = this.getMaterialId(material, object.geometry.index !== null);\n\n let group;\n if (!groupsMap.has(materialId)) {\n group = {\n material,\n objects: [object],\n totalVertices: objectGeometryVertexCount,\n totalIndices: objectGeometryIndexCount,\n };\n groupsMap.set(materialId, group);\n optimizeGroupList.push(group);\n } else {\n group = groupsMap.get(materialId);\n if (\n group.totalVertices + objectGeometryVertexCount > VERTEX_LIMIT ||\n group.totalIndices + objectGeometryIndexCount > INDEX_LIMIT\n ) {\n const newGroup = {\n material,\n objects: [object],\n totalVertices: objectGeometryVertexCount,\n totalIndices: objectGeometryIndexCount,\n };\n materialId = this.getMaterialId(material, object.geometry.index !== null);\n groupsMap.set(materialId, newGroup);\n optimizeGroupList.push(newGroup);\n } else {\n group.objects.push(object);\n group.totalVertices += objectGeometryVertexCount;\n group.totalIndices += objectGeometryIndexCount;\n }\n }\n\n this.originalObjects.add(object);\n }\n\n yieldToUI() {\n return new Promise((resolve) => {\n setTimeout(resolve, 0);\n });\n }\n\n async optimizeScene() {\n console.log(\"Starting scene optimization...\");\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"start\",\n progress: 0,\n message: \"Starting optimization...\",\n });\n\n this.originalObjects.clear();\n this.originalObjectsToSelection.clear();\n // Clear previous optimization data\n this.objectIdToIndex.clear();\n this.maxObjectId = 0;\n const structureGroups = new Map();\n\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"collecting\",\n progress: 5,\n message: \"Collecting scene objects...\",\n });\n\n let totalObjectsToMerge = 0;\n\n this.scene.traverse((object) => {\n if (object.userData.structureId) {\n const structureId = object.userData.structureId;\n if (!structureGroups.has(structureId)) {\n structureGroups.set(structureId, {\n mapMeshes: new Map(),\n mapLines: new Map(),\n mapLineSegments: new Map(),\n mapPoints: new Map(),\n\n meshes: [],\n lines: [],\n lineSegments: [],\n points: [],\n rootGroup: this.structureRoots.get(structureId),\n });\n }\n\n const group = structureGroups.get(structureId);\n let added = false;\n\n if (object instanceof Mesh) {\n this.addToMaterialGroup(object, group.mapMeshes, group.meshes);\n added = true;\n } else if (object instanceof LineSegments) {\n this.addToMaterialGroup(object, group.mapLineSegments, group.lineSegments);\n added = true;\n } else if (object instanceof Line) {\n this.addToMaterialGroup(object, group.mapLines, group.lines);\n added = true;\n } else if (object instanceof Points) {\n this.addToMaterialGroup(object, group.mapPoints, group.points);\n added = true;\n }\n\n if (added) {\n totalObjectsToMerge++;\n }\n }\n });\n\n // Initialize transform texture and visibility arrays BEFORE merging\n // This ensures that as we create merged objects, the texture is large enough\n // and populated with identity matrices, so objects don't disappear (scale 0).\n if (totalObjectsToMerge > 0) {\n this.maxObjectId = totalObjectsToMerge;\n this.initTransformTexture();\n this.initializeObjectVisibility();\n\n // Reset counter so IDs are assigned from 0 during merge\n this.maxObjectId = 0;\n }\n\n let processedGroups = 0;\n const totalGroups = structureGroups.size;\n\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"merging\",\n progress: 10,\n message: `Merging ${totalGroups} structure groups...`,\n current: 0,\n total: totalGroups,\n });\n\n for (const group of structureGroups.values()) {\n group.mapMeshes.clear();\n group.mapLines.clear();\n group.mapLineSegments.clear();\n group.mapPoints.clear();\n\n await this.mergeMeshGroups(group.meshes, group.rootGroup);\n await this.yieldToUI();\n\n await this.mergeLineGroups(group.lines, group.rootGroup);\n await this.yieldToUI();\n\n await this.mergeLineSegmentGroups(group.lineSegments, group.rootGroup);\n await this.yieldToUI();\n\n await this.mergePointsGroups(group.points, group.rootGroup);\n\n processedGroups++;\n const progress = 10 + Math.round((processedGroups / totalGroups) * 80);\n\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"merging\",\n progress,\n message: `Processing structure ${processedGroups}/${totalGroups}...`,\n current: processedGroups,\n total: totalGroups,\n });\n\n console.log(`Optimization progress: ${processedGroups}/${totalGroups} structure groups processed (${progress}%)`);\n\n await this.yieldToUI();\n }\n\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"finalizing\",\n progress: 95,\n message: \"Finalizing optimization...\",\n });\n\n this.originalObjects.forEach((obj) => {\n obj.visible = false;\n if (!(obj instanceof Points) && !obj.userData.isEdge) {\n this.originalObjectsToSelection.add(obj);\n }\n });\n\n // Texture and visibility initialized at start of optimization\n console.log(`Optimization complete. Total objects: ${this.maxObjectId}`);\n\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"complete\",\n progress: 100,\n message: `Optimization complete! ${this.maxObjectId} objects processed.`,\n });\n\n this.updateMemoryIndicator();\n this.dispatchEvent(\"update\");\n }\n\n async mergeMeshGroups(materialGroups, rootGroup) {\n let processedGroups = 0;\n for (const group of materialGroups) {\n if (!group.material) {\n console.warn(\"DynamicLoader: Skipping mesh group with null material\");\n continue;\n }\n\n try {\n const geometries = [];\n const handles = new Set();\n const optimizedObjects = [];\n const objectMapping = new Map();\n let currentVertexOffset = 0;\n\n for (const mesh of group.objects) {\n const geometry = mesh.geometry.clone();\n\n const relativeMatrix = new Matrix4();\n let currentObject = mesh;\n\n while (currentObject && currentObject !== rootGroup) {\n relativeMatrix.premultiply(currentObject.matrix);\n currentObject = currentObject.parent;\n }\n\n if (!relativeMatrix.equals(new Matrix4())) {\n geometry.applyMatrix4(relativeMatrix);\n }\n\n const handle = mesh.userData.handle;\n if (!this.objectIdToIndex.has(handle)) {\n this.objectIdToIndex.set(handle, this.maxObjectId++);\n }\n const objectId = this.objectIdToIndex.get(handle);\n\n const vertexCount = geometry.attributes.position.count;\n const objectIds = new Float32Array(vertexCount);\n for (let i = 0; i < vertexCount; i++) {\n objectIds[i] = objectId;\n }\n geometry.setAttribute(\"objectId\", new BufferAttribute(objectIds, 1));\n\n objectMapping.set(mesh, {\n geometry,\n startVertexIndex: currentVertexOffset,\n vertexCount: geometry.attributes.position.count,\n });\n\n currentVertexOffset += geometry.attributes.position.count;\n geometries.push(geometry);\n\n optimizedObjects.push(mesh);\n handles.add(mesh.userData.handle);\n }\n\n const mergedObjects = [];\n\n if (geometries.length > 0) {\n const mergedGeometry = mergeGeometries(geometries);\n\n // Create visibility attribute\n const totalVertices = mergedGeometry.attributes.position.count;\n const visibilityArray = new Float32Array(totalVertices);\n\n // Initialize all vertices as visible (1.0)\n for (let i = 0; i < totalVertices; i++) {\n visibilityArray[i] = 1.0;\n }\n\n // Add visibility attribute to geometry\n mergedGeometry.setAttribute(\"visibility\", new BufferAttribute(visibilityArray, 1));\n\n if (this.useVAO) {\n this.createVAO(mergedGeometry);\n }\n\n // Create visibility material\n const visibilityMaterial = this.createVisibilityMaterial(group.material);\n\n const mergedMesh = new Mesh(mergedGeometry, visibilityMaterial);\n mergedMesh.frustumCulled = false; // Disable culling because vertex shader moves objects\n mergedMesh.userData.isOptimized = true;\n rootGroup.add(mergedMesh);\n\n this.mergedMesh.add(mergedMesh);\n this.optimizedOriginalMap.set(mergedMesh, optimizedObjects);\n\n // Store object mappings with visibility tracking\n this.mergedObjectMap.set(mergedMesh.uuid, {\n objectMapping,\n visibilityArray,\n totalVertices,\n });\n\n this.mergedGeometryVisibility.set(mergedMesh, visibilityArray);\n\n mergedObjects.push(mergedMesh);\n\n geometries.forEach((geometry) => {\n geometry.dispose();\n });\n }\n\n handles.forEach((handle) => {\n if (this.handleToOptimizedObjects.has(handle)) {\n const existingObjects = this.handleToOptimizedObjects.get(handle);\n existingObjects.push(...mergedObjects);\n this.handleToOptimizedObjects.set(handle, existingObjects);\n } else {\n this.handleToOptimizedObjects.set(handle, mergedObjects);\n }\n });\n\n processedGroups++;\n if (processedGroups % 5 === 0) {\n await this.yieldToUI();\n }\n } catch (error) {\n console.warn(\"DynamicLoader: Failed to merge meshes for material:\", error);\n group.objects.forEach((mesh) => {\n mesh.visible = true;\n });\n }\n }\n }\n\n async mergeLineGroups(materialGroups, rootGroup) {\n let processedGroups = 0;\n for (const group of materialGroups) {\n if (group.objects.length === 0) continue;\n\n if (!group.material) {\n console.warn(\"DynamicLoader: Skipping line group with null material\");\n continue;\n }\n\n const handles = new Set();\n let totalVertices = 0;\n const objectMapping = new Map();\n let currentVertexOffset = 0;\n\n group.objects.map((line) => {\n handles.add(line.userData.handle);\n totalVertices += line.geometry.attributes.position.count;\n });\n\n const positions = new Float32Array(totalVertices * 3);\n let posOffset = 0;\n\n const indices = [];\n let vertexOffset = 0;\n\n let isEdge = false;\n group.objects.forEach((line) => {\n isEdge = line.userData.isEdge;\n const geometry = line.geometry.clone();\n\n const relativeMatrix = new Matrix4();\n let currentObject = line;\n\n while (currentObject && currentObject !== rootGroup) {\n relativeMatrix.premultiply(currentObject.matrix);\n currentObject = currentObject.parent;\n }\n\n if (!relativeMatrix.equals(new Matrix4())) {\n geometry.applyMatrix4(relativeMatrix);\n }\n\n const positionAttr = geometry.attributes.position;\n const vertexCount = positionAttr.count;\n\n const handle = line.userData.handle;\n if (!this.objectIdToIndex.has(handle)) {\n this.objectIdToIndex.set(handle, this.maxObjectId++);\n }\n\n objectMapping.set(line, {\n startVertexIndex: currentVertexOffset,\n vertexCount,\n });\n currentVertexOffset += vertexCount;\n const vector = new Vector3();\n\n for (let i = 0; i < vertexCount; i++) {\n vector.fromBufferAttribute(positionAttr, i);\n positions[posOffset++] = vector.x;\n positions[posOffset++] = vector.y;\n positions[posOffset++] = vector.z;\n }\n\n for (let i = 0; i < vertexCount - 1; i++) {\n indices.push(vertexOffset + i, vertexOffset + i + 1);\n }\n\n vertexOffset += vertexCount;\n geometry.dispose();\n });\n\n const geometry = new BufferGeometry();\n geometry.setAttribute(\"position\", new BufferAttribute(positions, 3));\n geometry.setIndex(indices);\n geometry.computeBoundingSphere();\n geometry.computeBoundingBox();\n\n const objectIds = new Float32Array(totalVertices);\n let vertexIndex = 0;\n group.objects.forEach((line) => {\n const vertexCount = line.geometry.attributes.position.count;\n const handle = line.userData.handle;\n const objectId = this.objectIdToIndex.get(handle);\n\n for (let i = 0; i < vertexCount; i++) {\n objectIds[vertexIndex++] = objectId;\n }\n });\n geometry.setAttribute(\"objectId\", new BufferAttribute(objectIds, 1));\n\n const visibilityArray = new Float32Array(totalVertices);\n for (let i = 0; i < totalVertices; i++) {\n visibilityArray[i] = 1.0;\n }\n geometry.setAttribute(\"visibility\", new BufferAttribute(visibilityArray, 1));\n\n const visibilityMaterial = this.createVisibilityMaterial(group.material);\n\n const mergedLine = new LineSegments(geometry, visibilityMaterial);\n mergedLine.frustumCulled = false;\n mergedLine.userData.isEdge = isEdge;\n mergedLine.userData.isOptimized = true;\n\n const mergedObjects = [mergedLine];\n if (this.useVAO) {\n this.createVAO(mergedLine);\n }\n rootGroup.add(mergedLine);\n this.mergedLines.add(mergedLine);\n this.optimizedOriginalMap.set(mergedLine, group.objects);\n\n this.mergedObjectMap.set(mergedLine.uuid, {\n objectMapping,\n visibilityArray,\n totalVertices,\n });\n\n this.mergedGeometryVisibility.set(mergedLine, visibilityArray);\n\n handles.forEach((handle) => {\n if (this.handleToOptimizedObjects.has(handle)) {\n const existingObjects = this.handleToOptimizedObjects.get(handle);\n existingObjects.push(...mergedObjects);\n this.handleToOptimizedObjects.set(handle, existingObjects);\n } else {\n this.handleToOptimizedObjects.set(handle, mergedObjects);\n }\n });\n\n processedGroups++;\n if (processedGroups % 5 === 0) {\n await this.yieldToUI();\n }\n }\n }\n\n async mergeLineSegmentGroups(materialGroups, rootGroup) {\n let processedGroups = 0;\n for (const group of materialGroups) {\n if (!group.material) {\n console.warn(\"DynamicLoader: Skipping line segment group with null material\");\n continue;\n }\n\n try {\n const geometries = [];\n const optimizedObjects = [];\n const handles = new Set();\n const objectMapping = new Map();\n let currentVertexOffset = 0;\n let isEdge = false;\n\n for (const line of group.objects) {\n isEdge = line.userData.isEdge;\n const geometry = line.geometry.clone();\n\n // Calculate transformation matrix relative to rootGroup\n const relativeMatrix = new Matrix4();\n let currentObject = line;\n\n while (currentObject && currentObject !== rootGroup) {\n relativeMatrix.premultiply(currentObject.matrix);\n currentObject = currentObject.parent;\n }\n\n // Apply the relative transformation\n if (!relativeMatrix.equals(new Matrix4())) {\n geometry.applyMatrix4(relativeMatrix);\n }\n\n const handle = line.userData.handle;\n if (!this.objectIdToIndex.has(handle)) {\n this.objectIdToIndex.set(handle, this.maxObjectId++);\n }\n const objectId = this.objectIdToIndex.get(handle);\n const vertexCount = geometry.attributes.position.count;\n const objectIds = new Float32Array(vertexCount);\n for (let i = 0; i < vertexCount; i++) {\n objectIds[i] = objectId;\n }\n geometry.setAttribute(\"objectId\", new BufferAttribute(objectIds, 1));\n\n objectMapping.set(line, {\n geometry,\n startVertexIndex: currentVertexOffset,\n vertexCount: geometry.attributes.position.count,\n });\n\n currentVertexOffset += geometry.attributes.position.count;\n geometries.push(geometry);\n optimizedObjects.push(line);\n handles.add(line.userData.handle);\n }\n\n const mergedObjects = [];\n\n if (geometries.length > 0) {\n const mergedGeometry = mergeGeometries(geometries, false);\n\n const totalVertices = mergedGeometry.attributes.position.count;\n const visibilityArray = new Float32Array(totalVertices);\n\n for (let i = 0; i < totalVertices; i++) {\n visibilityArray[i] = 1.0;\n }\n\n mergedGeometry.setAttribute(\"visibility\", new BufferAttribute(visibilityArray, 1));\n\n const visibilityMaterial = this.createVisibilityMaterial(group.material);\n\n const mergedLine = new LineSegments(mergedGeometry, visibilityMaterial);\n mergedLine.frustumCulled = false;\n mergedLine.userData.isEdge = isEdge;\n mergedLine.userData.isOptimized = true;\n\n if (this.useVAO) {\n this.createVAO(mergedLine);\n }\n\n rootGroup.add(mergedLine);\n this.mergedLineSegments.add(mergedLine);\n this.optimizedOriginalMap.set(mergedLine, optimizedObjects);\n\n this.mergedObjectMap.set(mergedLine.uuid, {\n objectMapping,\n visibilityArray,\n totalVertices,\n });\n\n this.mergedGeometryVisibility.set(mergedLine, visibilityArray);\n\n mergedObjects.push(mergedLine);\n\n geometries.forEach((geometry) => {\n geometry.dispose();\n });\n }\n\n handles.forEach((handle) => {\n if (this.handleToOptimizedObjects.has(handle)) {\n const existingObjects = this.handleToOptimizedObjects.get(handle);\n existingObjects.push(...mergedObjects);\n this.handleToOptimizedObjects.set(handle, existingObjects);\n } else {\n this.handleToOptimizedObjects.set(handle, mergedObjects);\n }\n });\n\n processedGroups++;\n if (processedGroups % 5 === 0) {\n await this.yieldToUI();\n }\n } catch (error) {\n console.warn(\"DynamicLoader: Failed to merge line segments for material:\", error);\n group.objects.forEach((line) => {\n line.visible = true;\n });\n }\n }\n }\n\n async mergePointsGroups(materialGroups, rootGroup) {\n let processedGroups = 0;\n for (const group of materialGroups) {\n if (!group.material) {\n console.warn(\"DynamicLoader: Skipping points group with null material\");\n continue;\n }\n\n try {\n const geometries = [];\n const optimizedObjects = [];\n const handles = new Set();\n\n for (const points of group.objects) {\n const geometry = points.geometry.clone();\n\n const relativeMatrix = new Matrix4();\n let currentObject = points;\n\n while (currentObject && currentObject !== rootGroup) {\n relativeMatrix.premultiply(currentObject.matrix);\n currentObject = currentObject.parent;\n }\n\n if (!relativeMatrix.equals(new Matrix4())) {\n geometry.applyMatrix4(relativeMatrix);\n }\n\n geometries.push(geometry);\n optimizedObjects.push(points);\n handles.add(points.userData.handle);\n }\n\n const mergedObjects = [];\n\n if (geometries.length > 0) {\n const mergedGeometry = mergeGeometries(geometries, false);\n\n // Add objectId attribute\n const totalVertices = mergedGeometry.attributes.position.count;\n const objectIds = new Float32Array(totalVertices);\n let vertexOffset = 0;\n group.objects.forEach((points) => {\n const handle = points.userData.handle;\n if (!this.objectIdToIndex.has(handle)) {\n this.objectIdToIndex.set(handle, this.maxObjectId++);\n }\n const objectId = this.objectIdToIndex.get(handle);\n const count = points.geometry.attributes.position.count;\n for (let i = 0; i < count; i++) {\n objectIds[vertexOffset++] = objectId;\n }\n });\n mergedGeometry.setAttribute(\"objectId\", new BufferAttribute(objectIds, 1));\n\n // Add visibility attribute\n const visibilityArray = new Float32Array(totalVertices);\n visibilityArray.fill(1.0);\n mergedGeometry.setAttribute(\"visibility\", new BufferAttribute(visibilityArray, 1));\n\n const visibilityMaterial = this.createVisibilityMaterial(group.material);\n const mergedPoints = new Points(mergedGeometry, visibilityMaterial);\n mergedPoints.frustumCulled = false;\n mergedPoints.userData.isOptimized = true;\n\n if (this.useVAO) {\n this.createVAO(mergedPoints);\n }\n\n rootGroup.add(mergedPoints);\n\n this.mergedPoints.add(mergedPoints);\n this.optimizedOriginalMap.set(mergedPoints, optimizedObjects);\n mergedObjects.push(mergedPoints);\n\n geometries.forEach((geometry) => {\n geometry.dispose();\n });\n }\n\n handles.forEach((handle) => {\n if (this.handleToOptimizedObjects.has(handle)) {\n const existingObjects = this.handleToOptimizedObjects.get(handle);\n existingObjects.push(...mergedObjects);\n this.handleToOptimizedObjects.set(handle, existingObjects);\n } else {\n this.handleToOptimizedObjects.set(handle, mergedObjects);\n }\n });\n\n processedGroups++;\n if (processedGroups % 5 === 0) {\n await this.yieldToUI();\n }\n } catch (error) {\n console.warn(\"DynamicLoader: Failed to merge points for material:\", error);\n group.objects.forEach((points) => {\n points.visible = true;\n });\n }\n }\n }\n\n mergeInSingleSegment(structureId, rootGroup) {\n const lineSegmentsArray = [...this.mergedLineSegments, ...this.mergedLines].filter(\n (obj) => obj.userData.structureId === structureId\n );\n\n if (lineSegmentsArray.length === 0) return;\n\n try {\n const geometriesWithIndex = [];\n const hasNormals = lineSegmentsArray.some((segment) => segment.geometry.attributes.normal !== undefined);\n\n lineSegmentsArray.forEach((segment) => {\n const clonedGeometry = segment.geometry.clone();\n clonedGeometry.applyMatrix4(segment.matrixWorld);\n\n if (hasNormals && !clonedGeometry.attributes.normal) {\n clonedGeometry.computeVertexNormals();\n }\n if (!hasNormals && clonedGeometry.attributes.normal) {\n clonedGeometry.deleteAttribute(\"normal\");\n }\n\n const colorArray = new Float32Array(clonedGeometry.attributes.position.count * 3);\n for (let i = 0; i < colorArray.length; i += 3) {\n colorArray[i] = segment.material.color.r;\n colorArray[i + 1] = segment.material.color.g;\n colorArray[i + 2] = segment.material.color.b;\n }\n clonedGeometry.setAttribute(\"color\", new BufferAttribute(colorArray, 3));\n\n if (!clonedGeometry.index) {\n const indices = [];\n const posCount = clonedGeometry.attributes.position.count;\n for (let i = 0; i < posCount - 1; i += 2) {\n indices.push(i, i + 1);\n }\n clonedGeometry.setIndex(indices);\n }\n\n geometriesWithIndex.push(clonedGeometry);\n });\n\n const finalGeometry = mergeGeometries(geometriesWithIndex, false);\n // Add objectId attribute\n const totalVertices = finalGeometry.attributes.position.count;\n const objectIds = new Float32Array(totalVertices);\n let vertexOffset = 0;\n\n lineSegmentsArray.forEach((segment) => {\n const handle = segment.userData.handle;\n if (!this.objectIdToIndex.has(handle)) {\n this.objectIdToIndex.set(handle, this.maxObjectId++);\n }\n const objectId = this.objectIdToIndex.get(handle);\n const count = segment.geometry.attributes.position.count;\n for (let i = 0; i < count; i++) {\n objectIds[vertexOffset++] = objectId;\n }\n });\n finalGeometry.setAttribute(\"objectId\", new BufferAttribute(objectIds, 1));\n\n // Add visibility attribute\n const visibilityArray = new Float32Array(totalVertices);\n visibilityArray.fill(1.0);\n finalGeometry.setAttribute(\"visibility\", new BufferAttribute(visibilityArray, 1));\n\n const material = new LineBasicMaterial({\n vertexColors: true,\n });\n const visibilityMaterial = this.createVisibilityMaterial(material);\n\n if (this.useVAO) {\n this.createVAO(finalGeometry);\n }\n\n const mergedLine = new LineSegments(finalGeometry, visibilityMaterial);\n mergedLine.frustumCulled = false;\n mergedLine.userData.structureId = structureId;\n mergedLine.userData.isOptimized = true;\n rootGroup.add(mergedLine);\n this.mergedLineSegments.add(mergedLine);\n\n lineSegmentsArray.forEach((obj) => {\n if (obj.parent) {\n obj.parent.remove(obj);\n }\n obj.geometry.dispose();\n });\n } catch (error) {\n console.warn(\"DynamicLoader: Failed to merge geometries:\", error);\n lineSegmentsArray.forEach((obj) => {\n obj.visible = true;\n rootGroup.add(obj);\n });\n }\n }\n\n showOriginalObjects(objects) {\n objects.forEach((obj) => {\n if (this.originalObjects.has(obj)) {\n obj.visible = true;\n }\n });\n }\n\n hideOriginalObjects(objects) {\n objects.forEach((obj) => {\n if (this.originalObjects.has(obj)) {\n obj.visible = false;\n }\n });\n }\n\n createVAO(geometry) {\n if (!this.useVAO) {\n return;\n }\n\n if (geometry.attributes?.position?.count < 1000) {\n return;\n }\n\n const gl = this.renderer.getContext();\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n\n for (const name in geometry.attributes) {\n const attribute = geometry.attributes[name];\n const buffer = this.renderer.properties.get(attribute).buffer;\n\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.enableVertexAttribArray(attribute.itemSize);\n gl.vertexAttribPointer(attribute.itemSize, attribute.itemSize, gl.FLOAT, false, 0, 0);\n }\n\n if (geometry.index) {\n const indexBuffer = this.renderer.properties.get(geometry.index).buffer;\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\n }\n\n gl.bindVertexArray(null);\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\n\n geometry.vao = vao;\n }\n\n getOriginalObjectForSelect() {\n const optimizedOriginals = [];\n\n for (const obj of this.originalObjectsToSelection) {\n if (this.hiddenHandles.has(obj.userData.handle)) {\n continue;\n }\n\n optimizedOriginals.push(obj);\n }\n\n return optimizedOriginals;\n }\n\n isolateObjects(handles) {\n if (this.hiddenHandles.size !== 0) {\n this.hiddenHandles.clear();\n this.syncHiddenObjects();\n }\n\n for (const handle of this.handleToOptimizedObjects.keys()) {\n if (!handles.has(handle)) {\n this.hiddenHandles.add(handle);\n }\n }\n\n this.syncHiddenObjects();\n }\n\n showAllHiddenObjects() {\n this.hiddenHandles.clear();\n this.syncHiddenObjects();\n }\n\n hideObjects(handles) {\n handles.forEach((handle) => {\n this.hiddenHandles.add(handle);\n });\n this.syncHiddenObjects();\n }\n\n showObjects(handles) {\n handles.forEach((handle) => {\n this.hiddenHandles.delete(handle);\n });\n this.syncHiddenObjects();\n }\n\n _updateVisibilityAttribute(mergedObject) {\n if (\n mergedObject.geometry &&\n mergedObject.geometry.attributes.visibility &&\n mergedObject.geometry.attributes.objectId\n ) {\n const visibilityArray = mergedObject.geometry.attributes.visibility.array;\n const objectIdArray = mergedObject.geometry.attributes.objectId.array;\n\n for (let i = 0; i < visibilityArray.length; i++) {\n const objectId = objectIdArray[i];\n if (objectId < this.objectVisibility.length) {\n visibilityArray[i] = this.objectVisibility[objectId];\n }\n }\n\n mergedObject.geometry.attributes.visibility.needsUpdate = true;\n }\n }\n\n applyObjectTransforms(objectTransformMap) {\n if (this.mergedObjectMap.size === 0) {\n console.warn(\"DynamicLoader: No merged objects to transform\");\n return;\n }\n\n if (!this.transformData) {\n console.warn(\"DynamicLoader: Transform texture not initialized\");\n return;\n }\n\n // Store transform map directly\n this.objectTransforms = objectTransformMap;\n\n // Reset to identity first to ensure clean state\n this._resetTransformData(false);\n\n // Cache references for tight loop\n const transformData = this.transformData;\n const objectIdToIndex = this.objectIdToIndex;\n\n // Fast track map iteration using an array of values if we can\n // While .entries() is fast, sometimes direct properties check is faster\n let textureNeedsUpdate = false;\n\n // Process matrices directly into texture array\n if (objectTransformMap instanceof Map) {\n // Modern V8 engines optimize for...of on Maps better than Array.from or destructuring iterators\n for (const [object, matrix] of objectTransformMap.entries()) {\n const userData = object.userData;\n if (!userData) continue;\n\n const handle = userData.handle;\n if (handle === undefined) continue;\n\n const objectId = objectIdToIndex.get(handle);\n if (objectId !== undefined) {\n // TypedArray.set is highly optimized in modern JS engines\n transformData.set(matrix.elements, objectId * 16);\n textureNeedsUpdate = true;\n }\n }\n } else {\n // Fallback for arrays of [object, matrix] pairs\n const len = objectTransformMap.length;\n for (let i = 0; i < len; i++) {\n const pair = objectTransformMap[i];\n const userData = pair[0].userData;\n if (!userData) continue;\n\n const handle = userData.handle;\n if (handle === undefined) continue;\n\n const objectId = objectIdToIndex.get(handle);\n if (objectId !== undefined) {\n transformData.set(pair[1].elements, objectId * 16);\n textureNeedsUpdate = true;\n }\n }\n }\n\n if (textureNeedsUpdate) {\n this.updateTransformTexture();\n if (\n this._lastTransformTexture !== this.transformTexture ||\n this._lastTransformTextureSize !== this.transformTextureSize\n ) {\n this.updateMaterialUniforms();\n }\n }\n\n // TODO: Remove this block when highlight is implemented via shader.\n // Sync transforms to original (hidden) objects so that\n // GeometryHighlighter wireframes follow exploded positions.\n if (this.syncTransformsToOriginalObjects) {\n this._syncOriginalObjectTransforms(objectTransformMap);\n }\n }\n\n // TODO: Remove when highlight is implemented via shader.\n _syncOriginalObjectTransforms(objectTransformMap) {\n // First, restore any previously transformed objects back to their saved position\n for (const [obj, savedPos] of this._originalObjectMatrices) {\n obj.position.copy(savedPos);\n if (obj.userData.highlight) {\n obj.userData.highlight.position.copy(savedPos);\n }\n }\n this._originalObjectMatrices.clear();\n\n // The transform matrix is in the structure root's local space.\n // Original objects may be nested inside groups with their own transforms,\n // so we must convert the offset from structure-root-local → parent-local space.\n const _offset = new Vector3();\n const _parentInverse = new Matrix4();\n\n if (objectTransformMap instanceof Map) {\n for (const [object, matrix] of objectTransformMap.entries()) {\n if (!object.userData?.handle) continue;\n\n // Save original position before modifying\n if (!this._originalObjectMatrices.has(object)) {\n this._originalObjectMatrices.set(object, object.position.clone());\n }\n\n // Extract translation from the transform matrix (structure-root-local space)\n _offset.setFromMatrixPosition(matrix);\n\n // Convert offset from structure-root-local to world space,\n // then from world space to parent-local space.\n if (object.userData.structureId) {\n const rootGroup = this.structureRoots.get(object.userData.structureId);\n if (rootGroup && object.parent && object.parent !== rootGroup) {\n const origin = new Vector3(0, 0, 0);\n origin.applyMatrix4(rootGroup.matrixWorld);\n _offset.applyMatrix4(rootGroup.matrixWorld);\n _offset.sub(origin);\n\n const parentOrigin = new Vector3(0, 0, 0);\n _parentInverse.copy(object.parent.matrixWorld).invert();\n parentOrigin.applyMatrix4(_parentInverse);\n _offset.applyMatrix4(_parentInverse);\n _offset.sub(parentOrigin);\n }\n }\n\n object.position.add(_offset);\n\n if (object.userData.highlight) {\n object.userData.highlight.position.copy(object.position);\n }\n }\n }\n }\n\n createExplodeTransforms(objects = null, explodeCenter = null, explodeFactor = 1.5) {\n const transformMap = new Map();\n\n if (!explodeCenter) {\n explodeCenter = new Vector3();\n const extent = this.getTotalGeometryExtent();\n if (!extent.isEmpty()) {\n extent.getCenter(explodeCenter);\n }\n }\n\n const objectsArray = objects\n ? Array.isArray(objects)\n ? objects\n : Array.from(objects)\n : Array.from(this.originalObjects);\n\n // Cache inverse matrices for structures\n const structureInverseMatrices = new Map();\n\n // Map mesh -> node to access cached geometryExtents\n if (!this.meshToNodeMap) {\n this.meshToNodeMap = new Map();\n for (const node of this.nodes.values()) {\n if (node.object) {\n this.meshToNodeMap.set(node.object, node);\n }\n }\n }\n\n for (const obj of objectsArray) {\n if (!obj.geometry || !obj.geometry.attributes.position) continue;\n\n // OPTIMIZATION: Use cached node extent if available\n if (!obj.userData.explodeVector) {\n let center = null;\n\n // 1. Try to get extent from node (fastest, pre-calculated)\n const node = this.meshToNodeMap.get(obj);\n if (node && node.geometryExtents) {\n const box = node.geometryExtents.clone();\n box.applyMatrix4(obj.matrixWorld);\n center = new Vector3();\n box.getCenter(center);\n }\n\n // 2. Fallback to geometry bounding box\n if (!center) {\n if (!obj.geometry.boundingBox) obj.geometry.computeBoundingBox();\n const box = obj.geometry.boundingBox.clone();\n box.applyMatrix4(obj.matrixWorld);\n center = new Vector3();\n box.getCenter(center);\n }\n\n // Calculate vector from explode center to object center\n const explodeVector = center.sub(explodeCenter);\n\n // Cache it\n obj.userData.explodeVector = explodeVector;\n }\n\n const explodeVector = obj.userData.explodeVector;\n const distance = explodeVector.length();\n\n if (distance > 0) {\n // Calculate offset in World Space\n const offset = explodeVector.clone().multiplyScalar(explodeFactor - 1.0);\n\n // Convert offset from World Space to Local Space of the merged mesh\n const localOffset = offset.clone();\n\n if (obj.userData.structureId) {\n const structureId = obj.userData.structureId;\n let inverseMatrix = structureInverseMatrices.get(structureId);\n\n if (!inverseMatrix) {\n const rootGroup = this.structureRoots.get(structureId);\n if (rootGroup) {\n // Reuse cached inverse matrix if possible\n if (!rootGroup.userData.inverseWorldMatrix) {\n // rootGroup.updateMatrixWorld(true); // Trust current state\n rootGroup.userData.inverseWorldMatrix = new Matrix4().copy(rootGroup.matrixWorld).invert();\n }\n inverseMatrix = rootGroup.userData.inverseWorldMatrix;\n structureInverseMatrices.set(structureId, inverseMatrix);\n }\n }\n\n if (inverseMatrix) {\n const zero = new Vector3(0, 0, 0).applyMatrix4(inverseMatrix);\n const vec = offset.clone().applyMatrix4(inverseMatrix).sub(zero);\n localOffset.copy(vec);\n }\n }\n\n let matrix = obj.userData.explodeMatrix;\n if (!matrix) {\n matrix = new Matrix4();\n obj.userData.explodeMatrix = matrix;\n }\n matrix.makeTranslation(localOffset.x, localOffset.y, localOffset.z);\n transformMap.set(obj, matrix);\n }\n }\n\n return transformMap;\n }\n\n clearTransforms() {\n this.objectTransforms.clear();\n this._resetTransformData(true);\n\n // TODO: Remove when highlight is implemented via shader.\n // Restore original object positions\n if (this.syncTransformsToOriginalObjects) {\n for (const [obj, savedPos] of this._originalObjectMatrices) {\n obj.position.copy(savedPos);\n if (obj.userData.highlight) {\n obj.userData.highlight.position.copy(savedPos);\n }\n }\n this._originalObjectMatrices.clear();\n }\n }\n\n clearHandleTransforms() {\n this.clearTransforms();\n }\n\n syncHiddenObjects() {\n if (this.mergedObjectMap.size === 0) {\n console.warn(\"DynamicLoader: No merged objects to sync\");\n return;\n }\n\n if (this.objectVisibility.length > 0) {\n for (let i = 0; i < this.objectVisibility.length; i++) {\n this.objectVisibility[i] = 1.0;\n }\n\n this.hiddenHandles.forEach((handle) => {\n const index = this.objectIdToIndex.get(handle);\n if (index !== undefined && index < this.objectVisibility.length) {\n this.objectVisibility[index] = 0.0;\n }\n });\n }\n\n for (const mesh of this.mergedMesh) {\n this._updateVisibilityAttribute(mesh);\n }\n for (const line of this.mergedLines) {\n this._updateVisibilityAttribute(line);\n }\n for (const lineSegment of this.mergedLineSegments) {\n this._updateVisibilityAttribute(lineSegment);\n }\n for (const point of this.mergedPoints) {\n this._updateVisibilityAttribute(point);\n }\n }\n\n getStructureGeometryExtent(structureId) {\n const extent = new Box3();\n const structureRoot = this.structureRoots.get(structureId);\n\n for (const [nodeId, node] of this.nodes.entries()) {\n if (!node.geometryExtents) continue;\n if (!nodeId.startsWith(structureId + \"_\")) continue;\n if (node.object && this.hiddenHandles && this.hiddenHandles.has(node.object.userData.handle)) continue;\n const transformedBox = node.geometryExtents.clone();\n\n if (node.group) {\n const matrices = [];\n let currentGroup = node.group;\n\n while (currentGroup && currentGroup !== structureRoot) {\n if (currentGroup.matrix && currentGroup.matrixAutoUpdate === false) {\n matrices.unshift(currentGroup.matrix);\n }\n currentGroup = currentGroup.parent;\n }\n\n for (const matrix of matrices) {\n transformedBox.applyMatrix4(matrix);\n }\n }\n\n if (structureRoot && structureRoot.matrix) {\n transformedBox.applyMatrix4(structureRoot.matrix);\n }\n\n extent.union(transformedBox);\n }\n\n if (this.scene && this.scene.matrix && !extent.isEmpty()) {\n extent.applyMatrix4(this.scene.matrix);\n }\n\n return extent;\n }\n\n setMaxConcurrentChunks(maxChunks = 6) {\n if (maxChunks < 1) {\n console.warn(\"Max concurrent chunks must be at least 1\");\n return;\n }\n this.maxConcurrentChunks = maxChunks;\n }\n\n waitForChunkSlot() {\n if (this.activeChunkLoads < this.maxConcurrentChunks) {\n this.activeChunkLoads++;\n return Promise.resolve();\n }\n\n return new Promise((resolve) => {\n this.chunkQueue.push(resolve);\n });\n }\n\n releaseChunkSlot() {\n this.activeChunkLoads--;\n\n if (this.chunkQueue.length > 0) {\n const nextResolve = this.chunkQueue.shift();\n this.activeChunkLoads++;\n nextResolve();\n }\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { LoadParams } from \"@inweb/viewer-core\";\nimport { LoadingManager, LoaderUtils } from \"three\";\n\nexport type GLTFFileSource = string | globalThis.File | ArrayBuffer;\n\nexport type GLTFLoadParams = LoadParams & {\n requestHeader?: HeadersInit;\n withCredentials?: boolean;\n path?: string;\n externalFiles?: Map<string, GLTFFileSource>;\n crossOrigin?: string;\n};\n\nexport class GLTFLoadingManager extends LoadingManager {\n public path = \"\";\n public resourcePath = \"\";\n public fileURL = \"\";\n public dataURLs = new Map();\n\n constructor(file: GLTFFileSource, params: GLTFLoadParams = {}) {\n super();\n\n this.path = params.path || \"\";\n\n const externalFiles = params.externalFiles || new Map();\n\n if (typeof file === \"string\") {\n this.fileURL = file;\n this.resourcePath = LoaderUtils.extractUrlBase(file);\n } else {\n externalFiles.forEach((value, key) => (this.fileURL = value === file ? key : this.fileURL));\n externalFiles.set(this.fileURL, file);\n }\n\n externalFiles.forEach((value, key) => {\n let dataURL: string;\n if (typeof value === \"string\") dataURL = value;\n else dataURL = URL.createObjectURL(new Blob([value]));\n this.dataURLs.set(key, dataURL);\n });\n\n this.setURLModifier((url: string) => {\n const key = decodeURI(url)\n .replace(this.path, \"\")\n .replace(this.resourcePath, \"\")\n .replace(/^(\\.?\\/)/, \"\");\n const dataURL = this.dataURLs.get(key);\n return dataURL ?? url;\n });\n }\n\n dispose() {\n this.dataURLs.forEach((dataURL) => URL.revokeObjectURL(dataURL));\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\n// ===================== AI-CODE-FILE ======================\n// Source: Claude Sonnet 4.5\n// Date: 2025-28-10\n// Reviewer: roman.mochalov@opendesign.com\n// Issue: CLOUD-5933\n// Notes: Originally AI-generated, modified manually\n// =========================================================\n\nconst BINARY_EXTENSION_HEADER_MAGIC = \"glTF\";\nconst BINARY_EXTENSION_HEADER_LENGTH = 12;\nconst BINARY_EXTENSION_CHUNK_TYPES = { JSON: 0x4e4f534a, BIN: 0x004e4942 };\n\nexport interface GLTFBinaryHeader {\n magic: string;\n version: number;\n length: number;\n}\n\nexport class GLTFBinaryParser {\n public header: GLTFBinaryHeader;\n public content: Uint8Array;\n public body: ArrayBuffer;\n\n constructor(data: ArrayBuffer) {\n const dataView = new DataView(data, 0);\n\n const textDecoder = new TextDecoder();\n const magic = textDecoder.decode(new Uint8Array(data, 0, Math.min(4, data.byteLength)));\n\n if (magic !== BINARY_EXTENSION_HEADER_MAGIC) {\n this.content = new Uint8Array(data);\n return;\n }\n\n this.header = {\n magic,\n version: dataView.getUint32(4, true),\n length: dataView.getUint32(8, true),\n };\n\n if (this.header.length !== data.byteLength) {\n throw new Error(\"GLTFBinaryParser: Invalid binary file header.\");\n }\n if (this.header.version < 2.0) {\n throw new Error(\"GLTFBinaryParser: Legacy binary file detected.\");\n }\n\n let offset = BINARY_EXTENSION_HEADER_LENGTH;\n\n while (offset < this.header.length) {\n const chunkLength = dataView.getUint32(offset, true);\n offset += 4;\n\n const chunkType = dataView.getUint32(offset, true);\n offset += 4;\n\n if (chunkType === BINARY_EXTENSION_CHUNK_TYPES.JSON) {\n this.content = new Uint8Array(data, offset, chunkLength);\n } else if (chunkType === BINARY_EXTENSION_CHUNK_TYPES.BIN) {\n this.body = data.slice(offset, offset + chunkLength);\n }\n\n offset += chunkLength;\n }\n\n if (typeof this.content === \"undefined\") {\n throw new Error(\"GLTFBinaryParser: JSON content not found.\");\n }\n if (typeof this.body === \"undefined\") {\n throw new Error(\"GLTFBinaryParser: Binary buffer chunk not found or type not supported.\");\n }\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { JSONParser } from \"@streamparser/json\";\n\nexport class JSONStreamParser extends JSONParser {\n public json: any;\n\n constructor(data?: Uint8Array) {\n super();\n\n this.onValue = ({ value, stack }) => {\n if (stack.length === 0) this.json = value;\n };\n\n if (data) this.write(data);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nclass FetchError extends Error {\n public status: number;\n\n constructor(status: number, message: string) {\n super(message);\n this.name = \"FetchError\";\n this.status = status;\n }\n}\n\nexport interface Range {\n offset: number;\n length: number;\n}\n\nexport class RangesLoader {\n private requestHeader: HeadersInit;\n private withCredentials: boolean;\n private abortSignal: AbortSignal | undefined;\n\n constructor() {\n this.requestHeader = {};\n this.withCredentials = false;\n this.abortSignal = undefined;\n }\n\n setRequestHeader(requestHeader: HeadersInit) {\n this.requestHeader = requestHeader;\n }\n\n setWithCredentials(withCredentials: boolean) {\n this.withCredentials = withCredentials;\n }\n\n setAbortSignal(abortSignal: AbortSignal) {\n this.abortSignal = abortSignal;\n }\n\n async load(url: string, ranges: Range[]): Promise<ArrayBuffer> {\n const init: RequestInit = {\n headers: {\n ...this.requestHeader,\n Range: \"bytes=\" + ranges.map((x) => `${x.offset}-${x.offset + x.length - 1}`).join(\",\"),\n },\n credentials: this.withCredentials ? \"include\" : \"same-origin\",\n signal: this.abortSignal,\n };\n\n const response = await fetch(url, init);\n if (!response.ok) {\n throw new FetchError(response.status, `Failed to fetch \"${url}\", status ${response.status}`);\n }\n\n if (response.status !== 206) {\n const arrayBuffer = await response.arrayBuffer();\n return this.extractRanges(arrayBuffer, ranges);\n }\n\n return response.arrayBuffer();\n }\n\n // ===================== AI-CODE-START ======================\n // Source: Claude Sonnet 4.5\n // Date: 2025-28-10\n // Reviewer: roman.mochalov@opendesign.com\n // Issue: CLOUD-5933\n\n extractRanges(arrayBuffer: ArrayBuffer, ranges: Range[]): ArrayBuffer {\n const totalLength = ranges.reduce((sum, range) => sum + range.length, 0);\n const result = new Uint8Array(totalLength);\n\n let offset = 0;\n for (const range of ranges) {\n const chunk = new Uint8Array(arrayBuffer, range.offset, range.length);\n result.set(chunk, offset);\n offset += range.length;\n }\n\n return result.buffer;\n }\n // ===================== AI-CODE-END ======================\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { FileLoader, Group, LoaderUtils } from \"three\";\nimport { Loader } from \"@inweb/viewer-core\";\n\nimport { Viewer } from \"../Viewer\";\nimport { DynamicModelImpl } from \"./DynamicGltfLoader/DynamicModelImpl\";\nimport { DynamicGltfLoader } from \"./DynamicGltfLoader/DynamicGltfLoader.js\";\nimport { GltfStructure } from \"./DynamicGltfLoader/GltfStructure.js\";\nimport { GLTFLoadingManager, GLTFLoadParams } from \"./GLTFLoadingManager\";\nimport { GLTFBinaryParser } from \"./GLTFBinaryParser\";\nimport { JSONStreamParser } from \"./JSONStreamParser\";\nimport { RangesLoader } from \"./RangesLoader\";\n\nexport class GLTFFileDynamicLoader extends Loader {\n public viewer: Viewer;\n private gltfLoader: DynamicGltfLoader;\n private manager: GLTFLoadingManager;\n private glb: ArrayBuffer;\n\n constructor(viewer: Viewer) {\n super();\n this.viewer = viewer;\n }\n\n override dispose() {\n if (this.gltfLoader) this.gltfLoader.clear();\n if (this.manager) this.manager.dispose();\n }\n\n override isSupport(file: any, format?: string): boolean {\n return (\n (typeof file === \"string\" || file instanceof globalThis.File || file instanceof ArrayBuffer) &&\n /(gltf|glb)$/i.test(format)\n );\n }\n\n override async load(file: any, format?: string, params?: GLTFLoadParams): Promise<this> {\n this.manager = new GLTFLoadingManager(file, params);\n\n const scene = new Group();\n\n this.gltfLoader = new DynamicGltfLoader(this.viewer.camera, scene, this.viewer.renderer);\n this.gltfLoader.setMemoryLimit(this.viewer.options.memoryLimit);\n this.gltfLoader.setVisibleEdges(this.viewer.options.edgeModel);\n this.gltfLoader.setMaxConcurrentChunks(params.maxConcurrentChunks);\n this.gltfLoader.setDracoLoader(params.dracoLoader);\n\n const modelImpl = new DynamicModelImpl(scene);\n modelImpl.id = params.modelId || this.extractFileName(file);\n modelImpl.gltfLoader = this.gltfLoader;\n\n this.gltfLoader.addEventListener(\"databasechunk\", () => {\n this.viewer.scene.add(scene);\n this.viewer.models.push(modelImpl);\n\n this.viewer.syncOptions();\n this.viewer.syncOverlay();\n\n this.viewer.emitEvent({ type: \"databasechunk\", data: scene, file });\n this.viewer.update(true);\n });\n\n this.gltfLoader.addEventListener(\"geometryerror\", (data) => {\n this.viewer.emitEvent({ type: \"geometryerror\", data, file });\n });\n\n this.gltfLoader.addEventListener(\"update\", () => {\n this.viewer.update();\n });\n\n const loadController = {\n loadJson: async () => {\n const loader = new FileLoader(this.manager);\n loader.setPath(this.manager.path);\n loader.setRequestHeader((params.requestHeader as any) || {});\n loader.setWithCredentials(params.withCredentials || loader.withCredentials);\n loader.setResponseType(\"arraybuffer\");\n\n const progress = (event: ProgressEvent) => {\n const { lengthComputable, loaded, total } = event;\n const progress = lengthComputable ? loaded / total : 1;\n this.viewer.emitEvent({ type: \"geometryprogress\", data: progress, file });\n };\n\n const data = await loader.loadAsync(this.manager.fileURL, progress);\n\n const binaryParser = new GLTFBinaryParser(data as ArrayBuffer);\n const jsonParser = new JSONStreamParser(binaryParser.content);\n\n if (!jsonParser.json) {\n throw new Error(\"GLTFFileDynamicLoader: JSON content not found or invalid.\");\n }\n\n this.glb = binaryParser.body;\n\n return jsonParser.json;\n },\n\n loadBinaryData: (ranges, uri = \"\") => {\n const loader = new RangesLoader();\n loader.setRequestHeader((params.requestHeader as any) || {});\n loader.setWithCredentials(params.withCredentials || false);\n loader.setAbortSignal(this.gltfLoader.abortController.signal);\n\n if (this.glb) return loader.extractRanges(this.glb, ranges);\n\n const path = this.manager.path || this.manager.resourcePath;\n const url = LoaderUtils.resolveURL(uri, path);\n\n return loader.load(this.manager.resolveURL(url), ranges);\n },\n\n resolveURL: (uri) => {\n const path = this.manager.path || this.manager.resourcePath;\n const url = LoaderUtils.resolveURL(uri, path);\n return Promise.resolve(this.manager.resolveURL(url));\n },\n };\n\n const structure = new GltfStructure(modelImpl.id, loadController);\n\n await this.gltfLoader.loadStructure(structure);\n await this.gltfLoader.loadNodes();\n\n return this;\n }\n\n override cancel() {\n if (this.gltfLoader) this.gltfLoader.abortLoading();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Group, LoaderUtils } from \"three\";\nimport { Loader, LoadParams } from \"@inweb/viewer-core\";\n\nimport { Viewer } from \"../Viewer\";\nimport { DynamicModelImpl } from \"./DynamicGltfLoader/DynamicModelImpl\";\nimport { DynamicGltfLoader } from \"./DynamicGltfLoader/DynamicGltfLoader.js\";\nimport { GltfStructure } from \"./DynamicGltfLoader/GltfStructure.js\";\nimport { JSONStreamParser } from \"./JSONStreamParser\";\n\nexport class GLTFCloudDynamicLoader extends Loader {\n public viewer: Viewer;\n public gltfLoader: DynamicGltfLoader;\n public requestId = 0;\n\n constructor(viewer: Viewer) {\n super();\n this.viewer = viewer;\n }\n\n override dispose() {\n if (this.gltfLoader) this.gltfLoader.clear();\n }\n\n override isSupport(file: any): boolean {\n return (\n typeof file === \"object\" &&\n typeof file.database === \"string\" &&\n typeof file.downloadResource === \"function\" &&\n typeof file.downloadResourceRange === \"function\" &&\n /.gltf$/i.test(file.database)\n );\n }\n\n override async load(model: any, format?: string, params: LoadParams = {}): Promise<this> {\n const scene = new Group();\n\n this.gltfLoader = new DynamicGltfLoader(this.viewer.camera, scene, this.viewer.renderer);\n this.gltfLoader.setMemoryLimit(this.viewer.options.memoryLimit);\n this.gltfLoader.setVisibleEdges(this.viewer.options.edgeModel);\n this.gltfLoader.setMaxConcurrentChunks(params.maxConcurrentChunks);\n this.gltfLoader.setDracoLoader(params.dracoLoader);\n\n const modelImpl = new DynamicModelImpl(scene);\n modelImpl.id = model.file.id;\n modelImpl.gltfLoader = this.gltfLoader;\n\n this.gltfLoader.addEventListener(\"databasechunk\", (data) => {\n this.viewer.scene.add(scene);\n this.viewer.models.push(modelImpl);\n\n this.viewer.syncOptions();\n this.viewer.syncOverlay();\n\n this.viewer.emitEvent({ type: \"databasechunk\", data: scene, file: model.file, model });\n this.viewer.update(true);\n });\n\n this.gltfLoader.addEventListener(\"geometryerror\", (data) => {\n this.viewer.emitEvent({ type: \"geometryerror\", data, file: model.file, model });\n });\n\n this.gltfLoader.addEventListener(\"update\", () => {\n this.viewer.update();\n });\n\n const loadController = {\n loadJson: async () => {\n const jsonParser = new JSONStreamParser();\n\n const progress = (progress: number, chunk: Uint8Array) => {\n jsonParser.write(chunk);\n this.viewer.emitEvent({ type: \"geometryprogress\", data: progress, file: model.file, model });\n };\n\n await model.downloadResource(model.database, progress, this.gltfLoader.getAbortController().signal);\n\n if (!jsonParser.json) {\n throw new Error(\"GLTFCloudDynamicLoader: JSON content not found or invalid.\");\n }\n\n return jsonParser.json;\n },\n\n loadBinaryData: (requests) => {\n const ranges = requests.map((request) => ({\n begin: request.offset,\n end: request.offset + request.length - 1,\n requestId: this.requestId++,\n }));\n\n return model.downloadResourceRange(\n model.geometry[0],\n undefined,\n ranges,\n undefined,\n this.gltfLoader.getAbortController().signal\n );\n },\n\n resolveURL: (uri) => {\n const path = `${model.httpClient.serverUrl}${model.path}/`;\n const url = LoaderUtils.resolveURL(uri, path);\n return Promise.resolve(url);\n },\n };\n\n const structure = new GltfStructure(modelImpl.id, loadController);\n\n await this.gltfLoader.loadStructure(structure);\n await this.gltfLoader.loadNodes();\n\n return this;\n }\n\n override cancel() {\n if (this.gltfLoader) this.gltfLoader.abortLoading();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { ILoadersRegistry, loadersRegistry } from \"@inweb/viewer-core\";\n\nimport { GLTFFileDynamicLoader } from \"./GLTFFileDynamicLoader\";\nimport { GLTFCloudDynamicLoader } from \"./GLTFCloudDynamicLoader\";\n\n/**\n * Viewer loaders registry. Use this registry to register custom loaders.\n *\n * To implement custom loader:\n *\n * 1. Define a loader class implements {@link ILoader}.\n * 2. Define a constructor with a `viewer` parameter.\n * 3. Override {@link ILoader.isSupport} and check if the loader can load the specified file.\n * 4. Override {@link ILoader.load} and define the logic for loading the scene from the file.\n *\n * The loader should do:\n *\n * - Load raw data from file and convert it to the `Three.js` scene.\n * - Add scene to the viewer `scene`.\n * - Create `ModelImpl` instance with unique model ID add it to the viewer `models` list.\n * - Synchronize viewer options and overlay.\n * - Update the viewer.\n *\n * The loader must emit events:\n *\n * - `geometryprogress` - during loading (or once at 100% when complete).\n * - `databasechunk` - when scene is loaded and ready to render.\n * 5. Override {@link ILoader.dispose} and release loader resources, if required.\n * 6. Use `this.abortController` (defined in `Loader` class) to abort loading raw data.\n * 7. Register loader provider in the loaders registry by calling the {@link loaders.registerLoader}.\n *\n * @example Implementing a custom loader.\n *\n * ```javascript\n * import { Scene } from \"three\";\n * import { Loader, loaders, ModelImpl, Viewer } from \"@inweb/viewer-three\";\n *\n * class MyLoader extends Loader {\n * public viewer: Viewer;\n *\n * constructor(viewer: Viewer) {\n * super();\n * this.viewer = viewer;\n * }\n *\n * override isSupport(file, format): Boolean {\n * // check if this loader supports the file source and format\n * return type file === \"string\" && format === \"myformat\";\n * }\n *\n * override load(file, format, params = {}): Promise<this> {\n * // load raw data from file (custom loading logic)\n * const data = await fetch(file).then((result) => result.arrayBuffer());\n *\n * // convert raw data to the Three.js scene (custom parsing logic)\n * const scene = this.parse(data);\n *\n * const modelImpl = new ModelImpl(scene);\n * modelImpl.id = params.modelId;\n *\n * this.viewer.scene.add(scene);\n * this.viewer.models.push(modelImpl);\n *\n * this.viewer.syncOptions();\n * this.viewer.syncOverlay();\n *\n * this.viewer.emitEvent({ type: \"geometryprogress\", data: 1, file });\n * this.viewer.emitEvent({ type: \"databasechunk\", data: scene, file });\n *\n * this.viewer.update(true);\n *\n * return Promise.resove(this);\n * };\n *\n * private parse(data: ArrayBuffer): Scene {\n * // custom parsing logic\n * return new Scene();\n * }\n * }\n *\n * loaders.registerLoader(\"MyLoader\", (viewer) => new MyLoader(viewer));\n * ```\n */\nexport const loaders: ILoadersRegistry = loadersRegistry(\"threejs\");\n\n// build-in loaders\n\nloaders.registerLoader(\"gltf-file\", (viewer: any) => new GLTFFileDynamicLoader(viewer));\nloaders.registerLoader(\"gltf-cloud\", (viewer: any) => new GLTFCloudDynamicLoader(viewer));\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n Box3,\n Group,\n LinearSRGBColorSpace,\n // LinearToneMapping,\n Object3D,\n OrthographicCamera,\n PerspectiveCamera,\n Plane,\n Raycaster,\n Scene,\n Vector2,\n Vector3,\n WebGLRenderer,\n WebGLRenderTarget,\n} from \"three\";\nimport { EffectComposer } from \"three/examples/jsm/postprocessing/EffectComposer.js\";\nimport { RenderPass } from \"three/examples/jsm/postprocessing/RenderPass.js\";\nimport { FXAAPass } from \"three/examples/jsm/postprocessing/FXAAPass.js\";\nimport { SMAAPass } from \"three/examples/jsm/postprocessing/SMAAPass.js\";\nimport { SSAARenderPass } from \"three/examples/jsm/postprocessing/SSAARenderPass.js\";\nimport { OutputPass } from \"three/examples/jsm/postprocessing/OutputPass.js\";\n\nimport { EventEmitter2 } from \"@inweb/eventemitter2\";\nimport { Assembly, Client, Model, File } from \"@inweb/client\";\nimport {\n CANVAS_EVENTS,\n CanvasEventMap,\n FileSource,\n IClippingPlane,\n IComponent,\n IDragger,\n IEntity,\n IInfo,\n ILoader,\n Info,\n IOptions,\n IOrthogonalCamera,\n IPerspectiveCamera,\n IPoint,\n IViewer,\n IViewpoint,\n Options,\n OptionsEventMap,\n ViewerEventMap,\n} from \"@inweb/viewer-core\";\nimport { IMarkup, IWorldTransform, Markup } from \"@inweb/markup\";\n\nimport { draggers } from \"./draggers\";\nimport { commands } from \"./commands\";\nimport { components } from \"./components\";\nimport { loaders } from \"./loaders\";\nimport { IModelImpl } from \"./models/IModelImpl\";\n\n/**\n * 3D viewer powered by {@link https://threejs.org/ | Three.js}.\n */\nexport class Viewer\n extends EventEmitter2<ViewerEventMap & CanvasEventMap & OptionsEventMap>\n implements IViewer, IWorldTransform\n{\n public client: Client | undefined;\n public options: IOptions;\n public canvas: HTMLCanvasElement | undefined;\n public canvasEvents: string[];\n public loaders: ILoader[];\n public models: IModelImpl[];\n public info: IInfo;\n\n private canvaseventlistener: (event: any) => void;\n\n public scene: Scene | undefined;\n public helpers: Group | undefined;\n public camera: PerspectiveCamera | OrthographicCamera | undefined;\n public renderer: WebGLRenderer | undefined;\n public renderPass: RenderPass | undefined;\n public fxaaPass: FXAAPass | undefined;\n public smaaPass: SMAAPass | undefined;\n public ssaaRenderPass: SSAARenderPass | undefined;\n public outputPass: OutputPass | undefined;\n public composer: EffectComposer | undefined;\n public selected: Object3D[];\n public extents: Box3;\n public target: Vector3;\n public clippingPlanes: Plane[];\n\n private _activeDragger: IDragger | null;\n private _components: IComponent[];\n\n private _renderNeeded: boolean;\n private _renderTime: DOMHighResTimeStamp;\n\n private _markup: IMarkup;\n\n /**\n * @param client - The `Client` instance that is used to load model reference files from the Open Cloud\n * Server. Do not specify `Client` if you need a standalone viewer instance to view `glTF` files from\n * the web or from local computer.\n */\n constructor(client?: Client) {\n super();\n this.client = client;\n this.options = new Options(this);\n this.loaders = [];\n this.models = [];\n this.info = new Info();\n\n this.canvasEvents = CANVAS_EVENTS.slice();\n this.canvaseventlistener = (event: Event) => this.emit(event);\n\n this.selected = [];\n this.extents = new Box3();\n this.target = new Vector3(0, 0, 0);\n this.clippingPlanes = [];\n\n this._activeDragger = null;\n this._components = [];\n\n this._renderNeeded = false;\n this._renderTime = 0;\n\n this.render = this.render.bind(this);\n this.update = this.update.bind(this);\n\n this._markup = new Markup();\n }\n\n /**\n * 2D markup core instance used to create markups.\n *\n * @readonly\n */\n get markup(): IMarkup {\n return this._markup;\n }\n\n // IViewer\n\n get draggers(): string[] {\n return [...draggers.getDraggers().keys()];\n }\n\n get components(): string[] {\n return [...components.getComponents().keys()];\n }\n\n initialize(canvas: HTMLCanvasElement, onProgress?: (event: ProgressEvent<EventTarget>) => void): Promise<this> {\n this.addEventListener(\"optionschange\", (event) => this.syncOptions(event.data));\n\n this.scene = new Scene();\n\n this.helpers = new Group();\n this.helpers.name = \"Helpers\";\n this.scene.add(this.helpers);\n\n const pixelRatio = window.devicePixelRatio;\n const rect = canvas.parentElement.getBoundingClientRect();\n const width = rect.width || 1;\n const height = rect.height || 1;\n const aspectRatio = width / height;\n\n this.camera = new PerspectiveCamera(45, aspectRatio, 0.001, 1000);\n this.camera.up.set(0, 1, 0);\n this.camera.position.set(0, 0, 1);\n this.camera.lookAt(this.target);\n this.camera.updateProjectionMatrix();\n\n this.renderer = new WebGLRenderer({\n canvas,\n antialias: true,\n alpha: true,\n preserveDrawingBuffer: true,\n powerPreference: \"high-performance\",\n logarithmicDepthBuffer: true, // <- required for sections filling\n });\n this.renderer.setPixelRatio(pixelRatio);\n this.renderer.setSize(width, height);\n this.renderer.outputColorSpace = LinearSRGBColorSpace;\n // this.renderer.toneMapping = LinearToneMapping;\n this.renderer.localClippingEnabled = true;\n\n this.renderPass = new RenderPass(this.scene, this.camera);\n this.fxaaPass = new FXAAPass();\n this.smaaPass = new SMAAPass();\n this.ssaaRenderPass = new SSAARenderPass(this.scene, this.camera);\n this.ssaaRenderPass.unbiased = true;\n this.outputPass = new OutputPass();\n\n const renderTarget = new WebGLRenderTarget(1, 1, { samples: 4 });\n renderTarget.texture.name = \"EffectComposer.rt1\";\n\n this.composer = new EffectComposer(this.renderer, renderTarget);\n this.composer.addPass(this.renderPass);\n this.composer.addPass(this.smaaPass);\n this.composer.addPass(this.fxaaPass);\n this.composer.addPass(this.ssaaRenderPass);\n this.composer.addPass(this.outputPass);\n this.composer.setSize(width, height);\n\n this.canvas = canvas;\n this.canvasEvents.forEach((x) => canvas.addEventListener(x, this.canvaseventlistener));\n\n this._markup.initialize(this.canvas, this.canvasEvents, this, this);\n\n for (const name of components.getComponents().keys()) {\n this._components.push(components.createComponent(name, this));\n }\n\n this.syncOptions();\n this.syncOverlay();\n\n this._renderTime = performance.now();\n\n if (typeof onProgress === \"function\") {\n const event = new ProgressEvent(\"progress\", { lengthComputable: true, loaded: 1, total: 1 });\n onProgress(event);\n }\n\n this.emitEvent({ type: \"initializeprogress\", data: 1, loaded: 1, total: 1 });\n this.emitEvent({ type: \"initialize\" });\n this.update(true);\n\n return Promise.resolve(this);\n }\n\n dispose(): this {\n this.cancel();\n this.clear();\n\n this.emitEvent({ type: \"dispose\" });\n this.removeAllListeners();\n\n this.setActiveDragger();\n\n this._components.forEach((component: IComponent) => component.dispose());\n this._components.length = 0;\n\n if (this._markup) {\n this._markup.dispose();\n this._markup = undefined;\n }\n\n if (this.canvas) {\n this.canvasEvents.forEach((x) => this.canvas.removeEventListener(x, this.canvaseventlistener));\n this.canvas = undefined;\n }\n\n if (this.composer) this.composer.dispose();\n if (this.renderPass) this.renderPass.dispose();\n if (this.fxaaPass) this.fxaaPass.dispose();\n if (this.smaaPass) this.smaaPass.dispose();\n if (this.ssaaRenderPass) this.ssaaRenderPass.dispose();\n if (this.outputPass) this.outputPass.dispose();\n if (this.renderer) this.renderer.dispose();\n\n this.scene = undefined;\n this.helpers = undefined;\n this.camera = undefined;\n this.renderer = undefined;\n this.renderPass = undefined;\n this.fxaaPass = undefined;\n this.smaaPass = undefined;\n this.ssaaRenderPass = undefined;\n this.outputPass = undefined;\n this.composer = undefined;\n\n return this;\n }\n\n isInitialized(): boolean {\n return !!this.renderer;\n }\n\n setSize(width: number, height: number, updateStyle = true) {\n if (!this.renderer) return;\n\n const camera = this.camera as any;\n const aspectRatio = width / height;\n\n if (camera.isPerspectiveCamera) {\n camera.aspect = aspectRatio;\n camera.updateProjectionMatrix();\n }\n if (camera.isOrthographicCamera) {\n camera.left = camera.bottom * aspectRatio;\n camera.right = camera.top * aspectRatio;\n camera.updateProjectionMatrix();\n }\n\n this.renderer.setSize(width, height, updateStyle);\n this.composer.setSize(width, height);\n\n this.emitEvent({ type: \"resize\", width, height });\n this.update(true);\n }\n\n update(force: boolean | number = false): void {\n const time = performance.now();\n if (typeof force === \"number\" && time - this._renderTime >= force) force = true;\n\n this._renderNeeded = true;\n if (force) this.render(time);\n\n this.emitEvent({ type: \"update\", force: !!force });\n }\n\n // Internal render routines\n\n render(time?: DOMHighResTimeStamp, force = false): void {\n if (!this.renderer) return;\n if (!this._renderNeeded && !force) return;\n\n if (!time) time = performance.now();\n const deltaTime = (time - this._renderTime) / 1000;\n\n this._renderTime = time;\n this._renderNeeded = false;\n\n this.renderer.info.autoReset = false;\n this.renderer.info.reset();\n\n this.composer.render(deltaTime);\n\n this.emitEvent({ type: \"render\", time, deltaTime });\n }\n\n // Internal loading routines\n\n loadReferences(model: Model | File | Assembly): Promise<this> {\n // todo: load reference as text fonts\n return Promise.resolve(this);\n }\n\n /**\n * Loads a file into the viewer.\n *\n * The viewer must be {@link initialize | initialized} before opening the file. Otherwise, `open()` does\n * nothing.\n *\n * This method requires a `Client` instance to be specified to load file from the Open Cloud Server.\n * The file geometry data on the Open Cloud Server must be converted into a `gltf` format, otherwise an\n * exception will be thrown.\n *\n * For files from Open Cloud Server, the default model will be loaded. If there is no default model,\n * the first available model will be loaded. If no models are found in the file, an exception will be\n * thrown.\n *\n * For URLs, the file extension is used to determine the file format. For a `ArrayBuffer` and `Data\n * URL`, a file format must be specified using `params.format` parameter. If no appropriate loader is\n * found for the specified format, an exception will be thrown.\n *\n * If there was an active dragger before opening the file, it will be deactivated. After opening the\n * file, you must manually activate the required dragger.\n *\n * Fires:\n *\n * - {@link CancelEvent | cancel}\n * - {@link ClearEvent | clear}\n * - {@link OpenEvent | open}\n * - {@link GeometryStartEvent | geometrystart}\n * - {@link GeometryProgressEvent | geometryprogress}\n * - {@link DatabaseChunkEvent | databasechunk}\n * - {@link GeometryChunkEvent | geometrychunk}\n * - {@link GeometryEndEvent | geometryend}\n * - {@link GeometryErrorEvent | geometryerror}\n *\n * @param file - File to load. Can be:\n *\n * - `File`, `Assembly`, or `Model` instance from the Open Cloud Server\n * - `URL` string\n * - {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string\n * - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object\n * - {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer}\n * object\n *\n * @param params - Loading parameters.\n * @param params.format - File format. Can be `gltf`, `glb` or format from an extension. Required when\n * loading a file as `ArrayBuffer` or `Data URL`.\n * @param params.mode - File opening mode. Can be one of:\n *\n * - `file` - Single file mode. Unloads an open file and opens a new one. This is default mode.\n * - `assembly` - Assembly mode. Appends a file to an already open file.\n *\n * @param params.modelId - Unique model ID in the assembly (multi-model scene). Used as a model prefix\n * when selecting objects (see {@link getSelected2}). Must not contain the \":\" (colon). Required when\n * loading a file as `ArrayBuffer` or `Data URL`.\n * @param params.requestHeader - The\n * {@link https://developer.mozilla.org/docs/Glossary/Request_header | request header} used in HTTP\n * request.\n * @param params.withCredentials - Whether the HTTP request uses credentials such as cookies,\n * authorization headers or TLS client certificates. See\n * {@link https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/withCredentials | XMLHttpRequest.withCredentials}.\n * @param params.path - The base path from which external resources such as binary data buffers, images\n * or textures will be loaded. If not defined, the base path of the file URL will be used.\n * @param params.externalFiles - External resource map. Each resource should be represented by a `uri`\n * and a corresponding resource URL, or\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string, or\n * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object, or\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer}.\n * @param params.crossOrigin - The crossOrigin string to implement CORS for loading the external\n * resources from a different domain that allows CORS. Default is `anonymous`.\n */\n async open(\n file: FileSource,\n params: {\n format?: string;\n mode?: string;\n modelId?: string;\n requestHeader?: HeadersInit;\n withCredentials?: boolean;\n path?: string;\n externalFiles?: Map<string, string | globalThis.File | ArrayBuffer>;\n crossOrigin?: string;\n } = {}\n ): Promise<this> {\n if (!this.renderer) return this;\n\n const mode = params.mode || \"file\";\n\n if (mode !== \"assembly\" && mode !== \"a\" && mode !== \"append\") {\n this.cancel();\n this.clear();\n }\n\n this.emitEvent({ type: \"open\", mode, file });\n\n let model: any = file;\n if (model && typeof model.getModels === \"function\") {\n const models = await model.getModels();\n model = models.find((model: Model) => model.default) || models[0] || file;\n }\n if (model && typeof model.database === \"string\") {\n file = model.file;\n }\n\n let format = params.format;\n if (!format && file && typeof file[\"type\"] === \"string\") format = file[\"type\"].split(\".\").pop();\n if (!format && typeof file === \"string\") format = file.split(\".\").pop();\n if (!format && file instanceof globalThis.File) format = file.name.split(\".\").pop();\n\n const loader: ILoader = loaders.createLoader(this, model, format);\n if (!loader) throw new Error(`Format not supported (${format})`);\n this.loaders.push(loader);\n\n this.emitEvent({ type: \"geometrystart\", file, model });\n try {\n await this.loadReferences(model);\n await loader.load(model, format, params);\n } catch (error: any) {\n this.emitEvent({ type: \"geometryerror\", data: error, file, model });\n throw error;\n }\n this.emitEvent({ type: \"geometryend\", file, model });\n this.update(true);\n\n return this;\n }\n\n cancel(): this {\n this.loaders.forEach((loader) => loader.cancel());\n\n this.emitEvent({ type: \"cancel\" });\n return this;\n }\n\n clear(): this {\n if (!this.renderer) return this;\n\n this.setActiveDragger();\n this.clearSlices();\n this.clearOverlay();\n this.clearSelected();\n\n this.loaders.forEach((loader) => loader.dispose());\n this.loaders.length = 0;\n\n this.models.forEach((model) => model.dispose());\n this.models.length = 0;\n\n this.helpers.clear();\n\n this.scene.clear();\n this.scene.add(this.helpers);\n\n this.extents.makeEmpty();\n\n this.syncOptions();\n this.syncOverlay();\n\n this.emitEvent({ type: \"clear\" });\n this.update(true);\n\n return this;\n }\n\n is3D(): boolean {\n return true;\n }\n\n syncOptions(options: IOptions = this.options): void {\n if (!this.renderer) return;\n\n this.fxaaPass.enabled = options.antialiasing === \"fxaa\";\n this.smaaPass.enabled = options.antialiasing === \"smaa\";\n this.ssaaRenderPass.enabled = options.antialiasing === \"ssaa\";\n this.renderPass.enabled = options.antialiasing !== \"ssaa\";\n\n const samples = options.antialiasing === true || options.antialiasing === \"msaa\" ? 4 : 0;\n\n if (this.composer.renderTarget1.samples !== samples) {\n const size = this.renderer.getSize(new Vector2());\n\n const newRenderTarget = new WebGLRenderTarget(1, 1, { samples });\n newRenderTarget.texture.name = \"EffectComposer.rt1\";\n\n this.composer.reset(newRenderTarget);\n this.composer.setSize(size.x, size.y);\n }\n\n this.update();\n }\n\n syncOverlay(): void {\n if (!this.renderer) return;\n\n this._markup.syncOverlay();\n this.update();\n }\n\n clearOverlay(): void {\n if (!this.renderer) return;\n\n this._markup.clearOverlay();\n\n this.emitEvent({ type: \"clearoverlay\" });\n this.update();\n }\n\n clearSlices(): void {\n if (!this.renderer) return;\n\n this.clippingPlanes.length = 0;\n\n this.emitEvent({ type: \"changecuttingplanes\" });\n this.emitEvent({ type: \"clearslices\" });\n this.update();\n }\n\n getSelected(): string[] {\n return this.executeCommand(\"getSelected\");\n }\n\n getSelected2(): string[] {\n return this.executeCommand(\"getSelected2\");\n }\n\n setSelected(handles?: string[]): void {\n this.executeCommand(\"setSelected\", handles);\n }\n\n setSelected2(handles?: string[]): void {\n this.executeCommand(\"setSelected2\", handles);\n }\n\n clearSelected(): void {\n this.executeCommand(\"clearSelected\");\n }\n\n hideSelected(): void {\n this.executeCommand(\"hideSelected\");\n }\n\n isolateSelected(): void {\n this.executeCommand(\"isolateSelected\");\n }\n\n showAll(): void {\n this.executeCommand(\"showAll\");\n }\n\n explode(index = 0): void {\n this.executeCommand(\"explode\", index);\n }\n\n collect(): void {\n this.executeCommand(\"collect\");\n }\n\n activeDragger(): IDragger | null {\n return this._activeDragger;\n }\n\n setActiveDragger(name = \"\"): IDragger | null {\n if (!this._activeDragger || this._activeDragger.name !== name) {\n const oldDragger = this._activeDragger;\n let newDragger = null;\n\n if (this._activeDragger) {\n this._activeDragger.dispose();\n this._activeDragger = null;\n }\n if (this.isInitialized()) {\n newDragger = draggers.createDragger(name, this);\n this._activeDragger = newDragger;\n }\n\n const canvas = this.canvas;\n if (canvas) {\n if (oldDragger) canvas.classList.remove(`oda-cursor-${oldDragger.name.toLowerCase()}`);\n if (newDragger) canvas.classList.add(`oda-cursor-${newDragger.name.toLowerCase()}`);\n }\n\n this.emitEvent({ type: \"changeactivedragger\", data: name });\n this.update();\n }\n return this._activeDragger;\n }\n\n resetActiveDragger(): void {\n const dragger = this._activeDragger;\n if (dragger) {\n this.setActiveDragger();\n this.setActiveDragger(dragger.name);\n }\n }\n\n getComponent(name: string): IComponent {\n return this._components.find((component) => component.name === name);\n }\n\n drawViewpoint(viewpoint: IViewpoint): void {\n if (!this.renderer) return;\n\n const getVector3FromPoint3d = ({ x, y, z }): Vector3 => new Vector3(x, y, z);\n\n const setOrthogonalCamera = (orthogonal_camera: IOrthogonalCamera) => {\n if (orthogonal_camera) {\n const extentsSize = this.extents.getSize(new Vector3()).length() || 1;\n const rendererSize = this.renderer.getSize(new Vector2());\n const aspectRatio = rendererSize.x / rendererSize.y;\n\n const camera = new OrthographicCamera();\n camera.top = orthogonal_camera.field_height / 2;\n camera.bottom = -orthogonal_camera.field_height / 2;\n camera.left = camera.bottom * aspectRatio;\n camera.right = camera.top * aspectRatio;\n camera.near = -extentsSize * 1000;\n camera.far = extentsSize * 1000;\n camera.zoom = orthogonal_camera.view_to_world_scale;\n camera.updateProjectionMatrix();\n\n camera.up.copy(getVector3FromPoint3d(orthogonal_camera.up_vector));\n camera.position.copy(getVector3FromPoint3d(orthogonal_camera.view_point));\n camera.lookAt(getVector3FromPoint3d(orthogonal_camera.direction).add(camera.position));\n camera.updateMatrixWorld();\n\n this.camera = camera;\n this.renderPass.camera = camera;\n this.ssaaRenderPass.camera = camera;\n\n this.options.cameraMode = \"orthographic\";\n this.emitEvent({ type: \"changecameramode\", mode: \"orthographic\" });\n }\n };\n\n const setPerspectiveCamera = (perspective_camera: IPerspectiveCamera) => {\n if (perspective_camera) {\n const extentsSize = this.extents.getSize(new Vector3()).length() || 1;\n const rendererSize = this.renderer.getSize(new Vector2());\n const aspectRatio = rendererSize.x / rendererSize.y;\n\n const camera = new PerspectiveCamera();\n camera.fov = perspective_camera.field_of_view;\n camera.aspect = aspectRatio;\n camera.near = extentsSize / 1000;\n camera.far = extentsSize * 1000;\n camera.updateProjectionMatrix();\n\n camera.up.copy(getVector3FromPoint3d(perspective_camera.up_vector));\n camera.position.copy(getVector3FromPoint3d(perspective_camera.view_point));\n camera.lookAt(getVector3FromPoint3d(perspective_camera.direction).add(camera.position));\n camera.updateMatrixWorld();\n\n this.camera = camera;\n this.renderPass.camera = camera;\n this.ssaaRenderPass.camera = camera;\n\n this.options.cameraMode = \"perspective\";\n this.emitEvent({ type: \"changecameramode\", mode: \"perspective\" });\n }\n };\n\n const setClippingPlanes = (clipping_planes: IClippingPlane[]) => {\n if (clipping_planes) {\n clipping_planes.forEach((clipping_plane) => {\n const plane = new Plane();\n plane.setFromNormalAndCoplanarPoint(\n getVector3FromPoint3d(clipping_plane.direction),\n getVector3FromPoint3d(clipping_plane.location)\n );\n\n this.clippingPlanes.push(plane);\n });\n\n this.emitEvent({ type: \"changecuttingplanes\" });\n }\n };\n\n const setSelection = (selection: IEntity[]) => {\n if (selection) this.setSelected(selection.map((component) => component.handle));\n };\n\n const draggerName = this._activeDragger?.name;\n\n this.setActiveDragger();\n this.clearSlices();\n this.clearOverlay();\n this.clearSelected();\n\n this.showAll();\n this.explode();\n\n setOrthogonalCamera(viewpoint.orthogonal_camera);\n setPerspectiveCamera(viewpoint.perspective_camera);\n setClippingPlanes(viewpoint.clipping_planes);\n setSelection(viewpoint.custom_fields?.selection2 || viewpoint.selection);\n\n this._markup.setViewpoint(viewpoint);\n\n this.target.copy(getVector3FromPoint3d(viewpoint.custom_fields?.camera_target ?? this.target));\n\n this.syncOverlay();\n this.setActiveDragger(draggerName);\n\n this.emitEvent({ type: \"drawviewpoint\", data: viewpoint });\n this.update(true);\n }\n\n createViewpoint(): IViewpoint {\n if (!this.renderer) return {};\n\n const getPoint3dFromVector3 = ({ x, y, z }): IPoint => ({ x, y, z });\n\n const getOrthogonalCamera = (): IOrthogonalCamera => {\n if (this.camera[\"isOrthographicCamera\"])\n return {\n view_point: getPoint3dFromVector3(this.camera.position),\n direction: getPoint3dFromVector3(this.camera.getWorldDirection(new Vector3())),\n up_vector: getPoint3dFromVector3(this.camera.up),\n field_width: this.camera[\"right\"] - this.camera[\"left\"],\n field_height: this.camera[\"top\"] - this.camera[\"bottom\"],\n view_to_world_scale: this.camera.zoom,\n };\n else return undefined;\n };\n\n const getPerspectiveCamera = (): IPerspectiveCamera => {\n if (this.camera[\"isPerspectiveCamera\"])\n return {\n view_point: getPoint3dFromVector3(this.camera.position),\n direction: getPoint3dFromVector3(this.camera.getWorldDirection(new Vector3())),\n up_vector: getPoint3dFromVector3(this.camera.up),\n field_of_view: this.camera[\"fov\"],\n };\n else return undefined;\n };\n\n const getClippingPlanes = (): IClippingPlane[] => {\n const clipping_planes = [];\n this.clippingPlanes.forEach((plane: Plane) => {\n const clipping_plane = {\n location: getPoint3dFromVector3(plane.coplanarPoint(new Vector3())),\n direction: getPoint3dFromVector3(plane.normal),\n };\n clipping_planes.push(clipping_plane);\n });\n return clipping_planes;\n };\n\n const getSelection = (): IEntity[] => {\n return this.getSelected().map((handle) => ({ handle }));\n };\n\n const getSelection2 = (): IEntity[] => {\n return this.getSelected2().map((handle) => ({ handle }));\n };\n\n const viewpoint: IViewpoint = { custom_fields: {} };\n\n viewpoint.orthogonal_camera = getOrthogonalCamera();\n viewpoint.perspective_camera = getPerspectiveCamera();\n viewpoint.clipping_planes = getClippingPlanes();\n viewpoint.selection = getSelection();\n viewpoint.description = new Date().toDateString();\n viewpoint.snapshot = { data: this.getSnapshot() };\n\n this._markup.getViewpoint(viewpoint);\n\n viewpoint.custom_fields.camera_target = getPoint3dFromVector3(this.target);\n viewpoint.custom_fields.selection2 = getSelection2();\n\n this.emitEvent({ type: \"createviewpoint\", data: viewpoint });\n\n return viewpoint;\n }\n\n getSnapshot(type?: string, quality?: number): string {\n return this.executeCommand(\"getSnapshot\", type, quality);\n }\n\n // IWorldTransform\n\n screenToWorld(position: { x: number; y: number }): { x: number; y: number; z: number } {\n if (!this.renderer) return { x: position.x, y: position.y, z: 0 };\n\n const rect = this.canvas.getBoundingClientRect();\n const x = position.x / (rect.width / 2) - 1;\n const y = -position.y / (rect.height / 2) + 1;\n\n // ===================== AI-CODE-START ======================\n // Source: Claude Sonnet 4.5\n // Date: 2025-11-25\n // Reviewer: vitaly.ivanov@opendesign.com\n // Issue: CLOUD-5990\n\n if (this.camera[\"isPerspectiveCamera\"]) {\n // Create a raycaster from the screen position\n const raycaster = new Raycaster();\n const mouse = new Vector2(x, y);\n raycaster.setFromCamera(mouse, this.camera);\n\n // Create a plane perpendicular to the camera direction at the target point\n const cameraDirection = new Vector3();\n this.camera.getWorldDirection(cameraDirection);\n const targetPlane = new Plane().setFromNormalAndCoplanarPoint(cameraDirection, this.target);\n\n // Intersect the ray with the target plane\n const intersectionPoint = new Vector3();\n raycaster.ray.intersectPlane(targetPlane, intersectionPoint);\n\n // If intersection fails (ray parallel to plane), fallback to near plane unprojection\n if (!intersectionPoint) {\n const point = new Vector3(x, y, -1);\n point.unproject(this.camera);\n return { x: point.x, y: point.y, z: point.z };\n }\n return { x: intersectionPoint.x, y: intersectionPoint.y, z: intersectionPoint.z };\n }\n\n // ===================== AI-CODE-END ======================\n\n const point = new Vector3(x, y, -1);\n point.unproject(this.camera);\n\n return { x: point.x, y: point.y, z: point.z };\n }\n\n worldToScreen(position: { x: number; y: number; z: number }): { x: number; y: number } {\n if (!this.renderer) return { x: position.x, y: position.y };\n\n const point = new Vector3(position.x, position.y, position.z);\n point.project(this.camera);\n\n const rect = this.canvas.getBoundingClientRect();\n const x = (point.x + 1) * (rect.width / 2);\n const y = (-point.y + 1) * (rect.height / 2);\n\n return { x, y };\n }\n\n getScale(): { x: number; y: number; z: number } {\n return { x: 1, y: 1, z: 1 };\n }\n\n // ICommandService\n\n executeCommand(id: string, ...args: any[]): any {\n return commands.executeCommand(id, this, ...args);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM,YAAY,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE;AACvC,MAAM,WAAW,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE;AACrC,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE;AAEjC,MAAM,KAAK,GAAG;AACd,EAAE,IAAI,EAAE,EAAE;AACV,EAAE,MAAM,EAAE,CAAC;AACX,EAAE,KAAK,EAAE,CAAC;AACV,EAAE,GAAG,EAAE,CAAC;AACR,EAAE,YAAY,EAAE,CAAC;AACjB,EAAE,SAAS,EAAE,CAAC;AACd,EAAE,eAAe,EAAE,CAAC;AACpB,EAAE,kBAAkB,EAAE,CAAC;AACvB,CAAC;AAED,MAAM,aAAa,SAAS,eAAe,CAAC;AAC5C,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE;AAClC,IAAI,KAAK,EAAE;AAEX,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM;AACxB,IAAI,IAAI,CAAC,UAAU,GAAG,UAAU;AAChC,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,GAAG,MAAM;AAG9C,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI;AAGvB,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,OAAO,EAAE;AAG/B,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;AACxB,IAAI,IAAI,CAAC,WAAW,GAAG,QAAQ;AAG/B,IAAI,IAAI,CAAC,OAAO,GAAG,CAAC;AACpB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ts","../src/Viewer/draggers/OrbitDragger.ts","../src/Viewer/draggers/CuttingPlaneDragger.ts","../src/Viewer/draggers/CuttingPlaneXAxis.ts","../src/Viewer/draggers/CuttingPlaneYAxis.ts","../src/Viewer/draggers/CuttingPlaneZAxis.ts","../src/Viewer/measurement/UnitConverter.ts","../src/Viewer/measurement/UnitFormatter.ts","../src/Viewer/draggers/MeasureLineDragger.ts","../src/Viewer/draggers/PanDragger.ts","../src/Viewer/controls/WalkControls.ts","../src/Viewer/controls/JoyStickControls.ts","../src/Viewer/draggers/WalkDragger.ts","../src/Viewer/controls/FlyControls.ts","../src/Viewer/draggers/FlyDragger.ts","../src/Viewer/draggers/ZoomDragger.ts","../src/Viewer/draggers/index.ts","../src/Viewer/commands/ApplyModelTransform.ts","../src/Viewer/commands/ClearMarkup.ts","../src/Viewer/commands/ClearSelected.ts","../src/Viewer/commands/ClearSlices.ts","../src/Viewer/commands/GetSnapshot.ts","../src/Viewer/commands/Explode.ts","../src/Viewer/commands/ZoomTo.ts","../src/Viewer/commands/SetDefaultViewPosition.ts","../src/Viewer/commands/GetDefaultViewPositions.ts","../src/Viewer/commands/GetModels.ts","../src/Viewer/commands/GetSelected.ts","../src/Viewer/commands/GetSelected2.ts","../src/Viewer/commands/HideSelected.ts","../src/Viewer/commands/IsolateSelected.ts","../src/Viewer/commands/RegenerateAll.ts","../src/Viewer/commands/ResetView.ts","../src/Viewer/commands/SelectModel.ts","../src/Viewer/commands/SetActiveDragger.ts","../src/Viewer/commands/SetMarkupColor.ts","../src/Viewer/commands/SetSelected.ts","../src/Viewer/commands/SetSelected2.ts","../src/Viewer/commands/ShowAll.ts","../src/Viewer/commands/ZoomToExtents.ts","../src/Viewer/commands/ZoomToObjects.ts","../src/Viewer/commands/ZoomToSelected.ts","../src/Viewer/commands/index.ts","../src/Viewer/components/BackgroundComponent.ts","../src/Viewer/components/CameraComponent.ts","../src/Viewer/components/ExtentsComponent.ts","../src/Viewer/components/LightComponent.ts","../src/Viewer/components/InfoComponent.ts","../src/Viewer/components/CanvasResizeComponent.ts","../src/Viewer/components/CanvasRemoveComponent.ts","../src/Viewer/components/RenderLoopComponent.ts","../src/Viewer/components/HighlighterUtils.ts","../src/Viewer/components/HighlighterComponent.ts","../src/Viewer/components/SelectionComponent.ts","../src/Viewer/components/ClippingPlaneComponent.ts","../src/Viewer/helpers/SectionsHelper.js","../src/Viewer/components/SectionsComponent.ts","../src/Viewer/helpers/WCSHelper.ts","../src/Viewer/components/WCSHelperComponent.ts","../src/Viewer/components/ResetComponent.ts","../src/Viewer/components/index.ts","../src/Viewer/models/ModelImpl.ts","../src/Viewer/loaders/DynamicGltfLoader/DynamicModelImpl.ts","../src/Viewer/loaders/DynamicGltfLoader/GltfStructure.js","../src/Viewer/loaders/DynamicGltfLoader/DynamicGltfLoader.js","../src/Viewer/loaders/GLTFLoadingManager.ts","../src/Viewer/loaders/GLTFBinaryParser.ts","../src/Viewer/loaders/JSONStreamParser.ts","../src/Viewer/loaders/RangesLoader.ts","../src/Viewer/loaders/GLTFFileDynamicLoader.ts","../src/Viewer/loaders/GLTFCloudDynamicLoader.ts","../src/Viewer/loaders/index.ts","../src/Viewer/Viewer.ts"],"sourcesContent":["import { EventDispatcher, MOUSE, Quaternion, Spherical, TOUCH, Vector2, Vector3 } from \"three\";\n\n// OrbitControls performs orbiting, dollying (zooming), and panning.\n// Unlike TrackballControls, it maintains the \"up\" direction object.up (+Y by default).\n//\n// Orbit - left mouse / touch: one-finger move\n// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish\n// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move\n\nconst _changeEvent = { type: \"change\" };\nconst _startEvent = { type: \"start\" };\nconst _endEvent = { type: \"end\" };\n\nconst STATE = {\n NONE: -1,\n ROTATE: 0,\n DOLLY: 1,\n PAN: 2,\n TOUCH_ROTATE: 3,\n TOUCH_PAN: 4,\n TOUCH_DOLLY_PAN: 5,\n TOUCH_DOLLY_ROTATE: 6,\n};\n\nclass OrbitControls extends EventDispatcher {\n constructor(object, domElement) {\n super();\n\n this.object = object;\n this.domElement = domElement;\n this.domElement.style.touchAction = \"none\"; // disable touch scroll\n\n // Set to false to disable this control\n this.enabled = true;\n\n // \"target\" sets the location of focus, where the object orbits around\n this.target = new Vector3();\n\n // How far you can dolly in and out ( PerspectiveCamera only )\n this.minDistance = 0;\n this.maxDistance = Infinity;\n\n // How far you can zoom in and out ( OrthographicCamera only )\n this.minZoom = 0;\n this.maxZoom = Infinity;\n\n // How far you can orbit vertically, upper and lower limits.\n // Range is 0 to Math.PI radians.\n this.minPolarAngle = 0; // radians\n this.maxPolarAngle = Math.PI; // radians\n\n // How far you can orbit horizontally, upper and lower limits.\n // If set, the interval [ min, max ] must be a sub-interval of [ - 2 PI, 2 PI ], with ( max - min < 2 PI )\n this.minAzimuthAngle = -Infinity; // radians\n this.maxAzimuthAngle = Infinity; // radians\n\n // Set to true to enable damping (inertia)\n // If damping is enabled, you must call controls.update() in your animation loop\n this.enableDamping = false;\n this.dampingFactor = 0.05;\n\n // This option actually enables dollying in and out; left as \"zoom\" for backwards compatibility.\n // Set to false to disable zooming\n this.enableZoom = true;\n this.zoomSpeed = 1.0;\n\n // Set to false to disable rotating\n this.enableRotate = true;\n this.rotateSpeed = 1.0;\n\n // Set to false to disable panning\n this.enablePan = true;\n this.panSpeed = 1.0;\n this.screenSpacePanning = true; // if false, pan orthogonal to world-space direction camera.up\n this.keyPanSpeed = 7.0; // pixels moved per arrow key push\n\n // Set to true to automatically rotate around the target\n // If auto-rotate is enabled, you must call controls.update() in your animation loop\n this.autoRotate = false;\n this.autoRotateSpeed = 2.0; // 30 seconds per orbit when fps is 60\n\n // The four arrow keys\n this.keys = { LEFT: \"ArrowLeft\", UP: \"ArrowUp\", RIGHT: \"ArrowRight\", BOTTOM: \"ArrowDown\" };\n\n // Mouse buttons\n this.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.PAN };\n\n // Touch fingers\n this.touches = { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN };\n\n // for reset\n this.target0 = this.target.clone();\n this.position0 = this.object.position.clone();\n this.zoom0 = this.object.zoom;\n\n // the target DOM element for key events\n this._domElementKeyEvents = null;\n\n //\n // public methods\n //\n\n this.getPolarAngle = function () {\n return spherical.phi;\n };\n\n this.getAzimuthalAngle = function () {\n return spherical.theta;\n };\n\n this.getDistance = function () {\n return this.object.position.distanceTo(this.target);\n };\n\n this.listenToKeyEvents = function (domElement) {\n domElement.addEventListener(\"keydown\", onKeyDown);\n this._domElementKeyEvents = domElement;\n };\n\n this.stopListenToKeyEvents = function () {\n this._domElementKeyEvents.removeEventListener(\"keydown\", onKeyDown);\n this._domElementKeyEvents = null;\n };\n\n this.saveState = function () {\n scope.target0.copy(scope.target);\n scope.position0.copy(scope.object.position);\n scope.zoom0 = scope.object.zoom;\n };\n\n this.reset = function () {\n scope.target.copy(scope.target0);\n scope.object.position.copy(scope.position0);\n scope.object.zoom = scope.zoom0;\n\n scope.object.updateProjectionMatrix();\n scope.dispatchEvent(_changeEvent);\n\n scope.update();\n\n scope.state = STATE.NONE;\n };\n\n // this method is exposed, but perhaps it would be better if we can make it private...\n this.update = (function () {\n const offset = new Vector3();\n\n // so camera.up is the orbit axis\n const quat = new Quaternion().setFromUnitVectors(object.up, new Vector3(0, 1, 0));\n const quatInverse = quat.clone().invert();\n\n const lastPosition = new Vector3();\n const lastQuaternion = new Quaternion();\n const lastTargetPosition = new Vector3();\n\n const twoPI = 2 * Math.PI;\n\n return function update() {\n const position = scope.object.position;\n\n offset.copy(position).sub(scope.target);\n\n // rotate offset to \"y-axis-is-up\" space\n offset.applyQuaternion(quat);\n\n // angle from z-axis around y-axis\n spherical.setFromVector3(offset);\n\n if (scope.autoRotate && scope.state === STATE.NONE) {\n rotateLeft(getAutoRotationAngle());\n }\n\n if (scope.enableDamping) {\n spherical.theta += sphericalDelta.theta * scope.dampingFactor;\n spherical.phi += sphericalDelta.phi * scope.dampingFactor;\n } else {\n spherical.theta += sphericalDelta.theta;\n spherical.phi += sphericalDelta.phi;\n }\n\n // restrict theta to be between desired limits\n\n let min = scope.minAzimuthAngle;\n let max = scope.maxAzimuthAngle;\n\n if (isFinite(min) && isFinite(max)) {\n if (min < -Math.PI) min += twoPI;\n else if (min > Math.PI) min -= twoPI;\n\n if (max < -Math.PI) max += twoPI;\n else if (max > Math.PI) max -= twoPI;\n\n if (min <= max) {\n spherical.theta = Math.max(min, Math.min(max, spherical.theta));\n } else {\n spherical.theta =\n spherical.theta > (min + max) / 2 ? Math.max(min, spherical.theta) : Math.min(max, spherical.theta);\n }\n }\n\n // restrict phi to be between desired limits\n spherical.phi = Math.max(scope.minPolarAngle, Math.min(scope.maxPolarAngle, spherical.phi));\n\n spherical.makeSafe();\n\n spherical.radius *= scope.scale;\n\n // restrict radius to be between desired limits\n spherical.radius = Math.max(scope.minDistance, Math.min(scope.maxDistance, spherical.radius));\n\n // move target to panned location\n\n if (scope.enableDamping === true) {\n scope.target.addScaledVector(scope.panOffset, scope.dampingFactor);\n } else {\n scope.target.add(scope.panOffset);\n }\n\n offset.setFromSpherical(spherical);\n\n // rotate offset back to \"camera-up-vector-is-up\" space\n offset.applyQuaternion(quatInverse);\n\n position.copy(scope.target).add(offset);\n\n scope.object.lookAt(scope.target);\n\n if (scope.enableDamping === true) {\n sphericalDelta.theta *= 1 - scope.dampingFactor;\n sphericalDelta.phi *= 1 - scope.dampingFactor;\n\n scope.panOffset.multiplyScalar(1 - scope.dampingFactor);\n } else {\n sphericalDelta.set(0, 0, 0);\n\n scope.panOffset.set(0, 0, 0);\n }\n\n scope.scale = 1;\n\n // update condition is:\n // min(camera displacement, camera rotation in radians)^2 > EPS\n // using small-angle approximation cos(x/2) = 1 - x^2 / 8\n\n if (\n scope.zoomChanged ||\n lastPosition.distanceToSquared(scope.object.position) > EPS ||\n 8 * (1 - lastQuaternion.dot(scope.object.quaternion)) > EPS ||\n lastTargetPosition.distanceToSquared(scope.target) > 0\n ) {\n scope.dispatchEvent(_changeEvent);\n\n lastPosition.copy(scope.object.position);\n lastQuaternion.copy(scope.object.quaternion);\n lastTargetPosition.copy(scope.target);\n\n scope.zoomChanged = false;\n\n return true;\n }\n\n return false;\n };\n })();\n\n this.dispose = function () {\n scope.domElement.removeEventListener(\"contextmenu\", onContextMenu);\n\n scope.domElement.removeEventListener(\"pointerdown\", onPointerDown);\n scope.domElement.removeEventListener(\"pointercancel\", onPointerUp);\n scope.domElement.removeEventListener(\"wheel\", onMouseWheel);\n\n scope.domElement.removeEventListener(\"pointermove\", onPointerMove);\n scope.domElement.removeEventListener(\"pointerup\", onPointerUp);\n\n if (scope._domElementKeyEvents !== null) {\n scope._domElementKeyEvents.removeEventListener(\"keydown\", onKeyDown);\n scope._domElementKeyEvents = null;\n }\n\n //scope.dispatchEvent( { type: 'dispose' } ); // should this be added here?\n };\n\n //\n // internals\n //\n\n const scope = this;\n\n scope.state = STATE.NONE;\n\n const EPS = 0.000001;\n\n // current position in spherical coordinates\n const spherical = new Spherical();\n const sphericalDelta = new Spherical();\n\n scope.scale = 1;\n scope.panOffset = new Vector3();\n scope.zoomChanged = false;\n\n scope.rotateStart = new Vector2();\n scope.rotateEnd = new Vector2();\n scope.rotateDelta = new Vector2();\n\n scope.panStart = new Vector2();\n scope.panEnd = new Vector2();\n scope.panDelta = new Vector2();\n\n scope.dollyStart = new Vector2();\n scope.dollyEnd = new Vector2();\n scope.dollyDelta = new Vector2();\n scope.dollyScale = 0;\n\n scope.pointers = [];\n scope.pointerPositions = {};\n\n function getAutoRotationAngle() {\n return ((2 * Math.PI) / 60 / 60) * scope.autoRotateSpeed;\n }\n\n function getZoomScale() {\n return Math.pow(0.95, scope.zoomSpeed);\n }\n\n function rotateLeft(angle) {\n sphericalDelta.theta -= angle;\n }\n\n function rotateUp(angle) {\n sphericalDelta.phi -= angle;\n }\n\n const panLeft = (function () {\n const v = new Vector3();\n\n return function panLeft(distance, objectMatrix) {\n v.setFromMatrixColumn(objectMatrix, 0); // get X column of objectMatrix\n v.multiplyScalar(-distance);\n\n scope.panOffset.add(v);\n };\n })();\n\n const panUp = (function () {\n const v = new Vector3();\n\n return function panUp(distance, objectMatrix) {\n if (scope.screenSpacePanning === true) {\n v.setFromMatrixColumn(objectMatrix, 1);\n } else {\n v.setFromMatrixColumn(objectMatrix, 0);\n v.crossVectors(scope.object.up, v);\n }\n\n v.multiplyScalar(distance);\n\n scope.panOffset.add(v);\n };\n })();\n\n // deltaX and deltaY are in pixels; right and down are positive\n const pan = (function () {\n const offset = new Vector3();\n\n return function pan(deltaX, deltaY) {\n const element = scope.domElement;\n\n if (scope.object.isPerspectiveCamera) {\n // perspective\n const position = scope.object.position;\n offset.copy(position).sub(scope.target);\n let targetDistance = offset.length();\n\n // half of the fov is center to top of screen\n targetDistance *= Math.tan(((scope.object.fov / 2) * Math.PI) / 180.0);\n\n // we use only clientHeight here so aspect ratio does not distort speed\n panLeft((2 * deltaX * targetDistance) / element.clientHeight, scope.object.matrix);\n panUp((2 * deltaY * targetDistance) / element.clientHeight, scope.object.matrix);\n } else if (scope.object.isOrthographicCamera) {\n // orthographic\n panLeft(\n (deltaX * (scope.object.right - scope.object.left)) / scope.object.zoom / element.clientWidth,\n scope.object.matrix\n );\n panUp(\n (deltaY * (scope.object.top - scope.object.bottom)) / scope.object.zoom / element.clientHeight,\n scope.object.matrix\n );\n } else {\n // camera neither orthographic nor perspective\n console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.\");\n scope.enablePan = false;\n }\n };\n })();\n\n function dollyOut(dollyScale) {\n if (scope.object.isPerspectiveCamera) {\n scope.scale /= dollyScale;\n } else if (scope.object.isOrthographicCamera) {\n scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom * dollyScale));\n scope.object.updateProjectionMatrix();\n scope.zoomChanged = true;\n } else {\n console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.\");\n scope.enableZoom = false;\n }\n }\n\n function dollyIn(dollyScale) {\n if (scope.object.isPerspectiveCamera) {\n scope.scale *= dollyScale;\n } else if (scope.object.isOrthographicCamera) {\n scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom / dollyScale));\n scope.object.updateProjectionMatrix();\n scope.zoomChanged = true;\n } else {\n console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.\");\n scope.enableZoom = false;\n }\n }\n\n //\n // event callbacks - update the object state\n //\n\n function handleMouseDownRotate(event) {\n scope.rotateStart.set(event.clientX, event.clientY);\n }\n\n function handleMouseDownDolly(event) {\n scope.dollyStart.set(event.clientX, event.clientY);\n }\n\n function handleMouseDownPan(event) {\n scope.panStart.set(event.clientX, event.clientY);\n }\n\n function handleMouseMoveRotate(event) {\n scope.rotateEnd.set(event.clientX, event.clientY);\n\n scope.rotateDelta.subVectors(scope.rotateEnd, scope.rotateStart).multiplyScalar(scope.rotateSpeed);\n\n const element = scope.domElement;\n\n rotateLeft((2 * Math.PI * scope.rotateDelta.x) / element.clientHeight); // yes, height\n\n rotateUp((2 * Math.PI * scope.rotateDelta.y) / element.clientHeight);\n\n scope.rotateStart.copy(scope.rotateEnd);\n\n scope.update();\n }\n\n function handleMouseMoveDolly(event) {\n scope.dollyEnd.set(event.clientX, event.clientY);\n\n scope.dollyDelta.subVectors(scope.dollyEnd, scope.dollyStart);\n\n if (scope.dollyDelta.y < 0) {\n scope.dollyScale = 1 / getZoomScale();\n dollyOut(getZoomScale());\n } else if (scope.dollyDelta.y > 0) {\n scope.dollyScale = getZoomScale();\n dollyIn(getZoomScale());\n }\n\n scope.dollyStart.copy(scope.dollyEnd);\n\n scope.update();\n }\n\n function handleMouseMovePan(event) {\n scope.panEnd.set(event.clientX, event.clientY);\n\n scope.panDelta.subVectors(scope.panEnd, scope.panStart).multiplyScalar(scope.panSpeed);\n\n pan(scope.panDelta.x, scope.panDelta.y);\n\n scope.panStart.copy(scope.panEnd);\n\n scope.update();\n }\n\n function handleMouseWheel(event) {\n scope.dollyEnd.set(scope.domElement.clientWidth / 2, scope.domElement.clientHeight / 2);\n\n scope.dollyDelta.set(event.deltaX, event.deltaY);\n\n if (event.deltaY < 0) {\n scope.dollyScale = 1 / getZoomScale();\n dollyIn(getZoomScale());\n } else if (event.deltaY > 0) {\n scope.dollyScale = getZoomScale();\n dollyOut(getZoomScale());\n }\n\n scope.dollyStart.copy(scope.dollyEnd);\n\n scope.update();\n\n if (event.deltaY !== 0) {\n scope.state = STATE.DOLLY;\n scope.dispatchEvent(_changeEvent);\n scope.state = STATE.NONE;\n }\n }\n\n function handleKeyDown(event) {\n let needsUpdate = false;\n\n switch (event.code) {\n case scope.keys.UP:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateUp((2 * Math.PI * scope.rotateSpeed) / scope.domElement.clientHeight);\n } else {\n pan(0, scope.keyPanSpeed);\n }\n\n needsUpdate = true;\n break;\n\n case scope.keys.BOTTOM:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateUp((-2 * Math.PI * scope.rotateSpeed) / scope.domElement.clientHeight);\n } else {\n pan(0, -scope.keyPanSpeed);\n }\n\n needsUpdate = true;\n break;\n\n case scope.keys.LEFT:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateLeft((2 * Math.PI * scope.rotateSpeed) / scope.domElement.clientHeight);\n } else {\n pan(scope.keyPanSpeed, 0);\n }\n\n needsUpdate = true;\n break;\n\n case scope.keys.RIGHT:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateLeft((-2 * Math.PI * scope.rotateSpeed) / scope.domElement.clientHeight);\n } else {\n pan(-scope.keyPanSpeed, 0);\n }\n\n needsUpdate = true;\n break;\n }\n\n if (needsUpdate) {\n // prevent the browser from scrolling on cursor keys\n event.preventDefault();\n\n scope.update();\n }\n }\n\n function handleTouchStartRotate() {\n if (scope.pointers.length === 1) {\n scope.rotateStart.set(scope.pointers[0].pageX, scope.pointers[0].pageY);\n } else {\n const x = 0.5 * (scope.pointers[0].pageX + scope.pointers[1].pageX);\n const y = 0.5 * (scope.pointers[0].pageY + scope.pointers[1].pageY);\n\n scope.rotateStart.set(x, y);\n }\n }\n\n function handleTouchStartPan() {\n if (scope.pointers.length === 1) {\n scope.panStart.set(scope.pointers[0].pageX, scope.pointers[0].pageY);\n } else {\n const x = 0.5 * (scope.pointers[0].pageX + scope.pointers[1].pageX);\n const y = 0.5 * (scope.pointers[0].pageY + scope.pointers[1].pageY);\n\n scope.panStart.set(x, y);\n }\n }\n\n function handleTouchStartDolly() {\n const dx = scope.pointers[0].pageX - scope.pointers[1].pageX;\n const dy = scope.pointers[0].pageY - scope.pointers[1].pageY;\n\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n scope.dollyStart.set(0, distance);\n }\n\n function handleTouchStartDollyPan() {\n if (scope.enableZoom) handleTouchStartDolly();\n\n if (scope.enablePan) handleTouchStartPan();\n }\n\n function handleTouchStartDollyRotate() {\n if (scope.enableZoom) handleTouchStartDolly();\n\n if (scope.enableRotate) handleTouchStartRotate();\n }\n\n function handleTouchMoveRotate(event) {\n if (scope.pointers.length == 1) {\n scope.rotateEnd.set(event.pageX, event.pageY);\n } else {\n const position = getSecondPointerPosition(event);\n\n const x = 0.5 * (event.pageX + position.x);\n const y = 0.5 * (event.pageY + position.y);\n\n scope.rotateEnd.set(x, y);\n }\n\n scope.rotateDelta.subVectors(scope.rotateEnd, scope.rotateStart).multiplyScalar(scope.rotateSpeed);\n\n const element = scope.domElement;\n\n rotateLeft((2 * Math.PI * scope.rotateDelta.x) / element.clientHeight); // yes, height\n\n rotateUp((2 * Math.PI * scope.rotateDelta.y) / element.clientHeight);\n\n scope.rotateStart.copy(scope.rotateEnd);\n }\n\n function handleTouchMovePan(event) {\n if (scope.pointers.length === 1) {\n scope.panEnd.set(event.pageX, event.pageY);\n } else {\n const position = getSecondPointerPosition(event);\n\n const x = 0.5 * (event.pageX + position.x);\n const y = 0.5 * (event.pageY + position.y);\n\n scope.panEnd.set(x, y);\n }\n\n scope.panDelta.subVectors(scope.panEnd, scope.panStart).multiplyScalar(scope.panSpeed);\n\n pan(scope.panDelta.x, scope.panDelta.y);\n\n scope.panStart.copy(scope.panEnd);\n }\n\n function handleTouchMoveDolly(event) {\n const position = getSecondPointerPosition(event);\n\n const dx = event.pageX - position.x;\n const dy = event.pageY - position.y;\n\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n scope.dollyEnd.set(0, distance);\n\n scope.dollyDelta.set(0, Math.pow(scope.dollyEnd.y / scope.dollyStart.y, scope.zoomSpeed));\n\n dollyOut(scope.dollyDelta.y);\n\n scope.dollyStart.copy(scope.dollyEnd);\n }\n\n function handleTouchMoveDollyPan(event) {\n if (scope.enableZoom) handleTouchMoveDolly(event);\n\n if (scope.enablePan) handleTouchMovePan(event);\n }\n\n function handleTouchMoveDollyRotate(event) {\n if (scope.enableZoom) handleTouchMoveDolly(event);\n\n if (scope.enableRotate) handleTouchMoveRotate(event);\n }\n\n //\n // event handlers - FSM: listen for events and reset state\n //\n\n function onPointerDown(event) {\n if (scope.enabled === false) return;\n\n if (scope.pointers.length === 0) {\n scope.domElement.setPointerCapture(event.pointerId);\n\n scope.domElement.addEventListener(\"pointermove\", onPointerMove);\n scope.domElement.addEventListener(\"pointerup\", onPointerUp);\n }\n\n //\n\n addPointer(event);\n\n if (event.pointerType === \"touch\") {\n onTouchStart(event);\n } else {\n onMouseDown(event);\n }\n }\n\n function onPointerMove(event) {\n if (scope.enabled === false) return;\n\n if (event.pointerType === \"touch\") {\n onTouchMove(event);\n } else {\n onMouseMove(event);\n }\n }\n\n function onPointerUp(event) {\n removePointer(event);\n\n if (scope.pointers.length === 0) {\n scope.domElement.releasePointerCapture(event.pointerId);\n\n scope.domElement.removeEventListener(\"pointermove\", onPointerMove);\n scope.domElement.removeEventListener(\"pointerup\", onPointerUp);\n }\n\n scope.dispatchEvent(_endEvent);\n\n scope.state = STATE.NONE;\n }\n\n function onMouseDown(event) {\n let mouseAction;\n\n switch (event.button) {\n case 0:\n mouseAction = scope.mouseButtons.LEFT;\n break;\n\n case 1:\n mouseAction = scope.mouseButtons.MIDDLE;\n break;\n\n case 2:\n mouseAction = scope.mouseButtons.RIGHT;\n break;\n\n default:\n mouseAction = -1;\n }\n\n switch (mouseAction) {\n case MOUSE.DOLLY:\n if (scope.enableZoom === false) return;\n\n handleMouseDownDolly(event);\n\n scope.state = STATE.DOLLY;\n\n break;\n\n case MOUSE.ROTATE:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n if (scope.enablePan === false) return;\n\n handleMouseDownPan(event);\n\n scope.state = STATE.PAN;\n } else {\n if (scope.enableRotate === false) return;\n\n handleMouseDownRotate(event);\n\n scope.state = STATE.ROTATE;\n }\n\n break;\n\n case MOUSE.PAN:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n if (scope.enableRotate === false) return;\n\n handleMouseDownRotate(event);\n\n scope.state = STATE.ROTATE;\n } else {\n if (scope.enablePan === false) return;\n\n handleMouseDownPan(event);\n\n scope.state = STATE.PAN;\n }\n\n break;\n\n default:\n scope.state = STATE.NONE;\n }\n\n if (scope.state !== STATE.NONE) {\n scope.dispatchEvent(_startEvent);\n }\n }\n\n function onMouseMove(event) {\n switch (scope.state) {\n case STATE.ROTATE:\n if (scope.enableRotate === false) return;\n\n handleMouseMoveRotate(event);\n\n break;\n\n case STATE.DOLLY:\n if (scope.enableZoom === false) return;\n\n handleMouseMoveDolly(event);\n\n break;\n\n case STATE.PAN:\n if (scope.enablePan === false) return;\n\n handleMouseMovePan(event);\n\n break;\n }\n }\n\n function onMouseWheel(event) {\n if (scope.enabled === false || scope.enableZoom === false || scope.state !== STATE.NONE) return;\n\n event.preventDefault();\n\n scope.dispatchEvent(_startEvent);\n\n handleMouseWheel(event);\n\n scope.dispatchEvent(_endEvent);\n }\n\n function onKeyDown(event) {\n if (scope.enabled === false || scope.enablePan === false) return;\n\n handleKeyDown(event);\n }\n\n function onTouchStart(event) {\n trackPointer(event);\n\n switch (scope.pointers.length) {\n case 1:\n switch (scope.touches.ONE) {\n case TOUCH.ROTATE:\n if (scope.enableRotate === false) return;\n\n handleTouchStartRotate();\n\n scope.state = STATE.TOUCH_ROTATE;\n\n break;\n\n case TOUCH.PAN:\n if (scope.enablePan === false) return;\n\n handleTouchStartPan();\n\n scope.state = STATE.TOUCH_PAN;\n\n break;\n\n default:\n scope.state = STATE.NONE;\n }\n\n break;\n\n case 2:\n switch (scope.touches.TWO) {\n case TOUCH.DOLLY_PAN:\n if (scope.enableZoom === false && scope.enablePan === false) return;\n\n handleTouchStartDollyPan();\n\n scope.state = STATE.TOUCH_DOLLY_PAN;\n\n break;\n\n case TOUCH.DOLLY_ROTATE:\n if (scope.enableZoom === false && scope.enableRotate === false) return;\n\n handleTouchStartDollyRotate();\n\n scope.state = STATE.TOUCH_DOLLY_ROTATE;\n\n break;\n\n default:\n scope.state = STATE.NONE;\n }\n\n break;\n\n default:\n scope.state = STATE.NONE;\n }\n\n if (scope.state !== STATE.NONE) {\n scope.dispatchEvent(_startEvent);\n }\n }\n\n function onTouchMove(event) {\n trackPointer(event);\n\n switch (scope.state) {\n case STATE.TOUCH_ROTATE:\n if (scope.enableRotate === false) return;\n\n handleTouchMoveRotate(event);\n\n scope.update();\n\n break;\n\n case STATE.TOUCH_PAN:\n if (scope.enablePan === false) return;\n\n handleTouchMovePan(event);\n\n scope.update();\n\n break;\n\n case STATE.TOUCH_DOLLY_PAN:\n if (scope.enableZoom === false && scope.enablePan === false) return;\n\n handleTouchMoveDollyPan(event);\n\n scope.update();\n\n break;\n\n case STATE.TOUCH_DOLLY_ROTATE:\n if (scope.enableZoom === false && scope.enableRotate === false) return;\n\n handleTouchMoveDollyRotate(event);\n\n scope.update();\n\n break;\n\n default:\n scope.state = STATE.NONE;\n }\n }\n\n function onContextMenu(event) {\n if (scope.enabled === false) return;\n\n event.preventDefault();\n }\n\n function addPointer(event) {\n scope.pointers.push(event);\n }\n\n function removePointer(event) {\n delete scope.pointerPositions[event.pointerId];\n\n for (let i = 0; i < scope.pointers.length; i++) {\n if (scope.pointers[i].pointerId == event.pointerId) {\n scope.pointers.splice(i, 1);\n return;\n }\n }\n }\n\n function trackPointer(event) {\n let position = scope.pointerPositions[event.pointerId];\n\n if (position === undefined) {\n position = new Vector2();\n scope.pointerPositions[event.pointerId] = position;\n }\n\n position.set(event.pageX, event.pageY);\n }\n\n function getSecondPointerPosition(event) {\n const pointer = event.pointerId === scope.pointers[0].pointerId ? scope.pointers[1] : scope.pointers[0];\n\n return scope.pointerPositions[pointer.pointerId];\n }\n\n //\n\n scope.domElement.addEventListener(\"contextmenu\", onContextMenu);\n\n scope.domElement.addEventListener(\"pointerdown\", onPointerDown);\n scope.domElement.addEventListener(\"pointercancel\", onPointerUp);\n scope.domElement.addEventListener(\"wheel\", onMouseWheel, { passive: false });\n\n // force an update at start\n\n this.update();\n }\n}\n\nexport { OrbitControls, STATE };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n BufferGeometry,\n DoubleSide,\n Float32BufferAttribute,\n Line,\n LineBasicMaterial,\n Mesh,\n MeshBasicMaterial,\n Object3D,\n Plane,\n} from \"three\";\n\nexport class PlaneHelper2 extends Object3D {\n public plane: Plane;\n public size: number;\n public outline: Line;\n public mesh: Mesh;\n\n constructor(size = 1, color = 0xf0f0f0, opacity = 0.15) {\n super();\n\n (this as any).type = \"PlaneHelper2\";\n this.size = size;\n\n const positions = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0];\n const geometry = new BufferGeometry();\n geometry.setAttribute(\"position\", new Float32BufferAttribute(positions, 3));\n geometry.computeBoundingSphere();\n\n this.outline = new Line(geometry, new LineBasicMaterial({ color, toneMapped: false }));\n\n const positions2 = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0];\n const geometry2 = new BufferGeometry();\n geometry2.setAttribute(\"position\", new Float32BufferAttribute(positions2, 3));\n geometry2.computeBoundingSphere();\n\n this.mesh = new Mesh(\n geometry2,\n new MeshBasicMaterial({\n color,\n opacity,\n transparent: true,\n depthWrite: false,\n toneMapped: false,\n side: DoubleSide,\n })\n );\n\n this.add(this.outline);\n this.add(this.mesh);\n }\n\n dispose() {\n this.outline.geometry.dispose();\n (this.outline.material as LineBasicMaterial).dispose();\n this.mesh.geometry.dispose();\n (this.mesh.material as MeshBasicMaterial).dispose();\n }\n\n override updateMatrixWorld(force: boolean) {\n this.scale.set(0.5 * this.size, 0.5 * this.size, 1);\n super.updateMatrixWorld(force);\n }\n\n getLineMaterial(): LineBasicMaterial {\n return this.outline.material as LineBasicMaterial;\n }\n\n getMeshMaterial(): MeshBasicMaterial {\n return this.mesh.material as MeshBasicMaterial;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n Camera,\n EdgesGeometry,\n Intersection,\n Line3,\n MathUtils,\n Object3D,\n Plane,\n Raycaster,\n Vector2,\n Vector3,\n} from \"three\";\n\nconst DESKTOP_SNAP_DISTANCE = 10;\nconst MOBILE_SNAP_DISTANCE = 50;\n\nconst _vertex = new Vector3();\nconst _start = new Vector3();\nconst _end = new Vector3();\nconst _line = new Line3();\nconst _center = new Vector3();\nconst _projection = new Vector3();\n\nexport class Snapper {\n public camera: Camera;\n public clippingPlanes: Plane[];\n public canvas: HTMLCanvasElement;\n public threshold: number;\n private raycaster: Raycaster;\n private detectRadiusInPixels: number;\n private edgesCache: WeakMap<any, EdgesGeometry>;\n\n constructor(camera: Camera, clippingPlanes: Plane[], canvas: HTMLCanvasElement) {\n this.camera = camera;\n this.clippingPlanes = clippingPlanes;\n this.canvas = canvas;\n\n this.threshold = 0.0001;\n\n this.raycaster = new Raycaster();\n this.detectRadiusInPixels = this.isMobile() ? MOBILE_SNAP_DISTANCE : DESKTOP_SNAP_DISTANCE;\n this.edgesCache = new WeakMap();\n }\n\n isMobile(): boolean {\n if (typeof navigator === \"undefined\") return false;\n\n // ===================== AI-CODE-START ======================\n // Source: Claude Sonnet 4\n // Date: 2025-09-09\n // Reviewer: roman.mochalov@opendesign.com\n // Issue: CLOUD-5799\n\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);\n\n // ===================== AI-CODE-END ======================\n }\n\n getMousePosition(event: MouseEvent, target: Vector2): Vector2 {\n return target.set(event.clientX, event.clientY);\n }\n\n getPointerIntersects(\n mouse: Vector2,\n objects: Object3D[],\n recursive = false,\n clip = true\n ): Array<Intersection<Object3D>> {\n const rect = this.canvas.getBoundingClientRect();\n const x = ((mouse.x - rect.left) / rect.width) * 2 - 1;\n const y = (-(mouse.y - rect.top) / rect.height) * 2 + 1;\n\n const coords = new Vector2(x, y);\n this.raycaster.setFromCamera(coords, this.camera);\n\n this.raycaster.params = {\n Mesh: {},\n Line: { threshold: this.threshold },\n Line2: { threshold: this.threshold },\n LOD: {},\n Points: { threshold: this.threshold },\n Sprite: {},\n };\n\n let intersects = this.raycaster.intersectObjects(objects, recursive);\n\n if (clip) {\n const clippingPlanes = this.clippingPlanes;\n clippingPlanes.forEach((plane: Plane) => {\n intersects = intersects.filter((intersect) => plane.distanceToPoint(intersect.point) >= 0);\n });\n }\n\n return intersects;\n }\n\n getDetectRadius(point: Vector3): number {\n const camera: any = this.camera;\n\n // ===================== AI-CODE-START ======================\n // Source: Gemini 2.5 Pro\n // Date: 2025-08-27\n // Reviewer: roman.mochalov@opendesign.com\n // Issue: CLOUD-5799\n // Notes: Originally AI-generated, modified manually\n\n if (camera.isOrthographicCamera) {\n const fieldHeight = (camera.top - camera.bottom) / camera.zoom;\n\n const canvasHeight = this.canvas.height;\n const worldUnitsPerPixel = fieldHeight / canvasHeight;\n\n return this.detectRadiusInPixels * worldUnitsPerPixel;\n }\n\n if (camera.isPerspectiveCamera) {\n const distance = camera.position.distanceTo(point);\n const fieldHeight = 2 * Math.tan(MathUtils.degToRad(camera.fov * 0.5)) * distance;\n\n const canvasHeight = this.canvas.height;\n const worldUnitsPerPixel = fieldHeight / canvasHeight;\n\n return this.detectRadiusInPixels * worldUnitsPerPixel;\n }\n\n // ===================== AI-CODE-END ======================\n\n return 0.1;\n }\n\n getSnapPoint(mouse: Vector2, objects: Object3D[]): Vector3 | undefined {\n const intersections = this.getPointerIntersects(mouse, objects);\n if (intersections.length === 0) return undefined;\n\n // ===================== AI-CODE-START ======================\n // Source: Gemini 2.5 Pro\n // Date: 2025-08-20\n // Reviewer: roman.mochalov@opendesign.com\n // Issue: CLOUD-5799\n // Notes: Originally AI-generated, modified manually\n\n const object: any = intersections[0].object;\n const intersectionPoint = intersections[0].point;\n const localPoint = object.worldToLocal(intersectionPoint.clone());\n\n let snapPoint: Vector3 | undefined = undefined;\n let snapDistance = this.getDetectRadius(intersectionPoint);\n\n const geometry = object.geometry;\n\n const positions = geometry.attributes.position.array;\n for (let i = 0; i < positions.length; i += 3) {\n _vertex.set(positions[i], positions[i + 1], positions[i + 2]);\n const distance = _vertex.distanceTo(localPoint);\n if (distance < snapDistance) {\n snapDistance = distance;\n snapPoint = _vertex.clone();\n }\n }\n if (snapPoint) return object.localToWorld(snapPoint);\n\n let edges = this.edgesCache.get(geometry);\n if (!edges) {\n edges = new EdgesGeometry(geometry);\n this.edgesCache.set(geometry, edges);\n }\n\n const edgePositions = edges.attributes.position.array;\n for (let i = 0; i < edgePositions.length; i += 6) {\n _start.set(edgePositions[i], edgePositions[i + 1], edgePositions[i + 2]);\n _end.set(edgePositions[i + 3], edgePositions[i + 4], edgePositions[i + 5]);\n _line.set(_start, _end);\n\n _line.getCenter(_center);\n const centerDistance = _center.distanceTo(localPoint);\n if (centerDistance < snapDistance) {\n snapDistance = centerDistance;\n snapPoint = _center.clone();\n continue;\n }\n\n _line.closestPointToPoint(localPoint, true, _projection);\n const lineDistance = _projection.distanceTo(localPoint);\n if (lineDistance < snapDistance) {\n snapDistance = lineDistance;\n snapPoint = _projection.clone();\n }\n }\n if (snapPoint) return object.localToWorld(snapPoint);\n\n // ===================== AI-CODE-END ======================\n\n return intersectionPoint.clone();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { MOUSE, TOUCH } from \"three\";\nimport { type IDragger } from \"@inweb/viewer-core\";\n\nimport type { Viewer } from \"../Viewer\";\nimport { OrbitControls, STATE } from \"../controls/OrbitControls.js\";\n\nexport class OrbitDragger implements IDragger {\n protected viewer: Viewer;\n protected orbit: OrbitControls;\n protected changed: boolean;\n\n constructor(viewer: Viewer) {\n this.orbit = new OrbitControls(viewer.camera, viewer.canvas);\n this.orbit.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.PAN, RIGHT: MOUSE.PAN };\n this.orbit.touches = { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN };\n this.orbit.screenSpacePanning = true;\n this.orbit.rotateSpeed = 0.33;\n this.orbit.addEventListener(\"start\", this.controlsStart);\n this.orbit.addEventListener(\"change\", this.controlsChange);\n this.changed = false;\n this.viewer = viewer;\n this.viewer.addEventListener(\"databasechunk\", this.updateControls);\n this.viewer.addEventListener(\"clear\", this.updateControls);\n this.viewer.on(\"viewposition\", this.updateControls);\n this.viewer.addEventListener(\"zoom\", this.updateControls);\n this.viewer.addEventListener(\"drawviewpoint\", this.updateControls);\n this.viewer.addEventListener(\"changecameramode\", this.updateControlsCamera);\n this.viewer.addEventListener(\"optionschange\", this.updateZoomSpeed);\n this.viewer.addEventListener(\"contextmenu\", this.stopContextMenu);\n this.updateControls();\n this.updateControlsCamera();\n }\n\n dispose(): void {\n this.viewer.removeEventListener(\"databasechunk\", this.updateControls);\n this.viewer.removeEventListener(\"clear\", this.updateControls);\n this.viewer.off(\"viewposition\", this.updateControls);\n this.viewer.removeEventListener(\"zoom\", this.updateControls);\n this.viewer.removeEventListener(\"drawviewpoint\", this.updateControls);\n this.viewer.removeEventListener(\"changecameramode\", this.updateControlsCamera);\n this.viewer.removeEventListener(\"optionschange\", this.updateZoomSpeed);\n this.viewer.removeEventListener(\"contextmenu\", this.stopContextMenu);\n\n this.orbit.removeEventListener(\"start\", this.controlsStart);\n this.orbit.removeEventListener(\"change\", this.controlsChange);\n this.orbit.dispose();\n }\n\n updateControls = () => {\n this.orbit.target.copy(this.viewer.target);\n this.orbit.update();\n };\n\n updateControlsCamera = () => {\n this.orbit.maxDistance = this.viewer.camera.far;\n this.orbit.minDistance = this.viewer.camera.near;\n this.orbit.object = this.viewer.camera;\n this.orbit.update();\n };\n\n updateZoomSpeed = ({ data: options }) => {\n this.orbit.zoomSpeed = Math.abs(this.orbit.zoomSpeed) * (options.reverseZoomWheel ? -1 : 1);\n };\n\n controlsStart = () => {\n this.changed = false;\n };\n\n controlsChange = () => {\n this.viewer.target.copy(this.orbit.target);\n this.viewer.update();\n\n switch (this.orbit.state) {\n case STATE.ROTATE:\n case STATE.TOUCH_ROTATE:\n this.viewer.emitEvent({\n type: \"orbit\",\n });\n break;\n\n case STATE.PAN:\n case STATE.TOUCH_PAN:\n this.viewer.emitEvent({\n type: \"pan\",\n x: this.orbit.panEnd.x,\n y: this.orbit.panEnd.y,\n dX: this.orbit.panDelta.x,\n dY: this.orbit.panDelta.y,\n });\n break;\n\n case STATE.DOLLY:\n this.viewer.emitEvent({\n type: \"zoomat\",\n data: this.orbit.dollyScale,\n x: this.orbit.dollyEnd.x,\n y: this.orbit.dollyEnd.y,\n });\n break;\n }\n\n this.viewer.emitEvent({ type: \"changecamera\" });\n\n this.changed = true;\n };\n\n stopContextMenu = (event: PointerEvent) => {\n if (this.changed) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Plane, Quaternion, Vector2, Vector3 } from \"three\";\nimport { TransformControls } from \"three/examples/jsm/controls/TransformControls.js\";\n\nimport type { Viewer } from \"../Viewer\";\nimport { STATE } from \"../controls/OrbitControls.js\";\nimport { PlaneHelper2 } from \"../helpers/PlaneHelper2\";\nimport { Snapper } from \"../measurement/Snapper\";\nimport { OrbitDragger } from \"./OrbitDragger\";\n\nexport class CuttingPlaneDragger extends OrbitDragger {\n protected helpers: PlaneHelper2[] = [];\n protected activeHelper: PlaneHelper2 | undefined = undefined;\n protected snapper: Snapper;\n protected downPosition: Vector2;\n protected position0: Vector3;\n protected quaternion0: Quaternion;\n protected translate: TransformControls;\n protected rotate: TransformControls;\n\n constructor(viewer: Viewer) {\n super(viewer);\n\n viewer.clippingPlanes.forEach((plane) => this.addHelper(plane));\n\n const extentsSize = viewer.extents.getSize(new Vector3()).length() || 1;\n\n this.snapper = new Snapper(viewer.camera, viewer.clippingPlanes, viewer.canvas);\n this.snapper.threshold = extentsSize / 10000;\n\n this.downPosition = new Vector2();\n this.position0 = new Vector3();\n this.quaternion0 = new Quaternion();\n\n this.translate = new TransformControls(viewer.camera, viewer.canvas);\n this.translate.setMode(\"translate\");\n this.translate.setSpace(\"local\");\n this.translate.showX = false;\n this.translate.showY = false;\n this.translate.showZ = true;\n this.translate.addEventListener(\"change\", this.transformUpdate);\n this.translate.addEventListener(\"objectChange\", this.transformChange);\n this.translate.addEventListener(\"dragging-changed\", this.translateDrag);\n this.viewer.helpers.add(this.translate.getHelper());\n\n this.rotate = new TransformControls(viewer.camera, viewer.canvas);\n this.rotate.setMode(\"rotate\");\n this.rotate.setSpace(\"local\");\n this.rotate.showX = true;\n this.rotate.showY = true;\n this.rotate.showZ = false;\n this.rotate.addEventListener(\"change\", this.transformUpdate);\n this.rotate.addEventListener(\"objectChange\", this.transformChange);\n this.rotate.addEventListener(\"dragging-changed\", this.rotateDrag);\n this.viewer.helpers.add(this.rotate.getHelper());\n\n this.setActiveHelper(this.helpers[this.helpers.length - 1]);\n\n this.viewer.addEventListener(\"explode\", this.syncHelpers);\n this.viewer.addEventListener(\"hide\", this.syncHelpers);\n this.viewer.addEventListener(\"isolate\", this.syncHelpers);\n this.viewer.addEventListener(\"show\", this.syncHelpers);\n this.viewer.addEventListener(\"showall\", this.syncHelpers);\n this.viewer.addEventListener(\"clearslices\", this.clearHelpers);\n this.viewer.addEventListener(\"changecameramode\", this.updateTransformCamera);\n\n this.viewer.canvas.addEventListener(\"pointerdown\", this.onPointerDown, true);\n this.viewer.canvas.addEventListener(\"pointerup\", this.onPointerUp, true);\n this.viewer.canvas.addEventListener(\"pointercancel\", this.onPointerCancel, true);\n this.viewer.canvas.addEventListener(\"dblclick\", this.onDoubleClick, true);\n\n window.addEventListener(\"keydown\", this.onKeyDown);\n window.addEventListener(\"keyup\", this.onKeyUp);\n\n this.viewer.update();\n }\n\n override dispose() {\n this.viewer.removeEventListener(\"explode\", this.syncHelpers);\n this.viewer.removeEventListener(\"hide\", this.syncHelpers);\n this.viewer.removeEventListener(\"isolate\", this.syncHelpers);\n this.viewer.removeEventListener(\"show\", this.syncHelpers);\n this.viewer.removeEventListener(\"showall\", this.syncHelpers);\n this.viewer.removeEventListener(\"clearslices\", this.clearHelpers);\n this.viewer.removeEventListener(\"changecameramode\", this.updateTransformCamera);\n\n this.viewer.canvas.removeEventListener(\"pointerdown\", this.onPointerDown, true);\n this.viewer.canvas.removeEventListener(\"pointerup\", this.onPointerUp, true);\n this.viewer.canvas.removeEventListener(\"pointercancel\", this.onPointerCancel, true);\n this.viewer.canvas.removeEventListener(\"dblclick\", this.onDoubleClick, true);\n\n window.removeEventListener(\"keydown\", this.onKeyDown);\n window.removeEventListener(\"keyup\", this.onKeyUp);\n\n this.translate.removeEventListener(\"change\", this.transformUpdate);\n this.translate.removeEventListener(\"objectChange\", this.transformChange);\n this.translate.removeEventListener(\"dragging-changed\", this.translateDrag);\n this.translate.getHelper().removeFromParent();\n this.translate.detach();\n this.translate.dispose();\n\n this.rotate.removeEventListener(\"change\", this.transformUpdate);\n this.rotate.removeEventListener(\"objectChange\", this.transformChange);\n this.rotate.removeEventListener(\"dragging-changed\", this.rotateDrag);\n this.rotate.getHelper().removeFromParent();\n this.rotate.detach();\n this.rotate.dispose();\n\n this.helpers.forEach((helper) => {\n helper.removeFromParent();\n helper.dispose();\n });\n this.helpers.length = 0;\n this.activeHelper = undefined;\n\n super.dispose();\n }\n\n transformUpdate = () => {\n this.viewer.update();\n };\n\n transformChange = () => {\n if (!this.activeHelper) return;\n\n const plane = this.activeHelper.plane;\n plane.normal.copy(new Vector3(0, 0, -1)).applyQuaternion(this.activeHelper.quaternion);\n plane.constant = -this.activeHelper.position.dot(plane.normal);\n\n this.viewer.emitEvent({ type: \"changecuttingplanes\" });\n this.viewer.update();\n\n this.changed = true; // <- cancel context menu\n };\n\n translateDrag = (event) => {\n this.orbit.enabled = !event.value;\n this.rotate.enabled = !event.value;\n };\n\n rotateDrag = (event) => {\n this.orbit.enabled = !event.value;\n this.translate.enabled = !event.value;\n };\n\n syncHelpers = () => {\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n const extentsCenter = this.viewer.extents.getCenter(new Vector3());\n\n this.helpers.forEach((planeHelper) => {\n planeHelper.size = extentsSize;\n planeHelper.position.copy(planeHelper.plane.projectPoint(extentsCenter, new Vector3()));\n });\n\n this.viewer.update();\n };\n\n clearHelpers = () => {\n this.setActiveHelper();\n\n this.helpers.forEach((helper) => {\n helper.removeFromParent();\n helper.dispose();\n });\n this.helpers.length = 0;\n\n this.viewer.update();\n };\n\n updateTransformCamera = () => {\n this.translate.camera = this.viewer.camera;\n this.rotate.camera = this.viewer.camera;\n this.snapper.camera = this.viewer.camera;\n };\n\n onKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Shift\") this.rotate.setRotationSnap(Math.PI / 4);\n if (event.key === \"Delete\" || event.key === \"Backspace\") this.deleteActivePlane();\n if (event.key === \"Escape\" && (this.translate.dragging || this.rotate.dragging)) this.reset();\n };\n\n onKeyUp = (event: KeyboardEvent) => {\n if (event.key === \"Shift\") this.rotate.setRotationSnap(null);\n };\n\n onPointerDown = (event: PointerEvent) => {\n if (event.button !== 0 || !event.isPrimary) return;\n\n this.snapper.getMousePosition(event, this.downPosition);\n this.saveState();\n };\n\n onPointerUp = (event: PointerEvent) => {\n if (event.button !== 0) return;\n\n const upPosition = this.snapper.getMousePosition(event, new Vector2());\n if (upPosition.distanceTo(this.downPosition) !== 0) return;\n\n const intersects = this.snapper.getPointerIntersects(upPosition, this.helpers, true, false);\n if (intersects.length === 0) return;\n\n this.setActiveHelper(intersects[0].object.parent as PlaneHelper2);\n };\n\n onPointerCancel = (event: PointerEvent) => {\n this.viewer.canvas.dispatchEvent(new PointerEvent(\"pointerup\", event));\n };\n\n onDoubleClick = (event: MouseEvent) => {\n if (!this.activeHelper) return;\n\n const mousePosition = this.snapper.getMousePosition(event, new Vector2());\n\n const intersects = this.snapper.getPointerIntersects(mousePosition, [this.activeHelper], true, false);\n if (intersects.length === 0) return;\n\n this.activeHelper.rotateOnAxis(new Vector3(0, 1, 0), Math.PI);\n this.transformChange();\n\n event.stopPropagation();\n };\n\n private addHelper(plane: Plane): PlaneHelper2 {\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n const extentsCenter = this.viewer.extents.getCenter(new Vector3());\n\n const helper = new PlaneHelper2(extentsSize);\n helper.plane = plane;\n helper.position.copy(plane.projectPoint(extentsCenter, new Vector3()));\n helper.quaternion.setFromUnitVectors(new Vector3(0, 0, -1), plane.normal);\n\n this.helpers.push(helper);\n this.viewer.helpers.add(helper);\n\n return helper;\n }\n\n private setActiveHelper(helper?: PlaneHelper2) {\n if (helper === this.activeHelper) return;\n\n if (this.activeHelper) {\n this.activeHelper.getLineMaterial().color.setHex(0xf0f0f0);\n this.activeHelper.getMeshMaterial().opacity = 0.15;\n\n this.translate.detach();\n this.rotate.detach();\n }\n\n this.activeHelper = helper;\n\n if (this.activeHelper) {\n this.activeHelper.getLineMaterial().color.setHex(0xd0d0d0);\n this.activeHelper.getMeshMaterial().opacity = 0.3;\n\n this.translate.attach(this.activeHelper);\n this.rotate.attach(this.activeHelper);\n }\n\n this.viewer.update();\n }\n\n private saveState() {\n if (!this.activeHelper) return;\n\n this.position0.copy(this.activeHelper.position);\n this.quaternion0.copy(this.activeHelper.quaternion);\n }\n\n private reset() {\n if (!this.activeHelper) return;\n\n this.translate.dragging = false;\n this.rotate.dragging = false;\n this.orbit.state = STATE.NONE;\n\n this.activeHelper.position.copy(this.position0);\n this.activeHelper.quaternion.copy(this.quaternion0);\n\n this.transformChange();\n }\n\n addPlane(normal: Vector3) {\n const extentsCenter = this.viewer.extents.getCenter(new Vector3());\n const constant = -extentsCenter.dot(normal);\n\n const plane = new Plane(normal, constant);\n this.viewer.clippingPlanes.push(plane);\n\n const helper = this.addHelper(plane);\n this.setActiveHelper(helper);\n\n this.viewer.emitEvent({ type: \"changecuttingplanes\" });\n }\n\n addPlaneX() {\n this.addPlane(new Vector3(-1, 0, 0));\n }\n\n addPlaneY() {\n this.addPlane(new Vector3(0, -1, 0));\n }\n\n addPlaneZ() {\n this.addPlane(new Vector3(0, 0, -1));\n }\n\n deleteActivePlane() {\n if (!this.activeHelper) return;\n\n const helper = this.activeHelper;\n\n const index = this.viewer.clippingPlanes.indexOf(helper.plane);\n if (index !== -1) this.viewer.clippingPlanes.splice(index, 1);\n\n this.helpers = this.helpers.filter((x) => x !== helper);\n helper.removeFromParent();\n helper.dispose();\n\n this.setActiveHelper(this.helpers[this.helpers.length - 1]);\n\n this.viewer.emitEvent({ type: \"changecuttingplanes\" });\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport { CuttingPlaneDragger } from \"./CuttingPlaneDragger\";\n\nexport class CuttingPlaneXAxisDragger extends CuttingPlaneDragger {\n constructor(viewer: Viewer) {\n super(viewer);\n this.addPlaneX();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport { CuttingPlaneDragger } from \"./CuttingPlaneDragger\";\n\nexport class CuttingPlaneYAxisDragger extends CuttingPlaneDragger {\n constructor(viewer: Viewer) {\n super(viewer);\n this.addPlaneY();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport { CuttingPlaneDragger } from \"./CuttingPlaneDragger\";\n\nexport class CuttingPlaneZAxisDragger extends CuttingPlaneDragger {\n constructor(viewer: Viewer) {\n super(viewer);\n this.addPlaneZ();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\n// Model units for the user to choose from.\n\nexport const DisplayUnits = {\n Meters: { name: \"Meters\", symbol: \"m\", scale: 1.0 },\n Centimeters: { name: \"Centimeters\", symbol: \"cm\", scale: 0.01 },\n Millimeters: { name: \"Millimeters\", symbol: \"mm\", scale: 0.001 },\n Feet: { name: \"Feet\", symbol: \"ft\", scale: 0.3048 },\n Inches: { name: \"Inches\", symbol: \"in\", scale: 0.0254 },\n Yards: { name: \"Yards\", symbol: \"yd\", scale: 0.9144 },\n Kilometers: { name: \"Kilometers\", symbol: \"km\", scale: 1000.0 },\n Miles: { name: \"Miles\", symbol: \"mi\", scale: 1609.344 },\n Micrometers: { name: \"Micrometers\", symbol: \"µm\", scale: 0.000001 },\n Mils: { name: \"Mils\", symbol: \"mil\", scale: 0.0000254 },\n MicroInches: { name: \"Micro-inches\", symbol: \"µin\", scale: 0.0000000254 },\n Default: { name: \"File units\", symbol: \"\", scale: 1.0 },\n};\n\nexport const ModelUnits = {\n Default: { name: \"\", symbol: \"\", scale: 1.0 },\n};\n\nObject.keys(DisplayUnits).forEach((key) => (ModelUnits[key] = DisplayUnits[key]));\nObject.keys(DisplayUnits).forEach((key) => (ModelUnits[DisplayUnits[key].symbol] = DisplayUnits[key]));\n\n// Convert distance from unit to unit.\n\nexport function convertUnits(fromUnits: string, toUnits: string, distance: number) {\n const fromFactor = 1 / (ModelUnits[fromUnits] || ModelUnits.Default).scale;\n const toFactor = (ModelUnits[toUnits] || ModelUnits.Default).scale || 1;\n return distance * fromFactor * toFactor;\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { ModelUnits } from \"./UnitConverter\";\n\n// Returns a standard string representation of the display unit.\n\nexport function getDisplayUnit(units: string) {\n return (ModelUnits[units] || ModelUnits.Default).symbol;\n}\n\n// ===================== AI-CODE-START ======================\n// Source: Claude Sonnet 4.5\n// Date: 2025-10-08\n// Reviewer: roman.mochalov@opendesign.com\n// Issue: CLOUD-5963\n\n// Calculates recommended precision for small values (|value| < 1) to avoid showing \"0.00\".\n\nexport function calculatePrecision(value: number) {\n const distance = Math.abs(value);\n\n if (distance >= 1000) return 0;\n if (distance >= 10) return 1;\n if (distance >= 0.1) return 2;\n if (distance >= 0.001) return 3;\n\n return distance > 0 ? Math.floor(-Math.log10(distance)) + 1 : 2;\n}\n\n// Calculates the minimal distance for the sepecified precision.\n\nexport function calculateDistance(precision: any): number {\n let digits: number;\n\n if (precision === \"Auto\") digits = 2;\n else if (Number.isFinite(precision)) digits = precision;\n else digits = parseFloat(precision);\n\n if (!Number.isFinite(digits) || digits < 0) digits = 2;\n else if (digits > 10) digits = 10;\n\n return Math.pow(10, -digits);\n}\n\n// ===================== AI-CODE-END ======================\n\n// Formats a distance with units.\n\nfunction formatNumber(distance: number, digits: number, precision: any) {\n let result = distance.toFixed(digits);\n if (precision === \"Auto\") result = result.replace(/\\.0+$/, \"\").replace(/\\.$/, \"\");\n if (+result !== distance) result = \"~ \" + result;\n return result;\n}\n\nexport function formatDistance(distance: number, units: string, precision: any = 2) {\n let digits: number;\n\n if (precision === \"Auto\") digits = calculatePrecision(distance);\n else if (Number.isFinite(precision)) digits = precision;\n else digits = parseFloat(precision);\n\n if (!Number.isFinite(digits)) digits = 2;\n else if (digits < 0) digits = 0;\n else if (digits > 10) digits = 10;\n\n if (ModelUnits[units]) {\n return formatNumber(distance, digits, precision) + \" \" + ModelUnits[units].symbol;\n } else if (units) {\n return formatNumber(distance, digits, precision) + \" \" + units;\n } else {\n return formatNumber(distance, digits, precision);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Camera, MathUtils, Matrix4, Object3D, Vector2, Vector3, Vector4 } from \"three\";\n\nimport type { Viewer } from \"../Viewer\";\nimport { OrbitDragger } from \"./OrbitDragger\";\nimport { convertUnits } from \"../measurement/UnitConverter\";\nimport { formatDistance } from \"../measurement/UnitFormatter\";\nimport { Snapper } from \"../measurement/Snapper\";\n\nconst _downPoint = new Vector2();\n\nexport class MeasureLineDragger extends OrbitDragger {\n private overlay: MeasureOverlay;\n private line: MeasureLine;\n private snapper: Snapper;\n private objects: Object3D[];\n private scale = 1.0;\n private units = \"\";\n private precision: any = 2;\n\n constructor(viewer: Viewer) {\n super(viewer);\n\n this.overlay = new MeasureOverlay(viewer.camera, viewer.canvas);\n this.overlay.attach();\n\n this.line = new MeasureLine(this.overlay, this.scale, this.units, this.precision);\n this.overlay.addLine(this.line);\n\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n\n this.snapper = new Snapper(viewer.camera, viewer.clippingPlanes, viewer.canvas);\n this.snapper.threshold = extentsSize / 10000;\n\n this.objects = [];\n this.updateObjects();\n\n this.updateUnits();\n\n this.viewer.canvas.addEventListener(\"pointerdown\", this.onPointerDown);\n this.viewer.canvas.addEventListener(\"pointermove\", this.onPointerMove);\n this.viewer.canvas.addEventListener(\"pointerup\", this.onPointerUp);\n this.viewer.canvas.addEventListener(\"pointercancel\", this.onPointerCancel);\n this.viewer.canvas.addEventListener(\"pointerleave\", this.onPointerLeave);\n\n this.viewer.addEventListener(\"render\", this.renderOverlay);\n this.viewer.addEventListener(\"hide\", this.updateObjects);\n this.viewer.addEventListener(\"isolate\", this.updateObjects);\n this.viewer.addEventListener(\"show\", this.updateObjects);\n this.viewer.addEventListener(\"showall\", this.updateObjects);\n this.viewer.addEventListener(\"changecameramode\", this.updateSnapperCamera);\n this.viewer.addEventListener(\"optionschange\", this.updateUnits);\n }\n\n override dispose() {\n this.viewer.canvas.removeEventListener(\"pointerdown\", this.onPointerDown);\n this.viewer.canvas.removeEventListener(\"pointermove\", this.onPointerMove);\n this.viewer.canvas.removeEventListener(\"pointerup\", this.onPointerUp);\n this.viewer.canvas.removeEventListener(\"pointercancel\", this.onPointerCancel);\n this.viewer.canvas.removeEventListener(\"pointerleave\", this.onPointerLeave);\n\n this.viewer.removeEventListener(\"render\", this.renderOverlay);\n this.viewer.removeEventListener(\"hide\", this.updateObjects);\n this.viewer.removeEventListener(\"isolate\", this.updateObjects);\n this.viewer.removeEventListener(\"show\", this.updateObjects);\n this.viewer.removeEventListener(\"showall\", this.updateObjects);\n this.viewer.removeEventListener(\"changecameramode\", this.updateSnapperCamera);\n this.viewer.removeEventListener(\"optionschange\", this.updateUnits);\n\n this.objects.length = 0;\n\n this.overlay.detach();\n this.overlay.dispose();\n\n super.dispose();\n }\n\n onPointerDown = (event: PointerEvent) => {\n if (event.button !== 0) return;\n\n const mouse = this.snapper.getMousePosition(event, _downPoint);\n this.line.startPoint = this.snapper.getSnapPoint(mouse, this.objects);\n this.line.render();\n\n this.viewer.canvas.setPointerCapture(event.pointerId);\n this.orbit.enabled = !this.line.startPoint;\n };\n\n onPointerMove = (event: PointerEvent) => {\n if (this.orbit.enabled && this.orbit.state !== -1) return;\n\n const mouse = this.snapper.getMousePosition(event, _downPoint);\n const snapPoint = this.snapper.getSnapPoint(mouse, this.objects);\n if (snapPoint && this.line.endPoint && snapPoint.equals(this.line.endPoint)) return;\n\n this.line.endPoint = snapPoint;\n this.line.render();\n\n if (this.line.startPoint) this.changed = true; // <- to prevent context menu\n };\n\n onPointerUp = (event: PointerEvent) => {\n if (this.line.startPoint && this.line.endPoint && this.line.getDistance() > 0) {\n this.line = new MeasureLine(this.overlay, this.scale, this.units, this.precision);\n this.overlay.addLine(this.line);\n } else {\n this.line.startPoint = undefined;\n this.line.endPoint = undefined;\n this.line.render();\n }\n\n this.viewer.canvas.releasePointerCapture(event.pointerId);\n this.orbit.enabled = true;\n };\n\n onPointerCancel = (event: PointerEvent) => {\n this.viewer.canvas.dispatchEvent(new PointerEvent(\"pointerup\", event));\n };\n\n onPointerLeave = () => {\n this.line.endPoint = undefined;\n this.line.render();\n };\n\n clearOverlay = () => {\n this.overlay.clear();\n\n this.line = new MeasureLine(this.overlay, this.scale, this.units, this.precision);\n this.overlay.addLine(this.line);\n };\n\n renderOverlay = () => {\n this.overlay.render();\n };\n\n updateObjects = () => {\n this.objects.length = 0;\n this.viewer.models.forEach((model) => {\n model.getVisibleObjects().forEach((object) => this.objects.push(object));\n });\n };\n\n updateSnapperCamera = () => {\n this.snapper.camera = this.viewer.camera;\n this.overlay.camera = this.viewer.camera;\n };\n\n updateUnits = () => {\n const model = this.viewer.models[0];\n const units = this.viewer.options.rulerUnit ?? \"Default\";\n const precision = this.viewer.options.rulerPrecision ?? \"Default\";\n\n if (!model) {\n this.scale = 1;\n this.units = \"\";\n } else if (units === \"Default\") {\n this.scale = model.getUnitScale();\n this.units = model.getUnitString();\n } else {\n this.scale = convertUnits(model.getUnits(), units, 1);\n this.units = units;\n }\n\n if (!model) this.precision = 2;\n else if (precision === \"Default\") this.precision = model.getPrecision();\n else this.precision = precision;\n\n this.overlay.updateLineUnits(this.scale, this.units, this.precision);\n };\n}\n\nclass MeasureOverlay {\n public camera: Camera;\n public canvas: HTMLCanvasElement;\n public container: HTMLElement;\n public lines: MeasureLine[] = [];\n public projector: MeasureProjector;\n private resizeObserver: ResizeObserver;\n\n constructor(camera: Camera, canvas: HTMLCanvasElement) {\n this.camera = camera;\n this.canvas = canvas;\n this.projector = new MeasureProjector(camera, canvas);\n this.resizeObserver = new ResizeObserver(this.resizeContainer);\n }\n\n dispose() {\n this.clear();\n }\n\n attach() {\n this.container = document.createElement(\"div\");\n this.container.id = \"measure-container\";\n this.container.style.position = \"absolute\";\n this.container.style.outline = \"none\";\n this.container.style.pointerEvents = \"none\";\n this.container.style.overflow = \"hidden\";\n\n if (!this.canvas.parentElement) return;\n\n this.canvas.parentElement.appendChild(this.container);\n this.resizeObserver.observe(this.canvas);\n }\n\n detach() {\n this.resizeObserver.disconnect();\n\n this.container.remove();\n this.container = undefined;\n }\n\n clear() {\n this.lines.forEach((line) => line.dispose());\n this.lines.length = 0;\n }\n\n render() {\n this.projector.setFromCamera(this.camera);\n this.lines.forEach((line) => line.render());\n }\n\n update() {\n this.lines.forEach((line) => line.update());\n }\n\n addLine(line: MeasureLine) {\n this.lines.push(line);\n }\n\n removeLine(line: MeasureLine) {\n this.lines = this.lines.filter((x) => x !== line);\n }\n\n updateLineUnits(scale: number, units: string, precision: any) {\n this.lines.forEach((line) => {\n line.scale = scale;\n line.units = units;\n line.precision = precision;\n });\n }\n\n resizeContainer = () => {\n const { offsetLeft, offsetTop, offsetWidth, offsetHeight } = this.canvas;\n\n if (!offsetWidth || !offsetHeight) return; // <- invisible canvas, or canvas with parent removed\n\n this.container.style.left = `${offsetLeft}px`;\n this.container.style.top = `${offsetTop}px`;\n\n this.container.style.width = `${offsetWidth}px`;\n this.container.style.height = `${offsetHeight}px`;\n };\n}\n\nconst _middlePoint = new Vector3();\n\nclass MeasureLine {\n private overlay: MeasureOverlay;\n\n private elementStartPoint: HTMLElement;\n private elementEndPoint: HTMLElement;\n private elementLine: HTMLElement;\n private elementLabel: HTMLElement;\n\n public startPoint: Vector3;\n public endPoint: Vector3;\n\n public id = MathUtils.generateUUID();\n public scale: number;\n public units: string;\n public precision: any;\n public size = 10.0;\n public lineWidth = 2;\n\n public style = {\n border: \"2px solid #FFFFFF\",\n background: \"#009bff\",\n boxShadow: \"0 0 10px rgba(0,0,0,0.5)\",\n color: \"white\",\n font: \"1rem system-ui\",\n };\n\n constructor(overlay: MeasureOverlay, scale: number, units: string, precision: any) {\n this.overlay = overlay;\n this.scale = scale;\n this.units = units;\n this.precision = precision;\n\n this.elementStartPoint = overlay.container.appendChild(document.createElement(\"div\"));\n this.elementEndPoint = overlay.container.appendChild(document.createElement(\"div\"));\n this.elementLine = overlay.container.appendChild(document.createElement(\"div\"));\n this.elementLabel = overlay.container.appendChild(document.createElement(\"div\"));\n\n this.update();\n }\n\n dispose() {\n this.elementStartPoint.remove();\n this.elementEndPoint.remove();\n this.elementLine.remove();\n this.elementLabel.remove();\n\n this.elementStartPoint = undefined;\n this.elementEndPoint = undefined;\n this.elementLine = undefined;\n this.elementLabel = undefined;\n }\n\n render() {\n const projector = this.overlay.projector;\n\n if (this.startPoint) {\n const { point, visible } = projector.projectPoint(this.startPoint);\n\n this.elementStartPoint.style.display = visible ? \"block\" : \"none\";\n this.elementStartPoint.style.left = `${point.x}px`;\n this.elementStartPoint.style.top = `${point.y}px`;\n } else {\n this.elementStartPoint.style.display = \"none\";\n }\n\n if (this.endPoint) {\n const { point, visible } = projector.projectPoint(this.endPoint);\n\n this.elementEndPoint.style.display = visible ? \"block\" : \"none\";\n this.elementEndPoint.style.left = `${point.x}px`;\n this.elementEndPoint.style.top = `${point.y}px`;\n } else {\n this.elementEndPoint.style.display = \"none\";\n }\n\n if (this.startPoint && this.endPoint) {\n const { point1, point2, visible } = projector.projectLine(this.startPoint, this.endPoint);\n\n point2.sub(point1);\n const angle = point2.angle();\n const width = point2.length();\n\n this.elementLine.style.display = visible ? \"block\" : \"none\";\n this.elementLine.style.left = `${point1.x}px`;\n this.elementLine.style.top = `${point1.y}px`;\n this.elementLine.style.width = `${width}px`;\n this.elementLine.style.transform = `translate(0px, ${-this.lineWidth / 2}px) rotate(${angle}rad)`;\n } else {\n this.elementLine.style.display = \"none\";\n }\n\n if (this.startPoint && this.endPoint) {\n _middlePoint.lerpVectors(this.startPoint, this.endPoint, 0.5);\n const { point, visible } = projector.projectPoint(_middlePoint);\n\n const distance = this.getDistance();\n\n this.elementLabel.style.display = visible && distance > 0 ? \"block\" : \"none\";\n this.elementLabel.style.left = `${point.x}px`;\n this.elementLabel.style.top = `${point.y}px`;\n this.elementLabel.innerHTML = formatDistance(distance, this.units, this.precision);\n } else {\n this.elementLabel.style.display = \"none\";\n }\n }\n\n update() {\n this.elementStartPoint.id = `markup-dot-start-${this.id}`;\n this.elementStartPoint.style.position = \"absolute\";\n this.elementStartPoint.style.zIndex = \"2\";\n this.elementStartPoint.style.width = `${this.size}px`;\n this.elementStartPoint.style.height = `${this.size}px`;\n this.elementStartPoint.style.border = this.style.border;\n this.elementStartPoint.style.borderRadius = `${this.size}px`;\n this.elementStartPoint.style.background = this.style.background;\n this.elementStartPoint.style.boxShadow = this.style.boxShadow;\n this.elementStartPoint.style.transform = \"translate(-50%, -50%)\";\n\n this.elementEndPoint.id = `markup-dot-end-${this.id}`;\n this.elementEndPoint.style.position = \"absolute\";\n this.elementEndPoint.style.zIndex = \"2\";\n this.elementEndPoint.style.width = `${this.size}px`;\n this.elementEndPoint.style.height = `${this.size}px`;\n this.elementEndPoint.style.border = this.style.border;\n this.elementEndPoint.style.borderRadius = `${this.size}px`;\n this.elementEndPoint.style.background = this.style.background;\n this.elementEndPoint.style.boxShadow = this.style.boxShadow;\n this.elementEndPoint.style.transform = \"translate(-50%, -50%)\";\n\n this.elementLine.id = `markup-line-${this.id}`;\n this.elementLine.style.position = \"absolute\";\n this.elementLine.style.zIndex = \"1\";\n this.elementLine.style.height = `${this.lineWidth}px`;\n this.elementLine.style.background = this.style.background;\n this.elementLine.style.boxShadow = this.style.boxShadow;\n this.elementLine.style.transformOrigin = `0px ${this.lineWidth / 2}px`;\n\n this.elementLabel.id = `markup-label-${this.id}`;\n this.elementLabel.style.position = \"absolute\";\n this.elementLabel.style.zIndex = \"3\";\n this.elementLabel.style.padding = \"2px\";\n this.elementLabel.style.paddingInline = \"5px\";\n this.elementLabel.style.borderRadius = \"5px\";\n this.elementLabel.style.background = this.style.background;\n this.elementLabel.style.boxShadow = this.style.boxShadow;\n this.elementLabel.style.color = this.style.color;\n this.elementLabel.style.font = this.style.font;\n this.elementLabel.style.transform = \"translate(-50%, -50%)\";\n }\n\n getDistance(): number {\n return this.startPoint.distanceTo(this.endPoint) / this.scale;\n }\n}\n\nlet _widthHalf: number;\nlet _heightHalf: number;\nconst _viewMatrix = new Matrix4();\nconst _viewProjectionMatrix = new Matrix4();\nconst _vector = new Vector3();\nconst _vector1 = new Vector4();\nconst _vector2 = new Vector4();\nconst point = new Vector2();\nconst point1 = new Vector2();\nconst point2 = new Vector2();\n\nclass MeasureProjector {\n public camera: Camera;\n private canvas: HTMLElement;\n\n constructor(camera: Camera, canvas: HTMLCanvasElement) {\n this.camera = camera;\n this.canvas = canvas;\n }\n\n setFromCamera(camera: Camera) {\n this.camera = camera;\n this.updateProjectionMatrix();\n }\n\n updateProjectionMatrix() {\n const rect = this.canvas.getBoundingClientRect();\n _widthHalf = rect.width / 2;\n _heightHalf = rect.height / 2;\n\n _viewMatrix.copy(this.camera.matrixWorldInverse);\n _viewProjectionMatrix.multiplyMatrices(this.camera.projectionMatrix, _viewMatrix);\n }\n\n projectPoint(p: Vector3) {\n _vector.copy(p).applyMatrix4(_viewProjectionMatrix);\n const visible = _vector.z >= -1 && _vector.z <= 1;\n\n point.x = (_vector.x + 1) * _widthHalf;\n point.y = (-_vector.y + 1) * _heightHalf;\n\n return { point, visible };\n }\n\n projectLine(p1: Vector3, p2: Vector3) {\n let visible: boolean;\n\n _vector1.copy(p1 as any).applyMatrix4(_viewProjectionMatrix);\n _vector2.copy(p2 as any).applyMatrix4(_viewProjectionMatrix);\n\n // see three/examples/jsm/renderers/Projector.js/clipLine for more details\n\n const bc1near = _vector1.z + _vector1.w;\n const bc2near = _vector2.z + _vector2.w;\n const bc1far = -_vector1.z + _vector1.w;\n const bc2far = -_vector2.z + _vector2.w;\n\n if (bc1near >= 0 && bc2near >= 0 && bc1far >= 0 && bc2far >= 0) visible = true;\n else if ((bc1near < 0 && bc2near < 0) || (bc1far < 0 && bc2far < 0)) visible = false;\n else {\n let alpha1 = 0;\n let alpha2 = 1;\n\n if (bc1near < 0) alpha1 = Math.max(alpha1, bc1near / (bc1near - bc2near));\n else if (bc2near < 0) alpha2 = Math.min(alpha2, bc1near / (bc1near - bc2near));\n\n if (bc1far < 0) alpha1 = Math.max(alpha1, bc1far / (bc1far - bc2far));\n else if (bc2far < 0) alpha2 = Math.min(alpha2, bc1far / (bc1far - bc2far));\n\n visible = alpha2 >= alpha1;\n\n if (visible) {\n _vector1.lerp(_vector2, alpha1);\n _vector2.lerp(_vector1, 1 - alpha2);\n }\n }\n\n _vector1.multiplyScalar(1 / _vector1.w);\n _vector2.multiplyScalar(1 / _vector2.w);\n\n point1.x = (_vector1.x + 1) * _widthHalf;\n point1.y = (-_vector1.y + 1) * _heightHalf;\n\n point2.x = (_vector2.x + 1) * _widthHalf;\n point2.y = (-_vector2.y + 1) * _heightHalf;\n\n return { point1, point2, visible };\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { MOUSE } from \"three\";\n\nimport { OrbitDragger } from \"./OrbitDragger\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class PanDragger extends OrbitDragger {\n constructor(viewer: Viewer) {\n super(viewer);\n this.orbit.mouseButtons = { LEFT: MOUSE.PAN, MIDDLE: MOUSE.PAN, RIGHT: MOUSE.PAN };\n // this.controls.touches = { ONE: TOUCH.PAN, TWO: TOUCH.DOLLY_ROTATE };\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3, Clock, Camera, Controls, Quaternion, Vector2, Vector3, Raycaster, Object3D, MathUtils } from \"three\";\n\ninterface WalkControlsEventMap {\n change: { type: \"change\" };\n walkspeedchange: { type: \"walkspeedchange\"; data: number };\n}\n\nexport class WalkControls extends Controls<WalkControlsEventMap> {\n readonly EYE_HEIGHT = 1.7;\n readonly FAILING_DISTANCE = 2;\n readonly GROUND_FOLLOWING_SKIP_FRAMES = 3;\n readonly GROUND_FOLLOWING_SPEED = 0.4;\n readonly LOOK_SPEED = 0.1;\n readonly WALK_SPEED_DELIMITER = 4;\n readonly WHEEL_SPEED_DELIMITER = 15000;\n\n public movementSpeed = 0.1;\n public multiplier = 3;\n private groundFollowingSkippedFrames = 0;\n\n readonly GROUND_BOX_HALF_SIZE = 20;\n readonly GROUND_BOX_REFRESH_THRESHOLD = 0.3;\n\n private raycaster: Raycaster;\n private groundObjects: Object3D[];\n private _groundObjectBoxes = new Map<Object3D, Box3>();\n private _activeGroundObjects: Object3D[] = [];\n private _groundBox = new Box3();\n private _groundBoxCenter = new Vector3();\n\n private moveKeys: Set<string>;\n private moveWheel = 0;\n private moveClock: Clock;\n\n private quaternion: Quaternion;\n private downPosition: Vector2;\n private mouseDragOn = false;\n public rotateDelta: Vector2;\n\n private camera: Camera;\n\n private readonly _up = new Vector3();\n private readonly _forward = new Vector3();\n private readonly _sideways = new Vector3();\n\n constructor(camera: Camera, canvas: HTMLElement, groundObjects: Object3D[]) {\n super(camera, canvas);\n this.camera = camera;\n\n this.groundObjects = groundObjects;\n for (const obj of groundObjects) {\n this._groundObjectBoxes.set(obj, new Box3().setFromObject(obj));\n }\n const pos = this.object.position;\n this._rebuildGroundBox(pos);\n\n this.raycaster = new Raycaster();\n this.raycaster.near = 0;\n this.raycaster.far = this.EYE_HEIGHT + this.FAILING_DISTANCE;\n this.raycaster.params = {\n Mesh: {},\n Line: { threshold: 0 },\n Line2: { threshold: 0 },\n LOD: { threshold: 0 },\n Points: { threshold: 0 },\n Sprite: { threshold: 0 },\n };\n\n this.moveKeys = new Set();\n this.moveClock = new Clock();\n\n this.quaternion = camera.quaternion.clone();\n this.downPosition = new Vector2(0, 0);\n this.rotateDelta = new Vector2(0, 0);\n\n this.domElement.addEventListener(\"pointerdown\", this.onPointerDown);\n this.domElement.addEventListener(\"pointermove\", this.onPointerMove);\n this.domElement.addEventListener(\"pointerup\", this.onPointerUp);\n this.domElement.addEventListener(\"pointercancel\", this.onPointerCancel);\n this.domElement.addEventListener(\"wheel\", this.onWheel);\n\n window.addEventListener(\"keydown\", this.onKeyDown);\n window.addEventListener(\"keyup\", this.onKeyUp);\n }\n\n override dispose() {\n this.domElement.removeEventListener(\"pointerdown\", this.onPointerDown);\n this.domElement.removeEventListener(\"pointermove\", this.onPointerMove);\n this.domElement.removeEventListener(\"pointerup\", this.onPointerUp);\n this.domElement.removeEventListener(\"pointercancel\", this.onPointerCancel);\n this.domElement.removeEventListener(\"wheel\", this.onWheel);\n\n window.removeEventListener(\"keydown\", this.onKeyDown);\n window.removeEventListener(\"keyup\", this.onKeyUp);\n\n super.dispose();\n }\n\n onPointerDown = (event: PointerEvent) => {\n if (event.button !== 0) return;\n\n this.domElement.setPointerCapture(event.pointerId);\n this.downPosition.set(event.clientX, event.clientY);\n this.quaternion.copy(this.object.quaternion);\n this.mouseDragOn = true;\n };\n\n onPointerMove = (event: PointerEvent) => {\n if (!this.mouseDragOn) return;\n\n const movePosition = new Vector2(event.clientX, event.clientY);\n if (this.downPosition.distanceTo(movePosition) === 0) return;\n\n this.rotateDelta.copy(this.downPosition).sub(movePosition);\n this.rotateCamera(this.rotateDelta);\n this.dispatchEvent({ type: \"change\" });\n };\n\n onPointerUp = (event: PointerEvent) => {\n this.domElement.releasePointerCapture(event.pointerId);\n this.mouseDragOn = false;\n };\n\n onPointerCancel = (event: PointerEvent) => {\n this.domElement.dispatchEvent(new PointerEvent(\"pointerup\", event));\n };\n\n onWheel = (event: WheelEvent) => {\n this.moveWheel = event.deltaY;\n this.update();\n };\n\n onKeyDown = (event: KeyboardEvent) => {\n switch (event.code) {\n case \"NumpadSubtract\":\n case \"Minus\":\n if (this.multiplier > 1) {\n this.multiplier = this.multiplier - 1;\n this.dispatchEvent({ type: \"walkspeedchange\", data: this.multiplier });\n }\n break;\n\n case \"NumpadAdd\":\n case \"Equal\":\n if (this.multiplier < 10) {\n this.multiplier = this.multiplier + 1;\n this.dispatchEvent({ type: \"walkspeedchange\", data: this.multiplier });\n }\n break;\n\n case \"ArrowLeft\":\n case \"ArrowRight\":\n case \"ArrowUp\":\n case \"ArrowDown\":\n case \"KeyW\":\n case \"KeyS\":\n case \"KeyA\":\n case \"KeyD\":\n case \"KeyQ\":\n case \"KeyE\":\n this.moveKeys.add(event.code);\n this.update();\n break;\n }\n };\n\n onKeyUp = (event: KeyboardEvent) => {\n if (this.moveKeys.delete(event.code)) {\n if (this.moveKeys.size === 0) {\n this._rebuildGroundBox(this.object.position);\n }\n this.update();\n }\n };\n\n private _rebuildGroundBox(center: Vector3) {\n const h = this.GROUND_BOX_HALF_SIZE;\n this._groundBoxCenter.copy(center);\n this._groundBox.set(\n new Vector3(center.x - h, center.y - h * 4, center.z - h),\n new Vector3(center.x + h, center.y + h * 4, center.z + h)\n );\n\n this._activeGroundObjects = this.groundObjects.filter((obj) => {\n const objectBox = this._groundObjectBoxes.get(obj);\n return objectBox !== undefined && this._groundBox.intersectsBox(objectBox);\n });\n }\n\n private _needsGroundBoxRebuild(pos: Vector3): boolean {\n if (this._activeGroundObjects.length === 0 && this.groundObjects.length > 0) return true;\n const threshold = this.GROUND_BOX_HALF_SIZE * this.GROUND_BOX_REFRESH_THRESHOLD;\n return (\n Math.abs(pos.x - this._groundBoxCenter.x) > threshold || Math.abs(pos.z - this._groundBoxCenter.z) > threshold\n );\n }\n\n private updateGroundFollowing() {\n const pos = this.object.position;\n\n if (this._needsGroundBoxRebuild(pos)) {\n this._rebuildGroundBox(pos);\n }\n\n this._up.copy(this.camera.up).negate();\n this.raycaster.set(pos, this._up);\n\n const intersects = this.raycaster.intersectObjects(this._activeGroundObjects, false);\n if (intersects.length > 0) {\n const groundY = intersects[0].point.y;\n const targetY = groundY + this.EYE_HEIGHT;\n\n // Smoothly interpolate the camera's y position to the target height\n this.object.position.y = MathUtils.lerp(this.object.position.y, targetY, this.GROUND_FOLLOWING_SPEED);\n }\n }\n\n override update() {\n let moved = false;\n let upgradeGroundFollowing = false;\n const forward = this._forward;\n const sideways = this._sideways;\n\n if (this.moveKeys.size > 0) {\n upgradeGroundFollowing = true;\n const timeDelta = this.moveClock.getDelta();\n const moveDelta = (timeDelta * this.multiplier * this.movementSpeed) / this.WALK_SPEED_DELIMITER;\n\n this.object.getWorldDirection(forward);\n forward.y = 0;\n forward.normalize();\n\n sideways.setFromMatrixColumn(this.object.matrix, 0);\n sideways.y = 0;\n sideways.normalize();\n\n if (this.moveKeys.has(\"KeyW\")) {\n this.object.position.addScaledVector(forward, moveDelta);\n }\n if (this.moveKeys.has(\"KeyS\")) {\n this.object.position.addScaledVector(forward, -moveDelta);\n }\n\n if (this.moveKeys.has(\"KeyA\")) {\n this.object.position.addScaledVector(sideways, -moveDelta);\n }\n if (this.moveKeys.has(\"KeyD\")) {\n this.object.position.addScaledVector(sideways, moveDelta);\n }\n\n if (this.moveKeys.has(\"KeyQ\")) {\n this.object.translateY(moveDelta);\n upgradeGroundFollowing = false;\n }\n if (this.moveKeys.has(\"KeyE\")) {\n this.object.translateY(-moveDelta);\n upgradeGroundFollowing = false;\n }\n\n const lookDelta = this.LOOK_SPEED + (this.multiplier - 1);\n\n if (this.moveKeys.has(\"ArrowUp\")) this.rotateCamera(this.rotateDelta.add(new Vector2(0, -lookDelta / 2)));\n if (this.moveKeys.has(\"ArrowDown\")) this.rotateCamera(this.rotateDelta.add(new Vector2(0, lookDelta / 2)));\n if (this.moveKeys.has(\"ArrowLeft\")) this.rotateCamera(this.rotateDelta.add(new Vector2(lookDelta, 0)));\n if (this.moveKeys.has(\"ArrowRight\")) this.rotateCamera(this.rotateDelta.add(new Vector2(-lookDelta, 0)));\n\n this.moveWheel = 0;\n moved = true;\n }\n\n if (this.moveWheel !== 0) {\n const moveDelta = (this.moveWheel * this.multiplier * this.movementSpeed) / this.WHEEL_SPEED_DELIMITER;\n\n this.object.getWorldDirection(forward);\n forward.y = 0;\n forward.normalize();\n this.object.position.addScaledVector(forward, -moveDelta);\n\n this.moveWheel += -1 * Math.sign(this.moveWheel);\n moved = true;\n }\n\n this.groundFollowingSkippedFrames++;\n if (upgradeGroundFollowing && this.groundFollowingSkippedFrames >= this.GROUND_FOLLOWING_SKIP_FRAMES) {\n this.groundFollowingSkippedFrames = 0;\n this.updateGroundFollowing();\n }\n\n if (moved) {\n this.dispatchEvent({ type: \"change\" });\n }\n\n if (this.moveKeys.size === 0 && this.moveWheel === 0) {\n this.moveClock.stop();\n this.moveClock.autoStart = true;\n }\n }\n\n rotateCamera(delta: Vector2) {\n const rotateX = (Math.PI * delta.x) / this.domElement.clientWidth;\n const rotateY = (Math.PI * delta.y) / this.domElement.clientHeight;\n\n const xRotation = new Quaternion();\n xRotation.setFromAxisAngle(this.object.up, rotateX);\n\n const yRotation = new Quaternion();\n yRotation.setFromAxisAngle(new Vector3(1, 0, 0), rotateY);\n\n const quaternion = this.quaternion.clone();\n quaternion.premultiply(xRotation).multiply(yRotation).normalize();\n\n this.object.setRotationFromQuaternion(quaternion);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\n// ===================== AI-CODE-FILE ======================\n// Source: Claude Sonnet 4.5\n// Date: 2025-10-07\n// Reviewer: vitaly.ivanov@opendesign.com\n// Issue: CLOUD-5851\n// Notes: Originally AI-generated, modified manually\n// =========================================================\n\nimport { Camera, Clock, Controls, Vector2, Vector3, Raycaster, Object3D, MathUtils } from \"three\";\n\ninterface JoyStickControlsEventMap {\n change: { type: \"change\" };\n}\n\nexport class JoyStickControls extends Controls<JoyStickControlsEventMap> {\n readonly EYE_HEIGHT = 1.7;\n readonly FAILING_DISTANCE = 2;\n readonly GROUND_FOLLOWING_SPEED = 0.05;\n readonly WALK_SPEED_DELIMITER = 4;\n\n public movementSpeed = 0.1;\n public multiplier = 3;\n\n private raycaster: Raycaster;\n private groundObjects: Object3D[];\n\n private canvas: HTMLCanvasElement;\n private overlayElement: HTMLDivElement;\n private joyStickCanvas: HTMLCanvasElement;\n private context: CanvasRenderingContext2D;\n\n private moveClock: Clock;\n private camera: Camera;\n\n private joyStickPosition: Vector2;\n private isActive: boolean = false;\n\n private readonly MAX_JOYSTICK_DISTANCE = 100;\n private readonly INTERNAL_RADIUS = 35;\n private readonly MAX_MOVE_STICK = 40;\n private readonly EXTERNAL_RADIUS = 65;\n private readonly CANVAS_SIZE = 200;\n\n private centerX: number;\n private centerY: number;\n private pressed: boolean = false;\n\n constructor(camera: Camera, domElement: HTMLElement, canvasElement: HTMLCanvasElement, groundObjects: Object3D[]) {\n super(camera, domElement);\n this.camera = camera;\n this.canvas = canvasElement;\n this.moveClock = new Clock(false);\n this.joyStickPosition = new Vector2(0, 0);\n\n this.groundObjects = groundObjects;\n this.raycaster = new Raycaster();\n this.raycaster.near = 0;\n this.raycaster.far = this.EYE_HEIGHT + this.FAILING_DISTANCE;\n\n this.centerX = this.CANVAS_SIZE / 2;\n this.centerY = this.CANVAS_SIZE / 2;\n\n this.overlayElement = document.createElement(\"div\");\n this.overlayElement.id = \"joyStickDiv\";\n this.overlayElement.style.background = \"rgba(0,0,0,0)\";\n this.overlayElement.style.position = \"fixed\";\n this.overlayElement.style.zIndex = \"0\";\n this.overlayElement.style.touchAction = \"none\";\n canvasElement.parentElement.appendChild(this.overlayElement);\n\n this.joyStickCanvas = document.createElement(\"canvas\");\n this.joyStickCanvas.id = \"joyStickCanvas\";\n this.joyStickCanvas.width = this.CANVAS_SIZE;\n this.joyStickCanvas.height = this.CANVAS_SIZE;\n this.overlayElement.appendChild(this.joyStickCanvas);\n this.context = this.joyStickCanvas.getContext(\"2d\")!;\n\n this.joyStickCanvas.addEventListener(\"pointerdown\", this.onPointerDown);\n document.addEventListener(\"pointermove\", this.onPointerMove);\n document.addEventListener(\"pointerup\", this.onPointerUp);\n\n window.addEventListener(\"resize\", this.onResize);\n document.addEventListener(\"fullscreenchange\", this.onResize);\n\n this.updateVisibility();\n this.updatePosition();\n this.draw();\n }\n\n override dispose() {\n this.joyStickCanvas.removeEventListener(\"pointerdown\", this.onPointerDown);\n document.removeEventListener(\"pointermove\", this.onPointerMove);\n document.removeEventListener(\"pointerup\", this.onPointerUp);\n\n window.removeEventListener(\"resize\", this.onResize);\n document.removeEventListener(\"fullscreenchange\", this.onResize);\n\n this.overlayElement.remove();\n super.dispose();\n }\n\n private onPointerDown = (event: PointerEvent) => {\n event.preventDefault();\n this.pressed = true;\n };\n\n private onPointerMove = (event: PointerEvent) => {\n event.preventDefault();\n if (!this.pressed) return;\n\n let movedX = event.pageX;\n let movedY = event.pageY;\n\n if (\n this.joyStickCanvas.offsetParent &&\n (this.joyStickCanvas.offsetParent as HTMLElement).tagName.toUpperCase() === \"BODY\"\n ) {\n movedX -= this.joyStickCanvas.offsetLeft;\n movedY -= this.joyStickCanvas.offsetTop;\n } else if (this.joyStickCanvas.offsetParent) {\n movedX -= (this.joyStickCanvas.offsetParent as HTMLElement).offsetLeft;\n movedY -= (this.joyStickCanvas.offsetParent as HTMLElement).offsetTop;\n }\n\n const x = 100 * ((movedX - this.centerX) / this.MAX_MOVE_STICK);\n const y = 100 * ((movedY - this.centerY) / this.MAX_MOVE_STICK) * -1;\n\n const distance = Math.sqrt(x * x + y * y);\n if (distance > 20) {\n this.joyStickPosition.set(x, y);\n this.isActive = true;\n } else {\n this.joyStickPosition.set(0, 0);\n this.isActive = false;\n }\n\n this.draw();\n this.moveClock.start();\n this.update();\n };\n\n private onPointerUp = (event: PointerEvent) => {\n event.preventDefault();\n this.pressed = false;\n this.joyStickPosition.set(0, 0);\n this.isActive = false;\n this.moveClock.stop();\n this.draw();\n };\n\n private onResize = () => {\n this.updateVisibility();\n this.updatePosition();\n };\n\n private updateVisibility() {\n const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n const isNarrowScreen = window.innerWidth < 1024;\n\n if (isMobile || isNarrowScreen) {\n this.overlayElement.style.display = \"block\";\n } else {\n this.overlayElement.style.display = \"none\";\n }\n }\n\n private updatePosition() {\n const rect = this.canvas.getBoundingClientRect();\n this.overlayElement.style.top = `${rect.height - this.CANVAS_SIZE}px`;\n this.overlayElement.style.left = `${rect.left}px`;\n this.overlayElement.style.width = `${this.CANVAS_SIZE}px`;\n this.overlayElement.style.height = `${this.CANVAS_SIZE}px`;\n }\n\n private draw() {\n this.context.clearRect(0, 0, this.CANVAS_SIZE, this.CANVAS_SIZE);\n\n // Draw external circle\n this.context.beginPath();\n this.context.arc(this.centerX, this.centerY, this.EXTERNAL_RADIUS, 0, 2 * Math.PI, false);\n this.context.lineWidth = 2;\n this.context.strokeStyle = \"#35436E\";\n this.context.globalAlpha = 0.5;\n this.context.stroke();\n\n // Draw internal circle\n let movedX = this.centerX + (this.joyStickPosition.x * this.MAX_MOVE_STICK) / 100;\n let movedY = this.centerY - (this.joyStickPosition.y * this.MAX_MOVE_STICK) / 100;\n\n movedX = Math.max(this.MAX_MOVE_STICK, Math.min(this.CANVAS_SIZE - this.MAX_MOVE_STICK, movedX));\n movedY = Math.max(this.MAX_MOVE_STICK, Math.min(this.CANVAS_SIZE - this.MAX_MOVE_STICK, movedY));\n\n this.context.beginPath();\n this.context.arc(movedX, movedY, this.INTERNAL_RADIUS, 0, 2 * Math.PI, false);\n this.context.fillStyle = \"#35436E\";\n this.context.lineWidth = 2;\n this.context.strokeStyle = \"#35436E\";\n this.context.globalAlpha = 0.5;\n this.context.fill();\n this.context.stroke();\n }\n\n private updateGroundFollowing() {\n const up = new Vector3().copy(this.camera.up);\n this.raycaster.set(this.camera.position, up.negate());\n\n this.raycaster.params = this.raycaster.params = {\n Mesh: {},\n Line: { threshold: 0 },\n Line2: { threshold: 0 },\n LOD: { threshold: 0 },\n Points: { threshold: 0 },\n Sprite: { threshold: 0 },\n };\n\n const intersects = this.raycaster.intersectObjects(this.groundObjects, false);\n if (intersects.length > 0) {\n const groundY = intersects[0].point.y;\n const targetY = groundY + this.EYE_HEIGHT;\n\n // Smoothly interpolate the camera's y position to the target height\n this.camera.position.y = MathUtils.lerp(this.camera.position.y, targetY, this.GROUND_FOLLOWING_SPEED);\n }\n }\n\n override update() {\n if (!this.isActive) return;\n\n const forwardInput = this.joyStickPosition.y / this.MAX_JOYSTICK_DISTANCE;\n const rightInput = this.joyStickPosition.x / this.MAX_JOYSTICK_DISTANCE;\n\n const timeDelta = this.moveClock.getDelta();\n const moveDelta = (timeDelta * this.multiplier * this.movementSpeed) / this.WALK_SPEED_DELIMITER;\n\n const forward = new Vector3();\n const sideways = new Vector3();\n\n this.camera.getWorldDirection(forward);\n if (this.groundObjects.length > 0) {\n forward.y = 0;\n }\n forward.normalize();\n\n sideways.setFromMatrixColumn(this.camera.matrix, 0);\n if (this.groundObjects.length > 0) {\n sideways.y = 0;\n }\n sideways.normalize();\n\n if (forwardInput !== 0) {\n this.camera.position.addScaledVector(forward, moveDelta * forwardInput);\n }\n if (rightInput !== 0) {\n this.camera.position.addScaledVector(sideways, moveDelta * rightInput);\n }\n\n if (forwardInput !== 0 || rightInput !== 0) {\n if (this.groundObjects.length > 0) this.updateGroundFollowing();\n this.dispatchEvent({ type: \"change\" });\n }\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Mesh, Vector3 } from \"three\";\nimport { type IDragger } from \"@inweb/viewer-core\";\n\nimport type { Viewer } from \"../Viewer\";\nimport { WalkControls } from \"../controls/WalkControls\";\nimport { JoyStickControls } from \"../controls/JoyStickControls\";\n\nexport class WalkDragger implements IDragger {\n protected viewer: Viewer;\n public controls: WalkControls;\n private joyStickControls: JoyStickControls;\n\n constructor(viewer: Viewer) {\n const meshOnlyGround: Mesh[] = [];\n viewer.models.forEach((model) =>\n model.getVisibleObjects().forEach((obj) => {\n if (obj instanceof Mesh) {\n meshOnlyGround.push(obj);\n }\n })\n );\n this.controls = new WalkControls(viewer.camera, viewer.canvas, meshOnlyGround);\n this.controls.addEventListener(\"change\", this.controlsChange);\n this.controls.addEventListener(\"walkspeedchange\", this.walkspeedChange);\n\n this.joyStickControls = new JoyStickControls(viewer.camera, viewer.canvas, viewer.canvas, meshOnlyGround);\n this.joyStickControls.addEventListener(\"change\", this.controlsChange);\n\n this.viewer = viewer;\n this.viewer.addEventListener(\"animate\", this.animate);\n this.viewer.addEventListener(\"render\", this.viewerRender);\n this.viewer.addEventListener(\"zoom\", this.viewerZoom);\n this.viewer.addEventListener(\"changecameramode\", this.updateControlsCamera);\n\n this.updateControls();\n }\n\n dispose() {\n this.viewer.removeEventListener(\"animate\", this.animate);\n this.viewer.removeEventListener(\"render\", this.viewerRender);\n this.viewer.removeEventListener(\"zoom\", this.viewerZoom);\n this.viewer.removeEventListener(\"changecameramode\", this.updateControlsCamera);\n\n this.controls.removeEventListener(\"walkspeedchange\", this.walkspeedChange);\n this.controls.removeEventListener(\"change\", this.controlsChange);\n this.controls.dispose();\n\n this.joyStickControls.removeEventListener(\"change\", this.controlsChange);\n this.joyStickControls.dispose();\n }\n\n updateControls = () => {\n const size = this.viewer.extents.getSize(new Vector3());\n this.controls.movementSpeed = Math.min(size.x, size.y, size.z) / 2 || 1;\n this.joyStickControls.movementSpeed = this.controls.movementSpeed;\n this.joyStickControls.multiplier = this.controls.multiplier;\n };\n\n updateControlsCamera = () => {\n this.controls.object = this.viewer.camera;\n };\n\n controlsChange = () => {\n this.viewer.update();\n this.viewer.emitEvent({ type: \"changecamera\" });\n };\n\n walkspeedChange = (event: any) => {\n this.viewer.emitEvent(event);\n this.joyStickControls.multiplier = this.controls.multiplier;\n };\n\n viewerRender = () => {\n this.joyStickControls.update();\n };\n\n viewerZoom = () => {\n this.controls.rotateDelta.set(0, 0);\n };\n\n animate = () => {\n this.controls.update();\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Clock, Camera, Controls, Quaternion, Vector2, Vector3 } from \"three\";\n\ninterface FlyControlsEventMap {\n change: { type: \"change\" };\n flyspeedchange: { type: \"flyspeedchange\"; data: number };\n}\n\nexport class FlyControls extends Controls<FlyControlsEventMap> {\n public movementSpeed = 0.2;\n public lookSpeed = 5;\n public multiplier = 5;\n\n private moveKeys: Set<string>;\n private moveWheel = 0;\n private moveClock: Clock;\n\n private quaternion: Quaternion;\n private downPosition: Vector2;\n private mouseDragOn = false;\n public rotateDelta: Vector2;\n\n constructor(camera: Camera, canvas: HTMLElement) {\n super(camera, canvas);\n\n this.moveKeys = new Set();\n this.moveClock = new Clock();\n\n this.quaternion = camera.quaternion.clone();\n this.downPosition = new Vector2(0, 0);\n this.rotateDelta = new Vector2(0, 0);\n\n this.domElement.addEventListener(\"pointerdown\", this.onPointerDown);\n this.domElement.addEventListener(\"pointermove\", this.onPointerMove);\n this.domElement.addEventListener(\"pointerup\", this.onPointerUp);\n this.domElement.addEventListener(\"pointercancel\", this.onPointerCancel);\n this.domElement.addEventListener(\"wheel\", this.onWheel);\n\n window.addEventListener(\"keydown\", this.onKeyDown);\n window.addEventListener(\"keyup\", this.onKeyUp);\n }\n\n override dispose() {\n this.domElement.removeEventListener(\"pointerdown\", this.onPointerDown);\n this.domElement.removeEventListener(\"pointermove\", this.onPointerMove);\n this.domElement.removeEventListener(\"pointerup\", this.onPointerUp);\n this.domElement.removeEventListener(\"pointercancel\", this.onPointerCancel);\n this.domElement.removeEventListener(\"wheel\", this.onWheel);\n\n window.removeEventListener(\"keydown\", this.onKeyDown);\n window.removeEventListener(\"keyup\", this.onKeyUp);\n\n super.dispose();\n }\n\n onPointerDown = (event: PointerEvent) => {\n if (event.button !== 0) return;\n\n this.domElement.setPointerCapture(event.pointerId);\n this.downPosition.set(event.clientX, event.clientY);\n this.quaternion.copy(this.object.quaternion);\n this.mouseDragOn = true;\n };\n\n onPointerMove = (event: PointerEvent) => {\n if (!this.mouseDragOn) return;\n\n const movePosition = new Vector2(event.clientX, event.clientY);\n if (this.downPosition.distanceTo(movePosition) === 0) return;\n\n this.rotateDelta.copy(this.downPosition).sub(movePosition);\n this.rotateCamera(this.rotateDelta);\n this.dispatchEvent({ type: \"change\" });\n };\n\n onPointerUp = (event: PointerEvent) => {\n this.domElement.releasePointerCapture(event.pointerId);\n this.mouseDragOn = false;\n };\n\n onPointerCancel = (event: PointerEvent) => {\n this.domElement.dispatchEvent(new PointerEvent(\"pointerup\", event));\n };\n\n onWheel = (event: WheelEvent) => {\n this.moveWheel = event.deltaY;\n this.update();\n };\n\n onKeyDown = (event: KeyboardEvent) => {\n switch (event.code) {\n case \"NumpadSubtract\":\n case \"Minus\":\n if (this.multiplier > 1) {\n this.multiplier = this.multiplier - 1;\n this.dispatchEvent({ type: \"flyspeedchange\", data: this.multiplier });\n }\n break;\n\n case \"NumpadAdd\":\n case \"Equal\":\n if (this.multiplier < 10) {\n this.multiplier = this.multiplier + 1;\n this.dispatchEvent({ type: \"flyspeedchange\", data: this.multiplier });\n }\n break;\n\n case \"ArrowLeft\":\n case \"ArrowRight\":\n case \"ArrowUp\":\n case \"ArrowDown\":\n case \"KeyW\":\n case \"KeyS\":\n case \"KeyA\":\n case \"KeyD\":\n case \"KeyQ\":\n case \"KeyE\":\n this.moveKeys.add(event.code);\n this.update();\n break;\n }\n };\n\n onKeyUp = (event: KeyboardEvent) => {\n if (this.moveKeys.delete(event.code)) this.update();\n };\n\n override update() {\n if (this.moveKeys.size > 0) {\n const timeDelta = this.moveClock.getDelta();\n const moveDelta = timeDelta * this.movementSpeed * this.multiplier;\n\n if (this.moveKeys.has(\"KeyW\")) this.object.translateZ(-moveDelta);\n if (this.moveKeys.has(\"KeyS\")) this.object.translateZ(moveDelta);\n\n if (this.moveKeys.has(\"KeyA\")) this.object.translateX(-moveDelta);\n if (this.moveKeys.has(\"KeyD\")) this.object.translateX(moveDelta);\n\n if (this.moveKeys.has(\"KeyQ\")) this.object.translateY(moveDelta);\n if (this.moveKeys.has(\"KeyE\")) this.object.translateY(-moveDelta);\n\n const lookDelta = this.lookSpeed + (this.multiplier - 1);\n\n if (this.moveKeys.has(\"ArrowUp\")) this.rotateCamera(this.rotateDelta.add(new Vector2(0, -lookDelta / 2)));\n if (this.moveKeys.has(\"ArrowDown\")) this.rotateCamera(this.rotateDelta.add(new Vector2(0, lookDelta / 2)));\n\n if (this.moveKeys.has(\"ArrowLeft\")) this.rotateCamera(this.rotateDelta.add(new Vector2(lookDelta, 0)));\n if (this.moveKeys.has(\"ArrowRight\")) this.rotateCamera(this.rotateDelta.add(new Vector2(-lookDelta, 0)));\n\n this.moveWheel = 0;\n this.dispatchEvent({ type: \"change\" });\n }\n\n if (this.moveWheel !== 0) {\n const moveDelta = this.moveWheel * 0.0001 * this.movementSpeed * this.multiplier;\n\n this.object.translateZ(-moveDelta);\n this.moveWheel += -1 * Math.sign(this.moveWheel);\n this.dispatchEvent({ type: \"change\" });\n }\n\n if (this.moveKeys.size === 0 && this.moveWheel === 0) {\n this.moveClock.stop();\n this.moveClock.autoStart = true;\n }\n }\n\n rotateCamera(delta: Vector2) {\n const rotateX = (Math.PI * delta.x) / this.domElement.clientWidth;\n const rotateY = (Math.PI * delta.y) / this.domElement.clientHeight;\n\n const xRotation = new Quaternion();\n xRotation.setFromAxisAngle(this.object.up, rotateX);\n\n const yRotation = new Quaternion();\n yRotation.setFromAxisAngle(new Vector3(1, 0, 0), rotateY);\n\n const quaternion = this.quaternion.clone();\n quaternion.premultiply(xRotation).multiply(yRotation).normalize();\n\n this.object.setRotationFromQuaternion(quaternion);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Vector3 } from \"three\";\nimport { type IDragger } from \"@inweb/viewer-core\";\n\nimport type { Viewer } from \"../Viewer\";\nimport { FlyControls } from \"../controls/FlyControls\";\nimport { JoyStickControls } from \"../controls/JoyStickControls\";\n\nexport class FlyDragger implements IDragger {\n protected viewer: Viewer;\n public controls: FlyControls;\n private joyStickControls: JoyStickControls;\n\n constructor(viewer: Viewer) {\n this.controls = new FlyControls(viewer.camera, viewer.canvas);\n this.controls.addEventListener(\"change\", this.controlsChange);\n this.controls.addEventListener(\"flyspeedchange\", this.flyspeedChange);\n\n this.joyStickControls = new JoyStickControls(viewer.camera, viewer.canvas, viewer.canvas, []);\n this.joyStickControls.addEventListener(\"change\", this.controlsChange);\n\n this.viewer = viewer;\n this.viewer.addEventListener(\"animate\", this.animate);\n this.viewer.addEventListener(\"render\", this.viewerRender);\n this.viewer.addEventListener(\"zoom\", this.viewerZoom);\n this.viewer.addEventListener(\"changecameramode\", this.updateControlsCamera);\n\n this.updateControls();\n }\n\n dispose() {\n this.viewer.removeEventListener(\"animate\", this.animate);\n this.viewer.removeEventListener(\"render\", this.viewerRender);\n this.viewer.removeEventListener(\"zoom\", this.viewerZoom);\n this.viewer.removeEventListener(\"changecameramode\", this.updateControlsCamera);\n\n this.controls.removeEventListener(\"flyspeedchange\", this.flyspeedChange);\n this.controls.removeEventListener(\"change\", this.controlsChange);\n this.controls.dispose();\n\n this.joyStickControls.removeEventListener(\"change\", this.controlsChange);\n this.joyStickControls.dispose();\n }\n\n updateControls = () => {\n const size = this.viewer.extents.getSize(new Vector3());\n this.controls.movementSpeed = Math.min(size.x, size.y, size.z) / 2 || 1;\n this.joyStickControls.movementSpeed = this.controls.movementSpeed;\n this.joyStickControls.multiplier = this.controls.multiplier;\n };\n\n updateControlsCamera = () => {\n this.controls.object = this.viewer.camera;\n };\n\n controlsChange = () => {\n this.viewer.update();\n this.viewer.emitEvent({ type: \"changecamera\" });\n };\n\n flyspeedChange = (event: any) => {\n this.viewer.emitEvent(event);\n this.joyStickControls.multiplier = this.controls.multiplier;\n };\n\n viewerRender = () => {\n this.joyStickControls.update();\n };\n\n viewerZoom = () => {\n this.controls.rotateDelta.set(0, 0);\n };\n\n animate = () => {\n this.controls.update();\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { MOUSE } from \"three\";\n\nimport { OrbitDragger } from \"./OrbitDragger\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class ZoomDragger extends OrbitDragger {\n constructor(viewer: Viewer) {\n super(viewer);\n this.orbit.mouseButtons = { LEFT: MOUSE.DOLLY, MIDDLE: MOUSE.PAN, RIGHT: MOUSE.PAN };\n // this.controls.touches = { ONE: TOUCH.DOLLY_PAN, TWO: TOUCH.DOLLY_PAN };\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IDraggersRegistry, draggersRegistry } from \"@inweb/viewer-core\";\n\nimport { CuttingPlaneDragger } from \"./CuttingPlaneDragger\";\nimport { CuttingPlaneXAxisDragger } from \"./CuttingPlaneXAxis\";\nimport { CuttingPlaneYAxisDragger } from \"./CuttingPlaneYAxis\";\nimport { CuttingPlaneZAxisDragger } from \"./CuttingPlaneZAxis\";\nimport { MeasureLineDragger } from \"./MeasureLineDragger\";\nimport { OrbitDragger } from \"./OrbitDragger\";\nimport { PanDragger } from \"./PanDragger\";\nimport { WalkDragger } from \"./WalkDragger\";\nimport { FlyDragger } from \"./FlyDragger\";\nimport { ZoomDragger } from \"./ZoomDragger\";\n\n/**\n * Viewer draggers registry. Use this registry to register custom draggers.\n *\n * To implement custom dragger:\n *\n * 1. Define a dragger class implements {@link IDragger}.\n * 2. Define a constructor with a `viewer` parameter and add mouse event listeners for the specified viewer.\n * 3. Define the dragger logic in the event listeners. For example, listen for the `mousemove` event and\n * zoom in/out when the left mouse button is pressed.\n * 4. Override {@link IDragger.dispose} and remove mouse event listeners from the viewer.\n * 5. Register dragger provider in the draggers registry by calling the {@link draggers.registerDragger}.\n *\n * @example Implementing a custom dragger.\n *\n * ```javascript\n * import { IDragger, draggers, Viewer } from \"@inweb/viewer-three\";\n *\n * class MyDragger implements IDragger {\n * protected viewer: Viewer;\n *\n * constructor(viewer: Viewer) {\n * this.viewer = viewer;\n * this.viewer.addEventListener(\"pointermove\", this.onPointerMove);\n * }\n *\n * override dispose() {\n * this.viewer.removeEventListener(\"pointermove\", this.onPointerMove);\n * }\n *\n * onPointerMove = (event: PointerEvent) => {\n * // place custom logic here\n * };\n * }\n *\n * draggers.registerDragger(\"MyDragger\", (viewer): IDragger => new MyDragger(viewer));\n * ```\n *\n * @example Activating a custom dragger.\n *\n * ```javascript\n * viewer.setActiveDragger(\"MyDragger\");\n * ```\n */\nexport const draggers: IDraggersRegistry = draggersRegistry(\"threejs\");\n\n// build-in draggers\n\ndraggers.registerDragger(\"Pan\", (viewer) => new PanDragger(viewer));\ndraggers.registerDragger(\"Orbit\", (viewer) => new OrbitDragger(viewer));\ndraggers.registerDragger(\"Zoom\", (viewer) => new ZoomDragger(viewer));\ndraggers.registerDragger(\"MeasureLine\", (viewer) => new MeasureLineDragger(viewer));\ndraggers.registerDragger(\"CuttingPlane\", (viewer) => new CuttingPlaneDragger(viewer));\ndraggers.registerDragger(\"CuttingPlaneXAxis\", (viewer) => new CuttingPlaneXAxisDragger(viewer));\ndraggers.registerDragger(\"CuttingPlaneYAxis\", (viewer) => new CuttingPlaneYAxisDragger(viewer));\ndraggers.registerDragger(\"CuttingPlaneZAxis\", (viewer) => new CuttingPlaneZAxisDragger(viewer));\ndraggers.registerDragger(\"Walk\", (viewer) => new WalkDragger(viewer));\ndraggers.registerDragger(\"Fly\", (viewer) => new FlyDragger(viewer));\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Model, File, Assembly } from \"@inweb/client\";\nimport type { Viewer } from \"../Viewer\";\n\nexport function applyModelTransform(viewer: Viewer, model: Model | File | Assembly) {\n console.warn(\"applyModelTransform not implemented\");\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function clearMarkup(viewer: Viewer) {\n viewer.clearOverlay();\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport type { SelectionComponent } from \"../components/SelectionComponent\";\n\nexport function clearSelected(viewer: Viewer): void {\n const selection = viewer.getComponent(\"SelectionComponent\") as SelectionComponent;\n selection.clearSelection();\n\n viewer.update();\n\n viewer.emitEvent({ type: \"select\", handles: [] });\n viewer.emitEvent({ type: \"select2\", handles: [] });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function clearSlices(viewer: Viewer) {\n viewer.clearSlices();\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function getSnapshot(viewer: Viewer, type?: string, quality?: number): string {\n viewer.update(true);\n\n const mimeType = type ?? viewer.options.snapshotMimeType ?? \"image/jpeg\";\n const imageQuality = quality ?? viewer.options.snapshotQuality ?? 0.25;\n\n if (viewer.markup) {\n return viewer.markup.getSnapshot(mimeType, imageQuality);\n }\n\n return viewer.canvas.toDataURL(mimeType, imageQuality);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function explode(viewer: Viewer, index = 0): void {\n viewer.models.forEach((model) => model.explode(index));\n\n viewer.update();\n viewer.emitEvent({ type: \"explode\", data: index });\n}\n\nexport function collect(viewer: Viewer) {\n explode(viewer, 0);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3, MathUtils, Vector2, Vector3 } from \"three\";\nimport type { Viewer } from \"../Viewer\";\n\nexport function zoomTo(viewer: Viewer, box: Box3): void {\n if (box.isEmpty()) return;\n\n const boxCenter = box.getCenter(new Vector3());\n const boxSize = box.getSize(new Vector3()).length() || 1;\n\n const rendererSize = viewer.renderer.getSize(new Vector2());\n const aspectRatio = rendererSize.x / rendererSize.y;\n\n const camera = viewer.camera as any;\n\n if (camera.isPerspectiveCamera) {\n const offset = new Vector3(0, 0, 1)\n .applyQuaternion(camera.quaternion)\n .multiplyScalar(boxSize / (2 * Math.tan(MathUtils.degToRad(camera.fov * 0.5))));\n\n camera.position.copy(offset).add(boxCenter);\n camera.updateMatrixWorld();\n }\n if (camera.isOrthographicCamera) {\n camera.top = boxSize / 2;\n camera.bottom = -boxSize / 2;\n camera.left = camera.bottom * aspectRatio;\n camera.right = camera.top * aspectRatio;\n camera.zoom = 1;\n camera.updateProjectionMatrix();\n\n const offset = new Vector3(0, 0, 1)\n .applyQuaternion(camera.quaternion)\n .multiplyScalar(viewer.extents.getSize(new Vector3()).length() || 1);\n\n camera.position.copy(offset).add(boxCenter);\n camera.updateMatrixWorld();\n }\n\n viewer.target.copy(boxCenter);\n\n viewer.update();\n viewer.emitEvent({ type: \"zoom\" });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Quaternion, Vector3 } from \"three\";\nimport type { Viewer } from \"../Viewer\";\nimport { zoomTo } from \"./ZoomTo\";\n\nexport const defaultViewPositions = {\n front: new Vector3(0, 0, -1),\n back: new Vector3(0, 0, 1),\n left: new Vector3(1, 0, 0),\n right: new Vector3(-1, 0, 0),\n bottom: new Vector3(0, -1, 0),\n top: new Vector3(0, 1, 0),\n se: new Vector3(-1, 1, -1).normalize(),\n sw: new Vector3(1, 1, -1).normalize(),\n ne: new Vector3(-1, 1, 1).normalize(),\n nw: new Vector3(1, 1, 1).normalize(),\n};\n\nexport function setDefaultViewPosition(viewer: Viewer, position = \"sw\"): void {\n const extentsCenter = viewer.extents.getCenter(new Vector3());\n const extentsSize = viewer.extents.getSize(new Vector3()).length() || 1;\n\n const upY = new Vector3(0, 1, 0);\n const offsetY = defaultViewPositions[position] || defaultViewPositions[\"sw\"];\n\n const up = new Vector3().copy(viewer.camera.up);\n const quaternion = new Quaternion().setFromUnitVectors(upY, up);\n const offset = new Vector3().copy(offsetY).applyQuaternion(quaternion);\n\n const camera = viewer.camera;\n camera.position.copy(offset).multiplyScalar(extentsSize).add(extentsCenter);\n camera.lookAt(extentsCenter);\n camera.updateMatrixWorld();\n\n viewer.target.copy(extentsCenter);\n\n viewer.update();\n viewer.emit({ type: \"viewposition\", data: position });\n\n zoomTo(viewer, viewer.extents);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { defaultViewPositions } from \"./SetDefaultViewPosition\";\n\nexport function getDefaultViewPositions(): string[] {\n return Object.keys(defaultViewPositions);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function getModels(viewer: Viewer): string[] {\n return viewer.models.map((model) => model.id);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function getSelected(viewer: Viewer): string[] {\n const handles2 = viewer.executeCommand(\"getSelected2\");\n const handles = handles2.map((handle) => handle.slice(handle.indexOf(\":\") + 1));\n return handles;\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function getSelected2(viewer: Viewer): string[] {\n const handles2: string[][] = [];\n\n viewer.models.forEach((model) => {\n handles2.push(model.getHandlesByObjects(viewer.selected));\n });\n\n return handles2.flat();\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport type { SelectionComponent } from \"../components/SelectionComponent\";\n\nexport function hideSelected(viewer: Viewer): void {\n viewer.models.forEach((model) => model.hideObjects(viewer.selected));\n\n const selection = viewer.getComponent(\"SelectionComponent\") as SelectionComponent;\n selection.clearSelection();\n\n viewer.update();\n\n viewer.emitEvent({ type: \"hide\" });\n viewer.emitEvent({ type: \"select\", handles: [] });\n viewer.emitEvent({ type: \"select2\", handles: [] });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function isolateSelected(viewer: Viewer): void {\n viewer.models.forEach((model) => model.isolateObjects(viewer.selected));\n\n viewer.update();\n viewer.emitEvent({ type: \"isolate\" });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function regenerateAll(viewer: Viewer): void {\n viewer.emit({ type: \"regenerateall\" });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function resetView(viewer: Viewer): void {\n viewer.executeCommand(\"setActiveDragger\");\n viewer.executeCommand(\"clearSlices\");\n viewer.executeCommand(\"clearOverlay\");\n viewer.executeCommand(\"setMarkupColor\");\n viewer.executeCommand(\"clearSelected\");\n viewer.executeCommand(\"showAll\");\n viewer.executeCommand(\"explode\", 0);\n viewer.executeCommand(\"zoomToExtents\", true);\n\n viewer.emit({ type: \"resetview\" });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport type { SelectionComponent } from \"../components/SelectionComponent\";\n\nexport function selectModel(viewer: Viewer, id: string): void {\n const selection = viewer.getComponent(\"SelectionComponent\") as SelectionComponent;\n selection.clearSelection();\n\n viewer.models.filter((model) => model.id === id).forEach((model) => selection.select(model.getObjects(), model));\n\n viewer.update();\n\n viewer.emitEvent({ type: \"select\", handles: viewer.getSelected() });\n viewer.emitEvent({ type: \"select2\", handles: viewer.getSelected2() });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function setActiveDragger(viewer: Viewer, dragger = \"\") {\n viewer.setActiveDragger(dragger);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function setMarkupColor(viewer: Viewer, r = 255, g = 0, b = 0) {\n viewer.markup.setMarkupColor(r, g, b);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function setSelected(viewer: Viewer, handles: string[] = []): void {\n const handles2: string[] = [];\n\n handles.forEach((handle) => {\n if (handle.includes(\":\")) {\n handles2.push(handle);\n } else\n viewer.models.forEach((model) => {\n handles2.push(`${model.id}:${handle}`);\n });\n });\n\n viewer.executeCommand(\"setSelected2\", handles2);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport type { SelectionComponent } from \"../components/SelectionComponent\";\n\nexport function setSelected2(viewer: Viewer, handles: string[] = []): void {\n const selectionComponent = viewer.getComponent(\"SelectionComponent\") as SelectionComponent;\n selectionComponent.clearSelection();\n\n viewer.models.forEach((model) => {\n const objects = model.getObjectsByHandles(handles);\n model.showObjects(objects);\n selectionComponent.select(objects, model);\n });\n\n viewer.update();\n\n viewer.emitEvent({ type: \"show\" });\n viewer.emitEvent({ type: \"select\", data: undefined, handles: viewer.getSelected() });\n viewer.emitEvent({ type: \"select2\", data: undefined, handles });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\n\nexport function showAll(viewer: Viewer): void {\n viewer.models.forEach((model) => model.showAllObjects());\n\n viewer.update();\n viewer.emitEvent({ type: \"showall\" });\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport type { Viewer } from \"../Viewer\";\nimport { zoomTo } from \"./ZoomTo\";\n\nexport function zoomToExtents(viewer: Viewer): void {\n zoomTo(viewer, viewer.extents);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3 } from \"three\";\nimport type { Viewer } from \"../Viewer\";\nimport { zoomTo } from \"./ZoomTo\";\n\nexport function zoomToObjects(viewer: Viewer, handles: string[] = []): void {\n const extents = new Box3();\n\n viewer.models.forEach((model) => {\n const objects = model.getObjectsByHandles(handles);\n objects.forEach((object) => extents.expandByObject(object));\n });\n if (extents.isEmpty()) extents.copy(viewer.extents);\n\n zoomTo(viewer, extents);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3 } from \"three\";\nimport type { Viewer } from \"../Viewer\";\nimport { zoomTo } from \"./ZoomTo\";\n\nexport function zoomToSelected(viewer: Viewer): void {\n const extents = new Box3();\n\n viewer.selected.forEach((object) => extents.expandByObject(object));\n if (extents.isEmpty()) extents.copy(viewer.extents);\n\n zoomTo(viewer, extents);\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { ICommandsRegistry, commandsRegistry } from \"@inweb/viewer-core\";\n\nimport { applyModelTransform } from \"./ApplyModelTransform\";\nimport { clearMarkup } from \"./ClearMarkup\";\nimport { clearSelected } from \"./ClearSelected\";\nimport { clearSlices } from \"./ClearSlices\";\nimport { getSnapshot } from \"./GetSnapshot\";\nimport { explode, collect } from \"./Explode\";\nimport { getDefaultViewPositions } from \"./GetDefaultViewPositions\";\nimport { getModels } from \"./GetModels\";\nimport { getSelected } from \"./GetSelected\";\nimport { getSelected2 } from \"./GetSelected2\";\nimport { hideSelected } from \"./HideSelected\";\nimport { isolateSelected } from \"./IsolateSelected\";\nimport { regenerateAll } from \"./RegenerateAll\";\nimport { resetView } from \"./ResetView\";\nimport { selectModel } from \"./SelectModel\";\nimport { setActiveDragger } from \"./SetActiveDragger\";\nimport { setDefaultViewPosition } from \"./SetDefaultViewPosition\";\nimport { setMarkupColor } from \"./SetMarkupColor\";\nimport { setSelected } from \"./SetSelected\";\nimport { setSelected2 } from \"./SetSelected2\";\nimport { showAll } from \"./ShowAll\";\nimport { zoomToExtents } from \"./ZoomToExtents\";\nimport { zoomToObjects } from \"./ZoomToObjects\";\nimport { zoomToSelected } from \"./ZoomToSelected\";\n\n/**\n * Viewer commands registry. Use this registry to register custom commands.\n *\n * To implement custom command:\n *\n * 1. Define a command handler with a first `viewer` parameter.\n * 2. Register command handler in the commands registry by calling the {@link commands.registerCommand}.\n *\n * @example Implementing a custom command.\n *\n * ```javascript\n * import { commands, Viewer } from \"@inweb/viewer-three\";\n *\n * function commandHandler(viewer: Viewer, name = \"world\"): void {\n * console.log(`Hello ${name}!!!`);\n * }\n *\n * commands.registerCommand(\"sayHello\", commandHandler);\n * ```\n *\n * @example Calling a custom command.\n *\n * ```javascript\n * viewer.executeCommand(\"sayHello\", \"user\");\n * ```\n */\nexport const commands: ICommandsRegistry = commandsRegistry(\"threejs\");\n\n// build-in commands\n\ncommands.registerCommand(\"applyModelTransform\", applyModelTransform);\ncommands.registerCommand(\"clearMarkup\", clearMarkup);\ncommands.registerCommand(\"clearSelected\", clearSelected);\ncommands.registerCommand(\"clearSlices\", clearSlices);\ncommands.registerCommand(\"collect\", collect);\ncommands.registerCommand(\"getSnapshot\", getSnapshot);\ncommands.registerCommand(\"explode\", explode);\ncommands.registerCommand(\"getDefaultViewPositions\", getDefaultViewPositions);\ncommands.registerCommand(\"getModels\", getModels);\ncommands.registerCommand(\"getSelected\", getSelected);\ncommands.registerCommand(\"getSelected2\", getSelected2);\ncommands.registerCommand(\"hideSelected\", hideSelected);\ncommands.registerCommand(\"isolateSelected\", isolateSelected);\ncommands.registerCommand(\"regenerateAll\", regenerateAll);\ncommands.registerCommand(\"resetView\", resetView);\ncommands.registerCommand(\"selectModel\", selectModel);\ncommands.registerCommand(\"setActiveDragger\", setActiveDragger);\ncommands.registerCommand(\"setDefaultViewPosition\", setDefaultViewPosition);\ncommands.registerCommand(\"setMarkupColor\", setMarkupColor);\ncommands.registerCommand(\"setSelected\", setSelected);\ncommands.registerCommand(\"setSelected2\", setSelected2);\ncommands.registerCommand(\"showAll\", showAll);\ncommands.registerCommand(\"zoomToExtents\", zoomToExtents);\ncommands.registerCommand(\"zoomToObjects\", zoomToObjects);\ncommands.registerCommand(\"zoomToSelected\", zoomToSelected);\n\ncommands.registerCommand(\"top\", (viewer) => setDefaultViewPosition(viewer, \"top\"));\ncommands.registerCommand(\"bottom\", (viewer) => setDefaultViewPosition(viewer, \"bottom\"));\ncommands.registerCommand(\"left\", (viewer) => setDefaultViewPosition(viewer, \"left\"));\ncommands.registerCommand(\"right\", (viewer) => setDefaultViewPosition(viewer, \"right\"));\ncommands.registerCommand(\"front\", (viewer) => setDefaultViewPosition(viewer, \"front\"));\ncommands.registerCommand(\"back\", (viewer) => setDefaultViewPosition(viewer, \"back\"));\ncommands.registerCommand(\"se\", (viewer) => setDefaultViewPosition(viewer, \"se\"));\ncommands.registerCommand(\"sw\", (viewer) => setDefaultViewPosition(viewer, \"sw\"));\ncommands.registerCommand(\"ne\", (viewer) => setDefaultViewPosition(viewer, \"ne\"));\ncommands.registerCommand(\"nw\", (viewer) => setDefaultViewPosition(viewer, \"nw\"));\n\ncommands.registerCommandAlias(\"clearMarkup\", \"clearOverlay\");\ncommands.registerCommandAlias(\"clearSelected\", \"unselect\");\ncommands.registerCommandAlias(\"getSnapshot\", \"createPreview\");\ncommands.registerCommandAlias(\"zoomToExtents\", \"zoomExtents\");\n\ncommands.registerCommandAlias(\"top\", \"k3DViewTop\");\ncommands.registerCommandAlias(\"bottom\", \"k3DViewBottom\");\ncommands.registerCommandAlias(\"left\", \"k3DViewLeft\");\ncommands.registerCommandAlias(\"right\", \"k3DViewRight\");\ncommands.registerCommandAlias(\"front\", \"k3DViewFront\");\ncommands.registerCommandAlias(\"back\", \"k3DViewBack\");\ncommands.registerCommandAlias(\"se\", \"k3DViewSE\");\ncommands.registerCommandAlias(\"sw\", \"k3DViewSW\");\ncommands.registerCommandAlias(\"ne\", \"k3DViewNE\");\ncommands.registerCommandAlias(\"nw\", \"k3DViewNW\");\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Color } from \"three\";\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class BackgroundComponent implements IComponent {\n protected viewer: Viewer;\n protected backgroundColor: Color;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n\n this.backgroundColor = new Color(0xffffff);\n\n this.viewer.renderer.setClearColor(this.backgroundColor);\n this.viewer.scene.background = this.backgroundColor;\n this.viewer.addEventListener(\"optionschange\", this.syncOptions);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"optionschange\", this.syncOptions);\n this.viewer.scene.background = null;\n }\n\n syncOptions = () => {\n this.backgroundColor.setHex(0xffffff);\n this.viewer.renderer.setClearColor(this.backgroundColor);\n this.viewer.update();\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { MathUtils, OrthographicCamera, PerspectiveCamera, Vector2, Vector3 } from \"three\";\n\nimport { CameraMode, IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class CameraComponent implements IComponent {\n protected viewer: Viewer;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.viewer.addEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.addEventListener(\"optionschange\", this.syncOptions);\n this.viewer.addEventListener(\"initialize\", this.syncOptions);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.removeEventListener(\"optionschange\", this.syncOptions);\n this.viewer.removeEventListener(\"initialize\", this.syncOptions);\n }\n\n getCameraMode(camera: any): CameraMode {\n return camera.isOrthographicCamera ? \"orthographic\" : \"perspective\";\n }\n\n switchCamera(camera: any) {\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n const rendererSize = this.viewer.renderer.getSize(new Vector2());\n const aspectRatio = rendererSize.x / rendererSize.y;\n\n if (camera.isPerspectiveCamera) {\n camera.aspect = aspectRatio;\n camera.near = extentsSize / 1000;\n camera.far = extentsSize * 1000;\n }\n if (camera.isOrthographicCamera) {\n camera.left = camera.bottom * aspectRatio;\n camera.right = camera.top * aspectRatio;\n camera.near = -extentsSize * 1000;\n camera.far = extentsSize * 1000;\n }\n\n camera.updateProjectionMatrix();\n\n this.viewer.camera = camera;\n this.viewer.renderPass.camera = camera;\n this.viewer.ssaaRenderPass.camera = camera;\n\n this.viewer.update();\n }\n\n switchCameraMode(mode: CameraMode) {\n if (!mode) return;\n\n const currentCamera: any = this.viewer.camera;\n if (mode === this.getCameraMode(currentCamera)) return;\n\n const target = this.viewer.target.clone();\n\n let camera: PerspectiveCamera | OrthographicCamera | null = null;\n\n if (currentCamera.isOrthographicCamera) {\n const fov = currentCamera.userData.fov || 45;\n const fieldHeight = (currentCamera.top - currentCamera.bottom) / currentCamera.zoom;\n const distance = fieldHeight / (2 * Math.tan(MathUtils.degToRad(fov) / 2));\n const direction = new Vector3().subVectors(currentCamera.position, target).normalize();\n\n camera = new PerspectiveCamera(fov);\n camera.position.copy(direction).multiplyScalar(distance).add(target);\n }\n if (currentCamera.isPerspectiveCamera) {\n const fov = currentCamera.fov;\n const distance = currentCamera.position.distanceTo(target);\n const fieldHeight = 2 * Math.tan(MathUtils.degToRad(fov * 0.5)) * distance;\n\n camera = new OrthographicCamera();\n camera.top = fieldHeight / 2;\n camera.bottom = -fieldHeight / 2;\n camera.position.copy(currentCamera.position);\n\n camera.userData.fov = fov;\n }\n if (!camera) return;\n\n camera.up.copy(currentCamera.up);\n camera.quaternion.copy(currentCamera.quaternion);\n\n this.switchCamera(camera);\n\n this.viewer.emitEvent({ type: \"changecameramode\", mode });\n }\n\n syncOptions = () => {\n this.switchCameraMode(this.viewer.options.cameraMode);\n };\n\n geometryEnd = () => {\n // do not change the camera after opening the second file in assembly\n if (this.viewer.models.length > 1) {\n this.switchCamera(this.viewer.camera);\n return;\n }\n\n let camera: any;\n\n this.viewer.scene.traverse((object: any) => {\n if (object.isCamera)\n if (!camera) camera = object;\n else if (object.isPerspectiveCamera && camera.isOrthographicCamera) camera = object;\n });\n\n if (camera) {\n camera.userData.isDefaultCamera = true;\n camera.scale.set(1, 1, 1); // <- Visualize fix\n\n this.switchCamera(camera);\n\n const mode = this.getCameraMode(camera);\n\n this.viewer.options.cameraMode = mode;\n this.viewer.emitEvent({ type: \"changecameramode\", mode });\n } else {\n this.switchCamera(this.viewer.camera);\n this.viewer.executeCommand(\"setDefaultViewPosition\");\n }\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3 } from \"three\";\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class ExtentsComponent implements IComponent {\n private viewer: Viewer;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.viewer.addEventListener(\"databasechunk\", this.syncExtents);\n this.viewer.addEventListener(\"clear\", this.syncExtents);\n this.viewer.on(\"explode\", this.syncExtents);\n this.viewer.on(\"hide\", this.syncExtents);\n this.viewer.on(\"isolate\", this.syncExtents);\n this.viewer.on(\"show\", this.syncExtents);\n this.viewer.on(\"showall\", this.syncExtents);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"databasechunk\", this.syncExtents);\n this.viewer.removeEventListener(\"clear\", this.syncExtents);\n this.viewer.off(\"explode\", this.syncExtents);\n this.viewer.off(\"hide\", this.syncExtents);\n this.viewer.off(\"isolate\", this.syncExtents);\n this.viewer.off(\"show\", this.syncExtents);\n this.viewer.off(\"showall\", this.syncExtents);\n }\n\n syncExtents = (event) => {\n const extents = new Box3();\n this.viewer.models.forEach((model) => model.getExtents(extents));\n this.viewer.extents.copy(extents);\n\n if (event.type !== \"databasechunk\" && event.target !== \"clear\") return;\n if (this.viewer.models.length > 1) return; // do not change target in assembly mode\n\n this.viewer.extents.getCenter(this.viewer.target);\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { AmbientLight, DirectionalLight, HemisphereLight, Quaternion, Vector3 } from \"three\";\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class LightComponent implements IComponent {\n protected viewer: Viewer;\n protected ambientLight: AmbientLight;\n protected directionalLight: DirectionalLight;\n protected frontLight: DirectionalLight;\n protected hemisphereLight: HemisphereLight;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n\n this.ambientLight = new AmbientLight(0xffffff, 1.5);\n this.directionalLight = new DirectionalLight(0xffffff, 1.0);\n this.frontLight = new DirectionalLight(0xffffff, 1.25);\n this.hemisphereLight = new HemisphereLight(0xffffff, 0x444444, 1.25);\n\n this.viewer.addEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.addEventListener(\"clear\", this.geometryEnd);\n }\n\n dispose(): void {\n this.ambientLight.removeFromParent();\n this.ambientLight.dispose();\n\n this.directionalLight.removeFromParent();\n this.directionalLight.dispose();\n\n this.frontLight.removeFromParent();\n this.frontLight.dispose();\n\n this.hemisphereLight.removeFromParent();\n this.hemisphereLight.dispose();\n\n this.viewer.removeEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.removeEventListener(\"clear\", this.geometryEnd);\n }\n\n geometryEnd = () => {\n this.ambientLight.removeFromParent();\n this.directionalLight.removeFromParent();\n this.frontLight.removeFromParent();\n this.hemisphereLight.removeFromParent();\n\n if (this.viewer.extents.isEmpty()) return;\n\n const extentsCenter = this.viewer.extents.getCenter(new Vector3());\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n\n const upY = new Vector3(0, 1, 0);\n const frontY = new Vector3(0, 0, -1);\n\n const up = new Vector3().copy(this.viewer.camera.up);\n const quaternion = new Quaternion().setFromUnitVectors(upY, up);\n const front = new Vector3().copy(frontY).applyQuaternion(quaternion).negate();\n\n this.directionalLight.position\n .copy(up)\n .applyAxisAngle(front, (-Math.PI * 30) / 180)\n .multiplyScalar(extentsSize)\n .add(extentsCenter);\n this.directionalLight.target.position.copy(extentsCenter);\n\n this.frontLight.position.copy(front).multiplyScalar(extentsSize).add(extentsCenter);\n this.frontLight.target.position.copy(extentsCenter);\n\n this.hemisphereLight.position\n .copy(front)\n .multiplyScalar(extentsSize * 1.5)\n .add(extentsCenter);\n\n this.viewer.scene.add(this.ambientLight);\n this.viewer.scene.add(this.directionalLight);\n this.viewer.scene.add(this.frontLight);\n this.viewer.scene.add(this.hemisphereLight);\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { REVISION } from \"three\";\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class InfoComponent implements IComponent {\n protected viewer: Viewer;\n private startTime: number;\n private beginTime: number;\n private prevTime: number;\n private frames: number;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.startTime = 0;\n this.beginTime = performance.now();\n this.prevTime = performance.now();\n this.frames = 0;\n this.viewer.addEventListener(\"initialize\", this.initialize);\n this.viewer.addEventListener(\"clear\", this.clear);\n this.viewer.addEventListener(\"optionschange\", this.syncOptions);\n this.viewer.addEventListener(\"geometrystart\", this.geometryStart);\n this.viewer.addEventListener(\"databasechunk\", this.databaseChunk);\n this.viewer.addEventListener(\"geometryend\", this.geometryEnd);\n this.viewer.addEventListener(\"resize\", this.resize);\n this.viewer.addEventListener(\"render\", this.render);\n this.viewer.addEventListener(\"animate\", this.animate);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"initialize\", this.initialize);\n this.viewer.removeEventListener(\"clear\", this.clear);\n this.viewer.removeEventListener(\"optionschange\", this.syncOptions);\n this.viewer.removeEventListener(\"geometrystart\", this.geometryStart);\n this.viewer.removeEventListener(\"databasechunk\", this.databaseChunk);\n this.viewer.removeEventListener(\"geometryend\", this.geometryEnd);\n this.viewer.removeEventListener(\"resize\", this.resize);\n this.viewer.removeEventListener(\"render\", this.render);\n this.viewer.addEventListener(\"animate\", this.animate);\n }\n\n initialize = () => {\n try {\n const gl = this.viewer.renderer.getContext();\n const dbgInfo = gl.getExtension(\"WEBGL_debug_renderer_info\");\n if (dbgInfo) {\n this.viewer.info.system.webglRenderer = gl.getParameter(dbgInfo.UNMASKED_RENDERER_WEBGL);\n this.viewer.info.system.webglVendor = gl.getParameter(dbgInfo.UNMASKED_VENDOR_WEBGL);\n }\n } catch (error) {\n console.error(\"Error reading WebGL info.\", error);\n }\n\n console.log(\"THREE.WebGLRenderer:\", REVISION);\n console.log(\"WebGL Renderer:\", this.viewer.info.system.webglRenderer);\n console.log(\"WebGL Vendor:\", this.viewer.info.system.webglVendor);\n\n this.resize();\n\n this.syncOptions({ data: this.viewer.options });\n };\n\n clear = () => {\n this.viewer.info.performance.timeToFirstRender = 0;\n this.viewer.info.performance.loadTime = 0;\n\n this.viewer.info.scene.objects = 0;\n this.viewer.info.scene.triangles = 0;\n this.viewer.info.scene.points = 0;\n this.viewer.info.scene.lines = 0;\n this.viewer.info.scene.edges = 0;\n\n this.viewer.info.optimizedScene.objects = 0;\n this.viewer.info.optimizedScene.triangles = 0;\n this.viewer.info.optimizedScene.points = 0;\n this.viewer.info.optimizedScene.lines = 0;\n this.viewer.info.optimizedScene.edges = 0;\n\n this.viewer.info.memory.geometries = 0;\n this.viewer.info.memory.geometryBytes = 0;\n this.viewer.info.memory.optimizedGeometryBytes = 0;\n this.viewer.info.memory.textures = 0;\n this.viewer.info.memory.textureBytes = 0;\n this.viewer.info.memory.materials = 0;\n this.viewer.info.memory.totalEstimatedGpuBytes = 0;\n this.viewer.info.memory.usedJSHeapSize = 0;\n };\n\n syncOptions = ({ data: options }) => {\n if (options.antialiasing === false) this.viewer.info.render.antialiasing = \"\";\n else if (options.antialiasing === true) this.viewer.info.render.antialiasing = \"mxaa\";\n else this.viewer.info.render.antialiasing = options.antialiasing;\n };\n\n geometryStart = () => {\n this.startTime = performance.now();\n };\n\n databaseChunk = () => {\n this.viewer.info.performance.timeToFirstRender += performance.now() - this.startTime;\n\n console.log(\"Time to first render:\", this.viewer.info.performance.timeToFirstRender, \"ms\");\n };\n\n geometryEnd = () => {\n const model = this.viewer.models[this.viewer.models.length - 1];\n const info = model.getInfo();\n\n this.viewer.info.scene.objects += info.scene.objects;\n this.viewer.info.scene.triangles += info.scene.triangles;\n this.viewer.info.scene.points += info.scene.points;\n this.viewer.info.scene.lines += info.scene.lines;\n this.viewer.info.scene.edges += info.scene.edges;\n\n this.viewer.info.optimizedScene.objects += info.optimizedScene.objects;\n this.viewer.info.optimizedScene.triangles += info.optimizedScene.triangles;\n this.viewer.info.optimizedScene.points += info.optimizedScene.points;\n this.viewer.info.optimizedScene.lines += info.optimizedScene.lines;\n this.viewer.info.optimizedScene.edges += info.optimizedScene.edges;\n\n this.viewer.info.memory.geometries += info.memory.geometries;\n this.viewer.info.memory.geometryBytes += info.memory.geometryBytes;\n this.viewer.info.memory.optimizedGeometryBytes += info.memory.optimizedGeometryBytes;\n this.viewer.info.memory.textures += info.memory.textures;\n this.viewer.info.memory.textureBytes += info.memory.textureBytes;\n this.viewer.info.memory.materials += info.memory.materials;\n this.viewer.info.memory.totalEstimatedGpuBytes += info.memory.totalEstimatedGpuBytes;\n\n const memory = performance[\"memory\"];\n if (memory) this.viewer.info.memory.usedJSHeapSize = memory.usedJSHeapSize;\n\n this.viewer.info.performance.loadTime += performance.now() - this.startTime;\n\n console.log(\"Number of objects:\", info.scene.objects);\n console.log(\"Number of objects after optimization:\", info.optimizedScene.objects);\n console.log(\"Geometry size:\", info.memory.geometryBytes / (1024 * 1024), \"MB\");\n console.log(\"Optimized geometry size:\", info.memory.optimizedGeometryBytes / (1024 * 1024), \"MB\");\n console.log(\"Estimated GPU used:\", info.memory.totalEstimatedGpuBytes / (1024 * 1024), \"MB\");\n\n console.log(\"File load time:\", this.viewer.info.performance.loadTime, \"ms\");\n };\n\n resize = () => {\n const { width, height } = this.viewer.canvas;\n this.viewer.info.render.viewport.width = width;\n this.viewer.info.render.viewport.height = height;\n };\n\n render = () => {\n this.viewer.info.render.drawCalls = this.viewer.renderer.info.render.calls;\n this.viewer.info.render.triangles = this.viewer.renderer.info.render.triangles;\n this.viewer.info.render.points = this.viewer.renderer.info.render.points;\n this.viewer.info.render.lines = this.viewer.renderer.info.render.lines;\n };\n\n animate = () => {\n const time = performance.now();\n\n this.viewer.info.performance.frameTime = Math.round(time - this.beginTime);\n this.beginTime = time;\n\n this.frames++;\n if (time - this.prevTime >= 1000) {\n this.viewer.info.performance.fps = Math.round((this.frames * 1000) / (time - this.prevTime));\n this.prevTime = time;\n this.frames = 0;\n }\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class CanvasResizeComponent implements IComponent {\n protected viewer: Viewer;\n protected resizeObserver: ResizeObserver;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.resizeObserver = new ResizeObserver(this.resizeViewer);\n this.resizeObserver.observe(viewer.canvas.parentElement);\n }\n\n dispose() {\n this.resizeObserver.disconnect();\n }\n\n resizeViewer = (entries: ResizeObserverEntry[]) => {\n const { width, height } = entries[0].contentRect;\n\n if (!width || !height) return; // <- invisible viewer, or viewer with parent removed\n\n this.viewer.setSize(width, height);\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class CanvasRemoveComponent implements IComponent {\n protected viewer: Viewer;\n protected mutationObserver: MutationObserver;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.mutationObserver = new MutationObserver(this.cleanupViewer);\n this.mutationObserver.observe(document, { childList: true, subtree: true });\n }\n\n dispose() {\n this.mutationObserver.disconnect();\n }\n\n cleanupViewer = (mutations: MutationRecord[]) => {\n for (const mutation of mutations) {\n if (mutation.type === \"childList\" && mutation.removedNodes.length > 0) {\n for (const node of mutation.removedNodes) {\n if (node === this.viewer.canvas || node.contains(this.viewer.canvas)) {\n this.viewer.emitEvent({ type: \"canvasremoved\" });\n this.viewer.dispose();\n return;\n }\n }\n }\n }\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class RenderLoopComponent implements IComponent {\n protected viewer: Viewer;\n protected requestId: number;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.requestId = requestAnimationFrame(this.animate);\n }\n\n dispose() {\n cancelAnimationFrame(this.requestId);\n }\n\n animate = (time: number) => {\n this.requestId = requestAnimationFrame(this.animate);\n\n this.viewer.render(time);\n this.viewer.emitEvent({ type: \"animate\", time });\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { LineSegmentsGeometry } from \"three/examples/jsm/lines/LineSegmentsGeometry.js\";\n\nexport class HighlighterUtils {\n static isBreak(positions: Float32Array, i: number) {\n return (\n isNaN(positions[i]) ||\n isNaN(positions[i + 1]) ||\n isNaN(positions[i + 2]) ||\n positions[i] === Infinity ||\n positions[i] === -Infinity ||\n positions[i + 1] === Infinity ||\n positions[i + 1] === -Infinity ||\n positions[i + 2] === Infinity ||\n positions[i + 2] === -Infinity\n );\n }\n\n static fromIndexedLine(positions: Float32Array, indices: number[]) {\n const lineGeometry = new LineSegmentsGeometry();\n const segments: number[] = [];\n\n for (let i = 0; i < indices.length; i += 2) {\n const idx1 = indices[i] * 3;\n const idx2 = indices[i + 1] * 3;\n\n if (indices[i] === -1 || indices[i + 1] === -1) {\n continue;\n }\n\n segments.push(\n positions[idx1],\n positions[idx1 + 1],\n positions[idx1 + 2],\n positions[idx2],\n positions[idx2 + 1],\n positions[idx2 + 2]\n );\n }\n\n if (segments.length === 0) return null;\n\n lineGeometry.setPositions(segments);\n return lineGeometry;\n }\n\n static fromNonIndexedLine(positions: Float32Array, isLineSegments: boolean) {\n const lineGeometry = new LineSegmentsGeometry();\n const segments: number[] = [];\n\n if (isLineSegments) {\n for (let i = 0; i < positions.length; i += 6) {\n if (i + 5 >= positions.length) break;\n\n if (HighlighterUtils.isBreak(positions, i) || HighlighterUtils.isBreak(positions, i + 3)) continue;\n\n segments.push(\n positions[i],\n positions[i + 1],\n positions[i + 2],\n positions[i + 3],\n positions[i + 4],\n positions[i + 5]\n );\n }\n } else {\n let lastValidIndex = -1;\n\n for (let i = 0; i < positions.length; i += 3) {\n if (HighlighterUtils.isBreak(positions, i)) {\n lastValidIndex = -1;\n continue;\n }\n\n if (lastValidIndex !== -1) {\n segments.push(\n positions[lastValidIndex],\n positions[lastValidIndex + 1],\n positions[lastValidIndex + 2],\n positions[i],\n positions[i + 1],\n positions[i + 2]\n );\n }\n lastValidIndex = i;\n }\n }\n\n if (segments.length === 0) return null;\n\n lineGeometry.setPositions(segments);\n return lineGeometry;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n EdgesGeometry,\n LineBasicMaterial,\n MeshPhongMaterial,\n Object3D,\n RGBAFormat,\n UnsignedByteType,\n Vector2,\n WebGLRenderTarget,\n} from \"three\";\nimport { LineSegmentsGeometry } from \"three/examples/jsm/lines/LineSegmentsGeometry.js\";\nimport { Wireframe } from \"three/examples/jsm/lines/Wireframe.js\";\nimport { LineMaterial } from \"three/examples/jsm/lines/LineMaterial.js\";\n\nimport { IComponent, Options, ResizeEvent } from \"@inweb/viewer-core\";\nimport { Viewer } from \"../Viewer\";\nimport { HighlighterUtils } from \"./HighlighterUtils\";\n\nexport class HighlighterComponent implements IComponent {\n protected viewer: Viewer;\n public renderTarget: WebGLRenderTarget;\n public facesMaterial: MeshPhongMaterial;\n public edgesMaterial: LineMaterial;\n public lineMaterial: LineBasicMaterial;\n public lineGlowMaterial: LineMaterial;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n\n const gl2 = viewer.canvas.getContext(\"webgl2\");\n if (gl2) {\n const size = viewer.renderer.getSize(new Vector2());\n this.renderTarget = new WebGLRenderTarget(size.x, size.y, {\n format: RGBAFormat,\n stencilBuffer: false,\n samples: 4,\n type: UnsignedByteType,\n });\n }\n\n this.viewer.addEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.addEventListener(\"optionschange\", this.syncOptions);\n this.viewer.addEventListener(\"resize\", this.viewerResize);\n\n this.geometryEnd();\n }\n\n dispose() {\n this.viewer.removeEventListener(\"databasechunk\", this.geometryEnd);\n this.viewer.removeEventListener(\"optionschange\", this.syncOptions);\n this.viewer.removeEventListener(\"resize\", this.viewerResize);\n }\n\n highlight(objects: Object3D | Object3D[]) {\n const { edgesVisibility } = this.viewer.options;\n\n if (!Array.isArray(objects)) objects = [objects];\n if (objects.length === 0) return;\n\n objects\n .filter((object) => !object.userData.isEdge) // <- filtering server generated edges\n .forEach((object: any) => {\n if (object.userData.isHighlighted) return;\n\n if (object.isLine || object.isLineSegments) {\n const positions = object.geometry.attributes.position.array;\n const indices = object.geometry.index ? object.geometry.index.array : null;\n const lineGeometry = indices\n ? HighlighterUtils.fromIndexedLine(positions, indices)\n : HighlighterUtils.fromNonIndexedLine(positions, object.isLineSegments);\n\n const wireframe = new Wireframe(lineGeometry, this.lineGlowMaterial);\n wireframe.visible = edgesVisibility;\n wireframe.userData.isHighlightWireframe = true;\n\n object.add(wireframe);\n object.userData.highlightWireframe = wireframe;\n object.userData.originalMaterial = object.material;\n object.material = this.lineMaterial;\n object.userData.isHighlighted = true;\n } else if (object.isMesh) {\n const edgesGeometry = new EdgesGeometry(object.geometry, 89);\n const lineGeometry = new LineSegmentsGeometry().fromEdgesGeometry(edgesGeometry);\n\n const wireframe = new Wireframe(lineGeometry, this.edgesMaterial);\n wireframe.visible = edgesVisibility;\n wireframe.userData.isHighlightWireframe = true;\n\n object.add(wireframe);\n object.userData.highlightWireframe = wireframe;\n object.userData.originalMaterial = object.material;\n object.material = this.facesMaterial;\n object.userData.isHighlighted = true;\n }\n });\n }\n\n unhighlight(objects: Object3D | Object3D[]) {\n if (!Array.isArray(objects)) objects = [objects];\n if (objects.length === 0) return;\n\n objects.forEach((object: any) => {\n if (!object.userData.isHighlighted) return;\n\n object.material = object.userData.originalMaterial;\n object.userData.highlightWireframe.removeFromParent();\n\n delete object.userData.isHighlighted;\n delete object.userData.originalMaterial;\n delete object.userData.highlightWireframe;\n });\n }\n\n geometryEnd = () => {\n this.facesMaterial = new MeshPhongMaterial({\n transparent: true,\n specular: 0x222222,\n shininess: 10,\n reflectivity: 0.05,\n polygonOffset: true,\n polygonOffsetFactor: 1,\n polygonOffsetUnits: 1,\n clippingPlanes: this.viewer.clippingPlanes,\n });\n\n this.edgesMaterial = new LineMaterial({\n linewidth: 1.5,\n resolution: new Vector2(window.innerWidth, window.innerHeight),\n clippingPlanes: this.viewer.clippingPlanes,\n });\n\n this.lineMaterial = new LineBasicMaterial({\n transparent: true,\n depthTest: true,\n depthWrite: true,\n clippingPlanes: this.viewer.clippingPlanes,\n });\n\n this.lineGlowMaterial = new LineMaterial({\n linewidth: 1.5,\n transparent: true,\n opacity: 0.8,\n resolution: new Vector2(window.innerWidth, window.innerHeight),\n clippingPlanes: this.viewer.clippingPlanes,\n });\n\n this.syncHighlightColors();\n };\n\n syncOptions = () => {\n this.syncHighlightColors();\n this.viewer.update();\n };\n\n syncHighlightColors() {\n const options = this.viewer.options.enableCustomHighlight ? this.viewer.options : Options.defaults();\n\n const { facesColor, facesTransparancy, facesOverlap } = options;\n const { edgesColor, edgesVisibility, edgesOverlap } = options;\n\n this.facesMaterial.color.setRGB(facesColor.r / 255, facesColor.g / 255, facesColor.b / 255);\n this.facesMaterial.opacity = (255 - facesTransparancy) / 255;\n this.facesMaterial.depthTest = !facesOverlap;\n this.facesMaterial.depthWrite = !facesOverlap;\n\n this.edgesMaterial.color.setRGB(edgesColor.r / 255, edgesColor.g / 255, edgesColor.b / 255);\n this.edgesMaterial.depthTest = !edgesOverlap;\n this.edgesMaterial.depthWrite = !edgesOverlap;\n\n this.lineMaterial.color.setRGB(facesColor.r / 255, facesColor.g / 255, facesColor.b / 255);\n\n this.lineGlowMaterial.color.setRGB(edgesColor.r / 255, edgesColor.g / 255, edgesColor.b / 255);\n this.lineGlowMaterial.depthTest = !edgesOverlap;\n this.lineGlowMaterial.depthWrite = !edgesOverlap;\n\n this.viewer.selected.forEach((selected) => {\n const wireframe = selected.userData.highlightWireframe;\n if (wireframe) wireframe.visible = edgesVisibility;\n });\n }\n\n viewerResize = (event: ResizeEvent) => {\n this.renderTarget?.setSize(event.width, event.height);\n this.edgesMaterial?.resolution.set(event.width, event.height);\n this.lineGlowMaterial?.resolution.set(event.width, event.height);\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Intersection, Object3D, Vector2, Vector3 } from \"three\";\n\nimport type { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\nimport type { IModelImpl } from \"../models/IModelImpl\";\nimport type { HighlighterComponent } from \"./HighlighterComponent\";\nimport { Snapper } from \"../measurement/Snapper\";\n\nexport class SelectionComponent implements IComponent {\n protected viewer: Viewer;\n protected downPosition: Vector2;\n protected highlighter: HighlighterComponent;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.downPosition = new Vector2();\n\n this.viewer.addEventListener(\"pointerdown\", this.onPointerDown);\n this.viewer.addEventListener(\"pointerup\", this.onPointerUp);\n this.viewer.addEventListener(\"dblclick\", this.onDoubleClick);\n this.viewer.addEventListener(\"initialize\", this.initHighlighter);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"pointerdown\", this.onPointerDown);\n this.viewer.removeEventListener(\"pointerup\", this.onPointerUp);\n this.viewer.removeEventListener(\"dblclick\", this.onDoubleClick);\n this.viewer.removeEventListener(\"initialize\", this.initHighlighter);\n }\n\n onPointerDown = (event: PointerEvent) => {\n if (!event.isPrimary || event.button !== 0) return;\n\n this.getMousePosition(event, this.downPosition);\n };\n\n onPointerUp = (event: PointerEvent) => {\n if (!event.isPrimary || event.button !== 0) return;\n\n const upPosition = this.getMousePosition(event, new Vector2());\n if (upPosition.distanceTo(this.downPosition) !== 0) return;\n\n const extentsSize = this.viewer.extents.getSize(new Vector3()).length() || 1;\n\n const snapper = new Snapper(this.viewer.camera, this.viewer.clippingPlanes, this.viewer.canvas);\n snapper.threshold = extentsSize / 10000;\n\n type Intersection2 = Intersection<Object3D> & { model: IModelImpl };\n\n let intersections: Intersection2[] = [];\n this.viewer.models.forEach((model) => {\n const objects = model.getVisibleObjects();\n const intersects = snapper.getPointerIntersects(upPosition, objects);\n if (intersects.length > 0) intersections.push({ ...intersects[0], model });\n });\n intersections = intersections.sort((a, b) => a.distance - b.distance);\n\n if (!event.shiftKey) this.clearSelection();\n\n if (intersections.length > 0) {\n const model = intersections[0].model;\n const handles = model.getHandlesByObjects(intersections[0].object);\n const objects = model.getObjectsByHandles(handles);\n\n if (!event.shiftKey) this.select(objects, model);\n else this.toggleSelection(objects, model);\n }\n\n this.viewer.update();\n\n this.viewer.emitEvent({ type: \"select\", data: undefined, handles: this.viewer.getSelected() });\n this.viewer.emitEvent({ type: \"select2\", data: undefined, handles: this.viewer.getSelected2() });\n };\n\n onDoubleClick = (event: MouseEvent) => {\n if (event.button !== 0) return;\n\n this.viewer.executeCommand(\"zoomToSelected\");\n };\n\n getMousePosition(event: MouseEvent, target: Vector2): Vector2 {\n return target.set(event.clientX, event.clientY);\n }\n\n select(objects: Object3D | Object3D[], model?: IModelImpl) {\n if (!model) {\n this.viewer.models.forEach((model) => this.select(objects, model));\n return;\n }\n\n if (!Array.isArray(objects)) objects = [objects];\n if (objects.length === 0) return;\n\n model.highlightObjects(objects);\n this.highlighter.highlight(objects);\n\n objects.forEach((object) => this.viewer.selected.push(object));\n objects.forEach((object) => (object.userData.isSelected = true));\n }\n\n deselect(objects: Object3D | Object3D[], model?: IModelImpl) {\n if (!model) {\n this.viewer.models.forEach((model) => this.select(objects, model));\n return;\n }\n\n if (!Array.isArray(objects)) objects = [objects];\n if (objects.length === 0) return;\n\n model.unhighlightObjects(objects);\n this.highlighter.unhighlight(objects);\n\n this.viewer.selected = this.viewer.selected.filter((x) => !objects.includes(x));\n objects.forEach((object) => (object.userData.isSelected = false));\n }\n\n toggleSelection(objects: Object3D | Object3D[], model?: IModelImpl) {\n if (!Array.isArray(objects)) objects = [objects];\n if (objects.length === 0) return;\n\n if (objects[0].userData.isSelected) this.deselect(objects, model);\n else this.select(objects, model);\n }\n\n clearSelection() {\n if (this.viewer.selected.length === 0) return;\n\n this.viewer.models.forEach((model) => model.unhighlightObjects(this.viewer.selected));\n this.highlighter.unhighlight(this.viewer.selected);\n\n this.viewer.selected.forEach((object) => (object.userData.isSelected = false));\n this.viewer.selected.length = 0;\n }\n\n initHighlighter = () => {\n this.highlighter = this.viewer.getComponent(\"HighlighterComponent\") as HighlighterComponent;\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\n\nexport class ClippingPlaneComponent implements IComponent {\n protected viewer: Viewer;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n\n this.viewer.addEventListener(\"geometryend\", this.applyClippingPlanes);\n this.viewer.addEventListener(\"changecuttingplanes\", this.applyClippingPlanes);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"geometryend\", this.applyClippingPlanes);\n this.viewer.removeEventListener(\"changecuttingplanes\", this.applyClippingPlanes);\n }\n\n applyClippingPlanes = () => {\n this.viewer.models.forEach((model) => {\n model.scene.traverse((object: any) => {\n if (object.material) {\n const materials = Array.isArray(object.material) ? object.material : [object.material];\n materials.forEach((material) => (material.clippingPlanes = this.viewer.clippingPlanes));\n }\n });\n });\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n Box3,\n BufferGeometry,\n Color,\n DoubleSide,\n Float32BufferAttribute,\n Mesh,\n Object3D,\n Points,\n PointsMaterial,\n ShaderMaterial,\n ShapeUtils,\n Sphere,\n Vector2,\n Vector3,\n} from \"three\";\nimport { LineSegmentsGeometry } from \"three/examples/jsm/lines/LineSegmentsGeometry.js\";\nimport { LineMaterial } from \"three/examples/jsm/lines/LineMaterial.js\";\nimport { LineSegments2 } from \"three/examples/jsm/lines/LineSegments2.js\";\n\n/**\n * Spatial Hash Grid class. Used for merging vertices that are practically at the same coordinate (within\n * the given tolerance). This is critical for eliminating gaps caused by floating-point precision\n * errors.\n */\nclass PointHashGrid {\n constructor(tolerance = 1e-5) {\n // Tolerance dictates how close two points must be to be considered identical\n this.tolerance = tolerance;\n\n // Array holding the actual Three.Vector3 objects\n this.points = [];\n\n // Map storing cell string keys to an array of point indices\n this.grid = new Map();\n }\n\n // Creates a unique string key based on integer cell coordinates\n _hash(hx, hy, hz) {\n return `${hx},${hy},${hz}`;\n }\n\n // Adds a vector to the grid, or returns the index of an existing identical vector\n add(v) {\n // Divide coordinates by tolerance and round to get integer grid coordinates\n const hx = Math.round(v.x / this.tolerance);\n const hy = Math.round(v.y / this.tolerance);\n const hz = Math.round(v.z / this.tolerance);\n\n // Search the current cell and all 26 adjacent cells to ensure\n // we catch points that fall exactly on cell boundaries\n for (let i = -1; i <= 1; i++) {\n for (let j = -1; j <= 1; j++) {\n for (let k = -1; k <= 1; k++) {\n // Calculate the hash key for the neighbor cell\n const hash = this._hash(hx + i, hy + j, hz + k);\n\n // Retrieve the cell array from the grid\n const cell = this.grid.get(hash);\n\n if (cell) {\n // Iterate over point IDs present in this cell\n for (const id of cell) {\n // If distance is within tolerance, it's a duplicate. Return the existing ID.\n if (this.points[id].distanceTo(v) <= this.tolerance) return id;\n }\n }\n }\n }\n }\n\n // If point does not exist, assign a new index based on array length\n const id = this.points.length;\n\n // Clone the vector to prevent reference mutations and push to array\n this.points.push(v.clone());\n\n // Get the hash for the central cell\n const centerHash = this._hash(hx, hy, hz);\n\n // Initialize an empty array for the cell if it doesn't exist\n if (!this.grid.has(centerHash)) this.grid.set(centerHash, []);\n\n // Push the new point ID into the respective cell\n this.grid.get(centerHash).push(id);\n\n return id;\n }\n}\n\n/**\n * Sections Helper Class Manages all meshes related to clipping planes: Fill (Caps), Outlines, and Debug\n * Points\n */\nclass SectionsHelper extends Object3D {\n constructor() {\n super();\n\n this.type = \"SectionsHelper\";\n\n // Configuration flags for visual settings\n this.flags = {\n fillEnabled: true,\n fillColor: \"#fffde7\",\n hatchEnabled: true,\n hatchColor: \"#000000\",\n hatchScale: 8.0,\n outlineEnabled: true,\n outlineColor: \"#000000\",\n outlineWidth: 2,\n boundaryOnly: true,\n showDebugSeams: false,\n showDebugPoints: false,\n showDebugSegments: false,\n showDebugGaps: false,\n showDebugInfo: false,\n useObjFillColor: false,\n useObjOutlineColor: false,\n };\n\n // Arrays storing corresponding meshes for each clipping plane\n this._caps = [];\n this._outlines = [];\n this._debugPoints = [];\n this._debugSegments = [];\n this._debugGaps = [];\n\n // Pre-allocated vectors to prevent excessive object instantiation during render loops\n this._vA = new Vector3();\n this._vB = new Vector3();\n this._vC = new Vector3();\n\n // Pre-allocated bounding box object\n this._worldBox = new Box3();\n }\n\n // Cleanup method to properly dispose of geometries and materials and free GPU memory\n dispose() {\n // Helper arrow function to dispose an individual item\n const disposeMesh = (item) => {\n if (item.geometry) item.geometry.dispose();\n if (item.material) item.material.dispose();\n this.remove(item);\n };\n\n // Execute cleanup for all mesh arrays\n this._caps.forEach(disposeMesh);\n this._outlines.forEach(disposeMesh);\n this._debugPoints.forEach(disposeMesh);\n this._debugSegments.forEach(disposeMesh);\n this._debugGaps.forEach(disposeMesh);\n\n // Clear the internal array references\n this._caps.length = 0;\n this._outlines.length = 0;\n this._debugPoints.length = 0;\n this._debugSegments.length = 0;\n this._debugGaps.length = 0;\n }\n\n // Update the resolution uniform for fat lines when viewport changes\n setSize(width, height) {\n this._outlines.forEach((o) => {\n if (o.material.resolution) o.material.resolution.set(width, height);\n });\n\n this._debugSegments.forEach((s) => {\n if (s.material.resolution) s.material.resolution.set(width, height);\n });\n }\n\n // Creates necessary helper meshes based on the amount of active clipping planes\n _ensureHelpersCount(count) {\n // Custom vertex shader for caps rendering\n // Extracts screen-space position into world-space format to allow steady hatch drawing\n const hatchVertexShader = `\n #include <common>\n #include <logdepthbuf_pars_vertex>\n #include <clipping_planes_pars_vertex>\n \n attribute float aHatchDir; \n attribute vec3 aFillColor;\n \n varying vec3 vWP; \n varying float vHatchDir; \n varying vec3 vFillColor;\n \n void main() { \n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n #include <clipping_planes_vertex>\n \n vWP = (modelMatrix * vec4(position, 1.0)).xyz;\n vHatchDir = aHatchDir; \n vFillColor = aFillColor;\n \n gl_Position = projectionMatrix * mvPosition; \n #include <logdepthbuf_vertex>\n }\n `;\n\n // Custom fragment shader for caps rendering\n // Uses modulo arithmetic to draw alternating hatch lines independent of zoom level\n const hatchFragmentShader = `\n #include <common>\n #include <logdepthbuf_pars_fragment>\n #include <clipping_planes_pars_fragment>\n \n uniform vec3 lineColor; \n uniform float uHatchScale; \n uniform float uHatchEnabled;\n \n varying vec3 vWP; \n varying float vHatchDir; \n varying vec3 vFillColor;\n \n void main() { \n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n \n float v1 = mod(gl_FragCoord.x + gl_FragCoord.y, uHatchScale);\n float v2 = mod(gl_FragCoord.x - gl_FragCoord.y, uHatchScale);\n float v = mix(v1, v2, vHatchDir);\n \n float hatchMask = step(v, 1.5) * uHatchEnabled;\n gl_FragColor = vec4(mix(vFillColor, lineColor, hatchMask), 1.0); \n }\n `;\n\n // Generate new meshes if the active plane count exceeds our pool\n while (this._caps.length < count) {\n // Cap material defining the cross-section surface\n const capMat = new ShaderMaterial({\n uniforms: {\n lineColor: { value: new Color() },\n uHatchScale: { value: 10.0 },\n uHatchEnabled: { value: 1.0 },\n },\n vertexShader: hatchVertexShader,\n fragmentShader: hatchFragmentShader,\n side: DoubleSide,\n clipping: true,\n depthTest: true,\n // STABLE LOGIC: Disabling depth write forces the fill to render,\n // but not push to Z-buffer, allowing Outline meshes (rendered later) to naturally\n // sit perfectly on top without struggling with Z-fighting.\n depthWrite: false,\n });\n\n const capMesh = new Mesh(new BufferGeometry(), capMat);\n // Render fills early\n capMesh.renderOrder = 5;\n this.add(capMesh);\n this._caps.push(capMesh);\n\n // Material for the thick intersection contour\n const lineMat = new LineMaterial({\n color: 0xffffff,\n linewidth: 2,\n resolution: new Vector2(window.innerWidth, window.innerHeight),\n depthTest: true,\n clipping: true,\n vertexColors: true,\n });\n\n const lineObj = new LineSegments2(new LineSegmentsGeometry(), lineMat);\n // Render outlines late so they sit atop the non-depth-writing fill mesh\n lineObj.renderOrder = 100;\n this.add(lineObj);\n this._outlines.push(lineObj);\n\n // Material for rendering discrete intersection points (Debugging)\n const ptsMat = new PointsMaterial({\n color: 0x00aaff,\n size: 6,\n sizeAttenuation: false,\n depthTest: false,\n transparent: true,\n depthWrite: false,\n });\n\n const pointsObj = new Points(new BufferGeometry(), ptsMat);\n pointsObj.renderOrder = 200;\n this.add(pointsObj);\n this._debugPoints.push(pointsObj);\n\n // Material for rendering discrete unconnected intersection segments (Debugging)\n const debugSegMat = new LineMaterial({\n color: 0x00ff00,\n linewidth: 4,\n resolution: new Vector2(window.innerWidth, window.innerHeight),\n depthTest: false,\n transparent: true,\n depthWrite: false,\n clipping: true,\n });\n\n const debugSegObj = new LineSegments2(new LineSegmentsGeometry(), debugSegMat);\n debugSegObj.renderOrder = 150;\n this.add(debugSegObj);\n this._debugSegments.push(debugSegObj);\n\n // Material to display failure points where loops didn't close (Debugging)\n const gapPtsMat = new PointsMaterial({\n size: 6,\n sizeAttenuation: false,\n depthTest: false,\n transparent: true,\n depthWrite: false,\n vertexColors: true,\n });\n\n const gapsObj = new Points(new BufferGeometry(), gapPtsMat);\n gapsObj.renderOrder = 250;\n this.add(gapsObj);\n this._debugGaps.push(gapsObj);\n }\n\n // If planes were disabled, hide their associated meshes from the scene\n for (let i = count; i < this._caps.length; i++) {\n this._caps[i].visible = false;\n this._outlines[i].visible = false;\n this._debugPoints[i].visible = false;\n this._debugSegments[i].visible = false;\n this._debugGaps[i].visible = false;\n }\n }\n\n // Main update loop processing geometry intersections\n update(objects, extents, planes) {\n const t0 = performance.now();\n\n // Initialize the correct amount of helper meshes\n this._ensureHelpersCount(planes.length);\n\n // Exit early if no planes are active\n if (planes.length === 0) return;\n\n // Determine mathematical bounding radius\n const sphere = extents.getBoundingSphere(new Sphere());\n const globalRadius = Math.max(sphere.radius, 1e-3);\n\n // Bias prevents geometry cut surfaces and generated caps from competing mathematically\n const clippingBias = globalRadius * 1e-4;\n\n // Prepare a slightly shifted copy of planes specifically for clipping the caps\n const biasedPlanes = planes.map((p) => {\n const bp = p.clone();\n bp.constant += clippingBias;\n return bp;\n });\n\n // Gather all relevant mesh objects from the scene hierarchy\n const targetMeshes = [];\n objects.forEach((obj) => {\n if (obj.isMesh && obj.material) {\n const mats = Array.isArray(obj.material) ? obj.material : [obj.material];\n if (mats.some((m) => m.clippingPlanes)) targetMeshes.push(obj);\n }\n });\n\n // Iterate over every active clipping plane\n planes.forEach((plane, pIdx) => {\n // Fetch corresponding helper objects\n const capMesh = this._caps[pIdx];\n const outlineMesh = this._outlines[pIdx];\n const debugPtsMesh = this._debugPoints[pIdx];\n const debugSegsMesh = this._debugSegments[pIdx];\n const debugGapsMesh = this._debugGaps[pIdx];\n\n // Cap shader writes the values straight into the framebuffer, so we need\n // to bypass Three.js's sRGB→linear color management and push sRGB values\n // to the GPU because the Viewer uses LinearSRGBColorSpace.\n const hatchColor = new Color(this.flags.hatchColor);\n hatchColor.convertLinearToSRGB();\n\n // Set uniforms\n capMesh.material.uniforms.lineColor.value.set(hatchColor);\n capMesh.material.uniforms.uHatchScale.value = this.flags.hatchScale;\n capMesh.material.uniforms.uHatchEnabled.value = this.flags.hatchEnabled ? 1.0 : 0.0;\n outlineMesh.material.linewidth = this.flags.outlineWidth;\n\n // Exclude current plane from array to avoid self-clipping\n const otherBiasedPlanes = biasedPlanes.filter((_, i) => i !== pIdx);\n\n capMesh.material.clippingPlanes = otherBiasedPlanes;\n outlineMesh.material.clippingPlanes = otherBiasedPlanes;\n debugSegsMesh.material.clippingPlanes = otherBiasedPlanes;\n\n // Establish 2D Local Space on the plane surface using Cross Products\n const n = plane.normal;\n const planeOrigin = n.clone().multiplyScalar(-plane.constant);\n\n const up = new Vector3(0, 1, 0);\n\n // Fallback 'up' vector if plane is completely horizontal\n if (Math.abs(n.dot(up)) > 0.999) up.set(1, 0, 0);\n\n // Create U and V axis vectors laying perfectly flat on the clipping plane\n const uAxis = new Vector3().crossVectors(up, n).normalize();\n const vAxis = new Vector3().crossVectors(n, uAxis).normalize();\n\n // Initialize arrays collecting vertex data across all intercepted meshes\n const positions = [];\n const indices = [];\n const hatchDirs = [];\n const fillColors = [];\n const combinedOutlinePoints = [];\n const combinedOutlineColors = [];\n const rawPts = [];\n const rawSegs = [];\n const rawGaps = [];\n const rawGapColors = [];\n\n // Scan every object in the model to see if it intercepts this plane\n targetMeshes.forEach((mesh, meshIndex) => {\n // Compute bounding structures if missing\n if (!mesh.geometry.boundingBox) mesh.geometry.computeBoundingBox();\n if (!mesh.geometry.boundingSphere) mesh.geometry.computeBoundingSphere();\n\n // Execute broad-phase culling\n this._worldBox.copy(mesh.geometry.boundingBox).applyMatrix4(mesh.matrixWorld);\n if (!plane.intersectsBox(this._worldBox)) return;\n\n // Compute contextual tolerances based on scale\n const localScale = new Vector3().setFromMatrixScale(mesh.matrixWorld);\n const maxScale = Math.max(localScale.x, localScale.y, localScale.z);\n const localRadius = Math.max(mesh.geometry.boundingSphere.radius * maxScale, 1e-3);\n\n // Adaptive tolerances to maintain mathematical precision\n const localHashTolerance = Math.max(localRadius * 1e-4, 1e-6);\n const localEps = Math.max(localRadius * 1e-5, 1e-7);\n\n // Capture object color to optionally apply to the cross section\n const baseColor = new Color(0xffffff);\n const om = mesh.userData.originalMaterial; // <- highlighted object\n const mm = om ?? (Array.isArray(mesh.material) ? mesh.material[0] : mesh.material);\n if (mm.color) baseColor.copy(mm.color);\n\n // Darken base colors slightly for better contrast on section faces\n const objFillColor = baseColor.clone().lerp(new Color(0x000000), 0.2);\n const objOutlineColor = baseColor.clone().lerp(new Color(0x000000), 0.85);\n\n // Create distinct color ID for debug views\n const hue = ((meshIndex * 137.5) % 360) / 360;\n const meshGapColor = new Color().setHSL(hue, 1.0, 0.5);\n\n // Alternate hatching direction index\n const currentHatchDir = meshIndex % 2 === 0 ? 0.0 : 1.0;\n\n // Map desired color based on user UI flag.\n const fillColor = this.flags.useObjFillColor ? objFillColor : new Color(this.flags.fillColor);\n const outlineColor = this.flags.useObjOutlineColor ? objOutlineColor : new Color(this.flags.outlineColor);\n\n // Cap and outline shaders write the values straight into the framebuffer, so we\n // need to bypass Three.js's sRGB→linear color management and push sRGB values\n // to the GPU because the Viewer uses LinearSRGBColorSpace.\n meshGapColor.convertLinearToSRGB();\n fillColor.convertLinearToSRGB();\n outlineColor.convertLinearToSRGB();\n\n // Map tracking frequency of line segments and Spatial grid for points\n const localEdgeStats = new Map();\n const localPointGrid = new PointHashGrid(localHashTolerance);\n\n // Gather intersections\n this._calculateMeshSegmentsUndirected(mesh, plane, localEdgeStats, localPointGrid, localEps);\n\n if (localEdgeStats.size > 0) {\n const boundaryEdges = [];\n\n // Iterate over gathered edges to find outer boundaries\n for (const [key, stat] of localEdgeStats.entries()) {\n // Segments appearing an odd number of times represent the outermost silhouette\n const isBoundary = stat.count % 2 !== 0;\n const ids = key.split(\"-\");\n const id0 = Number(ids[0]);\n const id1 = Number(ids[1]);\n\n // Fetch corresponding vector structures\n const p1 = localPointGrid.points[id0];\n const p2 = localPointGrid.points[id1];\n\n // Determine if this edge should be pushed to the active visual outline\n if (this.flags.showDebugSeams || (this.flags.boundaryOnly ? isBoundary : true)) {\n combinedOutlinePoints.push(p1.x, p1.y, p1.z, p2.x, p2.y, p2.z);\n combinedOutlineColors.push(outlineColor.r, outlineColor.g, outlineColor.b);\n combinedOutlineColors.push(outlineColor.r, outlineColor.g, outlineColor.b);\n }\n\n if (isBoundary) boundaryEdges.push([id0, id1]);\n\n if (this.flags.showDebugSegments) rawSegs.push(p1.x, p1.y, p1.z, p2.x, p2.y, p2.z);\n }\n\n if (this.flags.showDebugPoints) {\n for (const p of localPointGrid.points) rawPts.push(p.x, p.y, p.z);\n }\n\n // If we have enough edges to form a polygon, proceed to loop-building\n if (this.flags.fillEnabled && boundaryEdges.length >= 3) {\n const currentAdj = new Map();\n\n // Populate adjacency map to build node-to-node relationships\n for (const edge of boundaryEdges) {\n const a = edge[0];\n const b = edge[1];\n if (!currentAdj.has(a)) currentAdj.set(a, []);\n if (!currentAdj.has(b)) currentAdj.set(b, []);\n currentAdj.get(a).push(b);\n currentAdj.get(b).push(a);\n }\n\n const degree1 = [];\n\n // Detect vertices that have only 1 neighbor (unclosed chains)\n for (const [node, neighbors] of currentAdj.entries()) {\n if (neighbors.length === 1) degree1.push(node);\n }\n\n const stitchTol = Math.max(localRadius * 0.05, 1e-4);\n\n // Attempt to auto-stitch dead ends by snapping them to the nearest valid edge\n for (let i = 0; i < degree1.length; i++) {\n const n1 = degree1[i];\n if (currentAdj.get(n1).length !== 1) continue;\n\n const p1 = localPointGrid.points[n1];\n let bestEdgeIdx = -1;\n let bestProj = null;\n let bestT = 0;\n let minDist = stitchTol;\n\n const edgeCount = boundaryEdges.length;\n\n for (let eIdx = 0; eIdx < edgeCount; eIdx++) {\n const edge = boundaryEdges[eIdx];\n const eA = edge[0];\n const eB = edge[1];\n if (eA === n1 || eB === n1) continue;\n\n const pA = localPointGrid.points[eA];\n const pB = localPointGrid.points[eB];\n\n const lineVec = new Vector3().subVectors(pB, pA);\n const lineLenSq = lineVec.lengthSq();\n\n let proj;\n let t;\n\n // Line Math: Find the closest projected point on the segment\n if (lineLenSq < 1e-12) {\n proj = pA.clone();\n t = 0;\n } else {\n const ptVec = new Vector3().subVectors(p1, pA);\n t = ptVec.dot(lineVec) / lineLenSq;\n t = Math.max(0, Math.min(1, t));\n proj = new Vector3().copy(pA).addScaledVector(lineVec, t);\n }\n\n const dist = p1.distanceTo(proj);\n\n // Track the absolute best matching candidate\n if (dist < minDist) {\n minDist = dist;\n bestEdgeIdx = eIdx;\n bestProj = proj;\n bestT = t;\n }\n }\n\n // If a candidate was found, merge nodes and inject into adjacency logic\n if (bestEdgeIdx !== -1) {\n const edge = boundaryEdges[bestEdgeIdx];\n const eA = edge[0];\n const eB = edge[1];\n\n if (bestT < 0.001) {\n boundaryEdges.push([n1, eA]);\n currentAdj.get(n1).push(eA);\n currentAdj.get(eA).push(n1);\n p1.copy(localPointGrid.points[eA]);\n } else if (bestT > 0.999) {\n boundaryEdges.push([n1, eB]);\n currentAdj.get(n1).push(eB);\n currentAdj.get(eB).push(n1);\n p1.copy(localPointGrid.points[eB]);\n } else {\n const newNodeId = localPointGrid.add(bestProj);\n\n edge[1] = newNodeId;\n boundaryEdges.push([newNodeId, eB]);\n boundaryEdges.push([n1, newNodeId]);\n\n const neighborsA = currentAdj.get(eA);\n neighborsA[neighborsA.indexOf(eB)] = newNodeId;\n\n const neighborsB = currentAdj.get(eB);\n neighborsB[neighborsB.indexOf(eA)] = newNodeId;\n\n if (!currentAdj.has(newNodeId)) currentAdj.set(newNodeId, []);\n currentAdj.get(newNodeId).push(eA, eB, n1);\n\n currentAdj.get(n1).push(newNodeId);\n p1.copy(bestProj);\n }\n }\n }\n\n // Mark still unresolved vertices for debugging purposes\n if (this.flags.showDebugGaps) {\n for (const [node, neighbors] of currentAdj.entries()) {\n if (neighbors.length !== 2) {\n const p = localPointGrid.points[node];\n rawGaps.push(p.x, p.y, p.z);\n rawGapColors.push(meshGapColor.r, meshGapColor.g, meshGapColor.b);\n }\n }\n }\n\n // Chain edges to discover sequential closed loops\n const loops = this._assembleLoopsUndirected(boundaryEdges, localPointGrid, uAxis, vAxis);\n\n if (loops.length > 0) {\n // Submit valid loops for earcutting (Triangulation) to create solid geometry\n this._triangulateTreeOptimized(\n loops,\n planeOrigin,\n uAxis,\n vAxis,\n positions,\n indices,\n localRadius,\n fillColor,\n currentHatchDir,\n hatchDirs,\n fillColors\n );\n }\n }\n }\n });\n\n // Build and apply Fill BufferGeometry\n if (indices.length > 0) {\n capMesh.geometry.dispose();\n capMesh.geometry = new BufferGeometry();\n capMesh.geometry.setAttribute(\"position\", new Float32BufferAttribute(positions, 3));\n capMesh.geometry.setAttribute(\"aHatchDir\", new Float32BufferAttribute(hatchDirs, 1));\n capMesh.geometry.setAttribute(\"aFillColor\", new Float32BufferAttribute(fillColors, 3));\n capMesh.geometry.setIndex(indices);\n capMesh.geometry.computeVertexNormals();\n capMesh.visible = this.flags.fillEnabled;\n } else {\n capMesh.visible = false;\n }\n\n // Build and apply Outline BufferGeometry\n if (outlineMesh.geometry) outlineMesh.geometry.dispose();\n outlineMesh.geometry = new LineSegmentsGeometry();\n\n if (this.flags.outlineEnabled && combinedOutlinePoints.length >= 6) {\n outlineMesh.geometry.setPositions(new Float32Array(combinedOutlinePoints));\n outlineMesh.geometry.setColors(new Float32Array(combinedOutlineColors));\n outlineMesh.visible = true;\n } else {\n outlineMesh.visible = false;\n }\n\n // Push Debugging visual data if toggled\n if (this.flags.showDebugPoints && rawPts.length > 0) {\n debugPtsMesh.geometry.setAttribute(\"position\", new Float32BufferAttribute(rawPts, 3));\n debugPtsMesh.visible = true;\n } else {\n debugPtsMesh.visible = false;\n }\n\n if (debugSegsMesh.geometry) debugSegsMesh.geometry.dispose();\n debugSegsMesh.geometry = new LineSegmentsGeometry();\n\n if (this.flags.showDebugSegments && rawSegs.length >= 6) {\n debugSegsMesh.geometry.setPositions(new Float32Array(rawSegs));\n debugSegsMesh.visible = true;\n } else {\n debugSegsMesh.visible = false;\n }\n\n if (debugGapsMesh.geometry) debugGapsMesh.geometry.dispose();\n debugGapsMesh.geometry = new BufferGeometry();\n\n if (this.flags.showDebugGaps && rawGaps.length > 0) {\n debugGapsMesh.geometry.setAttribute(\"position\", new Float32BufferAttribute(rawGaps, 3));\n debugGapsMesh.geometry.setAttribute(\"color\", new Float32BufferAttribute(rawGapColors, 3));\n debugGapsMesh.visible = true;\n } else {\n debugGapsMesh.visible = false;\n }\n });\n\n if (this.flags.showDebugInfo) {\n console.log(`[SectionsHelper] v7.00 Updated in ${(performance.now() - t0).toFixed(2)} ms`);\n }\n }\n\n // Walks connected nodes to trace out distinct polygon paths\n _assembleLoopsUndirected(edges, pointGrid, uAxis, vAxis) {\n const adj = new Map();\n\n // Construct basic adjacency array list\n for (const edge of edges) {\n const a = edge[0];\n const b = edge[1];\n\n if (!adj.has(a)) adj.set(a, []);\n if (!adj.has(b)) adj.set(b, []);\n\n adj.get(a).push(b);\n adj.get(b).push(a);\n }\n\n const loops = [];\n\n // Keep resolving paths until node map is depleted\n while (adj.size > 0) {\n let startNode = -1;\n\n for (const key of adj.keys()) {\n if (adj.get(key).length > 0) {\n startNode = key;\n break;\n }\n }\n\n if (startNode === -1) break;\n\n let current = startNode;\n let prev = -1;\n const path = [];\n const pathIndices = new Map();\n\n while (true) {\n path.push(current);\n pathIndices.set(current, path.length - 1);\n\n const neighbors = adj.get(current);\n if (!neighbors || neighbors.length === 0) break;\n\n let nextIdx = 0;\n\n // Sharpest turn heuristic mapping for resolving complex overlapping intersections\n if (neighbors.length > 1 && prev !== -1) {\n const pPrev = pointGrid.points[prev];\n const pCurr = pointGrid.points[current];\n\n const vIn = new Vector3().subVectors(pCurr, pPrev);\n const in2d = new Vector2(vIn.dot(uAxis), vIn.dot(vAxis));\n\n if (in2d.lengthSq() > 1e-10) {\n in2d.normalize();\n let minAngle = Infinity;\n\n for (let i = 0; i < neighbors.length; i++) {\n const pNext = pointGrid.points[neighbors[i]];\n const vOut = new Vector3().subVectors(pNext, pCurr);\n const out2d = new Vector2(vOut.dot(uAxis), vOut.dot(vAxis));\n\n if (out2d.lengthSq() > 1e-10) {\n out2d.normalize();\n const angle = Math.atan2(in2d.cross(out2d), in2d.dot(out2d));\n\n if (angle < minAngle) {\n minAngle = angle;\n nextIdx = i;\n }\n }\n }\n }\n }\n\n const next = neighbors[nextIdx];\n neighbors.splice(nextIdx, 1);\n\n const nextNeighbors = adj.get(next);\n if (nextNeighbors) {\n const revIdx = nextNeighbors.indexOf(current);\n if (revIdx !== -1) nextNeighbors.splice(revIdx, 1);\n }\n\n prev = current;\n current = next;\n\n // Circular logic check - If we've seen this node before, slice out the loop\n if (pathIndices.has(current)) {\n const loopStartIdx = pathIndices.get(current);\n const loopNodes = path.slice(loopStartIdx);\n\n if (loopNodes.length >= 3) loops.push(loopNodes.map((id) => pointGrid.points[id]));\n\n for (let i = loopStartIdx; i < path.length; i++) pathIndices.delete(path[i]);\n\n path.length = loopStartIdx;\n prev = path.length > 1 ? path[path.length - 2] : -1;\n }\n }\n\n // Cleanup isolated node references\n for (const key of adj.keys()) {\n if (adj.get(key).length === 0) adj.delete(key);\n }\n }\n\n return loops;\n }\n\n // Determines hole/boundary hierarchy and triangulates accordingly via Earcut algorithm\n _triangulateTreeOptimized(\n loops,\n planeOrigin,\n uAxis,\n vAxis,\n positionsBuffer,\n indicesBuffer,\n localRadius,\n fillColor,\n hatchDir,\n hatchDirsBuffer,\n fillColorsBuffer\n ) {\n const shapesData = [];\n const minArea = localRadius * 1e-5 * (localRadius * 1e-5);\n\n // Reduce 3D vectors to 2D coordinates residing strictly on the cutting plane\n loops.forEach((loop) => {\n const pts2d = loop.map((p) => {\n const pv = p.clone().sub(planeOrigin);\n return new Vector2(pv.dot(uAxis), pv.dot(vAxis));\n });\n\n const cleaned = [];\n for (let k = 0; k < pts2d.length; k++) {\n const prev = k === 0 ? pts2d[pts2d.length - 1] : pts2d[k - 1];\n if (pts2d[k].distanceTo(prev) > 1e-5) cleaned.push(pts2d[k]);\n }\n if (cleaned.length < 3) return;\n\n const area = ShapeUtils.area(cleaned);\n\n // Bypass rendering microscopic artifacts\n if (Math.abs(area) > minArea) {\n shapesData.push({ pts2d: cleaned, absArea: Math.abs(area), depth: 0, parent: -1, holes: [] });\n }\n });\n\n // Largest boundaries process first\n shapesData.sort((a, b) => b.absArea - a.absArea);\n\n // Process Parent-Child Hierarchies\n for (let i = 0; i < shapesData.length; i++) {\n for (let j = i - 1; j >= 0; j--) {\n if (shapesData[i].absArea > shapesData[j].absArea * 0.98) continue;\n\n // If bounds encompass the child completely, it dictates its depth\n if (this._isLoopInside(shapesData[i].pts2d, shapesData[j].pts2d, localRadius)) {\n shapesData[i].parent = j;\n shapesData[i].depth = shapesData[j].depth + 1;\n break;\n }\n }\n }\n\n // Push odd depths into parent as holes\n for (let i = 0; i < shapesData.length; i++) {\n const shape = shapesData[i];\n if (shape.depth % 2 === 1 && shape.parent !== -1) {\n shapesData[shape.parent].holes.push(shape.pts2d);\n }\n }\n\n // Dispatch triangulation execution\n for (let i = 0; i < shapesData.length; i++) {\n const shapeData = shapesData[i];\n\n if (shapeData.depth % 2 !== 0) continue;\n\n // Reverse vertex winding order correctly\n if (ShapeUtils.area(shapeData.pts2d) < 0) {\n shapeData.pts2d.reverse();\n }\n\n shapeData.holes.forEach((h) => {\n if (ShapeUtils.area(h) > 0) h.reverse();\n });\n\n const allPoints = [...shapeData.pts2d];\n shapeData.holes.forEach((h) => allPoints.push(...h));\n\n const faces = ShapeUtils.triangulateShape(shapeData.pts2d, shapeData.holes);\n const vertexOffset = positionsBuffer.length / 3;\n\n // Extrapolate resulting 2D triangles back into absolute World 3D coordinates\n for (const pt of allPoints) {\n const p3d = planeOrigin.clone().addScaledVector(uAxis, pt.x).addScaledVector(vAxis, pt.y);\n\n positionsBuffer.push(p3d.x, p3d.y, p3d.z);\n hatchDirsBuffer.push(hatchDir);\n fillColorsBuffer.push(fillColor.r, fillColor.g, fillColor.b);\n }\n\n for (let f = 0; f < faces.length; f++) {\n indicesBuffer.push(vertexOffset + faces[f][0], vertexOffset + faces[f][1], vertexOffset + faces[f][2]);\n }\n }\n }\n\n // Ray-Casting algorithm for point-in-polygon checks\n _isPointInPoly(pt, poly) {\n let inside = false;\n const py = pt.y + 1.119e-7;\n const px = pt.x;\n\n for (let i = 0, j = poly.length - 1; i < poly.length; j = i++) {\n if (\n poly[i].y > py !== poly[j].y > py &&\n px < ((poly[j].x - poly[i].x) * (py - poly[i].y)) / (poly[j].y - poly[i].y) + poly[i].x\n ) {\n inside = !inside;\n }\n }\n\n return inside;\n }\n\n // Checks whether an entire polygon resides within another\n _isLoopInside(child, parent, localRadius) {\n let minX1 = Infinity;\n let maxX1 = -Infinity;\n let minY1 = Infinity;\n let maxY1 = -Infinity;\n\n for (const p of child) {\n if (p.x < minX1) minX1 = p.x;\n if (p.x > maxX1) maxX1 = p.x;\n if (p.y < minY1) minY1 = p.y;\n if (p.y > maxY1) maxY1 = p.y;\n }\n\n let minX2 = Infinity;\n let maxX2 = -Infinity;\n let minY2 = Infinity;\n let maxY2 = -Infinity;\n\n for (const p of parent) {\n if (p.x < minX2) minX2 = p.x;\n if (p.x > maxX2) maxX2 = p.x;\n if (p.y < minY2) minY2 = p.y;\n if (p.y > maxY2) maxY2 = p.y;\n }\n\n const margin = Math.max(localRadius * 1e-4, 1e-5);\n\n // Box rejection filter\n if (minX1 < minX2 - margin || maxX1 > maxX2 + margin || minY1 < minY2 - margin || maxY1 > maxY2 + margin) {\n return false;\n }\n\n let insideCount = 0;\n\n // Verify actual point casting array\n for (let i = 0; i < child.length; i++) {\n if (this._isPointInPoly(child[i], parent)) {\n insideCount++;\n }\n }\n\n // 85% rule avoids rejecting geometry that strictly overlaps edges precisely\n return insideCount >= child.length * 0.85;\n }\n\n // High volume segment calculation extracting lines where geometry intercepts plane\n _calculateMeshSegmentsUndirected(mesh, plane, edgeStats, grid, eps) {\n const geom = mesh.geometry;\n const pos = geom.attributes.position;\n const index = geom.index;\n const world = mesh.matrixWorld;\n const count = index ? index.count : pos.count;\n\n for (let i = 0; i < count; i += 3) {\n const i1 = index ? index.getX(i) : i;\n const i2 = index ? index.getX(i + 1) : i + 1;\n const i3 = index ? index.getX(i + 2) : i + 2;\n\n const v1 = this._vA.fromBufferAttribute(pos, i1).applyMatrix4(world);\n const v2 = this._vB.fromBufferAttribute(pos, i2).applyMatrix4(world);\n const v3 = this._vC.fromBufferAttribute(pos, i3).applyMatrix4(world);\n\n let d1 = plane.distanceToPoint(v1);\n let d2 = plane.distanceToPoint(v2);\n let d3 = plane.distanceToPoint(v3);\n\n if (Math.abs(d1) <= eps) d1 = eps;\n if (Math.abs(d2) <= eps) d2 = eps;\n if (Math.abs(d3) <= eps) d3 = eps;\n\n const s1 = d1 > 0 ? 1 : -1;\n const s2 = d2 > 0 ? 1 : -1;\n const s3 = d3 > 0 ? 1 : -1;\n\n // Discard entirely invisible triangles naturally bypassed by the plane\n if (s1 === s2 && s2 === s3) continue;\n\n const intersections = [];\n\n if (s1 !== s2) {\n intersections.push(new Vector3().lerpVectors(v1, v2, Math.abs(d1) / (Math.abs(d1) + Math.abs(d2))));\n }\n if (s2 !== s3) {\n intersections.push(new Vector3().lerpVectors(v2, v3, Math.abs(d2) / (Math.abs(d2) + Math.abs(d3))));\n }\n if (s3 !== s1) {\n intersections.push(new Vector3().lerpVectors(v3, v1, Math.abs(d3) / (Math.abs(d3) + Math.abs(d1))));\n }\n\n if (intersections.length >= 2) {\n const id1 = grid.add(intersections[0]);\n const id2 = grid.add(intersections[1]);\n\n if (id1 !== id2) {\n const key = id1 < id2 ? `${id1}-${id2}` : `${id2}-${id1}`;\n const stat = edgeStats.get(key) || { count: 0 };\n stat.count++;\n edgeStats.set(key, stat);\n }\n }\n }\n }\n}\n\nexport { SectionsHelper };\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// private by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent, RGB, ResizeEvent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\nimport { SectionsHelper } from \"../helpers/SectionsHelper.js\";\nimport { Object3D } from \"three\";\n\nexport class SectionsComponent implements IComponent {\n private viewer: Viewer;\n private sectionsHelper: SectionsHelper;\n private updateTimerId = 0;\n private updateDelay = 250;\n\n constructor(viewer: Viewer) {\n this.sectionsHelper = new SectionsHelper();\n\n this.viewer = viewer;\n this.viewer.addEventListener(\"initialize\", this.syncHelper);\n this.viewer.addEventListener(\"databasechunk\", this.syncHelper);\n this.viewer.addEventListener(\"drawviewpoint\", this.syncHelper);\n this.viewer.addEventListener(\"changecuttingplanes\", this.syncSections);\n this.viewer.addEventListener(\"explode\", this.syncSections);\n this.viewer.addEventListener(\"hide\", this.syncSections);\n this.viewer.addEventListener(\"isolate\", this.syncSections);\n this.viewer.addEventListener(\"show\", this.syncSections);\n this.viewer.addEventListener(\"showall\", this.syncSections);\n this.viewer.addEventListener(\"resize\", this.viewerResize);\n this.viewer.addEventListener(\"optionschange\", this.syncOptions);\n\n this.syncOptions();\n }\n\n dispose() {\n clearTimeout(this.updateTimerId);\n\n this.sectionsHelper.removeFromParent();\n this.sectionsHelper.dispose();\n\n this.viewer.removeEventListener(\"initialize\", this.syncHelper);\n this.viewer.removeEventListener(\"databasechunk\", this.syncHelper);\n this.viewer.removeEventListener(\"drawviewpoint\", this.syncHelper);\n this.viewer.removeEventListener(\"changecuttingplanes\", this.syncSections);\n this.viewer.removeEventListener(\"explode\", this.syncSections);\n this.viewer.removeEventListener(\"hide\", this.syncSections);\n this.viewer.removeEventListener(\"isolate\", this.syncSections);\n this.viewer.removeEventListener(\"show\", this.syncSections);\n this.viewer.removeEventListener(\"showall\", this.syncSections);\n this.viewer.removeEventListener(\"resize\", this.viewerResize);\n this.viewer.removeEventListener(\"optionschange\", this.syncOptions);\n }\n\n syncOptions = () => {\n function rgbToHex(c: any): string {\n const hex = (v = 0) => v.toString(16).padStart(2, \"0\");\n return \"#\" + hex(c.r) + hex(c.g) + hex(c.b);\n }\n\n const options = this.viewer.options;\n const flags = this.sectionsHelper.flags;\n\n flags.fillEnabled = options.enableSectionFill;\n flags.fillColor = rgbToHex(options.sectionFillColor);\n flags.useObjFillColor = options.sectionUseObjectColor;\n flags.hatchEnabled = options.enableSectionHatch;\n flags.hatchColor = rgbToHex(options.sectionHatchColor);\n flags.hatchScale = options.sectionHatchScale;\n flags.outlineEnabled = options.enableSectionOutline;\n flags.outlineColor = rgbToHex(options.sectionOutlineColor);\n flags.outlineWidth = options.sectionOutlineWidth;\n\n this.syncSections();\n };\n\n syncHelper = () => {\n this.sectionsHelper.removeFromParent();\n this.viewer.helpers.add(this.sectionsHelper);\n };\n\n syncSections = () => {\n this.sectionsHelper.visible = false;\n clearTimeout(this.updateTimerId);\n this.updateTimerId = window.setTimeout(this.updateSections, this.updateDelay);\n };\n\n viewerResize = (event: ResizeEvent) => {\n this.sectionsHelper.setSize(event.width, event.height);\n };\n\n updateSections = () => {\n const objects: Object3D[][] = [];\n this.viewer.models.forEach((model) => objects.push(model.getVisibleObjects()));\n const objects2 = objects.flat();\n\n this.sectionsHelper.update(objects2, this.viewer.extents, this.viewer.clippingPlanes);\n this.sectionsHelper.visible = true;\n this.viewer.update();\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n Camera,\n CylinderGeometry,\n CanvasTexture,\n Color,\n Mesh,\n MeshBasicMaterial,\n Object3D,\n OrthographicCamera,\n Sprite,\n SpriteMaterial,\n SRGBColorSpace,\n Vector4,\n WebGLRenderer,\n} from \"three\";\n\nexport class WCSHelper extends Object3D {\n public camera: Camera;\n private orthoCamera: OrthographicCamera;\n public size: number;\n\n constructor(camera: Camera) {\n super();\n\n (this as any).type = \"WCSHelper\";\n this.camera = camera;\n this.size = 160;\n\n this.orthoCamera = new OrthographicCamera(-2, 2, 2, -2, 0, 4);\n this.orthoCamera.position.set(0, 0, 2);\n\n const matRed = new MeshBasicMaterial({ toneMapped: false, color: \"#dd0000\" });\n const matGreen = new MeshBasicMaterial({ toneMapped: false, color: \"#00dd00\" });\n const matBlue = new MeshBasicMaterial({ toneMapped: false, color: \"#0000dd\" });\n\n const spriteRed = this.getSpriteMaterial(matRed.color, \"X\");\n const spriteGreen = this.getSpriteMaterial(matGreen.color, \"Y\");\n const spriteBlue = this.getSpriteMaterial(matBlue.color, \"Z\");\n\n const lineGeometry = new CylinderGeometry(0.01, 0.01, 1, 3);\n lineGeometry.translate(0, 0.5, 0);\n\n const arrowGeometry = new CylinderGeometry(0, 0.1, 0.25, 12);\n arrowGeometry.translate(0, 0.625, 0);\n\n const axesMap = {\n X: [\n [new Mesh(arrowGeometry, matRed), [0.5, 0, 0], [0, 0, -Math.PI / 2]],\n [new Mesh(lineGeometry, matRed), [0, 0, 0], [0, 0, -Math.PI / 2]],\n [new Sprite(spriteRed), [1.55, 0, 0]],\n ],\n Y: [\n [new Mesh(arrowGeometry, matGreen), [0, 0.5, 0], null],\n [new Mesh(lineGeometry, matGreen), null, null],\n [new Sprite(spriteGreen), [0, 1.55, 0]],\n ],\n Z: [\n [new Mesh(arrowGeometry, matBlue), [0, 0, 0.5], [Math.PI / 2, 0, 0]],\n [new Mesh(lineGeometry, matBlue), null, [Math.PI / 2, 0, 0]],\n [new Sprite(spriteBlue), [0, 0, 1.55]],\n ],\n };\n\n Object.keys(axesMap).forEach((key) => {\n axesMap[key].forEach((objects: any) => {\n const object = objects[0];\n const position = objects[1];\n const rotation = objects[2];\n\n object.name = key;\n if (position) object.position.set(position[0], position[1], position[2]);\n if (rotation) object.rotation.set(rotation[0], rotation[1], rotation[2]);\n object.updateMatrixWorld();\n\n this.add(object);\n });\n });\n }\n\n dispose() {\n this.traverse((object: any) => {\n if (object.geometry) object.geometry.dispose();\n if (object.material) object.material.dispose();\n });\n }\n\n getSpriteMaterial(color: Color, text: string) {\n const canvas = document.createElement(\"canvas\");\n canvas.width = 64;\n canvas.height = 64;\n\n const context = canvas.getContext(\"2d\");\n if (context) {\n context.clearRect(0, 0, 64, 64);\n context.font = \"24px Arial\";\n context.textAlign = \"center\";\n context.fillStyle = color.getStyle();\n context.fillText(text, 32, 41);\n }\n\n const texture = new CanvasTexture(canvas);\n texture.colorSpace = SRGBColorSpace;\n\n return new SpriteMaterial({ map: texture, toneMapped: false });\n }\n\n render(renderer: WebGLRenderer) {\n this.quaternion.copy(this.camera.quaternion).invert();\n this.updateMatrixWorld();\n\n const oldAutoClear = renderer.autoClear;\n const oldClippingPlanes = renderer.clippingPlanes;\n const oldViewport = renderer.getViewport(new Vector4());\n\n renderer.autoClear = false;\n renderer.clippingPlanes = [];\n renderer.setViewport(this.position.x, this.position.y, this.size, this.size);\n renderer.clearDepth();\n renderer.render(this, this.orthoCamera);\n\n renderer.setViewport(oldViewport);\n renderer.clippingPlanes = oldClippingPlanes;\n renderer.autoClear = oldAutoClear;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\nimport { WCSHelper } from \"../helpers/WCSHelper\";\n\nexport class WCSHelperComponent implements IComponent {\n private viewer: Viewer;\n private wcsHelper: WCSHelper;\n\n constructor(viewer: Viewer) {\n this.wcsHelper = new WCSHelper(viewer.camera);\n\n this.viewer = viewer;\n this.viewer.addEventListener(\"databasechunk\", this.syncHelper);\n this.viewer.addEventListener(\"drawviewpoint\", this.syncHelper);\n this.viewer.addEventListener(\"render\", this.viewerRender);\n this.viewer.addEventListener(\"changecameramode\", this.updateHelperCamera);\n }\n\n dispose() {\n this.viewer.removeEventListener(\"databasechunk\", this.syncHelper);\n this.viewer.removeEventListener(\"drawviewpoint\", this.syncHelper);\n this.viewer.removeEventListener(\"render\", this.viewerRender);\n this.viewer.removeEventListener(\"changecameramode\", this.updateHelperCamera);\n\n this.wcsHelper.dispose();\n }\n\n syncHelper = () => {\n this.wcsHelper.dispose();\n this.wcsHelper = new WCSHelper(this.viewer.camera);\n };\n\n viewerRender = () => {\n if (!this.viewer.options.showWCS) return;\n\n this.wcsHelper.render(this.viewer.renderer);\n };\n\n updateHelperCamera = () => {\n this.wcsHelper.camera = this.viewer.camera;\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\n// ===================== AI-CODE-FILE ======================\n// Source: Claude Sonnet 4\n// Date: 2025-09-10\n// Reviewer: vitaly.ivanov@opendesign.com\n// Issue: CLOUD-5835\n// Notes: Originally AI-generated, modified manually 2025-09-11\n// =========================================================\n\nimport { IComponent } from \"@inweb/viewer-core\";\nimport type { Viewer } from \"../Viewer\";\nimport { Vector3 } from \"three\";\n\nexport class ResetComponent implements IComponent {\n private viewer: Viewer;\n private savedCameraPosition: any = null;\n\n constructor(viewer: Viewer) {\n this.viewer = viewer;\n this.viewer.addEventListener(\"databasechunk\", this.onDatabaseChunk);\n this.viewer.on(\"resetview\", this.resetCameraPosition);\n }\n\n dispose() {\n this.viewer.off(\"resetview\", this.resetCameraPosition);\n this.viewer.removeEventListener(\"databasechunk\", this.onDatabaseChunk);\n }\n\n onDatabaseChunk = () => {\n this.savedCameraPosition = {\n position: this.viewer.camera.position.clone(),\n up: this.viewer.camera.up.clone(),\n direction: this.viewer.camera.getWorldDirection(new Vector3()),\n };\n };\n\n resetCameraPosition = () => {\n if (this.savedCameraPosition) {\n this.viewer.camera.position.copy(this.savedCameraPosition.position);\n this.viewer.camera.up.copy(this.savedCameraPosition.up);\n this.viewer.camera.lookAt(this.savedCameraPosition.position.clone().add(this.savedCameraPosition.direction));\n this.viewer.camera.updateProjectionMatrix();\n }\n };\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { IComponentsRegistry, componentsRegistry } from \"@inweb/viewer-core\";\n\nimport { BackgroundComponent } from \"./BackgroundComponent\";\nimport { CameraComponent } from \"./CameraComponent\";\nimport { ExtentsComponent } from \"./ExtentsComponent\";\nimport { LightComponent } from \"./LightComponent\";\nimport { InfoComponent } from \"./InfoComponent\";\nimport { CanvasResizeComponent } from \"./CanvasResizeComponent\";\nimport { CanvasRemoveComponent } from \"./CanvasRemoveComponent\";\nimport { RenderLoopComponent } from \"./RenderLoopComponent\";\nimport { HighlighterComponent } from \"./HighlighterComponent\";\nimport { SelectionComponent } from \"./SelectionComponent\";\nimport { ClippingPlaneComponent } from \"./ClippingPlaneComponent\";\nimport { SectionsComponent } from \"./SectionsComponent\";\nimport { WCSHelperComponent } from \"./WCSHelperComponent\";\nimport { ResetComponent } from \"./ResetComponent\";\n\n/**\n * Viewer components registry. Use this registry to register custom components.\n *\n * To implement custom component:\n *\n * 1. Define a component class implements {@link IComponent}.\n * 2. Define a constructor with a `viewer` parameter and add mouse event listeners for the specified viewer.\n * 3. Define the component logic in the event listeners. For example, listen for the `geometryend` event and\n * implement post-processing logic for the model.\n * 4. Override {@link IComponent.dispose} and remove mouse event listeners from the viewer.\n * 5. Register component provider in the components registry by calling the\n * {@link components.registerComponent}.\n *\n * @example Implementing a custom component.\n *\n * ```javascript\n * import { IComponent, components, Viewer } from \"@inweb/viewer-three\";\n *\n * class MyComponent implements IComponent {\n * protected viewer: Viewer;\n *\n * constructor(viewer: Viewer) {\n * this.viewer = viewer;\n * this.viewer.addEventListener(\"geometryend\", this.onGeometryEnd);\n * }\n *\n * override dispose() {\n * this.viewer.removeEventListener(\"geometryend\", this.onGeometryEnd);\n * }\n *\n * onGeometryEnd = (event: MouseEvent) => {\n * this.viewer.executeCommand(\"zoomToExtents\");\n * };\n * }\n *\n * components.registerComponent(\"MyComponent\", (viewer): IComponent => new MyComponent(viewer));\n * ```\n */\nexport const components: IComponentsRegistry = componentsRegistry(\"threejs\");\n\n// build-in components\n\ncomponents.registerComponent(\"ExtentsComponent\", (viewer) => new ExtentsComponent(viewer));\ncomponents.registerComponent(\"CameraComponent\", (viewer) => new CameraComponent(viewer));\ncomponents.registerComponent(\"BackgroundComponent\", (viewer) => new BackgroundComponent(viewer));\ncomponents.registerComponent(\"LightComponent\", (viewer) => new LightComponent(viewer));\ncomponents.registerComponent(\"InfoComponent\", (viewer) => new InfoComponent(viewer));\ncomponents.registerComponent(\"CanvasResizeComponent\", (viewer) => new CanvasResizeComponent(viewer));\ncomponents.registerComponent(\"CanvasRemoveComponent\", (viewer) => new CanvasRemoveComponent(viewer));\ncomponents.registerComponent(\"RenderLoopComponent\", (viewer) => new RenderLoopComponent(viewer));\ncomponents.registerComponent(\"HighlighterComponent\", (viewer) => new HighlighterComponent(viewer));\ncomponents.registerComponent(\"SelectionComponent\", (viewer) => new SelectionComponent(viewer));\ncomponents.registerComponent(\"ClippingPlaneComponent\", (viewer) => new ClippingPlaneComponent(viewer));\ncomponents.registerComponent(\"SectionsComponent\", (viewer) => new SectionsComponent(viewer));\ncomponents.registerComponent(\"WCSHelperComponent\", (viewer) => new WCSHelperComponent(viewer));\ncomponents.registerComponent(\"ResetComponent\", (viewer) => new ResetComponent(viewer));\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3, Object3D, Vector3 } from \"three\";\nimport { IInfo, Info } from \"@inweb/viewer-core\";\n\nimport { IModelImpl } from \"./IModelImpl\";\nimport { convertUnits } from \"../measurement/UnitConverter\";\nimport { getDisplayUnit } from \"../measurement/UnitFormatter\";\n\nexport class ModelImpl implements IModelImpl {\n public id: string;\n public scene: Object3D;\n\n private handleToObjects: Map<any, Set<Object3D>>;\n private originalObjects: Set<Object3D>;\n\n constructor(scene: Object3D) {\n this.id = \"\";\n this.scene = scene;\n\n this.handleToObjects = new Map();\n this.originalObjects = new Set();\n\n this.scene.traverse((object) => {\n this.originalObjects.add(object);\n\n const handle = object.userData.handle;\n if (!handle) return;\n\n let objects = this.handleToObjects.get(handle);\n if (!objects) {\n objects = new Set();\n this.handleToObjects.set(handle, objects);\n }\n\n objects.add(object);\n });\n }\n\n dispose() {\n function disposeMaterial(material: any) {\n // if (material.alphaMap) material.alphaMap.dispose();\n // if (material.anisotropyMap) material.anisotropyMap.dispose();\n // if (material.aoMap) material.aoMap.dispose();\n // if (material.bumpMap) material.bumpMap.dispose();\n // if (material.clearcoatMap) material.clearcoatMap.dispose();\n // if (material.clearcoatNormalMap) material.clearcoatNormalMap.dispose();\n // if (material.clearcoatRoughnessMap) material.clearcoatRoughnessMap.dispose();\n // if (material.displacementMap) material.displacementMap.dispose();\n // if (material.emissiveMap) material.emissiveMap.dispose();\n // if (material.gradientMap) material.gradientMap.dispose();\n // if (material.envMap) material.envMap.dispose();\n // if (material.iridescenceMap) material.iridescenceMap.dispose();\n // if (material.lightMap) material.lightMap.dispose();\n // if (material.map) material.map.dispose();\n // if (material.metalnessMap) material.metalnessMap.dispose();\n // if (material.normalMap) material.normalMap.dispose();\n // if (material.roughnessMap) material.roughnessMap.dispose();\n // if (material.sheenColorMap) material.sheenColorMap.dispose();\n // if (material.sheenRoughnessMap) material.sheenRoughnessMap.dispose();\n // if (material.specularMap) material.specularMap.dispose();\n // if (material.thicknessMap) material.thicknessMap.dispose();\n // if (material.transmissionMap) material.transmissionMap.dispose();\n material.dispose();\n }\n\n function disposeMaterials(material: any) {\n const materials = Array.isArray(material) ? material : [material];\n materials.forEach((material: any) => disposeMaterial(material));\n }\n\n function disposeObject(object: any) {\n if (object.geometry) object.geometry.dispose();\n if (object.material) disposeMaterials(object.material);\n }\n\n this.handleToObjects.clear();\n this.originalObjects.clear();\n\n this.scene.traverse(disposeObject);\n this.scene.clear();\n }\n\n getUnits(): string {\n return \"Meters\";\n }\n\n getUnitScale(): number {\n return convertUnits(this.getUnits(), \"Meters\", 1);\n }\n\n getUnitString(): string {\n return getDisplayUnit(this.getUnits());\n }\n\n getPrecision(): number {\n return 2;\n }\n\n getInfo(): IInfo {\n // ===================== AI-CODE-START ======================\n // Source: Claude Sonnet 4.5\n // Date: 2025-10-02\n // Reviewer: roman.mochalov@opendesign.com\n // Issue: CLOUD-5738\n\n const geometries = new Set();\n const materials = new Set();\n const textures = new Set();\n\n let totalObjects = 0;\n let totalTriangles = 0;\n let totalPoints = 0;\n let totalLines = 0;\n let totalEdges = 0;\n let geometryBytes = 0;\n let textureBytes = 0;\n\n this.scene.traverse((object: any) => {\n totalObjects++;\n\n if (object.geometry) {\n const geometry = object.geometry;\n\n if (!geometries.has(geometry)) {\n geometries.add(geometry);\n\n if (geometry.attributes) {\n for (const name in geometry.attributes) {\n const attribute = geometry.attributes[name];\n if (attribute && attribute.array) {\n geometryBytes += attribute.array.byteLength;\n }\n }\n }\n\n if (geometry.index && geometry.index.array) {\n geometryBytes += geometry.index.array.byteLength;\n }\n }\n\n if (geometry.index) {\n const indexCount = geometry.index.count;\n\n if (object.isLine || object.isLineSegments) {\n totalLines += indexCount / 2;\n } else if (object.isPoints) {\n totalPoints += indexCount;\n } else {\n totalTriangles += indexCount / 3;\n }\n } else if (geometry.attributes && geometry.attributes.position) {\n const positionCount = geometry.attributes.position.count;\n\n if (object.isLine || object.isLineSegments) {\n totalLines += positionCount / 2;\n } else if (object.isPoints) {\n totalPoints += positionCount;\n } else {\n totalTriangles += positionCount / 3;\n }\n }\n\n if (object.isLineSegments && geometry.attributes.position) {\n totalEdges += geometry.attributes.position.count / 2;\n }\n }\n\n if (object.material) {\n const materialsArray = Array.isArray(object.material) ? object.material : [object.material];\n\n materialsArray.forEach((material: any) => {\n materials.add(material);\n\n if (material.map && !textures.has(material.map)) {\n textures.add(material.map);\n textureBytes += estimateTextureSize(material.map);\n }\n\n const textureProps = [\n \"alphaMap\",\n \"aoMap\",\n \"bumpMap\",\n \"displacementMap\",\n \"emissiveMap\",\n \"envMap\",\n \"lightMap\",\n \"metalnessMap\",\n \"normalMap\",\n \"roughnessMap\",\n \"specularMap\",\n \"clearcoatMap\",\n \"clearcoatNormalMap\",\n \"clearcoatRoughnessMap\",\n \"iridescenceMap\",\n \"sheenColorMap\",\n \"sheenRoughnessMap\",\n \"thicknessMap\",\n \"transmissionMap\",\n \"anisotropyMap\",\n \"gradientMap\",\n ];\n\n textureProps.forEach((prop) => {\n const texture = material[prop];\n if (texture && !textures.has(texture)) {\n textures.add(texture);\n textureBytes += estimateTextureSize(texture);\n }\n });\n });\n }\n });\n\n function estimateTextureSize(texture: any): number {\n if (!texture.image) return 0;\n\n const width = texture.image.width || 0;\n const height = texture.image.height || 0;\n\n // Estimate bytes per pixel (RGBA = 4 bytes)\n const bytesPerPixel = 4;\n\n // Account for mipmaps (adds ~33% more memory)\n const mipmapMultiplier = texture.generateMipmaps ? 1.33 : 1;\n\n return width * height * bytesPerPixel * mipmapMultiplier;\n }\n\n // ===================== AI-CODE-END ======================\n\n const info = new Info();\n\n info.scene.objects = totalObjects;\n info.scene.triangles = Math.floor(totalTriangles);\n info.scene.points = Math.floor(totalPoints);\n info.scene.lines = Math.floor(totalLines);\n info.scene.edges = Math.floor(totalEdges);\n\n info.memory.geometries = geometries.size;\n info.memory.geometryBytes = geometryBytes;\n info.memory.optimizedGeometryBytes = 0;\n info.memory.textures = textures.size;\n info.memory.textureBytes = Math.floor(textureBytes);\n info.memory.materials = materials.size;\n info.memory.totalEstimatedGpuBytes = geometryBytes + Math.floor(textureBytes);\n\n info.optimizedScene.objects = info.scene.objects;\n info.optimizedScene.triangles = info.scene.triangles;\n info.optimizedScene.points = info.scene.points;\n info.optimizedScene.lines = info.scene.lines;\n info.optimizedScene.edges = info.scene.edges;\n\n return info;\n }\n\n getExtents(target: Box3): Box3 {\n const _box = new Box3();\n\n function expandByObject(object: any, target: Box3) {\n if (!object.geometry) return;\n\n object.updateWorldMatrix(false, false);\n\n // Use object bounds for the BatchedMesh, InstancedMesh and SkinnedMesh, use geometry\n // bounds for others. See Box3.expandByObject() for more details.\n\n if (object.boundingBox !== undefined) {\n if (object.boundingBox === null) object.computeBoundingBox();\n _box.copy(object.boundingBox);\n } else {\n if (object.geometry.boundingBox === null) object.geometry.computeBoundingBox();\n _box.copy(object.geometry.boundingBox);\n }\n\n _box.applyMatrix4(object.matrixWorld);\n\n target.union(_box);\n }\n\n this.scene.traverseVisible((object) => expandByObject(object, target));\n return target;\n }\n\n getObjects(): Object3D[] {\n return Array.from(this.originalObjects);\n }\n\n getVisibleObjects(): Object3D[] {\n const objects: Object3D[] = [];\n this.scene.traverseVisible((object) => object.userData.handle && objects.push(object));\n return objects;\n }\n\n getObjectsByHandles(handles: string | string[]): Object3D[] {\n if (!Array.isArray(handles)) handles = [handles];\n\n const ownHandles: string[] = [];\n handles.forEach((handle) => {\n const index = handle.indexOf(\":\");\n if (index !== -1) {\n if (handle.slice(0, index) !== this.id) return;\n handle = handle.slice(index + 1);\n }\n ownHandles.push(handle);\n });\n\n const handlesSet = new Set<string>(ownHandles);\n\n const objects: Object3D[][] = [];\n handlesSet.forEach((handle) => {\n objects.push(Array.from(this.handleToObjects.get(handle) || []));\n });\n\n return objects.flat();\n }\n\n getHandlesByObjects(objects: Object3D | Object3D[]): string[] {\n if (!Array.isArray(objects)) objects = [objects];\n\n const handleSet = new Set<string>();\n objects\n .filter((object) => this.originalObjects.has(object))\n .forEach((object) => {\n handleSet.add(`${this.id}:${object.userData.handle}`);\n });\n\n return Array.from(handleSet);\n }\n\n hideObjects(objects: Object3D | Object3D[]): this {\n if (!Array.isArray(objects)) objects = [objects];\n\n objects\n .filter((object) => this.originalObjects.has(object))\n .forEach((object) => {\n object.visible = false;\n });\n\n return this;\n }\n\n hideAllObjects(): this {\n return this.isolateObjects([]);\n }\n\n isolateObjects(objects: Object3D | Object3D[]): this {\n if (!Array.isArray(objects)) objects = [objects];\n\n const visibleSet = new Set(objects);\n objects\n .filter((object) => this.originalObjects.has(object))\n .forEach((object) => {\n object.traverseAncestors((parent) => visibleSet.add(parent));\n });\n\n this.scene.traverse((object) => (object.visible = visibleSet.has(object)));\n\n return this;\n }\n\n showObjects(objects: Object3D | Object3D[]): this {\n if (!Array.isArray(objects)) objects = [objects];\n\n objects\n .filter((object) => this.originalObjects.has(object))\n .forEach((object) => {\n object.visible = true;\n object.traverseAncestors((parent) => (parent.visible = true));\n });\n\n return this;\n }\n\n showAllObjects(): this {\n this.scene.traverse((object) => (object.visible = true));\n return this;\n }\n\n highlightObjects(objects: Object3D | Object3D[]): this {\n return this;\n }\n\n unhighlightObjects(objects: Object3D | Object3D[]): this {\n return this;\n }\n\n explode(scale = 0, coeff = 4): this {\n const centersCache = new Map();\n\n const calcObjectCenter = (object: Object3D, target: Vector3): Vector3 => {\n const extents = new Box3().setFromObject(object);\n\n const handle = object.userData.handle;\n if (!handle) return extents.getCenter(target);\n\n const center = centersCache.get(handle);\n if (center) return target.copy(center);\n\n const objects = this.getObjectsByHandles(handle);\n objects.forEach((x: Object3D) => extents.expandByObject(x));\n extents.getCenter(target);\n\n centersCache.set(handle, target.clone());\n\n return target;\n };\n\n const calcObjectOffset = (object: Object3D, target: Vector3): Vector3 => {\n const parent = object.parent;\n if (!parent || parent.userData.originalCenter === undefined) return target;\n\n return target.subVectors(object.userData.originalCenter, parent.userData.originalCenter);\n };\n\n const calcObjectDepth = (object: Object3D): number => {\n if (object.userData.depth !== undefined) return object.userData.depth;\n\n const parent = object.parent;\n const depth = parent && object !== explodeRoot ? calcObjectDepth(parent) + 1 : 0;\n\n object.userData.depth = depth;\n object.userData.originalPosition = object.position.clone();\n object.userData.originalCenter = calcObjectCenter(object, new Vector3());\n object.userData.originalOffset = calcObjectOffset(object, new Vector3());\n\n return depth;\n };\n\n const explodeScale = scale / 100;\n const explodeRoot = this.scene;\n const explodeObjects = this.getObjects();\n\n if (explodeRoot.userData.explodeDepth === undefined) {\n let maxDepth = 0;\n\n explodeObjects.forEach((object: Object3D) => {\n const depth = calcObjectDepth(object);\n if (depth > maxDepth) maxDepth = depth;\n });\n\n explodeRoot.userData.explodeDepth = maxDepth;\n }\n\n const maxDepth = explodeRoot.userData.explodeDepth;\n const scaledExplodeDepth = explodeScale * maxDepth + 1;\n const explodeDepth = 0 | scaledExplodeDepth;\n const currentSegmentFraction = scaledExplodeDepth - explodeDepth;\n\n const explodeObject = (object: any) => {\n if (object.isCamera) return;\n\n object.position.copy(object.userData.originalPosition);\n\n const depth = object.userData.depth;\n\n if (depth > 0 && depth <= explodeDepth) {\n let objectScale = explodeScale * coeff;\n if (depth === explodeDepth) objectScale *= currentSegmentFraction;\n\n object.position.addScaledVector(object.userData.originalOffset, objectScale);\n }\n };\n\n explodeObjects.forEach((object: Object3D) => {\n explodeObject(object);\n });\n\n this.scene.updateMatrixWorld();\n\n return this;\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Box3, Matrix4, Object3D, Vector3 } from \"three\";\nimport { IInfo, Info } from \"@inweb/viewer-core\";\n\nimport { ModelImpl } from \"../../models/ModelImpl\";\nimport { DynamicGltfLoader } from \"./DynamicGltfLoader.js\";\n\n// Dynamic model implementation.\n\nexport class DynamicModelImpl extends ModelImpl {\n public gltfLoader: DynamicGltfLoader;\n\n override getInfo(): IInfo {\n const stats = this.gltfLoader.getStats();\n\n const info = new Info();\n\n info.scene.objects = stats.scene.beforeOptimization.objects;\n info.scene.triangles = stats.scene.beforeOptimization.triangles;\n info.scene.lines = stats.scene.beforeOptimization.lines;\n info.scene.edges = stats.scene.beforeOptimization.edges;\n\n info.optimizedScene.objects = stats.scene.afterOptimization.objects;\n info.optimizedScene.triangles = stats.scene.afterOptimization.triangles;\n info.optimizedScene.lines = stats.scene.afterOptimization.lines;\n info.optimizedScene.edges = stats.scene.afterOptimization.edges;\n\n info.memory.geometries = stats.memory.geometries.count;\n info.memory.geometryBytes = stats.memory.geometries.bytes;\n info.memory.optimizedGeometryBytes = stats.memory.geometries.optimizedBytes;\n info.memory.textures = stats.memory.textures.count;\n info.memory.materials = stats.memory.materials.count;\n info.memory.totalEstimatedGpuBytes = stats.memory.totalEstimatedGpuBytes;\n\n return info;\n }\n\n override getExtents(target: Box3): Box3 {\n return target.union(this.gltfLoader.getTotalGeometryExtent());\n }\n\n override getObjects(): Object3D[] {\n const objects: Object3D[] = [];\n this.gltfLoader.originalObjects.forEach((object: Object3D) => {\n objects.push(object);\n });\n return objects;\n }\n\n override getVisibleObjects(): Object3D[] {\n return this.gltfLoader.getOriginalObjectForSelect();\n }\n\n override getObjectsByHandles(handles: string | string[]): Object3D[] {\n if (!Array.isArray(handles)) handles = [handles];\n\n const handlesSet = new Set(handles);\n\n const objects: Object3D[] = [];\n handlesSet.forEach((handle) => {\n objects.push(this.gltfLoader.getObjectsByHandle(handle));\n });\n\n return objects.flat();\n }\n\n override getHandlesByObjects(objects: Object3D | Object3D[]): string[] {\n if (!Array.isArray(objects)) objects = [objects];\n\n const handleSet = new Set<string>();\n objects\n .filter((object) => this.gltfLoader.originalObjects.has(object))\n .forEach((object) => {\n handleSet.add(object.userData.handle);\n });\n\n return Array.from(handleSet);\n }\n\n override hideObjects(objects: Object3D | Object3D[]): this {\n const handles = this.getHandlesByObjects(objects);\n this.gltfLoader.hideObjects(handles);\n return this;\n }\n\n override isolateObjects(objects: Object3D | Object3D[]): this {\n const handles = this.getHandlesByObjects(objects);\n this.gltfLoader.isolateObjects(new Set(handles));\n return this;\n }\n\n override showObjects(objects: Object3D | Object3D[]): this {\n const handles = this.getHandlesByObjects(objects);\n this.gltfLoader.showObjects(handles);\n return this;\n }\n\n override showAllObjects(): this {\n this.gltfLoader.showAllHiddenObjects();\n return this;\n }\n\n override highlightObjects(objects: Object3D | Object3D[]): this {\n this.gltfLoader.showOriginalObjects(objects);\n return this;\n }\n\n override unhighlightObjects(objects: Object3D | Object3D[]): this {\n this.gltfLoader.hideOriginalObjects(objects);\n return this;\n }\n\n override explode(scale = 0, coeff = 4): this {\n const centersCache = new Map();\n\n const calcObjectCenter = (object: Object3D, target: Vector3): Vector3 => {\n const extents = new Box3().setFromObject(object);\n\n const handle = object.userData.handle;\n if (!handle) return extents.getCenter(target);\n\n const center = centersCache.get(handle);\n if (center) return target.copy(center);\n\n const objects = this.getObjectsByHandles(handle);\n objects.forEach((x: Object3D) => extents.expandByObject(x));\n extents.getCenter(target);\n\n centersCache.set(handle, target.clone());\n\n return target;\n };\n\n const calcObjectOffset = (object: Object3D, target: Vector3): Vector3 => {\n const parent = object.parent;\n if (!parent || parent.userData.originalCenter === undefined) return target;\n\n return target.subVectors(object.userData.originalCenter, parent.userData.originalCenter);\n };\n\n const calcObjectDepth = (object: Object3D): number => {\n if (object.userData.depth !== undefined) return object.userData.depth;\n\n const parent = object.parent;\n const depth = parent && object !== explodeRoot ? calcObjectDepth(parent) + 1 : 0;\n\n object.userData.depth = depth;\n object.userData.originalPosition = object.position.clone();\n object.userData.originalCenter = calcObjectCenter(object, new Vector3());\n object.userData.originalOffset = calcObjectOffset(object, new Vector3());\n\n return depth;\n };\n\n const explodeScale = scale / 100;\n const explodeRoot = this.scene.children[0];\n const explodeObjects = this.getObjects();\n\n if (explodeRoot.userData.explodeDepth === undefined) {\n let maxDepth = 0;\n\n explodeObjects.forEach((object: Object3D) => {\n const depth = calcObjectDepth(object);\n if (depth > maxDepth) maxDepth = depth;\n });\n\n explodeRoot.userData.explodeDepth = maxDepth;\n }\n\n const maxDepth = explodeRoot.userData.explodeDepth;\n const scaledExplodeDepth = explodeScale * maxDepth + 1;\n const explodeDepth = 0 | scaledExplodeDepth;\n const currentSegmentFraction = scaledExplodeDepth - explodeDepth;\n\n const offsetCache = new Map();\n\n const calcExplodeOffset = (object: Object3D, target: Vector3): Vector3 => {\n if (offsetCache.has(object)) return target.copy(offsetCache.get(object));\n\n const parent = object.parent;\n if (parent && object !== explodeRoot) calcExplodeOffset(parent, target);\n\n const depth = object.userData.depth;\n\n if (depth > 0 && depth <= explodeDepth) {\n let objectScale = explodeScale * coeff;\n if (depth === explodeDepth) objectScale *= currentSegmentFraction;\n\n target.addScaledVector(object.userData.originalOffset, objectScale);\n }\n\n offsetCache.set(object, target.clone());\n\n return target;\n };\n\n const transformMap = new Map();\n\n explodeObjects.forEach((object: Object3D) => {\n const offset = calcExplodeOffset(object, new Vector3());\n transformMap.set(object, new Matrix4().makeTranslation(offset));\n });\n\n this.gltfLoader.applyObjectTransforms(transformMap);\n this.scene.updateMatrixWorld();\n\n return this;\n }\n}\n","import {\n TextureLoader,\n BufferAttribute,\n Color,\n DoubleSide,\n MeshPhongMaterial,\n MeshStandardMaterial,\n PointsMaterial,\n LineBasicMaterial,\n RepeatWrapping,\n ClampToEdgeWrapping,\n MirroredRepeatWrapping,\n NearestFilter,\n NearestMipmapNearestFilter,\n NearestMipmapLinearFilter,\n LinearFilter,\n LinearMipmapNearestFilter,\n LinearMipmapLinearFilter,\n SRGBColorSpace,\n} from \"three\";\n\nconst GL_TO_THREE_WRAP = {\n 33071: ClampToEdgeWrapping,\n 33648: MirroredRepeatWrapping,\n 10497: RepeatWrapping,\n};\n\nconst GL_TO_THREE_FILTER = {\n 9728: NearestFilter,\n 9729: LinearFilter,\n 9984: NearestMipmapNearestFilter,\n 9985: LinearMipmapNearestFilter,\n 9986: NearestMipmapLinearFilter,\n 9987: LinearMipmapLinearFilter,\n};\n\nexport const GL_COMPONENT_TYPES = {\n 5120: Int8Array,\n 5121: Uint8Array,\n 5122: Int16Array,\n 5123: Uint16Array,\n 5125: Uint32Array,\n 5126: Float32Array,\n};\n\nexport const GL_CONSTANTS = {\n FLOAT: 5126,\n //FLOAT_MAT2: 35674,\n FLOAT_MAT3: 35675,\n FLOAT_MAT4: 35676,\n FLOAT_VEC2: 35664,\n FLOAT_VEC3: 35665,\n FLOAT_VEC4: 35666,\n LINEAR: 9729,\n REPEAT: 10497,\n SAMPLER_2D: 35678,\n POINTS: 0,\n LINES: 1,\n LINE_LOOP: 2,\n LINE_STRIP: 3,\n TRIANGLES: 4,\n TRIANGLE_STRIP: 5,\n TRIANGLE_FAN: 6,\n UNSIGNED_BYTE: 5121,\n UNSIGNED_SHORT: 5123,\n};\n\nconst MAX_GAP = 128 * 1024; // 128 KB\nconst MAX_CHUNK = 30 * 1024 * 1024; // 100 MB\n\nexport class GltfStructure {\n constructor(id, loadController) {\n this.id = `${id}`;\n this.json = null;\n this.loadController = loadController;\n this.loader = null;\n this.batchDelay = 10;\n this.maxBatchSize = 5 * 1024 * 1024;\n this.maxRangesPerRequest = 512;\n this.pendingRequests = [];\n this.batchTimeout = null;\n this.textureLoader = new TextureLoader();\n this.textureLoader.crossOrigin = \"anonymous\";\n this.materials = new Map();\n this.textureCache = new Map();\n this.materialCache = new Map();\n this.uri = \"\";\n this._nextObjectId = 1;\n this.loadingAborted = false;\n this.criticalError = null;\n // Holds decoded base64 buffer when the .gltf has an embedded data URI\n this.embeddedBinaryChunk = null;\n }\n\n async initialize(loader) {\n const json = await this.loadController.loadJson();\n\n if (json.asset === undefined || json.asset.version[0] < 2) {\n throw new Error(\"DynamicLoader: Unsupported asset. glTF versions >=2.0 are supported.\");\n }\n\n this.json = json;\n this.loader = loader;\n\n const bufferUri = this.json.buffers?.[0]?.uri || \"\";\n\n // Detect embedded data URI (e.g. \"data:application/octet-stream;base64,...\")\n // and decode it once into memory. The buffer URI is then cleared so that\n // scheduleRequest serves data from memory instead of doing network requests.\n if (bufferUri.startsWith(\"data:\")) {\n this.embeddedBinaryChunk = await this._decodeDataUri(bufferUri);\n this.uri = \"\";\n } else {\n this.uri = bufferUri;\n }\n }\n\n // Decode a data URI to ArrayBuffer using the browser's native fetch() —\n // much faster than atob() + JS loop for large (10+ MB) base64 buffers.\n async _decodeDataUri(dataUri) {\n try {\n const response = await fetch(dataUri);\n return await response.arrayBuffer();\n } catch (e) {\n throw new Error(`DynamicLoader: Failed to decode embedded data URI: ${e.message}`);\n }\n }\n\n clear() {\n if (this.batchTimeout) {\n clearTimeout(this.batchTimeout);\n this.batchTimeout = null;\n }\n\n this._rejectPendingRequests();\n\n if (this.disposeMaterials) {\n try {\n this.disposeMaterials();\n } catch (e) {\n console.warn(\"DynamicLoader: error during disposeMaterials in clear():\", e);\n }\n }\n if (this.textureCache) this.textureCache.clear();\n if (this.materials) this.materials.clear();\n\n this.embeddedBinaryChunk = null;\n this.json = null;\n this.loadController = null;\n this.uri = \"\";\n\n this.activeChunkLoads = 0;\n this.chunkQueue = [];\n this.loadingAborted = false;\n this.criticalError = null;\n }\n\n _rejectPendingRequests() {\n const pending = this.pendingRequests;\n this.pendingRequests = [];\n if (!pending || pending.length === 0) return;\n\n const cancelError = new Error(\"DynamicLoader: Structure cleared while requests pending\");\n for (let i = 0; i < pending.length; i++) {\n const item = pending[i];\n if (item && typeof item._reject === \"function\") {\n try {\n item._reject(cancelError);\n } catch {\n // Consumer may have already been disposed\n }\n }\n }\n }\n\n getJson() {\n return this.json;\n }\n\n scheduleRequest(request) {\n // Fast path: buffer was an embedded data URI, decoded once into memory\n if (this.embeddedBinaryChunk && !this.uri) {\n return Promise.resolve({\n buffer: this.embeddedBinaryChunk,\n relOffset: request.offset,\n length: request.length,\n });\n }\n\n return new Promise((resolve, reject) => {\n if (this.loadingAborted) {\n reject(\n this.criticalError || new Error(\"DynamicLoader: Structure loading has been aborted due to critical error\")\n );\n return;\n }\n this.pendingRequests.push({\n ...request,\n _resolve: resolve,\n _reject: reject,\n });\n });\n }\n\n isCriticalHttpError(error) {\n if (!error) return false;\n\n const status = error.status || error.statusCode || error.code;\n\n if (typeof status === \"number\") {\n return status >= 400 && status < 600;\n }\n\n if (error.message) {\n const match = error.message.match(/HTTP\\s+(\\d{3})/i);\n if (match) {\n const code = parseInt(match[1], 10);\n return code >= 400 && code < 600;\n }\n }\n\n return false;\n }\n\n abortLoading(error) {\n if (this.loadingAborted) {\n return;\n }\n\n this.loadingAborted = true;\n this.criticalError = error;\n\n const requests = [...this.pendingRequests];\n this.pendingRequests = [];\n\n for (const req of requests) {\n if (req._reject) {\n req._reject(error);\n }\n }\n\n console.error(\n `DynamicLoader: Critical error for structure \"${this.id}\". All further loading aborted.`,\n `\\n Error: ${error.message || error}`,\n `\\n Rejected ${requests.length} pending chunk requests.`\n );\n\n throw error;\n }\n\n async flushBufferRequests() {\n if (!this.pendingRequests || this.pendingRequests.length === 0) return;\n const requests = [...this.pendingRequests];\n this.pendingRequests = [];\n\n requests.sort((a, b) => a.offset - b.offset);\n const mergedRanges = [];\n let current = {\n start: requests[0].offset,\n end: requests[0].offset + requests[0].length,\n requests: [requests[0]],\n };\n for (let i = 1; i < requests.length; i++) {\n const req = requests[i];\n const gap = req.offset - current.end;\n const newEnd = Math.max(current.end, req.offset + req.length);\n const projectedSize = newEnd - current.start;\n if (gap <= MAX_GAP && projectedSize <= MAX_CHUNK) {\n current.end = newEnd;\n current.requests.push(req);\n } else {\n mergedRanges.push(current);\n current = {\n start: req.offset,\n end: req.offset + req.length,\n requests: [req],\n };\n }\n }\n mergedRanges.push(current);\n const finalRanges = [];\n for (const range of mergedRanges) {\n let { start, end, requests } = range;\n while (end - start > MAX_CHUNK) {\n let splitIdx = 0;\n for (let i = 0; i < requests.length; i++) {\n if (requests[i].offset + requests[i].length - start > MAX_CHUNK) {\n break;\n }\n splitIdx = i;\n }\n const chunkRequests = requests.slice(0, splitIdx + 1);\n const chunkEnd =\n chunkRequests[chunkRequests.length - 1].offset + chunkRequests[chunkRequests.length - 1].length;\n finalRanges.push({\n start,\n end: chunkEnd,\n requests: chunkRequests,\n });\n requests = requests.slice(splitIdx + 1);\n if (requests.length > 0) {\n start = requests[0].offset;\n end = requests[0].offset + requests[0].length;\n for (let i = 1; i < requests.length; i++) {\n end = Math.max(end, requests[i].offset + requests[i].length);\n }\n }\n }\n if (requests.length > 0) {\n finalRanges.push({ start, end, requests });\n }\n }\n\n const promises = finalRanges.map(async (range, index) => {\n if (this.loadingAborted) {\n for (const req of range.requests) {\n req._reject(this.criticalError || new Error(\"DynamicLoader: Structure loading aborted\"));\n }\n return;\n }\n\n await this.loader.waitForChunkSlot();\n\n try {\n const length = range.end - range.start;\n const buffer = await this.loadController.loadBinaryData([{ offset: range.start, length }], this.uri);\n\n for (const req of range.requests) {\n const relOffset = req.offset - range.start;\n try {\n req._resolve({ buffer, relOffset, length: req.length });\n } catch (e) {\n req._reject(e);\n }\n }\n } catch (error) {\n for (const req of range.requests) {\n req._reject(error);\n }\n\n if (this.isCriticalHttpError(error)) {\n this.abortLoading(error);\n } else {\n console.warn(\n `DynamicLoader: Failed to load chunk ${index + 1}/${finalRanges.length} (${range.start}-${range.end}):`,\n error\n );\n }\n } finally {\n this.loader.releaseChunkSlot();\n }\n });\n\n await Promise.all(promises);\n\n this.pendingRequests = [];\n }\n\n getBufferView(byteOffset, byteLength, componentType) {\n return this.scheduleRequest({\n offset: byteOffset,\n length: byteLength,\n componentType,\n });\n }\n\n createTypedArray(buffer, offset, length, componentType) {\n try {\n if (!buffer || !(buffer instanceof ArrayBuffer)) {\n throw new Error(\"DynamicLoader: Invalid buffer\");\n }\n\n let elementSize;\n switch (componentType) {\n case 5120:\n case 5121:\n elementSize = 1;\n break; // BYTE, UNSIGNED_BYTE\n case 5122:\n case 5123:\n elementSize = 2;\n break; // SHORT, UNSIGNED_SHORT\n case 5125:\n case 5126:\n elementSize = 4;\n break; // UNSIGNED_INT, FLOAT\n default:\n throw new Error(`DynamicLoader: Unsupported component type: ${componentType}`);\n }\n\n const numElements = length / elementSize;\n if (!Number.isInteger(numElements)) {\n throw new Error(`DynamicLoader: Invalid length ${length} for component type ${componentType}`);\n }\n\n if (length > buffer.byteLength) {\n throw new Error(\n `DynamicLoader: Buffer too small: need ${length} bytes, but buffer is ${buffer.byteLength} bytes`\n );\n }\n\n const ArrayType = GL_COMPONENT_TYPES[componentType];\n return new ArrayType(buffer, offset, numElements);\n } catch (error) {\n if (error.name !== \"AbortError\") {\n console.warn(\"DynamicLoader: Error creating typed array:\", {\n bufferSize: buffer?.byteLength,\n offset,\n length,\n componentType,\n error,\n });\n }\n throw error;\n }\n }\n\n async createBufferAttribute(accessorIndex) {\n if (!this.json) {\n throw new Error(\"DynamicLoader: No GLTF structure loaded\");\n }\n\n const gltf = this.json;\n const accessor = gltf.accessors[accessorIndex];\n const bufferView = gltf.bufferViews[accessor.bufferView];\n\n try {\n const byteOffset = (bufferView.byteOffset || 0) + (accessor.byteOffset || 0);\n const components = this.getNumComponents(accessor.type);\n const count = accessor.count;\n const byteLength = count * components * this.getComponentSize(accessor.componentType);\n\n const array = await this.getBufferView(byteOffset, byteLength, accessor.componentType);\n\n const attribute = new BufferAttribute(array, components);\n\n if (accessor.min !== undefined) attribute.min = accessor.min;\n if (accessor.max !== undefined) attribute.max = accessor.max;\n\n return attribute;\n } catch (error) {\n if (error.name !== \"AbortError\") {\n console.warn(\"DynamicLoader: Error creating buffer attribute:\", {\n error,\n accessor,\n bufferView,\n });\n }\n\n throw error;\n }\n }\n\n getComponentSize(componentType) {\n switch (componentType) {\n case 5120: // BYTE\n case 5121: // UNSIGNED_BYTE\n return 1;\n case 5122: // SHORT\n case 5123: // UNSIGNED_SHORT\n return 2;\n case 5125: // UNSIGNED_INT\n case 5126: // FLOAT\n return 4;\n default:\n throw new Error(`DynamicLoader: Unknown component type: ${componentType}`);\n }\n }\n\n getNumComponents(type) {\n switch (type) {\n case \"SCALAR\":\n return 1;\n case \"VEC2\":\n return 2;\n case \"VEC3\":\n return 3;\n case \"VEC4\":\n return 4;\n case \"MAT2\":\n return 4;\n case \"MAT3\":\n return 9;\n case \"MAT4\":\n return 16;\n default:\n throw new Error(`DynamicLoader: Unknown type: ${type}`);\n }\n }\n\n async loadTextures() {\n if (!this.json.textures) return;\n\n const loadTexture = async (imageIndex) => {\n let textureName = `index_${imageIndex}`;\n try {\n const image = this.json.images[imageIndex];\n textureName = image.uri || image.name || textureName;\n\n if (image.uri) {\n const fullUrl = await this.loadController.resolveURL(image.uri);\n return await this.textureLoader.loadAsync(fullUrl);\n } else if (image.bufferView !== undefined) {\n const bufferView = this.json.bufferViews[image.bufferView];\n const { buffer, relOffset } = await this.getBufferView(\n bufferView.byteOffset || 0,\n bufferView.byteLength,\n 5121\n );\n const imageBytes = new Uint8Array(buffer, relOffset, bufferView.byteLength);\n const blob = new Blob([imageBytes], { type: image.mimeType });\n const url = URL.createObjectURL(blob);\n const texture = await this.textureLoader.loadAsync(url);\n URL.revokeObjectURL(url);\n return texture;\n }\n } catch {\n console.warn(`DynamicLoader: Error loading texture ${textureName}`);\n }\n };\n\n const texturePromises = [];\n for (let i = 0; i < this.json.textures.length; i++) {\n texturePromises.push(\n loadTexture(this.json.textures[i].source).then((texture) => {\n if (texture) {\n // Apply sampler settings, mapping WebGL constants to Three.js constants\n const samplerDef =\n this.json.textures[i].sampler !== undefined && this.json.samplers\n ? this.json.samplers[this.json.textures[i].sampler]\n : {};\n\n texture.magFilter = GL_TO_THREE_FILTER[samplerDef.magFilter] || LinearFilter;\n texture.minFilter = GL_TO_THREE_FILTER[samplerDef.minFilter] || LinearMipmapLinearFilter;\n\n // glTF spec: default wrap is REPEAT (10497) when not specified\n texture.wrapS = GL_TO_THREE_WRAP[samplerDef.wrapS] || RepeatWrapping;\n texture.wrapT = GL_TO_THREE_WRAP[samplerDef.wrapT] || RepeatWrapping;\n\n // glTF textures use non-flipped Y convention\n texture.flipY = false;\n texture.needsUpdate = true;\n }\n this.textureCache.set(i, texture);\n })\n );\n }\n await this.flushBufferRequests();\n await Promise.all(texturePromises);\n }\n\n loadMaterials() {\n if (!this.json.materials) return this.materials;\n\n for (let i = 0; i < this.json.materials.length; i++) {\n const materialDef = this.json.materials[i];\n\n const materialCacheKey = `material_${i}`;\n this.materialCache.set(materialCacheKey, {\n mesh: this.createMaterial(materialDef, GL_CONSTANTS.TRIANGLES),\n points: this.createMaterial(materialDef, GL_CONSTANTS.POINTS),\n lines: this.createMaterial(materialDef, GL_CONSTANTS.LINES),\n });\n\n this.materialCache.get(materialCacheKey).mesh.name = materialDef.name;\n this.materialCache.get(materialCacheKey).points.name = materialDef.name;\n this.materialCache.get(materialCacheKey).lines.name = materialDef.name;\n\n this.materials.set(i, this.materialCache.get(materialCacheKey).mesh);\n }\n return this.materials;\n }\n\n createMaterial(materialDef, primitiveMode = undefined) {\n const params = {};\n\n if (materialDef.pbrMetallicRoughness) {\n const pbr = materialDef.pbrMetallicRoughness;\n if (pbr.baseColorFactor) {\n params.color = new Color().fromArray(pbr.baseColorFactor);\n params.opacity = pbr.baseColorFactor[3];\n if (params.opacity < 1.0) params.transparent = true;\n }\n\n if (pbr.baseColorTexture !== undefined) {\n const texture = this.textureCache.get(pbr.baseColorTexture.index);\n if (texture) {\n params.map = texture;\n // Set color to white if map is present and baseColorFactor is not,\n // or else texture will be tinted with default color\n if (!pbr.baseColorFactor) {\n params.color = new Color(0xffffff);\n }\n }\n }\n }\n\n if (materialDef.emissiveFactor) {\n params.emissive = new Color().fromArray(materialDef.emissiveFactor);\n }\n\n if (materialDef.alphaMode === \"BLEND\") {\n params.transparent = true;\n }\n\n if (materialDef.doubleSided) {\n params.side = DoubleSide;\n }\n let material;\n\n if (primitiveMode === GL_CONSTANTS.POINTS) {\n params.sizeAttenuation = false;\n material = new PointsMaterial(params);\n material.sizeAttenuation = false;\n } else if (\n primitiveMode === GL_CONSTANTS.LINES ||\n primitiveMode === GL_CONSTANTS.LINE_STRIP ||\n primitiveMode === GL_CONSTANTS.LINE_LOOP\n ) {\n material = new LineBasicMaterial(params);\n } else {\n params.specular = 0x222222;\n params.shininess = 10;\n params.reflectivity = 0.05;\n params.polygonOffset = true;\n params.polygonOffsetFactor = 1;\n params.polygonOffsetUnits = 1;\n\n // Ensure color is white if only map is present so it renders the texture properly\n if (params.map && !materialDef.pbrMetallicRoughness?.baseColorFactor) {\n params.color = new Color(0xffffff);\n }\n\n if (materialDef.normalTexture !== undefined) {\n const normalMap = this.textureCache.get(materialDef.normalTexture.index);\n if (normalMap) {\n params.normalMap = normalMap;\n }\n }\n\n // Emissive texture\n if (materialDef.emissiveTexture !== undefined) {\n const emissiveMap = this.textureCache.get(materialDef.emissiveTexture.index);\n if (emissiveMap) {\n params.emissiveMap = emissiveMap;\n }\n }\n\n // Metallic-roughness texture\n // Check if we need MeshStandardMaterial for full PBR support or we can use MeshPhongMaterial\n // Use MeshStandardMaterial only if there are PBR textures present to optimize rendering performance.\n // If only factors are present, MeshPhongMaterial is enough for basic lighting.\n const usePBR = materialDef.pbrMetallicRoughness?.metallicRoughnessTexture !== undefined;\n\n if (usePBR) {\n // Apply default values if not specified\n params.metalness =\n materialDef.pbrMetallicRoughness?.metallicFactor !== undefined\n ? materialDef.pbrMetallicRoughness.metallicFactor\n : 1.0;\n params.roughness =\n materialDef.pbrMetallicRoughness?.roughnessFactor !== undefined\n ? materialDef.pbrMetallicRoughness.roughnessFactor\n : 1.0;\n\n if (materialDef.pbrMetallicRoughness?.metallicRoughnessTexture !== undefined) {\n const map = this.textureCache.get(materialDef.pbrMetallicRoughness.metallicRoughnessTexture.index);\n if (map) {\n params.metalnessMap = map;\n params.roughnessMap = map;\n }\n }\n material = new MeshStandardMaterial(params);\n } else {\n material = new MeshPhongMaterial(params);\n }\n\n // Additional maps setup (needs to happen after instantiation for some properties)\n if (material.map) material.map.colorSpace = SRGBColorSpace;\n if (material.emissiveMap) material.emissiveMap.colorSpace = SRGBColorSpace;\n\n if (material.normalMap) {\n if (materialDef.normalTexture?.scale !== undefined) {\n material.normalScale.set(materialDef.normalTexture.scale, materialDef.normalTexture.scale);\n }\n }\n if (materialDef.occlusionTexture !== undefined) {\n const aoMap = this.textureCache.get(materialDef.occlusionTexture.index);\n if (aoMap) {\n material.aoMap = aoMap;\n if (materialDef.occlusionTexture.strength !== undefined) {\n material.aoMapIntensity = materialDef.occlusionTexture.strength;\n }\n }\n }\n }\n\n return material;\n }\n\n getCachedMaterial(materialIndex, primitiveMode) {\n const materialCacheKey = `material_${materialIndex}`;\n const materialCache = this.materialCache.get(materialCacheKey);\n\n if (materialCache) {\n if (primitiveMode === GL_CONSTANTS.POINTS) {\n return materialCache.points;\n } else if (\n primitiveMode === GL_CONSTANTS.LINES ||\n primitiveMode === GL_CONSTANTS.LINE_STRIP ||\n primitiveMode === GL_CONSTANTS.LINE_LOOP\n ) {\n return materialCache.lines;\n } else {\n return materialCache.mesh;\n }\n }\n\n return null;\n }\n\n disposeMaterials() {\n this.textureCache.forEach((texture) => texture.dispose());\n this.textureCache.clear();\n\n this.materials.forEach((material) => {\n if (material.map) material.map.dispose();\n if (material.lightMap) material.lightMap.dispose();\n if (material.bumpMap) material.bumpMap.dispose();\n if (material.normalMap) material.normalMap.dispose();\n if (material.specularMap) material.specularMap.dispose();\n if (material.envMap) material.envMap.dispose();\n if (material.aoMap) material.aoMap.dispose();\n if (material.metalnessMap) material.metalnessMap.dispose();\n if (material.roughnessMap) material.roughnessMap.dispose();\n if (material.emissiveMap) material.emissiveMap.dispose();\n material.dispose();\n });\n this.materials.clear();\n\n this.materialCache.forEach((materialCache) => {\n if (materialCache.mesh) {\n if (materialCache.mesh.map) materialCache.mesh.map.dispose();\n if (materialCache.mesh.lightMap) materialCache.mesh.lightMap.dispose();\n if (materialCache.mesh.bumpMap) materialCache.mesh.bumpMap.dispose();\n if (materialCache.mesh.normalMap) materialCache.mesh.normalMap.dispose();\n if (materialCache.mesh.specularMap) materialCache.mesh.specularMap.dispose();\n if (materialCache.mesh.envMap) materialCache.mesh.envMap.dispose();\n if (materialCache.mesh.aoMap) materialCache.mesh.aoMap.dispose();\n if (materialCache.mesh.metalnessMap) materialCache.mesh.metalnessMap.dispose();\n if (materialCache.mesh.roughnessMap) materialCache.mesh.roughnessMap.dispose();\n if (materialCache.mesh.emissiveMap) materialCache.mesh.emissiveMap.dispose();\n materialCache.mesh.dispose();\n }\n\n if (materialCache.points) {\n if (materialCache.points.map) materialCache.points.map.dispose();\n materialCache.points.dispose();\n }\n\n if (materialCache.lines) {\n if (materialCache.lines.map) materialCache.lines.map.dispose();\n materialCache.lines.dispose();\n }\n });\n this.materialCache.clear();\n }\n\n estimateNodeSize(meshIndex) {\n if (!this.json.meshes) return 0;\n\n const meshDef = this.json.meshes[meshIndex];\n if (!meshDef || !meshDef.primitives) return 0;\n\n let totalSize = 0;\n for (const primitive of meshDef.primitives) {\n if (primitive.attributes) {\n for (const [, accessorIndex] of Object.entries(primitive.attributes)) {\n if (accessorIndex === undefined) continue;\n\n const accessor = this.json.accessors[accessorIndex];\n if (!accessor) continue;\n\n const numComponents = this.getNumComponents(accessor.type);\n const bytesPerComponent = this.getComponentSize(accessor.componentType);\n totalSize += accessor.count * numComponents * bytesPerComponent;\n }\n }\n\n if (primitive.indices !== undefined) {\n const accessor = this.json.accessors[primitive.indices];\n if (accessor) {\n const bytesPerComponent = this.getComponentSize(accessor.componentType);\n totalSize += accessor.count * bytesPerComponent;\n }\n }\n }\n\n return totalSize;\n }\n}\n","import {\n BufferGeometry,\n PointsMaterial,\n Points,\n Mesh,\n TriangleStripDrawMode,\n TriangleFanDrawMode,\n LineSegments,\n Line,\n LineLoop,\n Group,\n Vector3,\n Vector2,\n Quaternion,\n Matrix4,\n Box3,\n MeshPhongMaterial,\n Color,\n MathUtils,\n PerspectiveCamera,\n OrthographicCamera,\n NormalBlending,\n BufferAttribute,\n LineBasicMaterial,\n DataTexture,\n RGBAFormat,\n FloatType,\n NearestFilter,\n} from \"three\";\nimport { GL_CONSTANTS } from \"./GltfStructure.js\";\nimport { mergeGeometries } from \"three/examples/jsm/utils/BufferGeometryUtils.js\";\n\nconst DRACO_EXTENSION_NAME = \"KHR_draco_mesh_compression\";\n\nconst STRUCTURE_ID_SEPARATOR = \":\";\n\n//#AI-GENERATED using Gemini 2.5 Pro, Claude-4-sonnet\n//#Reviewed and adapted by dborysov@opendesign.com\n\nexport class DynamicGltfLoader {\n constructor(camera, scene, renderer) {\n this.camera = camera;\n this.scene = scene;\n this.renderer = renderer;\n\n this.eventHandlers = {\n geometryprogress: [],\n databasechunk: [],\n geometryend: [],\n geometryerror: [],\n update: [],\n geometrymemory: [],\n optimizationprogress: [],\n };\n\n this.loadDistance = 100;\n this.unloadDistance = 150;\n this.checkInterval = 1000;\n\n this.nodes = new Map();\n this.loadedMeshes = new Map();\n this.nodesToLoad = [];\n this.edgeNodes = [];\n this.structures = [];\n this.structureRoots = new Map();\n\n this.memoryLimit = this.getAvailableMemory();\n this.optimizationMemoryMultiplier = 5;\n this.memoryEstimationFactor = 1.7;\n this.loadedGeometrySize = 0;\n this.geometryCache = new Map();\n this.materialCache = new Map();\n this.textureCache = new Map();\n this.currentMemoryUsage = 0;\n this.pendingMemoryUsage = 0;\n\n this.updateMemoryIndicator();\n\n this.loadedMaterials = new Map();\n this.abortController = new AbortController();\n\n this.batchSize = 10000;\n this.frameDelay = 0;\n\n this.graphicsObjectLimit = 10000;\n this.totalLoadedObjects = 0;\n\n this.handleToObjects = new Map();\n\n this.originalObjects = new Set();\n this.originalObjectsToSelection = new Set();\n\n this.optimizedOriginalMap = new Map();\n this.mergedMesh = new Set();\n this.mergedLines = new Set();\n this.mergedLineSegments = new Set();\n this.mergedPoints = new Set();\n\n this.isolatedObjects = [];\n //!!window.WebGL2RenderingContext && this.renderer.getContext() instanceof WebGL2RenderingContext\n this.useVAO = false;\n this.visibleEdges = true;\n\n this.handleToOptimizedObjects = new Map();\n\n this.hiddenHandles = new Set();\n this.newOptimizedObjects = new Set();\n this.oldOptimizeObjects = new Set();\n\n // Transform system for exploded view - works directly with original objects\n this.objectTransforms = new Map(); // originalObject -> Matrix4\n this.transformedGeometries = new Map(); // mergedObject.uuid -> original position data\n\n // TODO: Remove when highlight is implemented via shader.\n // Sync transforms to original (hidden) objects so GeometryHighlighter\n // wireframes follow the exploded positions.\n this.syncTransformsToOriginalObjects = true;\n this._originalObjectMatrices = new Map(); // object -> original matrix (for restore)\n\n this.activeChunkLoads = 0;\n this.chunkQueue = [];\n\n // GPU-accelerated visibility system\n this.objectIdToIndex = new Map(); // objectId -> index\n this.maxObjectId = 0; // Maximum object ID\n this.objectVisibility = new Float32Array(); // Array of visibility flags for each object\n\n // Chunk loading configuration\n this.maxConcurrentChunks = 6; // Default limit\n\n // Merged geometry tracking\n this.mergedObjectMap = new Map(); // objectId -> {mergedObject, startIndex, endIndex, vertexCount}\n this.mergedGeometryVisibility = new Map(); // mergedObject -> visibility array\n\n this._webglInfoCache = null;\n\n // Transform texture support\n this.transformTextureSize = 1024;\n this.transformTexture = this.createDummyTexture();\n this.transformData = null;\n this.identityTransformData = null;\n this.visibilityMaterials = new Set(); // Keep track of materials to update uniforms\n\n // KHR_draco_mesh_compression support — DRACOLoader is injected from\n // the outside via setDracoLoader() so this module doesn't carry a hard\n // dependency on three/examples/jsm/loaders/DRACOLoader.js (which has no\n // CommonJS build and is awkward to consume in non-ESM environments).\n this._dracoLoader = null;\n }\n\n // Inject an externally-configured DRACOLoader instance. The caller is\n // responsible for setting the decoder path / decoder config / worker pool\n // size before passing it in. Pass `null` to detach.\n //\n // Usage:\n // import { DRACOLoader } from \"three/examples/jsm/loaders/DRACOLoader.js\";\n // const draco = new DRACOLoader();\n // draco.setDecoderPath(\"https://www.gstatic.com/draco/v1/decoders/\");\n // loader.setDracoLoader(draco);\n setDracoLoader(loader = null) {\n this._dracoLoader = loader || null;\n }\n\n // Decode a Draco-compressed primitive into a BufferGeometry. The caller\n // (loadNode) guarantees this._dracoLoader is set — see the early check at\n // the top of loadNode().\n //\n // Important detail: DRACOLoader.decodeGeometry() uses the *keys* of\n // taskConfig.attributeIDs verbatim as attribute names on the resulting\n // BufferGeometry. So if we pass dracoExt.attributes directly (POSITION,\n // NORMAL, TEXCOORD_0…) the geometry ends up with those uppercase names\n // and downstream code that expects three.js conventions (position,\n // normal, uv) breaks. We pre-translate the keys here.\n async _decodeDracoPrimitive(structure, primitive, dracoBufferData) {\n const dracoExt = primitive.extensions[DRACO_EXTENSION_NAME];\n const loader = this._dracoLoader;\n\n const attributeIDs = {};\n const attributeTypes = {};\n // glTF attribute name → three.js name, used both for re-keying the\n // DRACOLoader config and for re-mapping bounds afterwards.\n const gltfNameToThreeName = new Map();\n // three.js attribute name → glTF accessor index (for normalized flag,\n // bounds, and post-decode dequantization).\n const threeNameToAccessor = new Map();\n\n for (const [gltfAttrName, dracoUniqueId] of Object.entries(dracoExt.attributes)) {\n const threeName = this._gltfAttributeNameToThreeName(gltfAttrName);\n attributeIDs[threeName] = dracoUniqueId;\n gltfNameToThreeName.set(gltfAttrName, threeName);\n\n const accessorIdx = primitive.attributes[gltfAttrName];\n if (accessorIdx !== undefined) {\n const accessor = structure.json.accessors[accessorIdx];\n attributeTypes[threeName] = this._gltfComponentTypeToTypedArrayName(accessor.componentType);\n threeNameToAccessor.set(threeName, accessor);\n }\n }\n\n const geometry = await loader.decodeGeometry(dracoBufferData, {\n attributeIDs,\n attributeTypes,\n useUniqueIDs: true,\n });\n\n // DRACOLoader doesn't carry the accessor.normalized flag through, so\n // we apply it manually. This also matters for KHR_mesh_quantization +\n // Draco combined files (rare, but spec-compliant).\n for (const [threeName, accessor] of threeNameToAccessor) {\n const attribute = geometry.getAttribute(threeName);\n if (!attribute) continue;\n if (accessor.normalized === true) {\n attribute.normalized = true;\n }\n // Min/max bounds — used by computeBoundingBox/Sphere fast-path.\n if (accessor.min) attribute.min = accessor.min;\n if (accessor.max) attribute.max = accessor.max;\n }\n\n // Mirror the dequantization done in _createGeometryAttribute() for\n // ordinary glTF attributes: convert any normalized integer attributes\n // into a tightly-packed Float32Array so that BufferGeometryUtils\n // .mergeGeometries() (used by this loader for batched draw calls) sees\n // a consistent layout across all primitives.\n for (const [threeName, accessor] of threeNameToAccessor) {\n const attribute = geometry.getAttribute(threeName);\n if (!attribute || !attribute.normalized) continue;\n const denom = this._normalizedDenominator(accessor.componentType);\n if (denom <= 0) continue;\n const src = attribute.array;\n const inv = 1 / denom;\n const isSigned = accessor.componentType === 5120 || accessor.componentType === 5122;\n const out = new Float32Array(src.length);\n for (let i = 0; i < src.length; i++) {\n let v = src[i] * inv;\n if (isSigned && v < -1) v = -1;\n out[i] = v;\n }\n const newAttr = new BufferAttribute(out, attribute.itemSize, false);\n if (accessor.min) newAttr.min = accessor.min;\n if (accessor.max) newAttr.max = accessor.max;\n geometry.setAttribute(threeName, newAttr);\n }\n\n return geometry;\n }\n\n _gltfComponentTypeToTypedArrayName(componentType) {\n switch (componentType) {\n case 5120:\n return \"Int8Array\";\n case 5121:\n return \"Uint8Array\";\n case 5122:\n return \"Int16Array\";\n case 5123:\n return \"Uint16Array\";\n case 5125:\n return \"Uint32Array\";\n case 5126:\n return \"Float32Array\";\n default:\n return \"Float32Array\";\n }\n }\n\n // glTF normalization denominators (per glTF 2.0 spec, accessor.normalized).\n _normalizedDenominator(componentType) {\n switch (componentType) {\n case 5120:\n return 127; // BYTE\n case 5121:\n return 255; // UBYTE\n case 5122:\n return 32767; // SHORT\n case 5123:\n return 65535; // USHORT\n default:\n return 0; // not normalizable\n }\n }\n\n // Map glTF attribute names to three.js BufferGeometry attribute names.\n _gltfAttributeNameToThreeName(name) {\n switch (name) {\n case \"POSITION\":\n return \"position\";\n case \"NORMAL\":\n return \"normal\";\n case \"TANGENT\":\n return \"tangent\";\n case \"TEXCOORD_0\":\n return \"uv\";\n case \"TEXCOORD_1\":\n return \"uv2\";\n case \"COLOR_0\":\n return \"color\";\n case \"JOINTS_0\":\n return \"skinIndex\";\n case \"WEIGHTS_0\":\n return \"skinWeight\";\n default:\n return name.toLowerCase();\n }\n }\n\n // Build a buffer request for an accessor that correctly accounts for\n // bufferView.byteStride (interleaved attributes — common in quantized models\n // produced via KHR_mesh_quantization / gltfpack).\n _buildAccessorRequest(structure, accessorIndex, type, primIdx) {\n const accessor = structure.json.accessors[accessorIndex];\n const bufferView = structure.json.bufferViews[accessor.bufferView];\n const components = structure.getNumComponents(accessor.type);\n const componentSize = structure.getComponentSize(accessor.componentType);\n const itemBytes = components * componentSize;\n const accessorByteOffset = accessor.byteOffset || 0;\n const bvByteOffset = bufferView.byteOffset || 0;\n const byteStride = bufferView.byteStride || 0;\n const interleaved = byteStride !== 0 && byteStride !== itemBytes;\n\n const offset = bvByteOffset + accessorByteOffset;\n let length;\n if (interleaved) {\n // For interleaved data the last element begins at (count-1)*stride\n // and spans itemBytes from there. Fetch only that tight extent.\n length = (accessor.count - 1) * byteStride + itemBytes;\n } else {\n length = accessor.count * itemBytes;\n }\n\n return {\n offset,\n length,\n componentType: accessor.componentType,\n accessorIndex,\n type,\n primIdx,\n // Metadata used by the geometry-assembly pass below.\n _accessor: accessor,\n _components: components,\n _componentSize: componentSize,\n _itemBytes: itemBytes,\n _byteStride: byteStride,\n _interleaved: interleaved,\n };\n }\n\n // Create a plain BufferAttribute, handling two transformations that\n // KHR_mesh_quantization-encoded glTF files commonly require:\n // 1. Deinterleave when the accessor lives inside a strided bufferView.\n // 2. Dequantize (integer typed array + accessor.normalized=true) into\n // a tightly-packed Float32Array in [-1,1] / [0,1] range.\n //\n // Reasons for always emitting a non-strided, non-normalized Float32Array\n // attribute:\n // * BufferGeometryUtils.mergeGeometries() (used heavily in this loader\n // to batch draw calls) refuses to merge InterleavedBufferAttribute\n // and requires identical TypedArray + `normalized` across primitives.\n // Eagerly dequantizing here lets us mix quantized and non-quantized\n // primitives in the same merged buffer.\n // * Geometry-local bounds (boundingBox, processNodeHierarchy extents)\n // and per-vertex CPU-side traversal can then assume float values.\n //\n // The trade-off is some extra CPU memory (4 bytes per component instead of\n // 1/2). The download size benefit of quantization is preserved.\n _createGeometryAttribute(req) {\n const accessor = req._accessor;\n const components = req._components;\n const count = accessor.count;\n const stride = req._interleaved ? req._byteStride / req._componentSize : components;\n const normalized = accessor.normalized === true;\n const componentType = req.componentType;\n const src = req.data;\n\n // Fast path: tightly-packed, non-normalized data — no copy needed.\n // Covers the common cases: non-quantized FLOAT attributes and integer\n // indices. The `req.data` view already has the correct length & type.\n if (!req._interleaved && !normalized) {\n return new BufferAttribute(src, components, false);\n }\n\n // Normalized integer attribute (KHR_mesh_quantization) → dequantize to\n // Float32 in [-1,1] / [0,1] range. This keeps merge/bounds simple.\n if (normalized) {\n const denom = this._normalizedDenominator(componentType);\n if (denom > 0) {\n const out = new Float32Array(count * components);\n const inv = 1 / denom;\n const isSignedNormalized = componentType === 5120 || componentType === 5122;\n for (let i = 0; i < count; i++) {\n const srcBase = i * stride;\n const dstBase = i * components;\n for (let c = 0; c < components; c++) {\n let v = src[srcBase + c] * inv;\n if (isSignedNormalized && v < -1) v = -1; // glTF spec clamp\n out[dstBase + c] = v;\n }\n }\n return new BufferAttribute(out, components, false);\n }\n }\n\n // Interleaved + non-normalized: deinterleave but preserve original\n // typed-array type (rare, but handle it for completeness).\n const TypedArrayCtor = src.constructor;\n const out = new TypedArrayCtor(count * components);\n for (let i = 0; i < count; i++) {\n const srcBase = i * stride;\n const dstBase = i * components;\n for (let c = 0; c < components; c++) {\n out[dstBase + c] = src[srcBase + c];\n }\n }\n return new BufferAttribute(out, components, false);\n }\n\n createDummyTexture() {\n // Create 1x1 dummy texture with identity matrix to prevent shader crash/black screen\n const data = new Float32Array(16); // 4x4 matrix\n const identity = new Matrix4();\n identity.toArray(data);\n\n // Correct dummy size: 4x1 to hold at least one matrix\n const dummyData = new Float32Array(16);\n identity.toArray(dummyData);\n const dummyTexture = new DataTexture(dummyData, 4, 1, RGBAFormat, FloatType);\n\n dummyTexture.minFilter = NearestFilter;\n dummyTexture.magFilter = NearestFilter;\n dummyTexture.needsUpdate = true;\n return dummyTexture;\n }\n\n initTransformTexture() {\n if (this.transformTexture) {\n this.transformTexture.dispose();\n }\n\n // Logic from BatchedMesh.js _initMatricesTexture\n // layout (1 matrix = 4 pixels)\n // RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)\n const maxInstanceCount = this.maxObjectId + 1;\n let size = Math.sqrt(maxInstanceCount * 4); // 4 pixels needed for 1 matrix\n size = Math.ceil(size / 4) * 4;\n size = Math.max(size, 4);\n\n this.transformTextureSize = size;\n const arraySize = size * size * 4; // 4 floats per RGBA pixel\n this.transformData = new Float32Array(arraySize);\n\n // Create and cache identity matrices for fast reset\n this.identityTransformData = new Float32Array(arraySize);\n for (let i = 0; i <= this.maxObjectId; i++) {\n const base = i * 16;\n if (base + 15 < arraySize) {\n this.identityTransformData[base + 0] = 1; // m00\n this.identityTransformData[base + 5] = 1; // m11\n this.identityTransformData[base + 10] = 1; // m22\n this.identityTransformData[base + 15] = 1; // m33\n }\n }\n\n // Initialize with identity matrices\n this._resetTransformData(false);\n\n this.transformTexture = new DataTexture(this.transformData, size, size, RGBAFormat, FloatType);\n\n this.transformTexture.needsUpdate = true;\n this.transformTexture.generateMipmaps = false;\n\n console.log(`Initialized transform texture: ${size}x${size} for ${maxInstanceCount} objects`);\n\n this.updateMaterialUniforms();\n\n // Force all visibility materials to update\n this.visibilityMaterials.forEach((material) => {\n material.needsUpdate = true;\n });\n }\n\n // Fast reset to Identity matrices without creating Matrix4 objects\n _resetTransformData(updateTexture = true) {\n if (!this.transformData || !this.identityTransformData) return;\n\n // Fast copy from cached identity array\n this.transformData.set(this.identityTransformData);\n\n if (updateTexture) {\n this.updateTransformTexture();\n }\n }\n\n updateMaterialUniforms() {\n // Only update if the texture actually changed\n if (\n this._lastTransformTexture === this.transformTexture &&\n this._lastTransformTextureSize === this.transformTextureSize\n ) {\n return;\n }\n\n this._lastTransformTexture = this.transformTexture;\n this._lastTransformTextureSize = this.transformTextureSize;\n\n this.visibilityMaterials.forEach((material) => {\n if (material.userData && material.userData.visibilityUniforms) {\n material.userData.visibilityUniforms.transformTexture.value = this.transformTexture;\n material.userData.visibilityUniforms.transformTextureSize.value = this.transformTextureSize;\n }\n });\n }\n\n updateTransformTexture() {\n if (!this.transformTexture) return;\n this.transformTexture.needsUpdate = true;\n }\n\n setVisibleEdges(visible = true) {\n this.visibleEdges = visible;\n }\n\n getAvailableMemory() {\n let memoryLimit = 6 * 1024 * 1024 * 1024;\n try {\n if (navigator.deviceMemory) {\n memoryLimit = navigator.deviceMemory * 1024 * 1024 * 1024;\n } else if (performance.memory) {\n const jsHeapSizeLimit = performance.memory.jsHeapSizeLimit;\n if (jsHeapSizeLimit) {\n memoryLimit = Math.min(memoryLimit, jsHeapSizeLimit);\n }\n }\n\n memoryLimit = Math.min(memoryLimit, 16 * 1024 * 1024 * 1024);\n memoryLimit = Math.max(memoryLimit, 2 * 1024 * 1024 * 1024);\n\n console.log(`Available memory set to ${Math.round(memoryLimit / (1024 * 1024 * 1024))}GB`);\n } catch (error) {\n console.warn(\"DynamicLoader: Error detecting available memory:\", error);\n }\n\n return memoryLimit;\n }\n\n getAbortController() {\n return this.abortController;\n }\n\n abortLoading() {\n this.abortController.abort();\n }\n\n getOptimizedGeometrySize() {\n let total = 0;\n const addSize = (obj) => {\n if (obj && obj.geometry) total += this.estimateGeometrySize(obj);\n };\n this.mergedMesh?.forEach(addSize);\n this.mergedLines?.forEach(addSize);\n this.mergedLineSegments?.forEach(addSize);\n this.mergedPoints?.forEach(addSize);\n return total;\n }\n\n updateMemoryIndicator() {\n const optimizedUsage = this.getOptimizedGeometrySize();\n const totalUsage = this.currentMemoryUsage + optimizedUsage;\n const totalUsageEstimate = Math.round(totalUsage * this.memoryEstimationFactor);\n this.dispatchEvent(\"geometrymemory\", {\n currentUsage: this.currentMemoryUsage,\n optimizedUsage,\n totalUsage,\n totalUsageEstimate,\n limit: this.memoryLimit,\n });\n }\n\n setMemoryLimit(bytesLimit) {\n // this.memoryLimit = bytesLimit;\n //this.updateMemoryIndicator();\n // console.log(`Memory limit set to ${Math.round(bytesLimit / (1024 * 1024))}MB`);\n }\n\n estimateGeometrySize(nodeGroup) {\n let totalSize = 0;\n nodeGroup.traverse((child) => {\n if (child.geometry) {\n if (this.abortController.signal.aborted) {\n throw new DOMException(\"Loading aborted\", \"AbortError\");\n }\n const geometry = child.geometry;\n\n if (geometry.attributes) {\n Object.values(geometry.attributes).forEach((attribute) => {\n if (attribute && attribute.array) {\n totalSize += attribute.array.byteLength;\n }\n });\n }\n\n if (geometry.index && geometry.index.array) {\n totalSize += geometry.index.array.byteLength;\n }\n }\n });\n\n return totalSize;\n }\n\n recalculateScene() {\n const geometries = [];\n this.scene.traverse((object) => {\n if (this.abortController.signal.aborted) {\n throw new DOMException(\"Loading aborted\", \"AbortError\");\n }\n\n if (object.geometry && !this.geometryCache.has(object.geometry.uuid)) {\n const size = this.estimateGeometrySize(object);\n this.geometryCache.set(object.geometry.uuid, size);\n geometries.push({\n object,\n size,\n distance: object.position.distanceTo(this.camera.position),\n });\n }\n });\n\n if (this.abortController.signal.aborted) {\n throw new DOMException(\"Loading aborted\", \"AbortError\");\n }\n\n geometries.sort((a, b) => b.distance - a.distance);\n\n let currentMemoryUsage = 0;\n for (const geo of geometries) {\n currentMemoryUsage += geo.size;\n }\n\n const effectiveLimitForEviction = this.memoryLimit / this.memoryEstimationFactor;\n if (currentMemoryUsage > effectiveLimitForEviction) {\n console.log(\n `Memory usage (${Math.round((currentMemoryUsage * this.memoryEstimationFactor) / (1024 * 1024))}MB est.) exceeds limit`\n );\n\n for (const geo of geometries) {\n if (currentMemoryUsage <= effectiveLimitForEviction) break;\n\n if (this.abortController.signal.aborted) {\n throw new DOMException(\"Loading aborted\", \"AbortError\");\n }\n\n const object = geo.object;\n if (object.geometry) {\n currentMemoryUsage -= geo.size;\n this.geometryCache.delete(object.geometry.uuid);\n object.geometry.dispose();\n object.visible = false;\n }\n }\n }\n\n this.currentMemoryUsage = currentMemoryUsage;\n this.updateMemoryIndicator();\n\n console.log(`Final memory usage: ${Math.round(currentMemoryUsage / (1024 * 1024))}MB`);\n }\n\n getStats() {\n let totalObjects = 0;\n let renderedObjects = 0;\n let totalTriangles = 0;\n let renderedTriangles = 0;\n let totalLines = 0;\n let renderedLines = 0;\n let totalEdges = 0;\n let renderedEdges = 0;\n\n this.scene.traverse((object) => {\n totalObjects++;\n\n const geometry = object.geometry;\n if (!geometry) return;\n\n let triCount = 0;\n if (geometry.index) {\n triCount = Math.floor(geometry.index.count / 3);\n } else if (geometry.attributes && geometry.attributes.position) {\n triCount = Math.floor(geometry.attributes.position.count / 3);\n }\n totalTriangles += triCount;\n\n let lineCount = 0;\n if (geometry.index) {\n lineCount = Math.floor(geometry.index.count / 2);\n } else if (geometry.attributes && geometry.attributes.position) {\n lineCount = Math.floor(geometry.attributes.position.count / 2);\n }\n\n if (object.type === \"Line\" || object.type === \"LineSegments\" || object.type === \"LineLoop\") {\n if (object.userData.isEdge) {\n totalEdges += lineCount;\n } else {\n totalLines += lineCount;\n }\n }\n\n if (object.visible !== false) {\n if (object.isMesh || object.isLine || object.isPoints) {\n renderedObjects++;\n if (object.isMesh) {\n renderedTriangles += triCount;\n } else if (object.type === \"Line\" || object.type === \"LineSegments\" || object.type === \"LineLoop\") {\n if (object.userData.isEdge) {\n renderedEdges += lineCount;\n } else {\n renderedLines += lineCount;\n }\n }\n }\n }\n });\n\n const geometryCount = this.geometryCache ? this.geometryCache.size : 0;\n const geometryMemoryBytes = Array.from(this.geometryCache?.values?.() || []).reduce((a, b) => a + b, 0);\n\n const uniqueMaterialIds = new Set();\n const uniqueTextureIds = new Set();\n if (Array.isArray(this.structures)) {\n for (const structure of this.structures) {\n try {\n for (const entry of structure.materialCache.values()) {\n if (entry?.mesh?.uuid) uniqueMaterialIds.add(entry.mesh.uuid);\n if (entry?.points?.uuid) uniqueMaterialIds.add(entry.points.uuid);\n if (entry?.lines?.uuid) uniqueMaterialIds.add(entry.lines.uuid);\n }\n } catch (exp) {\n console.warn(\"DynamicLoader: Error collecting material stats\", exp);\n }\n }\n }\n const materialCount = uniqueMaterialIds.size;\n const textureCount = uniqueTextureIds.size;\n const optimizedUsageBytes = this.getOptimizedGeometrySize();\n const totalUsageBytes = geometryMemoryBytes + optimizedUsageBytes;\n const estimatedGpuMemoryBytes = Math.round(totalUsageBytes * this.memoryEstimationFactor);\n\n if (!this._webglInfoCache) {\n try {\n const gl = this.renderer.getContext();\n const dbgInfo = gl.getExtension(\"WEBGL_debug_renderer_info\");\n if (dbgInfo) {\n const rendererStr = gl.getParameter(dbgInfo.UNMASKED_RENDERER_WEBGL);\n const vendorStr = gl.getParameter(dbgInfo.UNMASKED_VENDOR_WEBGL);\n this._webglInfoCache = { renderer: rendererStr, vendor: vendorStr };\n } else {\n this._webglInfoCache = { renderer: null, vendor: null };\n }\n } catch (e) {\n console.warn(\"DynamicLoader: Error getting webgl info\", e);\n this._webglInfoCache = { renderer: null, vendor: null };\n }\n }\n\n const size = new Vector2();\n if (this.renderer && this.renderer.getSize) {\n this.renderer.getSize(size);\n }\n\n return {\n scene: {\n beforeOptimization: {\n objects: totalObjects - renderedObjects,\n triangles: totalTriangles - renderedTriangles,\n lines: totalLines - renderedLines,\n edges: totalEdges - renderedEdges,\n },\n\n afterOptimization: {\n objects: renderedObjects,\n triangles: renderedTriangles,\n lines: renderedLines,\n edges: renderedEdges,\n },\n },\n memory: {\n geometries: {\n count: geometryCount,\n bytes: geometryMemoryBytes,\n optimizedBytes: optimizedUsageBytes,\n totalRawBytes: totalUsageBytes,\n },\n textures: { count: textureCount },\n materials: { count: materialCount },\n totalEstimatedGpuBytes: estimatedGpuMemoryBytes,\n },\n system: {\n webglRenderer: this._webglInfoCache?.renderer || \"\",\n webglVendor: this._webglInfoCache?.vendor || \"\",\n viewport: { width: size.x || 0, height: size.y || 0 },\n },\n };\n }\n\n async loadNode(nodeId, onLoadFinishCb, reservedEstimatedSize = 0) {\n const node = this.nodes.get(nodeId);\n if (!node || node.loaded || node.loading) {\n this.pendingMemoryUsage = Math.max(0, this.pendingMemoryUsage - reservedEstimatedSize);\n return;\n }\n\n node.loading = true;\n const meshDef = node.structure.getJson().meshes[node.meshIndex];\n\n try {\n // Fail fast: if any primitive in this mesh requires Draco but no\n // DRACOLoader was injected, abort with a single descriptive error\n // *before* we fetch any buffers. Otherwise downstream code\n // (estimateGeometrySize, mesh assembly, etc.) would hit secondary\n // null-deref crashes that mask the real cause. The throw is caught\n // by the surrounding try/catch and logged once via the standard\n // \"Error loading node N\" channel.\n if (\n !this._dracoLoader &&\n meshDef.primitives &&\n meshDef.primitives.some((p) => p.extensions && p.extensions[DRACO_EXTENSION_NAME])\n ) {\n throw new Error(\n \"primitive uses KHR_draco_mesh_compression but no DRACOLoader is configured. \" +\n \"Inject one via dynamicLoader.setDracoLoader(new DRACOLoader()) before opening the file.\"\n );\n }\n\n const bufferRequests = [];\n const primitiveReqMap = new Map();\n const dracoPrimitives = new Map(); // primIdx -> { req: {offset, length}, primitive }\n\n for (let primIdx = 0; primIdx < meshDef.primitives.length; primIdx++) {\n const primitive = meshDef.primitives[primIdx];\n const reqs = [];\n\n // KHR_draco_mesh_compression: load the entire compressed bufferView\n // and skip the per-attribute requests below.\n const dracoExt = primitive.extensions && primitive.extensions[DRACO_EXTENSION_NAME];\n if (dracoExt) {\n const bufferView = node.structure.json.bufferViews[dracoExt.bufferView];\n const byteOffset = bufferView.byteOffset || 0;\n const byteLength = bufferView.byteLength;\n const dracoReq = {\n offset: byteOffset,\n length: byteLength,\n componentType: 5121, // raw bytes\n type: \"draco\",\n primIdx,\n };\n reqs.push(dracoReq);\n dracoPrimitives.set(primIdx, { req: dracoReq, primitive });\n primitiveReqMap.set(primIdx, reqs);\n bufferRequests.push(...reqs);\n continue;\n }\n\n if (primitive.attributes.POSITION !== undefined) {\n reqs.push(this._buildAccessorRequest(node.structure, primitive.attributes.POSITION, \"position\", primIdx));\n }\n if (primitive.attributes.NORMAL !== undefined) {\n reqs.push(this._buildAccessorRequest(node.structure, primitive.attributes.NORMAL, \"normal\", primIdx));\n }\n if (primitive.attributes.TEXCOORD_0 !== undefined) {\n reqs.push(this._buildAccessorRequest(node.structure, primitive.attributes.TEXCOORD_0, \"uv\", primIdx));\n }\n if (primitive.indices !== undefined) {\n reqs.push(this._buildAccessorRequest(node.structure, primitive.indices, \"index\", primIdx));\n }\n\n primitiveReqMap.set(primIdx, reqs);\n bufferRequests.push(...reqs);\n }\n\n if (bufferRequests.length === 0) {\n node.loaded = true;\n node.loading = false;\n this.pendingMemoryUsage = Math.max(0, this.pendingMemoryUsage - reservedEstimatedSize);\n return;\n }\n bufferRequests.sort((a, b) => a.offset - b.offset);\n const minOffset = bufferRequests[0].offset;\n const maxOffset = Math.max(...bufferRequests.map((r) => r.offset + r.length));\n const totalLength = maxOffset - minOffset;\n\n const { buffer, relOffset: baseRelOffset } = await node.structure.scheduleRequest({\n offset: minOffset,\n length: totalLength,\n componentType: null,\n });\n\n for (const req of bufferRequests) {\n const relOffset = req.offset - minOffset;\n req.data = node.structure.createTypedArray(buffer, baseRelOffset + relOffset, req.length, req.componentType);\n }\n\n for (let primIdx = 0; primIdx < meshDef.primitives.length; primIdx++) {\n const primitive = meshDef.primitives[primIdx];\n const reqs = primitiveReqMap.get(primIdx);\n let geometry;\n\n // Handle Draco-compressed primitives\n if (dracoPrimitives.has(primIdx)) {\n const dracoReq = reqs.find((r) => r.type === \"draco\");\n // Build a clean ArrayBuffer for the DRACO decoder.\n // dracoReq.data is a Uint8Array view into the larger shared buffer.\n const dracoBytes = new Uint8Array(dracoReq.data.buffer, dracoReq.data.byteOffset, dracoReq.data.byteLength);\n const dracoBuffer = dracoBytes.slice().buffer; // copy to standalone ArrayBuffer\n // Any decode failure (e.g. corrupted compressed data) will bubble\n // up to the outer try/catch and be reported once via the standard\n // \"Error loading node N\" channel rather than a misleading\n // \"skipping primitive\" warning followed by a downstream null deref.\n geometry = await this._decodeDracoPrimitive(node.structure, primitive, dracoBuffer);\n } else {\n geometry = new BufferGeometry();\n\n if (primitive.attributes.POSITION !== undefined) {\n const req = reqs.find((r) => r.type === \"position\" && r.accessorIndex === primitive.attributes.POSITION);\n geometry.setAttribute(\"position\", this._createGeometryAttribute(req));\n }\n\n if (primitive.attributes.NORMAL !== undefined) {\n const req = reqs.find((r) => r.type === \"normal\" && r.accessorIndex === primitive.attributes.NORMAL);\n geometry.setAttribute(\"normal\", this._createGeometryAttribute(req));\n }\n\n if (primitive.attributes.TEXCOORD_0 !== undefined) {\n const req = reqs.find((r) => r.type === \"uv\" && r.accessorIndex === primitive.attributes.TEXCOORD_0);\n geometry.setAttribute(\"uv\", this._createGeometryAttribute(req));\n }\n\n if (primitive.indices !== undefined) {\n const req = reqs.find((r) => r.type === \"index\" && r.accessorIndex === primitive.indices);\n // Indices are never interleaved per glTF spec, but use the same\n // helper for consistency (it falls back to BufferAttribute).\n geometry.setIndex(this._createGeometryAttribute(req));\n }\n }\n\n let material;\n if (primitive.material !== undefined) {\n material = node.structure.getCachedMaterial(primitive.material, primitive.mode);\n\n if (!material) {\n const materialDef = node.structure.json.materials[primitive.material];\n material = node.structure.createMaterial(materialDef, primitive.mode);\n }\n } else {\n material = this.createDefaultMaterial(primitive.mode);\n }\n\n let mesh;\n if (primitive.mode === GL_CONSTANTS.POINTS) {\n mesh = new Points(geometry, material);\n } else if (\n primitive.mode === GL_CONSTANTS.TRIANGLES ||\n primitive.mode === GL_CONSTANTS.TRIANGLE_STRIP ||\n primitive.mode === GL_CONSTANTS.TRIANGLE_FAN ||\n primitive.mode === undefined\n ) {\n mesh = new Mesh(geometry, material);\n if (primitive.mode === GL_CONSTANTS.TRIANGLE_STRIP) {\n mesh.drawMode = TriangleStripDrawMode;\n } else if (primitive.mode === GL_CONSTANTS.TRIANGLE_FAN) {\n mesh.drawMode = TriangleFanDrawMode;\n }\n } else if (primitive.mode === GL_CONSTANTS.LINES) {\n mesh = new LineSegments(geometry, material);\n } else if (primitive.mode === GL_CONSTANTS.LINE_STRIP) {\n mesh = new Line(geometry, material);\n } else if (primitive.mode === GL_CONSTANTS.LINE_LOOP) {\n mesh = new LineLoop(geometry, material);\n }\n\n if (node.extras) {\n mesh.userData = { ...mesh.userData, ...node.extras };\n }\n if (meshDef.extras) {\n mesh.userData = { ...mesh.userData, ...meshDef.extras };\n }\n if (primitive.extras) {\n mesh.userData = { ...mesh.userData, ...primitive.extras };\n }\n\n if (node.handle) {\n mesh.userData.handle = node.handle;\n } else {\n mesh.userData.handle = this.getFullHandle(node.structure.id, mesh.userData.handle);\n }\n\n if (mesh.material.name === \"edges\") {\n mesh.userData.isEdge = true;\n } else {\n mesh.userData.isEdge = false;\n }\n\n this.registerObjectWithHandle(mesh, mesh.userData.handle);\n\n mesh.position.copy(node.position);\n if (!geometry.attributes.normal) {\n geometry.computeVertexNormals();\n }\n if (material.aoMap && geometry.attributes.uv) {\n geometry.setAttribute(\"uv2\", geometry.attributes.uv);\n }\n if (node.group) {\n node.group.add(mesh);\n } else {\n this.scene.add(mesh);\n }\n node.object = mesh;\n this.totalLoadedObjects++;\n mesh.visible = this.totalLoadedObjects < this.graphicsObjectLimit;\n }\n node.loaded = true;\n node.loading = false;\n this.pendingMemoryUsage = Math.max(0, this.pendingMemoryUsage - reservedEstimatedSize);\n const geometrySize = this.estimateGeometrySize(node.object);\n this.geometryCache.set(node.object.uuid, geometrySize);\n this.currentMemoryUsage += geometrySize;\n if (onLoadFinishCb) {\n onLoadFinishCb();\n }\n } catch (error) {\n node.loading = false;\n this.pendingMemoryUsage = Math.max(0, this.pendingMemoryUsage - reservedEstimatedSize);\n\n if (error.name === \"AbortError\") {\n return;\n }\n\n if (node.structure && node.structure.loadingAborted) {\n return;\n }\n\n console.warn(`DynamicLoader: Error loading node ${nodeId}:`, error);\n }\n }\n\n unloadNode(nodeId) {\n const node = this.nodes.get(nodeId);\n if (!node || !node.loaded) return;\n\n if (node.object) {\n if (node.object.parent) {\n node.object.parent.remove(node.object);\n } else {\n this.scene.remove(node.object);\n }\n\n node.object.traverse((child) => {\n if (child.geometry) {\n const geometrySize = this.geometryCache.get(child.geometry.uuid) || 0;\n this.currentMemoryUsage -= geometrySize;\n this.geometryCache.delete(child.geometry.uuid);\n child.geometry.dispose();\n }\n });\n\n node.object = null;\n node.loaded = false;\n this.updateMemoryIndicator();\n console.log(`Unloaded node: ${nodeId}`);\n }\n }\n\n checkDistances() {\n const cameraPosition = this.camera.position;\n\n this.nodes.forEach((node, nodeId) => {\n const distance = cameraPosition.distanceTo(node.position);\n\n if (node.loaded) {\n if (distance > this.unloadDistance) {\n this.unloadNode(nodeId);\n }\n } else if (!node.loading) {\n if (distance < this.loadDistance) {\n this.loadNode(nodeId);\n }\n }\n });\n }\n\n async loadStructure(structures) {\n this.clear();\n\n const structureArray = Array.isArray(structures) ? structures : [structures];\n\n for (const structure of structureArray) {\n await structure.initialize(this);\n this.structures.push(structure);\n }\n\n for (const structure of this.structures) {\n try {\n await structure.loadTextures();\n await structure.loadMaterials();\n } catch (error) {\n console.error(\"DynamicLoader: Error loading materials:\", error);\n throw error;\n }\n }\n\n await this.processSceneHierarchy();\n }\n\n async processSceneHierarchy() {\n if (this.structures.length === 0) {\n throw new Error(\"DynamicLoader: No GLTF structures loaded\");\n }\n\n this.nodesToLoad = [];\n\n let estimatedSize = 0;\n\n for (const structure of this.structures) {\n const gltf = structure.getJson();\n\n if (!gltf.scenes || !gltf.scenes.length) {\n console.warn(\"DynamicLoader: No scenes found in GLTF structure\");\n continue;\n }\n\n estimatedSize += gltf.buffers[0].byteLength;\n\n const rootGroup = new Group();\n rootGroup.name = `structure_${structure.id}_root`;\n this.scene.add(rootGroup);\n this.structureRoots.set(structure.id, rootGroup);\n\n const scene = gltf.scenes[gltf.scene || 0];\n\n for (const nodeIndex of scene.nodes) {\n await this.processNodeHierarchy(structure, nodeIndex, rootGroup);\n }\n }\n\n const ignoreEdges = estimatedSize * 2 > this.memoryLimit;\n\n this.nodesToLoad.sort((a, b) => {\n const nodeA = this.nodes.get(a);\n const nodeB = this.nodes.get(b);\n\n if (!nodeA?.geometryExtents || !nodeB?.geometryExtents) {\n return 0;\n }\n\n const sizeA = nodeA.geometryExtents.getSize(new Vector3());\n const sizeB = nodeB.geometryExtents.getSize(new Vector3());\n const volumeA = sizeA.x * sizeA.y * sizeA.z;\n const volumeB = sizeB.x * sizeB.y * sizeB.z;\n\n return volumeB - volumeA;\n });\n\n if (!ignoreEdges && this.visibleEdges) {\n this.nodesToLoad.push(...this.edgeNodes);\n }\n\n this.dispatchEvent(\"databasechunk\", {\n totalNodes: this.nodesToLoad.length,\n structures: this.structures.map((s) => ({\n id: s.id,\n nodeCount: this.nodesToLoad.filter((nodeId) => nodeId.startsWith(s.id)).length,\n })),\n });\n }\n\n getFullHandle(structureId, originalHandle) {\n return `${structureId}${STRUCTURE_ID_SEPARATOR}${originalHandle}`;\n }\n\n async processNodeHierarchy(structure, nodeId, parentGroup) {\n const nodeDef = structure.json.nodes[nodeId];\n let nodeGroup = null;\n\n let handle = null;\n if (nodeDef.extras?.handle) {\n handle = this.getFullHandle(structure.id, nodeDef.extras.handle);\n }\n\n if (nodeDef.camera !== undefined) {\n const camera = this.loadCamera(structure, nodeDef.camera, nodeDef);\n if (nodeDef.extras) {\n camera.userData = { ...camera.userData, ...nodeDef.extras };\n }\n this.scene.add(camera);\n return;\n }\n\n const needsGroup = this.needsGroupForNode(structure, nodeDef);\n\n if (needsGroup) {\n nodeGroup = new Group();\n nodeGroup.name = nodeDef.name || `node_${nodeId}`;\n\n if (nodeDef.extras) {\n nodeGroup.userData = { ...nodeDef.extras };\n if (nodeGroup.userData.handle) {\n nodeGroup.userData.handle = this.getFullHandle(structure.id, nodeGroup.userData.handle);\n }\n }\n\n if (nodeDef.matrix) {\n nodeGroup.matrix.fromArray(nodeDef.matrix);\n nodeGroup.matrixAutoUpdate = false;\n } else if (nodeDef.translation || nodeDef.rotation || nodeDef.scale) {\n const position = nodeDef.translation ? new Vector3().fromArray(nodeDef.translation) : new Vector3();\n const quaternion = nodeDef.rotation ? new Quaternion().fromArray(nodeDef.rotation) : new Quaternion();\n const scale = nodeDef.scale ? new Vector3().fromArray(nodeDef.scale) : new Vector3(1, 1, 1);\n nodeGroup.matrix.compose(position, quaternion, scale);\n nodeGroup.matrixAutoUpdate = false;\n }\n\n if (parentGroup) {\n parentGroup.add(nodeGroup);\n }\n }\n\n if (nodeDef.mesh !== undefined) {\n const nodeMatrix = new Matrix4();\n const uniqueNodeId = `${structure.id}_${nodeId}`;\n const meshDef = structure.json.meshes[nodeDef.mesh];\n\n // Some glTF files may reference a mesh index that has no primitives\n // (or no mesh at all). Skip this mesh node gracefully.\n if (!meshDef || !meshDef.primitives || meshDef.primitives.length === 0) {\n if (nodeDef.children) {\n for (const childId of nodeDef.children) {\n await this.processNodeHierarchy(structure, childId, nodeGroup || parentGroup);\n }\n }\n return nodeGroup;\n }\n\n const geometryExtents = new Box3();\n\n for (const primitive of meshDef.primitives) {\n if (!primitive.attributes) continue;\n const positionAccessor = structure.json.accessors[primitive.attributes.POSITION];\n if (positionAccessor && positionAccessor.min && positionAccessor.max) {\n // For KHR_mesh_quantization (normalized integer accessors) min/max\n // are stored in quantized integer space (e.g. -32767..32767). The\n // BufferGeometry's local space, however, is the *normalized* range\n // (-1..1 or 0..1) because the GPU performs dequantization via the\n // `normalized` attribute flag. Convert here so geometryExtents is\n // in geometry-local (post-normalization) space.\n const minVec = new Vector3().fromArray(positionAccessor.min);\n const maxVec = new Vector3().fromArray(positionAccessor.max);\n if (positionAccessor.normalized === true) {\n const denom = this._normalizedDenominator(positionAccessor.componentType);\n if (denom > 0) {\n minVec.divideScalar(denom);\n maxVec.divideScalar(denom);\n // For signed types the result is clamped to [-1, 1] per spec.\n if (positionAccessor.componentType === 5120 || positionAccessor.componentType === 5122) {\n minVec.x = Math.max(minVec.x, -1);\n minVec.y = Math.max(minVec.y, -1);\n minVec.z = Math.max(minVec.z, -1);\n maxVec.x = Math.max(maxVec.x, -1);\n maxVec.y = Math.max(maxVec.y, -1);\n maxVec.z = Math.max(maxVec.z, -1);\n }\n }\n }\n geometryExtents.union(new Box3(minVec, maxVec));\n }\n }\n\n let isEdge = false;\n const firstPrimitive = meshDef.primitives[0];\n if (firstPrimitive && firstPrimitive.material !== undefined) {\n const material = structure.json.materials[firstPrimitive.material];\n if (material?.name === \"edges\") {\n isEdge = true;\n }\n }\n\n if (!isEdge) {\n this.nodesToLoad.push(uniqueNodeId);\n } else {\n this.edgeNodes.push(uniqueNodeId);\n }\n\n if (meshDef.extras && meshDef.extras.handle) {\n handle = this.getFullHandle(structure.id, meshDef.extras.handle);\n }\n\n this.nodes.set(uniqueNodeId, {\n position: nodeGroup ? nodeGroup.position.clone() : new Vector3().setFromMatrixPosition(nodeMatrix),\n nodeIndex: nodeId,\n meshIndex: nodeDef.mesh,\n loaded: false,\n loading: false,\n object: null,\n group: nodeGroup || parentGroup,\n structure,\n extras: nodeDef.extras,\n geometryExtents,\n handle: handle || this.getFullHandle(structure.id, structure._nextObjectId++),\n });\n }\n\n if (nodeDef.children) {\n for (const childId of nodeDef.children) {\n await this.processNodeHierarchy(structure, childId, nodeGroup || parentGroup);\n }\n }\n\n return nodeGroup;\n }\n\n needsGroupForNode(structure, nodeDef) {\n const hasTransforms = nodeDef.matrix || nodeDef.translation || nodeDef.rotation || nodeDef.scale;\n\n const hasMultiplePrimitives =\n nodeDef.mesh !== undefined && structure.json.meshes[nodeDef.mesh].primitives.length > 1;\n\n return hasTransforms !== undefined || hasMultiplePrimitives;\n }\n\n async processNodes() {\n const nodesToLoad = this.nodesToLoad;\n let loadedCount = 0;\n let lastLoadedCount = 0;\n const totalNodes = nodesToLoad.length;\n const progressTotal = { value: totalNodes };\n\n const loadProgress = async () => {\n loadedCount++;\n const total = progressTotal.value;\n const percentage = total > 0 ? Math.min(100, Math.round((loadedCount / total) * 100)) : 0;\n if (loadedCount - lastLoadedCount > 1000) {\n lastLoadedCount = loadedCount;\n this.updateMemoryIndicator();\n this.dispatchEvent(\"geometryprogress\", {\n percentage,\n loaded: loadedCount,\n total,\n });\n\n this.dispatchEvent(\"update\");\n\n await new Promise((resolve) => {\n setTimeout(resolve, 0);\n });\n }\n };\n\n try {\n const loadOperations = [];\n let memoryLimitReached = false;\n for (const nodeId of nodesToLoad) {\n if (this.abortController.signal.aborted) {\n throw new DOMException(\"Loading aborted\", \"AbortError\");\n }\n\n const estimatedSize = await this.estimateNodeSize(nodeId);\n const estimated = Number(estimatedSize) || 0;\n const effectiveLimit = this.memoryLimit / this.optimizationMemoryMultiplier / this.memoryEstimationFactor;\n\n if (this.currentMemoryUsage + this.pendingMemoryUsage + estimated > effectiveLimit) {\n memoryLimitReached = true;\n progressTotal.value = loadOperations.length;\n console.log(`Memory limit reached after scheduling ${loadOperations.length} nodes`);\n break;\n }\n\n this.pendingMemoryUsage += estimated;\n loadOperations.push(this.loadNode(nodeId, loadProgress, estimated));\n }\n\n for (const structure of this.structures) {\n loadOperations.push(structure.flushBufferRequests());\n }\n\n await Promise.all(loadOperations);\n\n this.dispatchEvent(\"geometryend\", {\n totalLoaded: loadedCount,\n totalNodes: progressTotal.value,\n memoryLimitReached,\n });\n\n return loadedCount;\n } catch (error) {\n this.dispatchEvent(\"geometryerror\", { error });\n throw error;\n }\n }\n\n async loadNodes() {\n console.time(\"Process nodes\");\n await this.processNodes();\n console.timeEnd(\"Process nodes\");\n\n console.time(\"Optimize scene\");\n await this.optimizeScene();\n console.timeEnd(\"Optimize scene\");\n }\n\n cleanupPartialLoad() {\n this.nodesToLoad.forEach((nodeId) => {\n const node = this.nodes.get(nodeId);\n if (node && node.loading) {\n this.unloadNode(nodeId);\n }\n });\n }\n\n createDefaultMaterial(primitiveMode = undefined) {\n if (primitiveMode === GL_CONSTANTS.POINTS) {\n return new PointsMaterial({\n color: new Color(0x808080),\n size: 0.05,\n sizeAttenuation: false,\n alphaTest: 0.5,\n transparent: true,\n vertexColors: false,\n blending: NormalBlending,\n depthWrite: false,\n depthTest: true,\n });\n } else if (\n primitiveMode === GL_CONSTANTS.LINES ||\n primitiveMode === GL_CONSTANTS.LINE_STRIP ||\n primitiveMode === GL_CONSTANTS.LINE_LOOP\n ) {\n return new LineBasicMaterial({\n color: 0x808080,\n linewidth: 1.0,\n alphaTest: 0.1,\n depthTest: true,\n depthWrite: true,\n transparent: true,\n opacity: 1.0,\n });\n } else {\n return new MeshPhongMaterial({\n color: 0x808080,\n specular: 0x222222,\n shininess: 10,\n });\n }\n }\n\n async estimateNodeSize(nodeId) {\n const node = this.nodes.get(nodeId);\n if (!node) return 0;\n return await node.structure.estimateNodeSize(node.meshIndex);\n }\n\n getTotalGeometryExtent() {\n const totalExtent = new Box3();\n\n for (const node of this.nodes.values()) {\n if (!node.geometryExtents) continue;\n\n if (node.object && this.hiddenHandles.has(node.object.userData.handle)) continue;\n\n const transformedBox = node.geometryExtents.clone();\n const structureRoot = node.structure ? this.structureRoots.get(node.structure.id) : null;\n\n if (node.group) {\n const relativeMatrix = new Matrix4();\n let currentObject = node.group;\n\n while (currentObject && currentObject !== structureRoot) {\n relativeMatrix.premultiply(currentObject.matrix);\n currentObject = currentObject.parent;\n }\n\n if (!relativeMatrix.equals(new Matrix4())) {\n transformedBox.applyMatrix4(relativeMatrix);\n }\n }\n\n if (structureRoot && structureRoot.matrix) {\n transformedBox.applyMatrix4(structureRoot.matrix);\n }\n\n const transform = this.objectTransforms.get(node.object);\n if (transform) {\n transformedBox.applyMatrix4(transform);\n }\n\n totalExtent.union(transformedBox);\n }\n\n if (this.scene && this.scene.matrix && !totalExtent.isEmpty()) {\n totalExtent.applyMatrix4(this.scene.matrix);\n }\n\n return totalExtent;\n }\n\n loadCamera(structure, cameraIndex, nodeDef) {\n const cameraDef = structure.getJson().cameras[cameraIndex];\n const params = cameraDef[cameraDef.type];\n\n let camera;\n if (cameraDef.type === \"perspective\") {\n camera = new PerspectiveCamera(\n MathUtils.radToDeg(params.yfov),\n params.aspectRatio || 1,\n params.znear || 1,\n params.zfar || 2e6\n );\n } else if (cameraDef.type === \"orthographic\") {\n camera = new OrthographicCamera(\n params.xmag / -2,\n params.xmag / 2,\n params.ymag / 2,\n params.ymag / -2,\n params.znear,\n params.zfar\n );\n }\n\n if (nodeDef.matrix) {\n camera.matrix.fromArray(nodeDef.matrix);\n camera.matrix.decompose(camera.position, camera.quaternion, camera.scale);\n } else {\n if (nodeDef.translation) {\n camera.position.fromArray(nodeDef.translation);\n }\n if (nodeDef.rotation) {\n camera.quaternion.fromArray(nodeDef.rotation);\n }\n if (nodeDef.scale) {\n camera.scale.fromArray(nodeDef.scale);\n }\n }\n\n return camera;\n }\n\n clearNodesToLoad() {\n this.nodesToLoad = [];\n }\n\n removeOptimization() {\n this.originalObjects.forEach((obj) => (obj.visible = true));\n\n const disposeMerged = (obj) => {\n if (obj.parent) {\n obj.parent.remove(obj);\n }\n if (obj.geometry) {\n obj.geometry.dispose();\n }\n };\n\n if (this.structureGroups) {\n for (const group of this.structureGroups.values()) {\n group.meshes.forEach(disposeMerged);\n group.lines.forEach(disposeMerged);\n group.lineSegments.forEach(disposeMerged);\n group.meshes.clear();\n group.lines.clear();\n group.lineSegments.clear();\n }\n }\n this.optimizedOriginalMap.clear();\n this.mergedMesh.clear();\n this.mergedLines.clear();\n this.mergedLineSegments.clear();\n this.originalObjects.clear();\n this.originalObjectsToSelection.clear();\n }\n\n initializeObjectVisibility() {\n if (this.maxObjectId > 0) {\n this.objectVisibility = new Float32Array(this.maxObjectId);\n for (let i = 0; i < this.maxObjectId; i++) {\n this.objectVisibility[i] = 1.0;\n }\n }\n }\n\n createVisibilityMaterial(material) {\n this.visibilityMaterials.add(material);\n\n const uniforms = {\n transformTexture: { value: this.transformTexture },\n transformTextureSize: { value: this.transformTextureSize },\n };\n material.userData.visibilityUniforms = uniforms;\n\n material.onBeforeCompile = (shader) => {\n shader.uniforms.transformTexture = uniforms.transformTexture;\n shader.uniforms.transformTextureSize = uniforms.transformTextureSize;\n\n // 1. Common Definitions\n shader.vertexShader = shader.vertexShader.replace(\n \"#include <common>\",\n `\n #include <common>\n \n attribute float visibility;\n attribute float objectId;\n varying float vVisibility;\n uniform highp sampler2D transformTexture;\n uniform float transformTextureSize;\n\n mat4 getTransformMatrix(float instanceId) {\n int size = int(transformTextureSize);\n int index = int(instanceId) * 4;\n \n int x0 = index % size;\n int y0 = index / size;\n \n vec4 row0 = texelFetch(transformTexture, ivec2(x0, y0), 0);\n vec4 row1 = texelFetch(transformTexture, ivec2(x0 + 1, y0), 0);\n vec4 row2 = texelFetch(transformTexture, ivec2(x0 + 2, y0), 0);\n vec4 row3 = texelFetch(transformTexture, ivec2(x0 + 3, y0), 0);\n \n return mat4(row0, row1, row2, row3);\n }\n `\n );\n\n // 2. Inject matrix retrieval at start of main()\n shader.vertexShader = shader.vertexShader.replace(\n \"void main() {\",\n `\n void main() {\n mat4 batchingMatrix = getTransformMatrix(objectId);\n vVisibility = visibility;\n `\n );\n\n // 3. Transform Normal (and Tangent, when present).\n //\n // We replace the standard `beginnormal_vertex` chunk because we need\n // to apply the per-object batching matrix to the normal. The original\n // three.js chunk also conditionally declares `objectTangent` under\n // `#ifdef USE_TANGENT` — that define is enabled automatically by\n // three.js whenever the material uses a normalMap (or clearcoat\n // normalMap) AND the geometry has a `tangent` attribute (e.g.\n // Avocado/BoomBox glTF samples). If our replacement omits that\n // declaration, downstream chunks (`defaultnormal_vertex`, etc.) fail\n // to compile with \"objectTangent: undeclared identifier\".\n //\n // We mirror three.js' own `skinnormal_vertex` convention: the same\n // per-vertex matrix that rotates the normal also rotates the tangent.\n if (shader.vertexShader.includes(\"#include <beginnormal_vertex>\")) {\n shader.vertexShader = shader.vertexShader.replace(\n \"#include <beginnormal_vertex>\",\n `\n vec3 objectNormal = vec3( normal );\n mat3 bm = mat3( batchingMatrix );\n objectNormal = bm * objectNormal;\n #ifdef USE_TANGENT\n vec3 objectTangent = vec3( tangent.xyz );\n objectTangent = bm * objectTangent;\n #endif\n `\n );\n }\n\n // 4. Transform Position\n shader.vertexShader = shader.vertexShader.replace(\n \"#include <begin_vertex>\",\n `\n vec3 transformed = vec3( position );\n transformed = ( batchingMatrix * vec4( transformed, 1.0 ) ).xyz;\n `\n );\n\n // 5. Fragment Shader\n shader.fragmentShader = shader.fragmentShader\n .replace(\n \"#include <common>\",\n `\n #include <common>\n varying float vVisibility;\n `\n )\n .replace(\n \"void main() {\",\n `\n void main() {\n if (vVisibility < 0.5) discard;\n `\n );\n\n //console.log(\"!vertex\", shader.vertexShader);\n };\n // Ensure the material recompiles to pick up changes\n material.needsUpdate = true;\n return material;\n }\n\n clear() {\n this.chunkQueue = [];\n\n this.structures.forEach((structure) => {\n if (structure) {\n structure.clear();\n }\n });\n this.structures = [];\n\n this.nodes.forEach((node) => {\n if (node.object) {\n if (node.object.parent) {\n node.object.parent.remove(node.object);\n }\n if (node.object.geometry) {\n node.object.geometry.dispose();\n }\n if (node.object.material) {\n if (Array.isArray(node.object.material)) {\n node.object.material.forEach((material) => material.dispose());\n } else {\n node.object.material.dispose();\n }\n }\n }\n });\n this.nodes.clear();\n\n this.loadedMeshes.forEach((mesh) => {\n if (mesh.geometry) mesh.geometry.dispose();\n if (mesh.material) {\n if (Array.isArray(mesh.material)) {\n mesh.material.forEach((material) => material.dispose());\n } else {\n mesh.material.dispose();\n }\n }\n });\n this.loadedMeshes.clear();\n\n this.structureRoots.forEach((rootGroup) => {\n if (rootGroup) {\n rootGroup.traverse((child) => {\n if (child.geometry) child.geometry.dispose();\n if (child.material) {\n if (Array.isArray(child.material)) {\n child.material.forEach((material) => material.dispose());\n } else {\n child.material.dispose();\n }\n }\n });\n if (rootGroup.parent) {\n rootGroup.parent.remove(rootGroup);\n }\n }\n });\n this.structureRoots.clear();\n\n this.mergedMesh.forEach((mesh) => {\n if (mesh.geometry) mesh.geometry.dispose();\n if (mesh.material) {\n if (Array.isArray(mesh.material)) {\n mesh.material.forEach((material) => material.dispose());\n } else {\n mesh.material.dispose();\n }\n }\n if (mesh.parent) mesh.parent.remove(mesh);\n });\n this.mergedMesh.clear();\n\n this.mergedLines.forEach((line) => {\n if (line.geometry) line.geometry.dispose();\n if (line.material) line.material.dispose();\n if (line.parent) line.parent.remove(line);\n });\n this.mergedLines.clear();\n\n this.mergedLineSegments.forEach((lineSegment) => {\n if (lineSegment.geometry) lineSegment.geometry.dispose();\n if (lineSegment.material) lineSegment.material.dispose();\n if (lineSegment.parent) lineSegment.parent.remove(lineSegment);\n });\n this.mergedLineSegments.clear();\n\n this.mergedPoints.forEach((points) => {\n if (points.geometry) points.geometry.dispose();\n if (points.material) points.material.dispose();\n if (points.parent) points.parent.remove(points);\n });\n this.mergedPoints.clear();\n\n this.geometryCache.clear();\n this.materialCache.clear();\n this.textureCache.clear();\n this.loadedMaterials.clear();\n\n this.nodesToLoad = [];\n this.handleToObjects.clear();\n this.originalObjects.clear();\n this.originalObjectsToSelection.clear();\n this.optimizedOriginalMap.clear();\n this.handleToOptimizedObjects.clear();\n this.hiddenHandles.clear();\n this.newOptimizedObjects.clear();\n this.oldOptimizeObjects.clear();\n this.isolatedObjects = [];\n\n this.objectTransforms.clear();\n this.transformedGeometries.clear();\n this._originalObjectMatrices.clear();\n\n this.totalLoadedObjects = 0;\n this.currentMemoryUsage = 0;\n this.pendingMemoryUsage = 0;\n this.loadedGeometrySize = 0;\n\n this.abortController = new AbortController();\n this.updateMemoryIndicator();\n\n this.objectIdToIndex.clear();\n this.maxObjectId = 0;\n this.objectVisibility = new Float32Array();\n this.meshToNodeMap = null;\n this.visibilityMaterials.clear();\n\n // NOTE: do *not* drop this._dracoLoader here. The DRACOLoader is owned\n // by the caller (injected via setDracoLoader) and should survive across\n // clear()/reload cycles — the loader keeps its worker pool warm and is\n // typically configured once at app startup.\n }\n\n setStructureTransform(structureId, matrix) {\n const rootGroup = this.structureRoots.get(structureId);\n if (rootGroup) {\n rootGroup.matrix.copy(matrix);\n rootGroup.matrix.decompose(rootGroup.position, rootGroup.quaternion, rootGroup.scale);\n return true;\n }\n return false;\n }\n\n getStructureRootGroup(structureId) {\n return this.structureRoots.get(structureId);\n }\n\n addEventListener(event, handler) {\n if (this.eventHandlers[event]) {\n this.eventHandlers[event].push(handler);\n }\n }\n\n removeEventListener(event, handler) {\n if (this.eventHandlers[event]) {\n this.eventHandlers[event] = this.eventHandlers[event].filter((h) => h !== handler);\n }\n }\n\n dispatchEvent(event, data) {\n if (this.eventHandlers[event]) {\n this.eventHandlers[event].forEach((handler) => handler(data));\n }\n }\n\n registerObjectWithHandle(object, handle) {\n if (!handle) return;\n\n const fullHandle = object.userData.handle;\n if (!this.handleToObjects.has(fullHandle)) {\n this.handleToObjects.set(fullHandle, new Set());\n }\n this.handleToObjects.get(fullHandle).add(object);\n\n object.userData.structureId = object.userData.handle.split(STRUCTURE_ID_SEPARATOR)[0];\n }\n\n getObjectsByHandle(handle) {\n if (!handle) return [];\n return Array.from(this.handleToObjects.get(handle) || []);\n }\n\n getHandlesByObjects(objects) {\n if (!objects.length) return [];\n const handles = new Set();\n objects.forEach((obj) => {\n if (this.originalObjects.has(obj)) handles.add(obj.userData.handle);\n });\n return Array.from(handles);\n }\n\n getMaterialId(material, index) {\n const props = {\n type: material.type,\n color: material.color?.getHex(),\n map: material.map?.uuid,\n transparent: material.transparent,\n opacity: material.opacity,\n side: material.side,\n index: index ? 1 : 0,\n };\n return JSON.stringify(props);\n }\n\n addToMaterialGroup(object, groupsMap, optimizeGroupList) {\n const VERTEX_LIMIT = 100_000;\n const INDEX_LIMIT = 100_000;\n\n const objectGeometryVertexCount = object.geometry.attributes.position.count;\n const objectGeometryIndexCount = object.geometry.index ? object.geometry.index.count : 0;\n\n const material = object.material;\n let materialId = this.getMaterialId(material, object.geometry.index !== null);\n\n let group;\n if (!groupsMap.has(materialId)) {\n group = {\n material,\n objects: [object],\n totalVertices: objectGeometryVertexCount,\n totalIndices: objectGeometryIndexCount,\n };\n groupsMap.set(materialId, group);\n optimizeGroupList.push(group);\n } else {\n group = groupsMap.get(materialId);\n if (\n group.totalVertices + objectGeometryVertexCount > VERTEX_LIMIT ||\n group.totalIndices + objectGeometryIndexCount > INDEX_LIMIT\n ) {\n const newGroup = {\n material,\n objects: [object],\n totalVertices: objectGeometryVertexCount,\n totalIndices: objectGeometryIndexCount,\n };\n materialId = this.getMaterialId(material, object.geometry.index !== null);\n groupsMap.set(materialId, newGroup);\n optimizeGroupList.push(newGroup);\n } else {\n group.objects.push(object);\n group.totalVertices += objectGeometryVertexCount;\n group.totalIndices += objectGeometryIndexCount;\n }\n }\n\n this.originalObjects.add(object);\n }\n\n yieldToUI() {\n return new Promise((resolve) => {\n setTimeout(resolve, 0);\n });\n }\n\n async optimizeScene() {\n console.log(\"Starting scene optimization...\");\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"start\",\n progress: 0,\n message: \"Starting optimization...\",\n });\n\n this.originalObjects.clear();\n this.originalObjectsToSelection.clear();\n // Clear previous optimization data\n this.objectIdToIndex.clear();\n this.maxObjectId = 0;\n const structureGroups = new Map();\n\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"collecting\",\n progress: 5,\n message: \"Collecting scene objects...\",\n });\n\n let totalObjectsToMerge = 0;\n\n this.scene.traverse((object) => {\n if (object.userData.structureId) {\n const structureId = object.userData.structureId;\n if (!structureGroups.has(structureId)) {\n structureGroups.set(structureId, {\n mapMeshes: new Map(),\n mapLines: new Map(),\n mapLineSegments: new Map(),\n mapPoints: new Map(),\n\n meshes: [],\n lines: [],\n lineSegments: [],\n points: [],\n rootGroup: this.structureRoots.get(structureId),\n });\n }\n\n const group = structureGroups.get(structureId);\n let added = false;\n\n if (object instanceof Mesh) {\n this.addToMaterialGroup(object, group.mapMeshes, group.meshes);\n added = true;\n } else if (object instanceof LineSegments) {\n this.addToMaterialGroup(object, group.mapLineSegments, group.lineSegments);\n added = true;\n } else if (object instanceof Line) {\n this.addToMaterialGroup(object, group.mapLines, group.lines);\n added = true;\n } else if (object instanceof Points) {\n this.addToMaterialGroup(object, group.mapPoints, group.points);\n added = true;\n }\n\n if (added) {\n totalObjectsToMerge++;\n }\n }\n });\n\n // Initialize transform texture and visibility arrays BEFORE merging\n // This ensures that as we create merged objects, the texture is large enough\n // and populated with identity matrices, so objects don't disappear (scale 0).\n if (totalObjectsToMerge > 0) {\n this.maxObjectId = totalObjectsToMerge;\n this.initTransformTexture();\n this.initializeObjectVisibility();\n\n // Reset counter so IDs are assigned from 0 during merge\n this.maxObjectId = 0;\n }\n\n let processedGroups = 0;\n const totalGroups = structureGroups.size;\n\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"merging\",\n progress: 10,\n message: `Merging ${totalGroups} structure groups...`,\n current: 0,\n total: totalGroups,\n });\n\n for (const group of structureGroups.values()) {\n group.mapMeshes.clear();\n group.mapLines.clear();\n group.mapLineSegments.clear();\n group.mapPoints.clear();\n\n await this.mergeMeshGroups(group.meshes, group.rootGroup);\n await this.yieldToUI();\n\n await this.mergeLineGroups(group.lines, group.rootGroup);\n await this.yieldToUI();\n\n await this.mergeLineSegmentGroups(group.lineSegments, group.rootGroup);\n await this.yieldToUI();\n\n await this.mergePointsGroups(group.points, group.rootGroup);\n\n processedGroups++;\n const progress = 10 + Math.round((processedGroups / totalGroups) * 80);\n\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"merging\",\n progress,\n message: `Processing structure ${processedGroups}/${totalGroups}...`,\n current: processedGroups,\n total: totalGroups,\n });\n\n console.log(`Optimization progress: ${processedGroups}/${totalGroups} structure groups processed (${progress}%)`);\n\n await this.yieldToUI();\n }\n\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"finalizing\",\n progress: 95,\n message: \"Finalizing optimization...\",\n });\n\n this.originalObjects.forEach((obj) => {\n obj.visible = false;\n if (!(obj instanceof Points) && !obj.userData.isEdge) {\n this.originalObjectsToSelection.add(obj);\n }\n });\n\n // Texture and visibility initialized at start of optimization\n console.log(`Optimization complete. Total objects: ${this.maxObjectId}`);\n\n this.dispatchEvent(\"optimizationprogress\", {\n phase: \"complete\",\n progress: 100,\n message: `Optimization complete! ${this.maxObjectId} objects processed.`,\n });\n\n this.updateMemoryIndicator();\n this.dispatchEvent(\"update\");\n }\n\n async mergeMeshGroups(materialGroups, rootGroup) {\n let processedGroups = 0;\n for (const group of materialGroups) {\n if (!group.material) {\n console.warn(\"DynamicLoader: Skipping mesh group with null material\");\n continue;\n }\n\n try {\n const geometries = [];\n const handles = new Set();\n const optimizedObjects = [];\n const objectMapping = new Map();\n let currentVertexOffset = 0;\n\n for (const mesh of group.objects) {\n const geometry = mesh.geometry.clone();\n\n const relativeMatrix = new Matrix4();\n let currentObject = mesh;\n\n while (currentObject && currentObject !== rootGroup) {\n relativeMatrix.premultiply(currentObject.matrix);\n currentObject = currentObject.parent;\n }\n\n if (!relativeMatrix.equals(new Matrix4())) {\n geometry.applyMatrix4(relativeMatrix);\n }\n\n const handle = mesh.userData.handle;\n if (!this.objectIdToIndex.has(handle)) {\n this.objectIdToIndex.set(handle, this.maxObjectId++);\n }\n const objectId = this.objectIdToIndex.get(handle);\n\n const vertexCount = geometry.attributes.position.count;\n const objectIds = new Float32Array(vertexCount);\n for (let i = 0; i < vertexCount; i++) {\n objectIds[i] = objectId;\n }\n geometry.setAttribute(\"objectId\", new BufferAttribute(objectIds, 1));\n\n objectMapping.set(mesh, {\n geometry,\n startVertexIndex: currentVertexOffset,\n vertexCount: geometry.attributes.position.count,\n });\n\n currentVertexOffset += geometry.attributes.position.count;\n geometries.push(geometry);\n\n optimizedObjects.push(mesh);\n handles.add(mesh.userData.handle);\n }\n\n const mergedObjects = [];\n\n if (geometries.length > 0) {\n const mergedGeometry = mergeGeometries(geometries);\n\n // Create visibility attribute\n const totalVertices = mergedGeometry.attributes.position.count;\n const visibilityArray = new Float32Array(totalVertices);\n\n // Initialize all vertices as visible (1.0)\n for (let i = 0; i < totalVertices; i++) {\n visibilityArray[i] = 1.0;\n }\n\n // Add visibility attribute to geometry\n mergedGeometry.setAttribute(\"visibility\", new BufferAttribute(visibilityArray, 1));\n\n if (this.useVAO) {\n this.createVAO(mergedGeometry);\n }\n\n // Create visibility material\n const visibilityMaterial = this.createVisibilityMaterial(group.material);\n\n const mergedMesh = new Mesh(mergedGeometry, visibilityMaterial);\n mergedMesh.frustumCulled = false; // Disable culling because vertex shader moves objects\n mergedMesh.userData.isOptimized = true;\n rootGroup.add(mergedMesh);\n\n this.mergedMesh.add(mergedMesh);\n this.optimizedOriginalMap.set(mergedMesh, optimizedObjects);\n\n // Store object mappings with visibility tracking\n this.mergedObjectMap.set(mergedMesh.uuid, {\n objectMapping,\n visibilityArray,\n totalVertices,\n });\n\n this.mergedGeometryVisibility.set(mergedMesh, visibilityArray);\n\n mergedObjects.push(mergedMesh);\n\n geometries.forEach((geometry) => {\n geometry.dispose();\n });\n }\n\n handles.forEach((handle) => {\n if (this.handleToOptimizedObjects.has(handle)) {\n const existingObjects = this.handleToOptimizedObjects.get(handle);\n existingObjects.push(...mergedObjects);\n this.handleToOptimizedObjects.set(handle, existingObjects);\n } else {\n this.handleToOptimizedObjects.set(handle, mergedObjects);\n }\n });\n\n processedGroups++;\n if (processedGroups % 5 === 0) {\n await this.yieldToUI();\n }\n } catch (error) {\n console.warn(\"DynamicLoader: Failed to merge meshes for material:\", error);\n group.objects.forEach((mesh) => {\n mesh.visible = true;\n });\n }\n }\n }\n\n async mergeLineGroups(materialGroups, rootGroup) {\n let processedGroups = 0;\n for (const group of materialGroups) {\n if (group.objects.length === 0) continue;\n\n if (!group.material) {\n console.warn(\"DynamicLoader: Skipping line group with null material\");\n continue;\n }\n\n const handles = new Set();\n let totalVertices = 0;\n const objectMapping = new Map();\n let currentVertexOffset = 0;\n\n group.objects.map((line) => {\n handles.add(line.userData.handle);\n totalVertices += line.geometry.attributes.position.count;\n });\n\n const positions = new Float32Array(totalVertices * 3);\n let posOffset = 0;\n\n const indices = [];\n let vertexOffset = 0;\n\n let isEdge = false;\n group.objects.forEach((line) => {\n isEdge = line.userData.isEdge;\n const geometry = line.geometry.clone();\n\n const relativeMatrix = new Matrix4();\n let currentObject = line;\n\n while (currentObject && currentObject !== rootGroup) {\n relativeMatrix.premultiply(currentObject.matrix);\n currentObject = currentObject.parent;\n }\n\n if (!relativeMatrix.equals(new Matrix4())) {\n geometry.applyMatrix4(relativeMatrix);\n }\n\n const positionAttr = geometry.attributes.position;\n const vertexCount = positionAttr.count;\n\n const handle = line.userData.handle;\n if (!this.objectIdToIndex.has(handle)) {\n this.objectIdToIndex.set(handle, this.maxObjectId++);\n }\n\n objectMapping.set(line, {\n startVertexIndex: currentVertexOffset,\n vertexCount,\n });\n currentVertexOffset += vertexCount;\n const vector = new Vector3();\n\n for (let i = 0; i < vertexCount; i++) {\n vector.fromBufferAttribute(positionAttr, i);\n positions[posOffset++] = vector.x;\n positions[posOffset++] = vector.y;\n positions[posOffset++] = vector.z;\n }\n\n for (let i = 0; i < vertexCount - 1; i++) {\n indices.push(vertexOffset + i, vertexOffset + i + 1);\n }\n\n vertexOffset += vertexCount;\n geometry.dispose();\n });\n\n const geometry = new BufferGeometry();\n geometry.setAttribute(\"position\", new BufferAttribute(positions, 3));\n geometry.setIndex(indices);\n geometry.computeBoundingSphere();\n geometry.computeBoundingBox();\n\n const objectIds = new Float32Array(totalVertices);\n let vertexIndex = 0;\n group.objects.forEach((line) => {\n const vertexCount = line.geometry.attributes.position.count;\n const handle = line.userData.handle;\n const objectId = this.objectIdToIndex.get(handle);\n\n for (let i = 0; i < vertexCount; i++) {\n objectIds[vertexIndex++] = objectId;\n }\n });\n geometry.setAttribute(\"objectId\", new BufferAttribute(objectIds, 1));\n\n const visibilityArray = new Float32Array(totalVertices);\n for (let i = 0; i < totalVertices; i++) {\n visibilityArray[i] = 1.0;\n }\n geometry.setAttribute(\"visibility\", new BufferAttribute(visibilityArray, 1));\n\n const visibilityMaterial = this.createVisibilityMaterial(group.material);\n\n const mergedLine = new LineSegments(geometry, visibilityMaterial);\n mergedLine.frustumCulled = false;\n mergedLine.userData.isEdge = isEdge;\n mergedLine.userData.isOptimized = true;\n\n const mergedObjects = [mergedLine];\n if (this.useVAO) {\n this.createVAO(mergedLine);\n }\n rootGroup.add(mergedLine);\n this.mergedLines.add(mergedLine);\n this.optimizedOriginalMap.set(mergedLine, group.objects);\n\n this.mergedObjectMap.set(mergedLine.uuid, {\n objectMapping,\n visibilityArray,\n totalVertices,\n });\n\n this.mergedGeometryVisibility.set(mergedLine, visibilityArray);\n\n handles.forEach((handle) => {\n if (this.handleToOptimizedObjects.has(handle)) {\n const existingObjects = this.handleToOptimizedObjects.get(handle);\n existingObjects.push(...mergedObjects);\n this.handleToOptimizedObjects.set(handle, existingObjects);\n } else {\n this.handleToOptimizedObjects.set(handle, mergedObjects);\n }\n });\n\n processedGroups++;\n if (processedGroups % 5 === 0) {\n await this.yieldToUI();\n }\n }\n }\n\n async mergeLineSegmentGroups(materialGroups, rootGroup) {\n let processedGroups = 0;\n for (const group of materialGroups) {\n if (!group.material) {\n console.warn(\"DynamicLoader: Skipping line segment group with null material\");\n continue;\n }\n\n try {\n const geometries = [];\n const optimizedObjects = [];\n const handles = new Set();\n const objectMapping = new Map();\n let currentVertexOffset = 0;\n let isEdge = false;\n\n for (const line of group.objects) {\n isEdge = line.userData.isEdge;\n const geometry = line.geometry.clone();\n\n // Calculate transformation matrix relative to rootGroup\n const relativeMatrix = new Matrix4();\n let currentObject = line;\n\n while (currentObject && currentObject !== rootGroup) {\n relativeMatrix.premultiply(currentObject.matrix);\n currentObject = currentObject.parent;\n }\n\n // Apply the relative transformation\n if (!relativeMatrix.equals(new Matrix4())) {\n geometry.applyMatrix4(relativeMatrix);\n }\n\n const handle = line.userData.handle;\n if (!this.objectIdToIndex.has(handle)) {\n this.objectIdToIndex.set(handle, this.maxObjectId++);\n }\n const objectId = this.objectIdToIndex.get(handle);\n const vertexCount = geometry.attributes.position.count;\n const objectIds = new Float32Array(vertexCount);\n for (let i = 0; i < vertexCount; i++) {\n objectIds[i] = objectId;\n }\n geometry.setAttribute(\"objectId\", new BufferAttribute(objectIds, 1));\n\n objectMapping.set(line, {\n geometry,\n startVertexIndex: currentVertexOffset,\n vertexCount: geometry.attributes.position.count,\n });\n\n currentVertexOffset += geometry.attributes.position.count;\n geometries.push(geometry);\n optimizedObjects.push(line);\n handles.add(line.userData.handle);\n }\n\n const mergedObjects = [];\n\n if (geometries.length > 0) {\n const mergedGeometry = mergeGeometries(geometries, false);\n\n const totalVertices = mergedGeometry.attributes.position.count;\n const visibilityArray = new Float32Array(totalVertices);\n\n for (let i = 0; i < totalVertices; i++) {\n visibilityArray[i] = 1.0;\n }\n\n mergedGeometry.setAttribute(\"visibility\", new BufferAttribute(visibilityArray, 1));\n\n const visibilityMaterial = this.createVisibilityMaterial(group.material);\n\n const mergedLine = new LineSegments(mergedGeometry, visibilityMaterial);\n mergedLine.frustumCulled = false;\n mergedLine.userData.isEdge = isEdge;\n mergedLine.userData.isOptimized = true;\n\n if (this.useVAO) {\n this.createVAO(mergedLine);\n }\n\n rootGroup.add(mergedLine);\n this.mergedLineSegments.add(mergedLine);\n this.optimizedOriginalMap.set(mergedLine, optimizedObjects);\n\n this.mergedObjectMap.set(mergedLine.uuid, {\n objectMapping,\n visibilityArray,\n totalVertices,\n });\n\n this.mergedGeometryVisibility.set(mergedLine, visibilityArray);\n\n mergedObjects.push(mergedLine);\n\n geometries.forEach((geometry) => {\n geometry.dispose();\n });\n }\n\n handles.forEach((handle) => {\n if (this.handleToOptimizedObjects.has(handle)) {\n const existingObjects = this.handleToOptimizedObjects.get(handle);\n existingObjects.push(...mergedObjects);\n this.handleToOptimizedObjects.set(handle, existingObjects);\n } else {\n this.handleToOptimizedObjects.set(handle, mergedObjects);\n }\n });\n\n processedGroups++;\n if (processedGroups % 5 === 0) {\n await this.yieldToUI();\n }\n } catch (error) {\n console.warn(\"DynamicLoader: Failed to merge line segments for material:\", error);\n group.objects.forEach((line) => {\n line.visible = true;\n });\n }\n }\n }\n\n async mergePointsGroups(materialGroups, rootGroup) {\n let processedGroups = 0;\n for (const group of materialGroups) {\n if (!group.material) {\n console.warn(\"DynamicLoader: Skipping points group with null material\");\n continue;\n }\n\n try {\n const geometries = [];\n const optimizedObjects = [];\n const handles = new Set();\n\n for (const points of group.objects) {\n const geometry = points.geometry.clone();\n\n const relativeMatrix = new Matrix4();\n let currentObject = points;\n\n while (currentObject && currentObject !== rootGroup) {\n relativeMatrix.premultiply(currentObject.matrix);\n currentObject = currentObject.parent;\n }\n\n if (!relativeMatrix.equals(new Matrix4())) {\n geometry.applyMatrix4(relativeMatrix);\n }\n\n geometries.push(geometry);\n optimizedObjects.push(points);\n handles.add(points.userData.handle);\n }\n\n const mergedObjects = [];\n\n if (geometries.length > 0) {\n const mergedGeometry = mergeGeometries(geometries, false);\n\n // Add objectId attribute\n const totalVertices = mergedGeometry.attributes.position.count;\n const objectIds = new Float32Array(totalVertices);\n let vertexOffset = 0;\n group.objects.forEach((points) => {\n const handle = points.userData.handle;\n if (!this.objectIdToIndex.has(handle)) {\n this.objectIdToIndex.set(handle, this.maxObjectId++);\n }\n const objectId = this.objectIdToIndex.get(handle);\n const count = points.geometry.attributes.position.count;\n for (let i = 0; i < count; i++) {\n objectIds[vertexOffset++] = objectId;\n }\n });\n mergedGeometry.setAttribute(\"objectId\", new BufferAttribute(objectIds, 1));\n\n // Add visibility attribute\n const visibilityArray = new Float32Array(totalVertices);\n visibilityArray.fill(1.0);\n mergedGeometry.setAttribute(\"visibility\", new BufferAttribute(visibilityArray, 1));\n\n const visibilityMaterial = this.createVisibilityMaterial(group.material);\n const mergedPoints = new Points(mergedGeometry, visibilityMaterial);\n mergedPoints.frustumCulled = false;\n mergedPoints.userData.isOptimized = true;\n\n if (this.useVAO) {\n this.createVAO(mergedPoints);\n }\n\n rootGroup.add(mergedPoints);\n\n this.mergedPoints.add(mergedPoints);\n this.optimizedOriginalMap.set(mergedPoints, optimizedObjects);\n mergedObjects.push(mergedPoints);\n\n geometries.forEach((geometry) => {\n geometry.dispose();\n });\n }\n\n handles.forEach((handle) => {\n if (this.handleToOptimizedObjects.has(handle)) {\n const existingObjects = this.handleToOptimizedObjects.get(handle);\n existingObjects.push(...mergedObjects);\n this.handleToOptimizedObjects.set(handle, existingObjects);\n } else {\n this.handleToOptimizedObjects.set(handle, mergedObjects);\n }\n });\n\n processedGroups++;\n if (processedGroups % 5 === 0) {\n await this.yieldToUI();\n }\n } catch (error) {\n console.warn(\"DynamicLoader: Failed to merge points for material:\", error);\n group.objects.forEach((points) => {\n points.visible = true;\n });\n }\n }\n }\n\n mergeInSingleSegment(structureId, rootGroup) {\n const lineSegmentsArray = [...this.mergedLineSegments, ...this.mergedLines].filter(\n (obj) => obj.userData.structureId === structureId\n );\n\n if (lineSegmentsArray.length === 0) return;\n\n try {\n const geometriesWithIndex = [];\n const hasNormals = lineSegmentsArray.some((segment) => segment.geometry.attributes.normal !== undefined);\n\n lineSegmentsArray.forEach((segment) => {\n const clonedGeometry = segment.geometry.clone();\n clonedGeometry.applyMatrix4(segment.matrixWorld);\n\n if (hasNormals && !clonedGeometry.attributes.normal) {\n clonedGeometry.computeVertexNormals();\n }\n if (!hasNormals && clonedGeometry.attributes.normal) {\n clonedGeometry.deleteAttribute(\"normal\");\n }\n\n const colorArray = new Float32Array(clonedGeometry.attributes.position.count * 3);\n for (let i = 0; i < colorArray.length; i += 3) {\n colorArray[i] = segment.material.color.r;\n colorArray[i + 1] = segment.material.color.g;\n colorArray[i + 2] = segment.material.color.b;\n }\n clonedGeometry.setAttribute(\"color\", new BufferAttribute(colorArray, 3));\n\n if (!clonedGeometry.index) {\n const indices = [];\n const posCount = clonedGeometry.attributes.position.count;\n for (let i = 0; i < posCount - 1; i += 2) {\n indices.push(i, i + 1);\n }\n clonedGeometry.setIndex(indices);\n }\n\n geometriesWithIndex.push(clonedGeometry);\n });\n\n const finalGeometry = mergeGeometries(geometriesWithIndex, false);\n // Add objectId attribute\n const totalVertices = finalGeometry.attributes.position.count;\n const objectIds = new Float32Array(totalVertices);\n let vertexOffset = 0;\n\n lineSegmentsArray.forEach((segment) => {\n const handle = segment.userData.handle;\n if (!this.objectIdToIndex.has(handle)) {\n this.objectIdToIndex.set(handle, this.maxObjectId++);\n }\n const objectId = this.objectIdToIndex.get(handle);\n const count = segment.geometry.attributes.position.count;\n for (let i = 0; i < count; i++) {\n objectIds[vertexOffset++] = objectId;\n }\n });\n finalGeometry.setAttribute(\"objectId\", new BufferAttribute(objectIds, 1));\n\n // Add visibility attribute\n const visibilityArray = new Float32Array(totalVertices);\n visibilityArray.fill(1.0);\n finalGeometry.setAttribute(\"visibility\", new BufferAttribute(visibilityArray, 1));\n\n const material = new LineBasicMaterial({\n vertexColors: true,\n });\n const visibilityMaterial = this.createVisibilityMaterial(material);\n\n if (this.useVAO) {\n this.createVAO(finalGeometry);\n }\n\n const mergedLine = new LineSegments(finalGeometry, visibilityMaterial);\n mergedLine.frustumCulled = false;\n mergedLine.userData.structureId = structureId;\n mergedLine.userData.isOptimized = true;\n rootGroup.add(mergedLine);\n this.mergedLineSegments.add(mergedLine);\n\n lineSegmentsArray.forEach((obj) => {\n if (obj.parent) {\n obj.parent.remove(obj);\n }\n obj.geometry.dispose();\n });\n } catch (error) {\n console.warn(\"DynamicLoader: Failed to merge geometries:\", error);\n lineSegmentsArray.forEach((obj) => {\n obj.visible = true;\n rootGroup.add(obj);\n });\n }\n }\n\n showOriginalObjects(objects) {\n objects.forEach((obj) => {\n if (this.originalObjects.has(obj)) {\n obj.visible = true;\n }\n });\n }\n\n hideOriginalObjects(objects) {\n objects.forEach((obj) => {\n if (this.originalObjects.has(obj)) {\n obj.visible = false;\n }\n });\n }\n\n createVAO(geometry) {\n if (!this.useVAO) {\n return;\n }\n\n if (geometry.attributes?.position?.count < 1000) {\n return;\n }\n\n const gl = this.renderer.getContext();\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n\n for (const name in geometry.attributes) {\n const attribute = geometry.attributes[name];\n const buffer = this.renderer.properties.get(attribute).buffer;\n\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.enableVertexAttribArray(attribute.itemSize);\n gl.vertexAttribPointer(attribute.itemSize, attribute.itemSize, gl.FLOAT, false, 0, 0);\n }\n\n if (geometry.index) {\n const indexBuffer = this.renderer.properties.get(geometry.index).buffer;\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\n }\n\n gl.bindVertexArray(null);\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\n\n geometry.vao = vao;\n }\n\n getOriginalObjectForSelect() {\n const optimizedOriginals = [];\n\n for (const obj of this.originalObjectsToSelection) {\n if (this.hiddenHandles.has(obj.userData.handle)) {\n continue;\n }\n\n optimizedOriginals.push(obj);\n }\n\n return optimizedOriginals;\n }\n\n isolateObjects(handles) {\n if (this.hiddenHandles.size !== 0) {\n this.hiddenHandles.clear();\n this.syncHiddenObjects();\n }\n\n for (const handle of this.handleToOptimizedObjects.keys()) {\n if (!handles.has(handle)) {\n this.hiddenHandles.add(handle);\n }\n }\n\n this.syncHiddenObjects();\n }\n\n showAllHiddenObjects() {\n this.hiddenHandles.clear();\n this.syncHiddenObjects();\n }\n\n hideObjects(handles) {\n handles.forEach((handle) => {\n this.hiddenHandles.add(handle);\n });\n this.syncHiddenObjects();\n }\n\n showObjects(handles) {\n handles.forEach((handle) => {\n this.hiddenHandles.delete(handle);\n });\n this.syncHiddenObjects();\n }\n\n _updateVisibilityAttribute(mergedObject) {\n if (\n mergedObject.geometry &&\n mergedObject.geometry.attributes.visibility &&\n mergedObject.geometry.attributes.objectId\n ) {\n const visibilityArray = mergedObject.geometry.attributes.visibility.array;\n const objectIdArray = mergedObject.geometry.attributes.objectId.array;\n\n for (let i = 0; i < visibilityArray.length; i++) {\n const objectId = objectIdArray[i];\n if (objectId < this.objectVisibility.length) {\n visibilityArray[i] = this.objectVisibility[objectId];\n }\n }\n\n mergedObject.geometry.attributes.visibility.needsUpdate = true;\n }\n }\n\n applyObjectTransforms(objectTransformMap) {\n if (this.mergedObjectMap.size === 0) {\n console.warn(\"DynamicLoader: No merged objects to transform\");\n return;\n }\n\n if (!this.transformData) {\n console.warn(\"DynamicLoader: Transform texture not initialized\");\n return;\n }\n\n // Store transform map directly\n this.objectTransforms = objectTransformMap;\n\n // Reset to identity first to ensure clean state\n this._resetTransformData(false);\n\n // Cache references for tight loop\n const transformData = this.transformData;\n const objectIdToIndex = this.objectIdToIndex;\n\n // Fast track map iteration using an array of values if we can\n // While .entries() is fast, sometimes direct properties check is faster\n let textureNeedsUpdate = false;\n\n // Process matrices directly into texture array\n if (objectTransformMap instanceof Map) {\n // Modern V8 engines optimize for...of on Maps better than Array.from or destructuring iterators\n for (const [object, matrix] of objectTransformMap.entries()) {\n const userData = object.userData;\n if (!userData) continue;\n\n const handle = userData.handle;\n if (handle === undefined) continue;\n\n const objectId = objectIdToIndex.get(handle);\n if (objectId !== undefined) {\n // TypedArray.set is highly optimized in modern JS engines\n transformData.set(matrix.elements, objectId * 16);\n textureNeedsUpdate = true;\n }\n }\n } else {\n // Fallback for arrays of [object, matrix] pairs\n const len = objectTransformMap.length;\n for (let i = 0; i < len; i++) {\n const pair = objectTransformMap[i];\n const userData = pair[0].userData;\n if (!userData) continue;\n\n const handle = userData.handle;\n if (handle === undefined) continue;\n\n const objectId = objectIdToIndex.get(handle);\n if (objectId !== undefined) {\n transformData.set(pair[1].elements, objectId * 16);\n textureNeedsUpdate = true;\n }\n }\n }\n\n if (textureNeedsUpdate) {\n this.updateTransformTexture();\n if (\n this._lastTransformTexture !== this.transformTexture ||\n this._lastTransformTextureSize !== this.transformTextureSize\n ) {\n this.updateMaterialUniforms();\n }\n }\n\n // TODO: Remove this block when highlight is implemented via shader.\n // Sync transforms to original (hidden) objects so that\n // GeometryHighlighter wireframes follow exploded positions.\n if (this.syncTransformsToOriginalObjects) {\n this._syncOriginalObjectTransforms(objectTransformMap);\n }\n }\n\n // TODO: Remove when highlight is implemented via shader.\n _syncOriginalObjectTransforms(objectTransformMap) {\n // First, restore any previously transformed objects back to their saved position\n for (const [obj, savedPos] of this._originalObjectMatrices) {\n obj.position.copy(savedPos);\n if (obj.userData.highlight) {\n obj.userData.highlight.position.copy(savedPos);\n }\n }\n this._originalObjectMatrices.clear();\n\n // The transform matrix is in the structure root's local space.\n // Original objects may be nested inside groups with their own transforms,\n // so we must convert the offset from structure-root-local → parent-local space.\n const _offset = new Vector3();\n const _parentInverse = new Matrix4();\n\n if (objectTransformMap instanceof Map) {\n for (const [object, matrix] of objectTransformMap.entries()) {\n if (!object.userData?.handle) continue;\n\n // Save original position before modifying\n if (!this._originalObjectMatrices.has(object)) {\n this._originalObjectMatrices.set(object, object.position.clone());\n }\n\n // Extract translation from the transform matrix (structure-root-local space)\n _offset.setFromMatrixPosition(matrix);\n\n // Convert offset from structure-root-local to world space,\n // then from world space to parent-local space.\n if (object.userData.structureId) {\n const rootGroup = this.structureRoots.get(object.userData.structureId);\n if (rootGroup && object.parent && object.parent !== rootGroup) {\n const origin = new Vector3(0, 0, 0);\n origin.applyMatrix4(rootGroup.matrixWorld);\n _offset.applyMatrix4(rootGroup.matrixWorld);\n _offset.sub(origin);\n\n const parentOrigin = new Vector3(0, 0, 0);\n _parentInverse.copy(object.parent.matrixWorld).invert();\n parentOrigin.applyMatrix4(_parentInverse);\n _offset.applyMatrix4(_parentInverse);\n _offset.sub(parentOrigin);\n }\n }\n\n object.position.add(_offset);\n\n if (object.userData.highlight) {\n object.userData.highlight.position.copy(object.position);\n }\n }\n }\n }\n\n createExplodeTransforms(objects = null, explodeCenter = null, explodeFactor = 1.5) {\n const transformMap = new Map();\n\n if (!explodeCenter) {\n explodeCenter = new Vector3();\n const extent = this.getTotalGeometryExtent();\n if (!extent.isEmpty()) {\n extent.getCenter(explodeCenter);\n }\n }\n\n const objectsArray = objects\n ? Array.isArray(objects)\n ? objects\n : Array.from(objects)\n : Array.from(this.originalObjects);\n\n // Cache inverse matrices for structures\n const structureInverseMatrices = new Map();\n\n // Map mesh -> node to access cached geometryExtents\n if (!this.meshToNodeMap) {\n this.meshToNodeMap = new Map();\n for (const node of this.nodes.values()) {\n if (node.object) {\n this.meshToNodeMap.set(node.object, node);\n }\n }\n }\n\n for (const obj of objectsArray) {\n if (!obj.geometry || !obj.geometry.attributes.position) continue;\n\n // OPTIMIZATION: Use cached node extent if available\n if (!obj.userData.explodeVector) {\n let center = null;\n\n // 1. Try to get extent from node (fastest, pre-calculated)\n const node = this.meshToNodeMap.get(obj);\n if (node && node.geometryExtents) {\n const box = node.geometryExtents.clone();\n box.applyMatrix4(obj.matrixWorld);\n center = new Vector3();\n box.getCenter(center);\n }\n\n // 2. Fallback to geometry bounding box\n if (!center) {\n if (!obj.geometry.boundingBox) obj.geometry.computeBoundingBox();\n const box = obj.geometry.boundingBox.clone();\n box.applyMatrix4(obj.matrixWorld);\n center = new Vector3();\n box.getCenter(center);\n }\n\n // Calculate vector from explode center to object center\n const explodeVector = center.sub(explodeCenter);\n\n // Cache it\n obj.userData.explodeVector = explodeVector;\n }\n\n const explodeVector = obj.userData.explodeVector;\n const distance = explodeVector.length();\n\n if (distance > 0) {\n // Calculate offset in World Space\n const offset = explodeVector.clone().multiplyScalar(explodeFactor - 1.0);\n\n // Convert offset from World Space to Local Space of the merged mesh\n const localOffset = offset.clone();\n\n if (obj.userData.structureId) {\n const structureId = obj.userData.structureId;\n let inverseMatrix = structureInverseMatrices.get(structureId);\n\n if (!inverseMatrix) {\n const rootGroup = this.structureRoots.get(structureId);\n if (rootGroup) {\n // Reuse cached inverse matrix if possible\n if (!rootGroup.userData.inverseWorldMatrix) {\n // rootGroup.updateMatrixWorld(true); // Trust current state\n rootGroup.userData.inverseWorldMatrix = new Matrix4().copy(rootGroup.matrixWorld).invert();\n }\n inverseMatrix = rootGroup.userData.inverseWorldMatrix;\n structureInverseMatrices.set(structureId, inverseMatrix);\n }\n }\n\n if (inverseMatrix) {\n const zero = new Vector3(0, 0, 0).applyMatrix4(inverseMatrix);\n const vec = offset.clone().applyMatrix4(inverseMatrix).sub(zero);\n localOffset.copy(vec);\n }\n }\n\n let matrix = obj.userData.explodeMatrix;\n if (!matrix) {\n matrix = new Matrix4();\n obj.userData.explodeMatrix = matrix;\n }\n matrix.makeTranslation(localOffset.x, localOffset.y, localOffset.z);\n transformMap.set(obj, matrix);\n }\n }\n\n return transformMap;\n }\n\n clearTransforms() {\n this.objectTransforms.clear();\n this._resetTransformData(true);\n\n // TODO: Remove when highlight is implemented via shader.\n // Restore original object positions\n if (this.syncTransformsToOriginalObjects) {\n for (const [obj, savedPos] of this._originalObjectMatrices) {\n obj.position.copy(savedPos);\n if (obj.userData.highlight) {\n obj.userData.highlight.position.copy(savedPos);\n }\n }\n this._originalObjectMatrices.clear();\n }\n }\n\n clearHandleTransforms() {\n this.clearTransforms();\n }\n\n syncHiddenObjects() {\n if (this.mergedObjectMap.size === 0) {\n console.warn(\"DynamicLoader: No merged objects to sync\");\n return;\n }\n\n if (this.objectVisibility.length > 0) {\n for (let i = 0; i < this.objectVisibility.length; i++) {\n this.objectVisibility[i] = 1.0;\n }\n\n this.hiddenHandles.forEach((handle) => {\n const index = this.objectIdToIndex.get(handle);\n if (index !== undefined && index < this.objectVisibility.length) {\n this.objectVisibility[index] = 0.0;\n }\n });\n }\n\n for (const mesh of this.mergedMesh) {\n this._updateVisibilityAttribute(mesh);\n }\n for (const line of this.mergedLines) {\n this._updateVisibilityAttribute(line);\n }\n for (const lineSegment of this.mergedLineSegments) {\n this._updateVisibilityAttribute(lineSegment);\n }\n for (const point of this.mergedPoints) {\n this._updateVisibilityAttribute(point);\n }\n }\n\n getStructureGeometryExtent(structureId) {\n const extent = new Box3();\n const structureRoot = this.structureRoots.get(structureId);\n\n for (const [nodeId, node] of this.nodes.entries()) {\n if (!node.geometryExtents) continue;\n if (!nodeId.startsWith(structureId + \"_\")) continue;\n if (node.object && this.hiddenHandles && this.hiddenHandles.has(node.object.userData.handle)) continue;\n const transformedBox = node.geometryExtents.clone();\n\n if (node.group) {\n const matrices = [];\n let currentGroup = node.group;\n\n while (currentGroup && currentGroup !== structureRoot) {\n if (currentGroup.matrix && currentGroup.matrixAutoUpdate === false) {\n matrices.unshift(currentGroup.matrix);\n }\n currentGroup = currentGroup.parent;\n }\n\n for (const matrix of matrices) {\n transformedBox.applyMatrix4(matrix);\n }\n }\n\n if (structureRoot && structureRoot.matrix) {\n transformedBox.applyMatrix4(structureRoot.matrix);\n }\n\n extent.union(transformedBox);\n }\n\n if (this.scene && this.scene.matrix && !extent.isEmpty()) {\n extent.applyMatrix4(this.scene.matrix);\n }\n\n return extent;\n }\n\n setMaxConcurrentChunks(maxChunks = 6) {\n if (maxChunks < 1) {\n console.warn(\"Max concurrent chunks must be at least 1\");\n return;\n }\n this.maxConcurrentChunks = maxChunks;\n }\n\n waitForChunkSlot() {\n if (this.activeChunkLoads < this.maxConcurrentChunks) {\n this.activeChunkLoads++;\n return Promise.resolve();\n }\n\n return new Promise((resolve) => {\n this.chunkQueue.push(resolve);\n });\n }\n\n releaseChunkSlot() {\n this.activeChunkLoads--;\n\n if (this.chunkQueue.length > 0) {\n const nextResolve = this.chunkQueue.shift();\n this.activeChunkLoads++;\n nextResolve();\n }\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { LoadParams } from \"@inweb/viewer-core\";\nimport { LoadingManager, LoaderUtils } from \"three\";\n\nexport type GLTFFileSource = string | globalThis.File | ArrayBuffer;\n\nexport type GLTFLoadParams = LoadParams & {\n requestHeader?: HeadersInit;\n withCredentials?: boolean;\n path?: string;\n externalFiles?: Map<string, GLTFFileSource>;\n crossOrigin?: string;\n};\n\nexport class GLTFLoadingManager extends LoadingManager {\n public path = \"\";\n public resourcePath = \"\";\n public fileURL = \"\";\n public dataURLs = new Map();\n\n constructor(file: GLTFFileSource, params: GLTFLoadParams = {}) {\n super();\n\n this.path = params.path || \"\";\n\n const externalFiles = params.externalFiles || new Map();\n\n if (typeof file === \"string\") {\n this.fileURL = file;\n this.resourcePath = LoaderUtils.extractUrlBase(file);\n } else {\n externalFiles.forEach((value, key) => (this.fileURL = value === file ? key : this.fileURL));\n externalFiles.set(this.fileURL, file);\n }\n\n externalFiles.forEach((value, key) => {\n let dataURL: string;\n if (typeof value === \"string\") dataURL = value;\n else dataURL = URL.createObjectURL(new Blob([value]));\n this.dataURLs.set(key, dataURL);\n });\n\n this.setURLModifier((url: string) => {\n const key = decodeURI(url)\n .replace(this.path, \"\")\n .replace(this.resourcePath, \"\")\n .replace(/^(\\.?\\/)/, \"\");\n const dataURL = this.dataURLs.get(key);\n return dataURL ?? url;\n });\n }\n\n dispose() {\n this.dataURLs.forEach((dataURL) => URL.revokeObjectURL(dataURL));\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\n// ===================== AI-CODE-FILE ======================\n// Source: Claude Sonnet 4.5\n// Date: 2025-28-10\n// Reviewer: roman.mochalov@opendesign.com\n// Issue: CLOUD-5933\n// Notes: Originally AI-generated, modified manually\n// =========================================================\n\nconst BINARY_EXTENSION_HEADER_MAGIC = \"glTF\";\nconst BINARY_EXTENSION_HEADER_LENGTH = 12;\nconst BINARY_EXTENSION_CHUNK_TYPES = { JSON: 0x4e4f534a, BIN: 0x004e4942 };\n\nexport interface GLTFBinaryHeader {\n magic: string;\n version: number;\n length: number;\n}\n\nexport class GLTFBinaryParser {\n public header: GLTFBinaryHeader;\n public content: Uint8Array;\n public body: ArrayBuffer;\n\n constructor(data: ArrayBuffer) {\n const dataView = new DataView(data, 0);\n\n const textDecoder = new TextDecoder();\n const magic = textDecoder.decode(new Uint8Array(data, 0, Math.min(4, data.byteLength)));\n\n if (magic !== BINARY_EXTENSION_HEADER_MAGIC) {\n this.content = new Uint8Array(data);\n return;\n }\n\n this.header = {\n magic,\n version: dataView.getUint32(4, true),\n length: dataView.getUint32(8, true),\n };\n\n if (this.header.length !== data.byteLength) {\n throw new Error(\"GLTFBinaryParser: Invalid binary file header.\");\n }\n if (this.header.version < 2.0) {\n throw new Error(\"GLTFBinaryParser: Legacy binary file detected.\");\n }\n\n let offset = BINARY_EXTENSION_HEADER_LENGTH;\n\n while (offset < this.header.length) {\n const chunkLength = dataView.getUint32(offset, true);\n offset += 4;\n\n const chunkType = dataView.getUint32(offset, true);\n offset += 4;\n\n if (chunkType === BINARY_EXTENSION_CHUNK_TYPES.JSON) {\n this.content = new Uint8Array(data, offset, chunkLength);\n } else if (chunkType === BINARY_EXTENSION_CHUNK_TYPES.BIN) {\n this.body = data.slice(offset, offset + chunkLength);\n }\n\n offset += chunkLength;\n }\n\n if (this.content === undefined) {\n throw new Error(\"GLTFBinaryParser: JSON content not found.\");\n }\n if (this.body === undefined) {\n throw new Error(\"GLTFBinaryParser: Binary buffer chunk not found or type not supported.\");\n }\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { JSONParser } from \"@streamparser/json\";\n\nexport class JSONStreamParser extends JSONParser {\n public json: any;\n\n constructor(data?: Uint8Array) {\n super();\n\n this.onValue = ({ value, stack }) => {\n if (stack.length === 0) this.json = value;\n };\n\n if (data) this.write(data);\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nclass FetchError extends Error {\n public status: number;\n\n constructor(status: number, message: string) {\n super(message);\n this.name = \"FetchError\";\n this.status = status;\n }\n}\n\nexport interface Range {\n offset: number;\n length: number;\n}\n\nexport class RangesLoader {\n private requestHeader: HeadersInit;\n private withCredentials: boolean;\n private abortSignal: AbortSignal | undefined;\n\n constructor() {\n this.requestHeader = {};\n this.withCredentials = false;\n this.abortSignal = undefined;\n }\n\n setRequestHeader(requestHeader: HeadersInit) {\n this.requestHeader = requestHeader;\n }\n\n setWithCredentials(withCredentials: boolean) {\n this.withCredentials = withCredentials;\n }\n\n setAbortSignal(abortSignal: AbortSignal) {\n this.abortSignal = abortSignal;\n }\n\n async load(url: string, ranges: Range[]): Promise<ArrayBuffer> {\n const init: RequestInit = {\n headers: {\n ...this.requestHeader,\n Range: \"bytes=\" + ranges.map((x) => `${x.offset}-${x.offset + x.length - 1}`).join(\",\"),\n },\n credentials: this.withCredentials ? \"include\" : \"same-origin\",\n signal: this.abortSignal,\n };\n\n const response = await fetch(url, init);\n if (!response.ok) {\n throw new FetchError(response.status, `Failed to fetch \"${url}\", status ${response.status}`);\n }\n\n if (response.status !== 206) {\n const arrayBuffer = await response.arrayBuffer();\n return this.extractRanges(arrayBuffer, ranges);\n }\n\n return response.arrayBuffer();\n }\n\n // ===================== AI-CODE-START ======================\n // Source: Claude Sonnet 4.5\n // Date: 2025-28-10\n // Reviewer: roman.mochalov@opendesign.com\n // Issue: CLOUD-5933\n\n extractRanges(arrayBuffer: ArrayBuffer, ranges: Range[]): ArrayBuffer {\n const totalLength = ranges.reduce((sum, range) => sum + range.length, 0);\n const result = new Uint8Array(totalLength);\n\n let offset = 0;\n for (const range of ranges) {\n const chunk = new Uint8Array(arrayBuffer, range.offset, range.length);\n result.set(chunk, offset);\n offset += range.length;\n }\n\n return result.buffer;\n }\n // ===================== AI-CODE-END ======================\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { FileLoader, Group, LoaderUtils } from \"three\";\nimport { Loader } from \"@inweb/viewer-core\";\n\nimport { Viewer } from \"../Viewer\";\nimport { DynamicModelImpl } from \"./DynamicGltfLoader/DynamicModelImpl\";\nimport { DynamicGltfLoader } from \"./DynamicGltfLoader/DynamicGltfLoader.js\";\nimport { GltfStructure } from \"./DynamicGltfLoader/GltfStructure.js\";\nimport { GLTFLoadingManager, GLTFLoadParams } from \"./GLTFLoadingManager\";\nimport { GLTFBinaryParser } from \"./GLTFBinaryParser\";\nimport { JSONStreamParser } from \"./JSONStreamParser\";\nimport { RangesLoader } from \"./RangesLoader\";\n\nexport class GLTFFileDynamicLoader extends Loader {\n public viewer: Viewer;\n private gltfLoader: DynamicGltfLoader;\n private manager: GLTFLoadingManager;\n private glb: ArrayBuffer;\n\n constructor(viewer: Viewer) {\n super();\n this.viewer = viewer;\n }\n\n override dispose() {\n if (this.gltfLoader) this.gltfLoader.clear();\n if (this.manager) this.manager.dispose();\n }\n\n override isSupport(file: any, format = \"\"): boolean {\n return (\n (typeof file === \"string\" || file instanceof globalThis.File || file instanceof ArrayBuffer) &&\n /(gltf|glb)$/i.test(format)\n );\n }\n\n override async load(file: any, format?: string, params: GLTFLoadParams = {}): Promise<this> {\n this.manager = new GLTFLoadingManager(file, params);\n\n const scene = new Group();\n\n this.gltfLoader = new DynamicGltfLoader(this.viewer.camera, scene, this.viewer.renderer);\n this.gltfLoader.setMemoryLimit(this.viewer.options.memoryLimit);\n this.gltfLoader.setVisibleEdges(this.viewer.options.edgeModel);\n this.gltfLoader.setMaxConcurrentChunks(params.maxConcurrentChunks);\n this.gltfLoader.setDracoLoader(params.dracoLoader);\n\n const modelImpl = new DynamicModelImpl(scene);\n modelImpl.id = params.modelId || this.extractFileName(file);\n modelImpl.gltfLoader = this.gltfLoader;\n\n this.gltfLoader.addEventListener(\"databasechunk\", () => {\n this.viewer.scene.add(scene);\n this.viewer.models.push(modelImpl);\n\n this.viewer.syncOptions();\n this.viewer.syncOverlay();\n\n this.viewer.emitEvent({ type: \"databasechunk\", data: scene, file });\n this.viewer.update(true);\n });\n\n this.gltfLoader.addEventListener(\"geometryerror\", (data) => {\n this.viewer.emitEvent({ type: \"geometryerror\", data, file });\n });\n\n this.gltfLoader.addEventListener(\"update\", () => {\n this.viewer.update();\n });\n\n const loadController = {\n loadJson: async () => {\n const loader = new FileLoader(this.manager);\n loader.setPath(this.manager.path);\n loader.setRequestHeader((params.requestHeader as any) || {});\n loader.setWithCredentials(params.withCredentials || loader.withCredentials);\n loader.setResponseType(\"arraybuffer\");\n\n const progress = (event: ProgressEvent) => {\n const { lengthComputable, loaded, total } = event;\n const progress = lengthComputable ? loaded / total : 1;\n this.viewer.emitEvent({ type: \"geometryprogress\", data: progress, file });\n };\n\n const data = await loader.loadAsync(this.manager.fileURL, progress);\n\n const binaryParser = new GLTFBinaryParser(data as ArrayBuffer);\n const jsonParser = new JSONStreamParser(binaryParser.content);\n\n if (!jsonParser.json) {\n throw new Error(\"GLTFFileDynamicLoader: JSON content not found or invalid.\");\n }\n\n this.glb = binaryParser.body;\n\n return jsonParser.json;\n },\n\n loadBinaryData: (ranges, uri = \"\") => {\n const loader = new RangesLoader();\n loader.setRequestHeader((params.requestHeader as any) || {});\n loader.setWithCredentials(params.withCredentials || false);\n loader.setAbortSignal(this.gltfLoader.abortController.signal);\n\n if (this.glb) return loader.extractRanges(this.glb, ranges);\n\n const path = this.manager.path || this.manager.resourcePath;\n const url = LoaderUtils.resolveURL(uri, path);\n\n return loader.load(this.manager.resolveURL(url), ranges);\n },\n\n resolveURL: (uri) => {\n const path = this.manager.path || this.manager.resourcePath;\n const url = LoaderUtils.resolveURL(uri, path);\n return Promise.resolve(this.manager.resolveURL(url));\n },\n };\n\n const structure = new GltfStructure(modelImpl.id, loadController);\n\n await this.gltfLoader.loadStructure(structure);\n await this.gltfLoader.loadNodes();\n\n return this;\n }\n\n override cancel() {\n if (this.gltfLoader) this.gltfLoader.abortLoading();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { Group, LoaderUtils } from \"three\";\nimport { Loader, LoadParams } from \"@inweb/viewer-core\";\n\nimport { Viewer } from \"../Viewer\";\nimport { DynamicModelImpl } from \"./DynamicGltfLoader/DynamicModelImpl\";\nimport { DynamicGltfLoader } from \"./DynamicGltfLoader/DynamicGltfLoader.js\";\nimport { GltfStructure } from \"./DynamicGltfLoader/GltfStructure.js\";\nimport { JSONStreamParser } from \"./JSONStreamParser\";\n\nexport class GLTFCloudDynamicLoader extends Loader {\n public viewer: Viewer;\n public gltfLoader: DynamicGltfLoader;\n public requestId = 0;\n\n constructor(viewer: Viewer) {\n super();\n this.viewer = viewer;\n }\n\n override dispose() {\n if (this.gltfLoader) this.gltfLoader.clear();\n }\n\n override isSupport(file: any): boolean {\n return (\n typeof file === \"object\" &&\n typeof file.database === \"string\" &&\n typeof file.downloadResource === \"function\" &&\n typeof file.downloadResourceRange === \"function\" &&\n /.gltf$/i.test(file.database)\n );\n }\n\n override async load(model: any, format?: string, params: LoadParams = {}): Promise<this> {\n const scene = new Group();\n\n this.gltfLoader = new DynamicGltfLoader(this.viewer.camera, scene, this.viewer.renderer);\n this.gltfLoader.setMemoryLimit(this.viewer.options.memoryLimit);\n this.gltfLoader.setVisibleEdges(this.viewer.options.edgeModel);\n this.gltfLoader.setMaxConcurrentChunks(params.maxConcurrentChunks);\n this.gltfLoader.setDracoLoader(params.dracoLoader);\n\n const modelImpl = new DynamicModelImpl(scene);\n modelImpl.id = model.file.id;\n modelImpl.gltfLoader = this.gltfLoader;\n\n this.gltfLoader.addEventListener(\"databasechunk\", (data) => {\n this.viewer.scene.add(scene);\n this.viewer.models.push(modelImpl);\n\n this.viewer.syncOptions();\n this.viewer.syncOverlay();\n\n this.viewer.emitEvent({ type: \"databasechunk\", data: scene, file: model.file, model });\n this.viewer.update(true);\n });\n\n this.gltfLoader.addEventListener(\"geometryerror\", (data) => {\n this.viewer.emitEvent({ type: \"geometryerror\", data, file: model.file, model });\n });\n\n this.gltfLoader.addEventListener(\"update\", () => {\n this.viewer.update();\n });\n\n const loadController = {\n loadJson: async () => {\n const jsonParser = new JSONStreamParser();\n\n const progress = (progress: number, chunk: Uint8Array) => {\n jsonParser.write(chunk);\n this.viewer.emitEvent({ type: \"geometryprogress\", data: progress, file: model.file, model });\n };\n\n await model.downloadResource(model.database, progress, this.gltfLoader.getAbortController().signal);\n\n if (!jsonParser.json) {\n throw new Error(\"GLTFCloudDynamicLoader: JSON content not found or invalid.\");\n }\n\n return jsonParser.json;\n },\n\n loadBinaryData: (requests) => {\n const ranges = requests.map((request) => ({\n begin: request.offset,\n end: request.offset + request.length - 1,\n requestId: this.requestId++,\n }));\n\n return model.downloadResourceRange(\n model.geometry[0],\n undefined,\n ranges,\n undefined,\n this.gltfLoader.getAbortController().signal\n );\n },\n\n resolveURL: (uri) => {\n const path = `${model.httpClient.serverUrl}${model.path}/`;\n const url = LoaderUtils.resolveURL(uri, path);\n return Promise.resolve(url);\n },\n };\n\n const structure = new GltfStructure(modelImpl.id, loadController);\n\n await this.gltfLoader.loadStructure(structure);\n await this.gltfLoader.loadNodes();\n\n return this;\n }\n\n override cancel() {\n if (this.gltfLoader) this.gltfLoader.abortLoading();\n }\n}\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport { ILoadersRegistry, loadersRegistry } from \"@inweb/viewer-core\";\n\nimport { GLTFFileDynamicLoader } from \"./GLTFFileDynamicLoader\";\nimport { GLTFCloudDynamicLoader } from \"./GLTFCloudDynamicLoader\";\n\n/**\n * Viewer loaders registry. Use this registry to register custom loaders.\n *\n * To implement custom loader:\n *\n * 1. Define a loader class implements {@link ILoader}.\n * 2. Define a constructor with a `viewer` parameter.\n * 3. Override {@link ILoader.isSupport} and check if the loader can load the specified file.\n * 4. Override {@link ILoader.load} and define the logic for loading the scene from the file.\n *\n * The loader should do:\n *\n * - Load raw data from file and convert it to the `Three.js` scene.\n * - Add scene to the viewer `scene`.\n * - Create `ModelImpl` instance with unique model ID add it to the viewer `models` list.\n * - Synchronize viewer options and overlay.\n * - Update the viewer.\n *\n * The loader must emit events:\n *\n * - `geometryprogress` - during loading (or once at 100% when complete).\n * - `databasechunk` - when scene is loaded and ready to render.\n * 5. Override {@link ILoader.dispose} and release loader resources, if required.\n * 6. Use `this.abortController` (defined in `Loader` class) to abort loading raw data.\n * 7. Register loader provider in the loaders registry by calling the {@link loaders.registerLoader}.\n *\n * @example Implementing a custom loader.\n *\n * ```javascript\n * import { Scene } from \"three\";\n * import { Loader, loaders, ModelImpl, Viewer } from \"@inweb/viewer-three\";\n *\n * class MyLoader extends Loader {\n * public viewer: Viewer;\n *\n * constructor(viewer: Viewer) {\n * super();\n * this.viewer = viewer;\n * }\n *\n * override isSupport(file, format): Boolean {\n * // check if this loader supports the file source and format\n * return type file === \"string\" && format === \"myformat\";\n * }\n *\n * override load(file, format, params = {}): Promise<this> {\n * // load raw data from file (custom loading logic)\n * const data = await fetch(file).then((result) => result.arrayBuffer());\n *\n * // convert raw data to the Three.js scene (custom parsing logic)\n * const scene = this.parse(data);\n *\n * const modelImpl = new ModelImpl(scene);\n * modelImpl.id = params.modelId;\n *\n * this.viewer.scene.add(scene);\n * this.viewer.models.push(modelImpl);\n *\n * this.viewer.syncOptions();\n * this.viewer.syncOverlay();\n *\n * this.viewer.emitEvent({ type: \"geometryprogress\", data: 1, file });\n * this.viewer.emitEvent({ type: \"databasechunk\", data: scene, file });\n *\n * this.viewer.update(true);\n *\n * return Promise.resove(this);\n * };\n *\n * private parse(data: ArrayBuffer): Scene {\n * // custom parsing logic\n * return new Scene();\n * }\n * }\n *\n * loaders.registerLoader(\"MyLoader\", (viewer) => new MyLoader(viewer));\n * ```\n */\nexport const loaders: ILoadersRegistry = loadersRegistry(\"threejs\");\n\n// build-in loaders\n\nloaders.registerLoader(\"gltf-file\", (viewer: any) => new GLTFFileDynamicLoader(viewer));\nloaders.registerLoader(\"gltf-cloud\", (viewer: any) => new GLTFCloudDynamicLoader(viewer));\n","///////////////////////////////////////////////////////////////////////////////\n// Copyright (C) 2002-2026, Open Design Alliance (the \"Alliance\").\n// All rights reserved.\n//\n// This software and its documentation and related materials are owned by\n// the Alliance. The software may only be incorporated into application\n// programs owned by members of the Alliance, subject to a signed\n// Membership Agreement and Supplemental Software License Agreement with the\n// Alliance. The structure and organization of this software are the valuable\n// trade secrets of the Alliance and its suppliers. The software is also\n// protected by copyright law and international treaty provisions. Application\n// programs incorporating this software must include the following statement\n// with their copyright notices:\n//\n// This application incorporates Open Design Alliance software pursuant to a\n// license agreement with Open Design Alliance.\n// Open Design Alliance Copyright (C) 2002-2026 by Open Design Alliance.\n// All rights reserved.\n//\n// By use of this software, its documentation or related materials, you\n// acknowledge and accept the above terms.\n///////////////////////////////////////////////////////////////////////////////\n\nimport {\n Box3,\n Group,\n LinearSRGBColorSpace,\n // LinearToneMapping,\n Object3D,\n OrthographicCamera,\n PerspectiveCamera,\n Plane,\n Raycaster,\n Scene,\n Vector2,\n Vector3,\n WebGLRenderer,\n WebGLRenderTarget,\n} from \"three\";\nimport { EffectComposer } from \"three/examples/jsm/postprocessing/EffectComposer.js\";\nimport { RenderPass } from \"three/examples/jsm/postprocessing/RenderPass.js\";\nimport { FXAAPass } from \"three/examples/jsm/postprocessing/FXAAPass.js\";\nimport { SMAAPass } from \"three/examples/jsm/postprocessing/SMAAPass.js\";\nimport { SSAARenderPass } from \"three/examples/jsm/postprocessing/SSAARenderPass.js\";\nimport { OutputPass } from \"three/examples/jsm/postprocessing/OutputPass.js\";\n\nimport { EventEmitter2 } from \"@inweb/eventemitter2\";\nimport { Assembly, Client, Model, File } from \"@inweb/client\";\nimport {\n CANVAS_EVENTS,\n CanvasEventMap,\n FileSource,\n IClippingPlane,\n IComponent,\n IDragger,\n IEntity,\n IInfo,\n ILoader,\n Info,\n IOptions,\n IOrthogonalCamera,\n IPerspectiveCamera,\n IPoint,\n IViewer,\n IViewpoint,\n Options,\n OptionsEventMap,\n ViewerEventMap,\n} from \"@inweb/viewer-core\";\nimport { IMarkup, IWorldTransform, Markup } from \"@inweb/markup\";\n\nimport { draggers } from \"./draggers\";\nimport { commands } from \"./commands\";\nimport { components } from \"./components\";\nimport { loaders } from \"./loaders\";\nimport { IModelImpl } from \"./models/IModelImpl\";\n\n/**\n * 3D viewer powered by {@link https://threejs.org/ | Three.js}.\n */\nexport class Viewer\n extends EventEmitter2<ViewerEventMap & CanvasEventMap & OptionsEventMap>\n implements IViewer, IWorldTransform\n{\n public client: Client | undefined;\n public options: IOptions;\n public canvas: HTMLCanvasElement | undefined;\n public canvasEvents: string[];\n public loaders: ILoader[];\n public models: IModelImpl[];\n public info: IInfo;\n\n private canvaseventlistener: (event: any) => void;\n\n public scene: Scene | undefined;\n public helpers: Group | undefined;\n public camera: PerspectiveCamera | OrthographicCamera | undefined;\n public renderer: WebGLRenderer | undefined;\n public renderPass: RenderPass | undefined;\n public fxaaPass: FXAAPass | undefined;\n public smaaPass: SMAAPass | undefined;\n public ssaaRenderPass: SSAARenderPass | undefined;\n public outputPass: OutputPass | undefined;\n public composer: EffectComposer | undefined;\n public selected: Object3D[];\n public extents: Box3;\n public target: Vector3;\n public clippingPlanes: Plane[];\n\n private _activeDragger: IDragger | null;\n private _components: IComponent[];\n\n private _renderNeeded: boolean;\n private _renderTime: DOMHighResTimeStamp;\n\n private _markup: IMarkup;\n\n /**\n * @param client - The `Client` instance that is used to load model reference files from the Open Cloud\n * Server. Do not specify `Client` if you need a standalone viewer instance to view `glTF` files from\n * the web or from local computer.\n */\n constructor(client?: Client) {\n super();\n this.client = client;\n this.options = new Options(this);\n this.loaders = [];\n this.models = [];\n this.info = new Info();\n\n this.canvasEvents = CANVAS_EVENTS.slice();\n this.canvaseventlistener = (event: Event) => this.emit(event);\n\n this.selected = [];\n this.extents = new Box3();\n this.target = new Vector3(0, 0, 0);\n this.clippingPlanes = [];\n\n this._activeDragger = null;\n this._components = [];\n\n this._renderNeeded = false;\n this._renderTime = 0;\n\n this.render = this.render.bind(this);\n this.update = this.update.bind(this);\n\n this._markup = new Markup();\n }\n\n /**\n * 2D markup core instance used to create markups.\n *\n * @readonly\n */\n get markup(): IMarkup {\n return this._markup;\n }\n\n // IViewer\n\n get draggers(): string[] {\n return [...draggers.getDraggers().keys()];\n }\n\n get components(): string[] {\n return [...components.getComponents().keys()];\n }\n\n initialize(canvas: HTMLCanvasElement, onProgress?: (event: ProgressEvent<EventTarget>) => void): Promise<this> {\n this.addEventListener(\"optionschange\", (event) => this.syncOptions(event.data));\n\n this.scene = new Scene();\n\n this.helpers = new Group();\n this.helpers.name = \"Helpers\";\n this.scene.add(this.helpers);\n\n const pixelRatio = window.devicePixelRatio;\n const rect = canvas.parentElement.getBoundingClientRect();\n const width = rect.width || 1;\n const height = rect.height || 1;\n const aspectRatio = width / height;\n\n this.camera = new PerspectiveCamera(45, aspectRatio, 0.001, 1000);\n this.camera.up.set(0, 1, 0);\n this.camera.position.set(0, 0, 1);\n this.camera.lookAt(this.target);\n this.camera.updateProjectionMatrix();\n\n this.renderer = new WebGLRenderer({\n canvas,\n antialias: true,\n alpha: true,\n preserveDrawingBuffer: true,\n powerPreference: \"high-performance\",\n logarithmicDepthBuffer: true, // <- required for sections filling\n });\n this.renderer.setPixelRatio(pixelRatio);\n this.renderer.setSize(width, height);\n this.renderer.outputColorSpace = LinearSRGBColorSpace;\n // this.renderer.toneMapping = LinearToneMapping;\n this.renderer.localClippingEnabled = true;\n\n this.renderPass = new RenderPass(this.scene, this.camera);\n this.fxaaPass = new FXAAPass();\n this.smaaPass = new SMAAPass();\n this.ssaaRenderPass = new SSAARenderPass(this.scene, this.camera);\n this.ssaaRenderPass.unbiased = true;\n this.outputPass = new OutputPass();\n\n const renderTarget = new WebGLRenderTarget(1, 1, { samples: 4 });\n renderTarget.texture.name = \"EffectComposer.rt1\";\n\n this.composer = new EffectComposer(this.renderer, renderTarget);\n this.composer.addPass(this.renderPass);\n this.composer.addPass(this.smaaPass);\n this.composer.addPass(this.fxaaPass);\n this.composer.addPass(this.ssaaRenderPass);\n this.composer.addPass(this.outputPass);\n this.composer.setSize(width, height);\n\n this.canvas = canvas;\n this.canvasEvents.forEach((x) => canvas.addEventListener(x, this.canvaseventlistener));\n\n this._markup.initialize(this.canvas, this.canvasEvents, this, this);\n\n for (const name of components.getComponents().keys()) {\n const component = components.createComponent(name, this);\n if (component) this._components.push(component);\n }\n\n this.syncOptions();\n this.syncOverlay();\n\n this._renderTime = performance.now();\n\n if (typeof onProgress === \"function\") {\n const event = new ProgressEvent(\"progress\", { lengthComputable: true, loaded: 1, total: 1 });\n onProgress(event);\n }\n\n this.emitEvent({ type: \"initializeprogress\", data: 1, loaded: 1, total: 1 });\n this.emitEvent({ type: \"initialize\" });\n this.update(true);\n\n return Promise.resolve(this);\n }\n\n dispose(): this {\n this.cancel();\n this.clear();\n\n this.emitEvent({ type: \"dispose\" });\n this.removeAllListeners();\n\n this.setActiveDragger();\n\n this._components.forEach((component: IComponent) => component.dispose());\n this._components.length = 0;\n\n this._markup.dispose();\n\n if (this.canvas) {\n this.canvasEvents.forEach((x) => this.canvas.removeEventListener(x, this.canvaseventlistener));\n this.canvas = undefined;\n }\n\n if (this.composer) this.composer.dispose();\n if (this.renderPass) this.renderPass.dispose();\n if (this.fxaaPass) this.fxaaPass.dispose();\n if (this.smaaPass) this.smaaPass.dispose();\n if (this.ssaaRenderPass) this.ssaaRenderPass.dispose();\n if (this.outputPass) this.outputPass.dispose();\n if (this.renderer) this.renderer.dispose();\n\n this.scene = undefined;\n this.helpers = undefined;\n this.camera = undefined;\n this.renderer = undefined;\n this.renderPass = undefined;\n this.fxaaPass = undefined;\n this.smaaPass = undefined;\n this.ssaaRenderPass = undefined;\n this.outputPass = undefined;\n this.composer = undefined;\n\n return this;\n }\n\n isInitialized(): boolean {\n return !!this.renderer;\n }\n\n setSize(width: number, height: number, updateStyle = true) {\n if (!this.renderer) return;\n\n const camera = this.camera as any;\n const aspectRatio = width / height;\n\n if (camera.isPerspectiveCamera) {\n camera.aspect = aspectRatio;\n camera.updateProjectionMatrix();\n }\n if (camera.isOrthographicCamera) {\n camera.left = camera.bottom * aspectRatio;\n camera.right = camera.top * aspectRatio;\n camera.updateProjectionMatrix();\n }\n\n this.renderer.setSize(width, height, updateStyle);\n this.composer.setSize(width, height);\n\n this.emitEvent({ type: \"resize\", width, height });\n this.update(true);\n }\n\n update(force: boolean | number = false): void {\n const time = performance.now();\n if (typeof force === \"number\" && time - this._renderTime >= force) force = true;\n\n this._renderNeeded = true;\n if (force) this.render(time);\n\n this.emitEvent({ type: \"update\", force: !!force });\n }\n\n // Internal render routines\n\n render(time?: DOMHighResTimeStamp, force = false): void {\n if (!this.renderer) return;\n if (!this._renderNeeded && !force) return;\n\n if (!time) time = performance.now();\n const deltaTime = (time - this._renderTime) / 1000;\n\n this._renderTime = time;\n this._renderNeeded = false;\n\n this.renderer.info.autoReset = false;\n this.renderer.info.reset();\n\n this.composer.render(deltaTime);\n\n this.emitEvent({ type: \"render\", time, deltaTime });\n }\n\n // Internal loading routines\n\n loadReferences(model: Model | File | Assembly): Promise<this> {\n // todo: load reference as text fonts\n return Promise.resolve(this);\n }\n\n /**\n * Loads a file into the viewer.\n *\n * The viewer must be {@link initialize | initialized} before opening the file. Otherwise, `open()` does\n * nothing.\n *\n * This method requires a `Client` instance to be specified to load file from the Open Cloud Server.\n * The file geometry data on the Open Cloud Server must be converted into a `gltf` format, otherwise an\n * exception will be thrown.\n *\n * For files from Open Cloud Server, the default model will be loaded. If there is no default model,\n * the first available model will be loaded. If no models are found in the file, an exception will be\n * thrown.\n *\n * For URLs, the file extension is used to determine the file format. For a `ArrayBuffer` and `Data\n * URL`, a file format must be specified using `params.format` parameter. If no appropriate loader is\n * found for the specified format, an exception will be thrown.\n *\n * If there was an active dragger before opening the file, it will be deactivated. After opening the\n * file, you must manually activate the required dragger.\n *\n * Fires:\n *\n * - {@link CancelEvent | cancel}\n * - {@link ClearEvent | clear}\n * - {@link OpenEvent | open}\n * - {@link GeometryStartEvent | geometrystart}\n * - {@link GeometryProgressEvent | geometryprogress}\n * - {@link DatabaseChunkEvent | databasechunk}\n * - {@link GeometryChunkEvent | geometrychunk}\n * - {@link GeometryEndEvent | geometryend}\n * - {@link GeometryErrorEvent | geometryerror}\n *\n * @param file - File to load. Can be:\n *\n * - `File`, `Assembly`, or `Model` instance from the Open Cloud Server\n * - `URL` string\n * - {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string\n * - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object\n * - {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer}\n * object\n *\n * @param params - Loading parameters.\n * @param params.format - File format. Can be `gltf`, `glb` or format from an extension. Required when\n * loading a file as `ArrayBuffer` or `Data URL`.\n * @param params.mode - File opening mode. Can be one of:\n *\n * - `file` - Single file mode. Unloads an open file and opens a new one. This is default mode.\n * - `assembly` - Assembly mode. Appends a file to an already open file.\n *\n * @param params.modelId - Unique model ID in the assembly (multi-model scene). Used as a model prefix\n * when selecting objects (see {@link getSelected2}). Must not contain the \":\" (colon). Required when\n * loading a file as `ArrayBuffer` or `Data URL`.\n * @param params.requestHeader - The\n * {@link https://developer.mozilla.org/docs/Glossary/Request_header | request header} used in HTTP\n * request.\n * @param params.withCredentials - Whether the HTTP request uses credentials such as cookies,\n * authorization headers or TLS client certificates. See\n * {@link https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/withCredentials | XMLHttpRequest.withCredentials}.\n * @param params.path - The base path from which external resources such as binary data buffers, images\n * or textures will be loaded. If not defined, the base path of the file URL will be used.\n * @param params.externalFiles - External resource map. Each resource should be represented by a `uri`\n * and a corresponding resource URL, or\n * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string, or\n * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object, or\n * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer}.\n * @param params.crossOrigin - The crossOrigin string to implement CORS for loading the external\n * resources from a different domain that allows CORS. Default is `anonymous`.\n */\n async open(\n file: FileSource,\n params: {\n format?: string;\n mode?: string;\n modelId?: string;\n requestHeader?: HeadersInit;\n withCredentials?: boolean;\n path?: string;\n externalFiles?: Map<string, string | globalThis.File | ArrayBuffer>;\n crossOrigin?: string;\n } = {}\n ): Promise<this> {\n if (!this.renderer) return this;\n\n const mode = params.mode || \"file\";\n\n if (mode !== \"assembly\" && mode !== \"a\" && mode !== \"append\") {\n this.cancel();\n this.clear();\n }\n\n this.emitEvent({ type: \"open\", mode, file });\n\n let model: any = file;\n if (model && typeof model.getModels === \"function\") {\n const models = await model.getModels();\n model = models.find((model: Model) => model.default) || models[0] || file;\n }\n if (model && typeof model.database === \"string\") {\n file = model.file;\n }\n\n let format = params.format;\n if (!format && file && typeof file[\"type\"] === \"string\") format = file[\"type\"].split(\".\").pop();\n if (!format && typeof file === \"string\") format = file.split(\".\").pop();\n if (!format && file instanceof globalThis.File) format = file.name.split(\".\").pop();\n\n const loader: ILoader | null = loaders.createLoader(this, model, format);\n if (!loader) throw new Error(`Format not supported (${format})`);\n this.loaders.push(loader);\n\n this.emitEvent({ type: \"geometrystart\", file, model });\n try {\n await this.loadReferences(model);\n await loader.load(model, format, params);\n } catch (error: any) {\n this.emitEvent({ type: \"geometryerror\", data: error, file, model });\n throw error;\n }\n this.emitEvent({ type: \"geometryend\", file, model });\n this.update(true);\n\n return this;\n }\n\n cancel(): this {\n this.loaders.forEach((loader) => loader.cancel());\n\n this.emitEvent({ type: \"cancel\" });\n return this;\n }\n\n clear(): this {\n if (!this.renderer) return this;\n\n this.setActiveDragger();\n this.clearSlices();\n this.clearOverlay();\n this.clearSelected();\n\n this.loaders.forEach((loader) => loader.dispose());\n this.loaders.length = 0;\n\n this.models.forEach((model) => model.dispose());\n this.models.length = 0;\n\n this.helpers.clear();\n\n this.scene.clear();\n this.scene.add(this.helpers);\n\n this.extents.makeEmpty();\n\n this.syncOptions();\n this.syncOverlay();\n\n this.emitEvent({ type: \"clear\" });\n this.update(true);\n\n return this;\n }\n\n is3D(): boolean {\n return true;\n }\n\n syncOptions(options: IOptions = this.options): void {\n if (!this.renderer) return;\n\n this.fxaaPass.enabled = options.antialiasing === \"fxaa\";\n this.smaaPass.enabled = options.antialiasing === \"smaa\";\n this.ssaaRenderPass.enabled = options.antialiasing === \"ssaa\";\n this.renderPass.enabled = options.antialiasing !== \"ssaa\";\n\n const samples = options.antialiasing === true || options.antialiasing === \"msaa\" ? 4 : 0;\n\n if (this.composer.renderTarget1.samples !== samples) {\n const size = this.renderer.getSize(new Vector2());\n\n const newRenderTarget = new WebGLRenderTarget(1, 1, { samples });\n newRenderTarget.texture.name = \"EffectComposer.rt1\";\n\n this.composer.reset(newRenderTarget);\n this.composer.setSize(size.x, size.y);\n }\n\n this.update();\n }\n\n syncOverlay(): void {\n if (!this.renderer) return;\n\n this._markup.syncOverlay();\n this.update();\n }\n\n clearOverlay(): void {\n if (!this.renderer) return;\n\n this._markup.clearOverlay();\n\n this.emitEvent({ type: \"clearoverlay\" });\n this.update();\n }\n\n clearSlices(): void {\n if (!this.renderer) return;\n\n this.clippingPlanes.length = 0;\n\n this.emitEvent({ type: \"changecuttingplanes\" });\n this.emitEvent({ type: \"clearslices\" });\n this.update();\n }\n\n getSelected(): string[] {\n return this.executeCommand(\"getSelected\");\n }\n\n getSelected2(): string[] {\n return this.executeCommand(\"getSelected2\");\n }\n\n setSelected(handles?: string[]): void {\n this.executeCommand(\"setSelected\", handles);\n }\n\n setSelected2(handles?: string[]): void {\n this.executeCommand(\"setSelected2\", handles);\n }\n\n clearSelected(): void {\n this.executeCommand(\"clearSelected\");\n }\n\n hideSelected(): void {\n this.executeCommand(\"hideSelected\");\n }\n\n isolateSelected(): void {\n this.executeCommand(\"isolateSelected\");\n }\n\n showAll(): void {\n this.executeCommand(\"showAll\");\n }\n\n explode(index = 0): void {\n this.executeCommand(\"explode\", index);\n }\n\n collect(): void {\n this.executeCommand(\"collect\");\n }\n\n activeDragger(): IDragger | null {\n return this._activeDragger;\n }\n\n setActiveDragger(name = \"\"): IDragger | null {\n if (!this._activeDragger || this._activeDragger.name !== name) {\n const oldDragger: IDragger | null = this._activeDragger;\n let newDragger: IDragger | null = null;\n\n if (this._activeDragger) {\n this._activeDragger.dispose();\n this._activeDragger = null;\n }\n if (this.isInitialized()) {\n newDragger = draggers.createDragger(name, this);\n this._activeDragger = newDragger;\n }\n\n const canvas = this.canvas;\n if (canvas) {\n if (oldDragger) canvas.classList.remove(`oda-cursor-${oldDragger.name.toLowerCase()}`);\n if (newDragger) canvas.classList.add(`oda-cursor-${newDragger.name.toLowerCase()}`);\n }\n\n this.emitEvent({ type: \"changeactivedragger\", data: name });\n this.update();\n }\n return this._activeDragger;\n }\n\n resetActiveDragger(): void {\n const dragger = this._activeDragger;\n if (dragger) {\n this.setActiveDragger();\n this.setActiveDragger(dragger.name);\n }\n }\n\n getComponent(name: string): IComponent | null {\n return this._components.find((component) => component.name === name) || null;\n }\n\n drawViewpoint(viewpoint: IViewpoint): void {\n if (!this.renderer) return;\n\n const getVector3FromPoint3d = ({ x, y, z }): Vector3 => new Vector3(x, y, z);\n\n const setOrthogonalCamera = (orthogonal_camera?: IOrthogonalCamera) => {\n if (orthogonal_camera) {\n const extentsSize = this.extents.getSize(new Vector3()).length() || 1;\n const rendererSize = this.renderer.getSize(new Vector2());\n const aspectRatio = rendererSize.x / rendererSize.y;\n\n const camera = new OrthographicCamera();\n camera.top = orthogonal_camera.field_height / 2;\n camera.bottom = -orthogonal_camera.field_height / 2;\n camera.left = camera.bottom * aspectRatio;\n camera.right = camera.top * aspectRatio;\n camera.near = -extentsSize * 1000;\n camera.far = extentsSize * 1000;\n camera.zoom = orthogonal_camera.view_to_world_scale;\n camera.updateProjectionMatrix();\n\n camera.up.copy(getVector3FromPoint3d(orthogonal_camera.up_vector));\n camera.position.copy(getVector3FromPoint3d(orthogonal_camera.view_point));\n camera.lookAt(getVector3FromPoint3d(orthogonal_camera.direction).add(camera.position));\n camera.updateMatrixWorld();\n\n this.camera = camera;\n this.renderPass.camera = camera;\n this.ssaaRenderPass.camera = camera;\n\n this.options.cameraMode = \"orthographic\";\n this.emitEvent({ type: \"changecameramode\", mode: \"orthographic\" });\n }\n };\n\n const setPerspectiveCamera = (perspective_camera?: IPerspectiveCamera) => {\n if (perspective_camera) {\n const extentsSize = this.extents.getSize(new Vector3()).length() || 1;\n const rendererSize = this.renderer.getSize(new Vector2());\n const aspectRatio = rendererSize.x / rendererSize.y;\n\n const camera = new PerspectiveCamera();\n camera.fov = perspective_camera.field_of_view;\n camera.aspect = aspectRatio;\n camera.near = extentsSize / 1000;\n camera.far = extentsSize * 1000;\n camera.updateProjectionMatrix();\n\n camera.up.copy(getVector3FromPoint3d(perspective_camera.up_vector));\n camera.position.copy(getVector3FromPoint3d(perspective_camera.view_point));\n camera.lookAt(getVector3FromPoint3d(perspective_camera.direction).add(camera.position));\n camera.updateMatrixWorld();\n\n this.camera = camera;\n this.renderPass.camera = camera;\n this.ssaaRenderPass.camera = camera;\n\n this.options.cameraMode = \"perspective\";\n this.emitEvent({ type: \"changecameramode\", mode: \"perspective\" });\n }\n };\n\n const setClippingPlanes = (clipping_planes?: IClippingPlane[]) => {\n if (clipping_planes) {\n clipping_planes.forEach((clipping_plane) => {\n const plane = new Plane();\n plane.setFromNormalAndCoplanarPoint(\n getVector3FromPoint3d(clipping_plane.direction),\n getVector3FromPoint3d(clipping_plane.location)\n );\n\n this.clippingPlanes.push(plane);\n });\n\n this.emitEvent({ type: \"changecuttingplanes\" });\n }\n };\n\n const setSelection = (selection: IEntity[]) => {\n if (selection) this.setSelected(selection.map((component) => component.handle));\n };\n\n const draggerName = this._activeDragger?.name;\n\n this.setActiveDragger();\n this.clearSlices();\n this.clearOverlay();\n this.clearSelected();\n\n this.showAll();\n this.explode();\n\n setOrthogonalCamera(viewpoint.orthogonal_camera);\n setPerspectiveCamera(viewpoint.perspective_camera);\n setClippingPlanes(viewpoint.clipping_planes);\n setSelection(viewpoint.custom_fields?.selection2 || viewpoint.selection);\n\n this._markup.setViewpoint(viewpoint);\n\n this.target.copy(getVector3FromPoint3d(viewpoint.custom_fields?.camera_target ?? this.target));\n\n this.syncOverlay();\n this.setActiveDragger(draggerName);\n\n this.emitEvent({ type: \"drawviewpoint\", data: viewpoint });\n this.update(true);\n }\n\n createViewpoint(): IViewpoint {\n if (!this.renderer) return {};\n\n const getPoint3dFromVector3 = ({ x, y, z }): IPoint => ({ x, y, z });\n\n const getOrthogonalCamera = (): IOrthogonalCamera | undefined => {\n if (this.camera[\"isOrthographicCamera\"])\n return {\n view_point: getPoint3dFromVector3(this.camera.position),\n direction: getPoint3dFromVector3(this.camera.getWorldDirection(new Vector3())),\n up_vector: getPoint3dFromVector3(this.camera.up),\n field_width: this.camera[\"right\"] - this.camera[\"left\"],\n field_height: this.camera[\"top\"] - this.camera[\"bottom\"],\n view_to_world_scale: this.camera.zoom,\n };\n else return undefined;\n };\n\n const getPerspectiveCamera = (): IPerspectiveCamera | undefined => {\n if (this.camera[\"isPerspectiveCamera\"])\n return {\n view_point: getPoint3dFromVector3(this.camera.position),\n direction: getPoint3dFromVector3(this.camera.getWorldDirection(new Vector3())),\n up_vector: getPoint3dFromVector3(this.camera.up),\n field_of_view: this.camera[\"fov\"],\n };\n else return undefined;\n };\n\n const getClippingPlanes = (): IClippingPlane[] => {\n const clipping_planes: IClippingPlane[] = [];\n this.clippingPlanes.forEach((plane: Plane) => {\n const clipping_plane = {\n location: getPoint3dFromVector3(plane.coplanarPoint(new Vector3())),\n direction: getPoint3dFromVector3(plane.normal),\n };\n clipping_planes.push(clipping_plane);\n });\n return clipping_planes;\n };\n\n const getSelection = (): IEntity[] => {\n return this.getSelected().map((handle) => ({ handle }));\n };\n\n const getSelection2 = (): IEntity[] => {\n return this.getSelected2().map((handle) => ({ handle }));\n };\n\n const viewpoint: IViewpoint = { custom_fields: {} };\n\n viewpoint.orthogonal_camera = getOrthogonalCamera();\n viewpoint.perspective_camera = getPerspectiveCamera();\n viewpoint.clipping_planes = getClippingPlanes();\n viewpoint.selection = getSelection();\n viewpoint.description = new Date().toDateString();\n viewpoint.snapshot = { data: this.getSnapshot() };\n\n this._markup.getViewpoint(viewpoint);\n\n viewpoint.custom_fields.camera_target = getPoint3dFromVector3(this.target);\n viewpoint.custom_fields.selection2 = getSelection2();\n\n this.emitEvent({ type: \"createviewpoint\", data: viewpoint });\n\n return viewpoint;\n }\n\n getSnapshot(type?: string, quality?: number): string {\n return this.executeCommand(\"getSnapshot\", type, quality);\n }\n\n // IWorldTransform\n\n screenToWorld(position: { x: number; y: number }): { x: number; y: number; z: number } {\n if (!this.renderer) return { x: position.x, y: position.y, z: 0 };\n\n const rect = this.canvas.getBoundingClientRect();\n const x = position.x / (rect.width / 2) - 1;\n const y = -position.y / (rect.height / 2) + 1;\n\n // ===================== AI-CODE-START ======================\n // Source: Claude Sonnet 4.5\n // Date: 2025-11-25\n // Reviewer: vitaly.ivanov@opendesign.com\n // Issue: CLOUD-5990\n\n if (this.camera[\"isPerspectiveCamera\"]) {\n // Create a raycaster from the screen position\n const raycaster = new Raycaster();\n const mouse = new Vector2(x, y);\n raycaster.setFromCamera(mouse, this.camera);\n\n // Create a plane perpendicular to the camera direction at the target point\n const cameraDirection = new Vector3();\n this.camera.getWorldDirection(cameraDirection);\n const targetPlane = new Plane().setFromNormalAndCoplanarPoint(cameraDirection, this.target);\n\n // Intersect the ray with the target plane\n const intersectionPoint = new Vector3();\n raycaster.ray.intersectPlane(targetPlane, intersectionPoint);\n\n // If intersection fails (ray parallel to plane), fallback to near plane unprojection\n if (!intersectionPoint) {\n const point = new Vector3(x, y, -1);\n point.unproject(this.camera);\n return { x: point.x, y: point.y, z: point.z };\n }\n return { x: intersectionPoint.x, y: intersectionPoint.y, z: intersectionPoint.z };\n }\n\n // ===================== AI-CODE-END ======================\n\n const point = new Vector3(x, y, -1);\n point.unproject(this.camera);\n\n return { x: point.x, y: point.y, z: point.z };\n }\n\n worldToScreen(position: { x: number; y: number; z: number }): { x: number; y: number } {\n if (!this.renderer) return { x: position.x, y: position.y };\n\n const point = new Vector3(position.x, position.y, position.z);\n point.project(this.camera);\n\n const rect = this.canvas.getBoundingClientRect();\n const x = (point.x + 1) * (rect.width / 2);\n const y = (-point.y + 1) * (rect.height / 2);\n\n return { x, y };\n }\n\n getScale(): { x: number; y: number; z: number } {\n return { x: 1, y: 1, z: 1 };\n }\n\n // ICommandService\n\n executeCommand(id: string, ...args: any[]): any {\n return commands.executeCommand(id, this, ...args);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM,YAAY,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE;AACvC,MAAM,WAAW,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE;AACrC,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE;AAEjC,MAAM,KAAK,GAAG;AACd,EAAE,IAAI,EAAE,EAAE;AACV,EAAE,MAAM,EAAE,CAAC;AACX,EAAE,KAAK,EAAE,CAAC;AACV,EAAE,GAAG,EAAE,CAAC;AACR,EAAE,YAAY,EAAE,CAAC;AACjB,EAAE,SAAS,EAAE,CAAC;AACd,EAA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