vim-web 0.4.1 → 0.5.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -18
- package/dist/style.css +0 -25
- package/dist/types/main.d.ts +1 -0
- package/dist/types/{core-viewers → vim-web/core-viewers}/shared/vim.d.ts +1 -1
- package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/element3d.d.ts +6 -6
- package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/index.d.ts +2 -2
- package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/renderer.d.ts +0 -14
- package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/rpcClient.d.ts +32 -30
- package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/rpcMarshal.d.ts +2 -0
- package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/rpcSafeClient.d.ts +46 -87
- package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/rpcTypes.d.ts +1 -0
- package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/vim.d.ts +3 -3
- package/dist/types/vim-web/core-viewers/ultra/visibility.d.ts +100 -0
- package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/vim.d.ts +1 -1
- package/dist/vim-web.iife.js +350 -537
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +350 -537
- package/dist/vim-web.js.map +1 -1
- package/package.json +10 -15
- package/dist/types/core-viewers/ultra/nodeState.d.ts +0 -113
- /package/dist/types/{core-viewers → vim-web/core-viewers}/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/shared/baseInputHandler.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/shared/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/shared/inputAdapter.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/shared/inputHandler.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/shared/keyboardHandler.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/shared/mouseHandler.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/shared/raycaster.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/shared/selection.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/shared/touchHandler.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/camera.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/colorManager.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/decoder.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/decoderWithWorker.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/inputAdapter.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/loadRequest.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/logger.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/protocol.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/raycaster.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/remoteColor.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/sectionBox.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/selection.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/socketClient.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/streamLogger.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/streamRenderer.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/viewer.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/viewport.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/ultra/vimCollection.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/averageBoundingBox.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/colorAttribute.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/element3d.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/elementMapping.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/geometry.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/materials/ghostMaterial.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/materials/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/materials/maskMaterial.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/materials/materials.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/materials/mergeMaterial.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/materials/outlineMaterial.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/materials/simpleMaterial.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/materials/skyboxMaterial.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/materials/standardMaterial.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/materials/transferMaterial.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/mesh.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/g3dOffsets.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/g3dSubset.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/insertableGeometry.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/insertableMesh.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/insertableSubmesh.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/instancedMesh.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/instancedMeshFactory.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/instancedSubmesh.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/legacyMeshFactory.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/loadingSynchronizer.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/open.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/subsetBuilder.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/subsetRequest.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/vimRequest.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/progressive/vimx.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/scene.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/vimSettings.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/loader/webglAttribute.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/utils/boxes.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/camera/camera.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/camera/cameraInterface.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/camera/cameraMovement.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/camera/cameraMovementLerp.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/camera/cameraMovementSnap.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/camera/cameraOrthographic.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/camera/cameraPerspective.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/camera/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/environment/environment.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/environment/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/environment/light.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/environment/skybox.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/axes/axes.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/axes/axesSettings.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/axes/gizmoAxes.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/axes/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/gizmoLoading.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/gizmoOrbit.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/gizmos.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/markers/gizmoMarker.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/markers/gizmoMarkers.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/markers/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/measure/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/measure/measure.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/measure/measureGizmo.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/measure/measureHtml.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/sectionBox/SectionBoxMesh.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/sectionBox/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/sectionBox/sectionBox.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/sectionBox/sectionBoxGizmo.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/sectionBox/sectionBoxHandle.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/sectionBox/sectionBoxHandles.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/sectionBox/sectionBoxInputs.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/gizmos/sectionBox/sectionBoxOutline.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/inputAdapter.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/raycaster.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/rendering/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/rendering/mergePass.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/rendering/outlinePass.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/rendering/renderScene.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/rendering/renderer.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/rendering/renderingComposer.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/rendering/renderingSection.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/rendering/transferPass.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/selection.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/settings/index.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/settings/viewerDefaultSettings.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/settings/viewerSettings.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/settings/viewerSettingsParsing.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/viewer.d.ts +0 -0
- /package/dist/types/{core-viewers → vim-web/core-viewers}/webgl/viewer/viewport.d.ts +0 -0
- /package/dist/types/{index.d.ts → vim-web/index.d.ts} +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/bimInfoBody.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/bimInfoData.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/bimInfoHeader.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/bimInfoObject.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/bimInfoPanel.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/bimInfoVim.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/bimPanel.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/bimSearch.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/bimTree.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/bimTreeData.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/bimUtils.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/index.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/bim/openState.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/container.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/controlbar/controlBar.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/controlbar/controlBarButton.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/controlbar/controlBarIds.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/controlbar/controlBarSection.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/controlbar/index.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/controlbar/style.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/errors/errorStyle.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/errors/errors.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/errors/index.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/generic/genericField.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/generic/genericPanel.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/generic/index.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/generic/inputNumber.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/cameraObserver.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/cursor.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/customizer.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/data.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/element.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/fullScreenObserver.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/index.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/layout.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/loadRequest.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/reactUtils.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/requestResult.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/helpers/utils.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/icons.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/index.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/axesPanel.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/contextMenu.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/help.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/index.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/isolationPanel.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/loadingBox.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/logo.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/messageBox.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/modal.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/overlay.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/performance.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/restOfScreen.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/sectionBoxPanel.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/sidePanel.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/panels/toast.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/settings/index.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/settings/settings.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/settings/settingsPanel.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/settings/settingsState.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/settings/settingsStorage.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/settings/userBoolean.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/state/cameraState.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/state/controlBarState.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/state/fullScreenState.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/state/index.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/state/measureState.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/state/pointerState.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/state/sectionBoxState.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/state/sharedIsolation.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/state/sideState.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/state/viewerInputs.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/camera.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/controlBar.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/errors/fileLoadingError.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/errors/fileOpeningError.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/errors/serverCompatibilityError.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/errors/serverConnectionError.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/errors/serverFileDownloadingError.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/errors/serverStreamError.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/errors/ultraErrors.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/index.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/isolation.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/modal.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/sectionBox.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/viewer.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/ultra/viewerRef.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/urls.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/webgl/camera.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/webgl/index.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/webgl/inputsBindings.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/webgl/isolation.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/webgl/loading.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/webgl/sectionBox.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/webgl/viewer.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/webgl/viewerRef.d.ts +0 -0
- /package/dist/types/{react-viewers → vim-web/react-viewers}/webgl/viewerState.d.ts +0 -0
- /package/dist/types/{utils → vim-web/utils}/array.d.ts +0 -0
- /package/dist/types/{utils → vim-web/utils}/debounce.d.ts +0 -0
- /package/dist/types/{utils → vim-web/utils}/index.d.ts +0 -0
- /package/dist/types/{utils → vim-web/utils}/interfaces.d.ts +0 -0
- /package/dist/types/{utils → vim-web/utils}/math3d.d.ts +0 -0
- /package/dist/types/{utils → vim-web/utils}/partial.d.ts +0 -0
- /package/dist/types/{utils → vim-web/utils}/promise.d.ts +0 -0
- /package/dist/types/{utils → vim-web/utils}/result.d.ts +0 -0
- /package/dist/types/{utils → vim-web/utils}/threeUtils.d.ts +0 -0
- /package/dist/types/{utils → vim-web/utils}/url.d.ts +0 -0
- /package/dist/types/{utils → vim-web/utils}/validation.d.ts +0 -0
package/dist/vim-web.js
CHANGED
|
@@ -45272,7 +45272,7 @@ class InsertableSubmesh {
|
|
|
45272
45272
|
* Returns vim object for this submesh.
|
|
45273
45273
|
*/
|
|
45274
45274
|
get object() {
|
|
45275
|
-
return this.mesh.vim.
|
|
45275
|
+
return this.mesh.vim.getElement(this.instance);
|
|
45276
45276
|
}
|
|
45277
45277
|
saveColors(colors) {
|
|
45278
45278
|
if (this._colors) return;
|
|
@@ -46853,7 +46853,7 @@ let Vim$1 = class Vim {
|
|
|
46853
46853
|
* @param {number} instance - The instance number of the object.
|
|
46854
46854
|
* @returns {THREE.Object3D | undefined} The object corresponding to the instance, or undefined if not found.
|
|
46855
46855
|
*/
|
|
46856
|
-
|
|
46856
|
+
getElement(instance) {
|
|
46857
46857
|
const element = this.map.getElementFromInstance(instance);
|
|
46858
46858
|
if (element === void 0) return;
|
|
46859
46859
|
return this.getElementFromIndex(element);
|
|
@@ -46906,7 +46906,7 @@ let Vim$1 = class Vim {
|
|
|
46906
46906
|
const count = subset.getInstanceCount();
|
|
46907
46907
|
for (let i = 0; i < count; i++) {
|
|
46908
46908
|
const instance = subset.getVimInstance(i);
|
|
46909
|
-
const obj = this.
|
|
46909
|
+
const obj = this.getElement(instance);
|
|
46910
46910
|
if (!set3.has(obj)) {
|
|
46911
46911
|
result.push(obj);
|
|
46912
46912
|
set3.add(obj);
|
|
@@ -47267,7 +47267,7 @@ class Scene2 {
|
|
|
47267
47267
|
this._instanceToMeshes.set(submesh.instance, meshes);
|
|
47268
47268
|
this.setDirty();
|
|
47269
47269
|
if (this.vim) {
|
|
47270
|
-
const obj = this.vim.
|
|
47270
|
+
const obj = this.vim.getElement(submesh.instance);
|
|
47271
47271
|
obj._addMesh(submesh);
|
|
47272
47272
|
}
|
|
47273
47273
|
}
|
|
@@ -48898,7 +48898,7 @@ class InstancedSubmesh {
|
|
|
48898
48898
|
* Returns vim object for this submesh.
|
|
48899
48899
|
*/
|
|
48900
48900
|
get object() {
|
|
48901
|
-
return this.mesh.vim.
|
|
48901
|
+
return this.mesh.vim.getElement(this.instance);
|
|
48902
48902
|
}
|
|
48903
48903
|
}
|
|
48904
48904
|
class InstancedMesh2 {
|
|
@@ -57483,14 +57483,14 @@ class Camera3 {
|
|
|
57483
57483
|
* @param segment - Optional segment to save as the camera position
|
|
57484
57484
|
*/
|
|
57485
57485
|
async save(segment) {
|
|
57486
|
-
this._savedPosition = segment ?? await this._rpc.
|
|
57486
|
+
this._savedPosition = segment ?? await this._rpc.RPCGetCameraView();
|
|
57487
57487
|
}
|
|
57488
57488
|
/**
|
|
57489
57489
|
* Resets the camera to the last saved position
|
|
57490
57490
|
*/
|
|
57491
57491
|
restoreSavedPosition(blendTime = this._defaultBlendTime) {
|
|
57492
57492
|
if (!this._savedPosition) return;
|
|
57493
|
-
this._rpc.
|
|
57493
|
+
this._rpc.RPCSetCameraView(this._savedPosition, blendTime);
|
|
57494
57494
|
}
|
|
57495
57495
|
/**
|
|
57496
57496
|
* Restores the camera to its last tracked position
|
|
@@ -57500,7 +57500,7 @@ class Camera3 {
|
|
|
57500
57500
|
var _a3;
|
|
57501
57501
|
if ((_a3 = this._lastPosition) == null ? void 0 : _a3.isValid()) {
|
|
57502
57502
|
console.log("Restoring camera position: ", this._lastPosition);
|
|
57503
|
-
this._rpc.
|
|
57503
|
+
this._rpc.RPCSetCameraView(this._lastPosition, blendTime);
|
|
57504
57504
|
}
|
|
57505
57505
|
}
|
|
57506
57506
|
/**
|
|
@@ -57514,7 +57514,7 @@ class Camera3 {
|
|
|
57514
57514
|
this._lastPosition = pose;
|
|
57515
57515
|
}
|
|
57516
57516
|
set(position, target, blendTime = this._defaultBlendTime) {
|
|
57517
|
-
this._rpc.
|
|
57517
|
+
this._rpc.RPCSetCameraView(new Segment(position, target), blendTime);
|
|
57518
57518
|
}
|
|
57519
57519
|
/**
|
|
57520
57520
|
* Pauses or resumes rendering
|
|
@@ -57539,7 +57539,7 @@ class Camera3 {
|
|
|
57539
57539
|
* @param blendTime - Duration of the camera animation in seconds (defaults to 0.5)
|
|
57540
57540
|
*/
|
|
57541
57541
|
async frameBox(box, blendTime = this._defaultBlendTime) {
|
|
57542
|
-
const segment = await this._rpc.
|
|
57542
|
+
const segment = await this._rpc.RPCFrameAABB(box, blendTime);
|
|
57543
57543
|
this._savedPosition = this._savedPosition ?? segment;
|
|
57544
57544
|
return segment;
|
|
57545
57545
|
}
|
|
@@ -57555,13 +57555,13 @@ class Camera3 {
|
|
|
57555
57555
|
if (nodes === "all") {
|
|
57556
57556
|
segment = await this._rpc.RPCFrameVim(vim.handle, blendTime);
|
|
57557
57557
|
} else {
|
|
57558
|
-
segment = await this._rpc.
|
|
57558
|
+
segment = await this._rpc.RPCFrameElements(vim.handle, nodes, blendTime);
|
|
57559
57559
|
}
|
|
57560
57560
|
this._savedPosition = this._savedPosition ?? segment;
|
|
57561
57561
|
return segment;
|
|
57562
57562
|
}
|
|
57563
57563
|
async frameObject(object, blendTime = this._defaultBlendTime) {
|
|
57564
|
-
const segment = await this._rpc.
|
|
57564
|
+
const segment = await this._rpc.RPCFrameElements(object.vim.handle, [object.element], blendTime);
|
|
57565
57565
|
this._savedPosition = this._savedPosition ?? segment;
|
|
57566
57566
|
return segment;
|
|
57567
57567
|
}
|
|
@@ -57637,9 +57637,10 @@ class Marshal {
|
|
|
57637
57637
|
}
|
|
57638
57638
|
// -------------------- HitCheckResult -------------------
|
|
57639
57639
|
writeHitCheckResult(data2) {
|
|
57640
|
-
this.ensureCapacity(4 + 4 + 4 * 3 + 4 * 3);
|
|
57640
|
+
this.ensureCapacity(4 + 4 + 4 + 4 * 3 + 4 * 3);
|
|
57641
57641
|
this.writeUInt(data2.vimHandle);
|
|
57642
57642
|
this.writeUInt(data2.nodeIndex);
|
|
57643
|
+
this.writeUInt(data2.elementIndex);
|
|
57643
57644
|
this.writeVector3(data2.worldPosition);
|
|
57644
57645
|
this.writeVector3(data2.worldNormal);
|
|
57645
57646
|
}
|
|
@@ -57763,6 +57764,12 @@ class ReadMarshal {
|
|
|
57763
57764
|
this._offset += 4;
|
|
57764
57765
|
return value;
|
|
57765
57766
|
}
|
|
57767
|
+
//TODO: Maybe wrong
|
|
57768
|
+
readUInt64() {
|
|
57769
|
+
const low = this.readUInt();
|
|
57770
|
+
const high = this.readUInt();
|
|
57771
|
+
return BigInt(high) << 32n | BigInt(low);
|
|
57772
|
+
}
|
|
57766
57773
|
readFloat() {
|
|
57767
57774
|
const value = this._dataView.getFloat32(this._offset, true);
|
|
57768
57775
|
this._offset += 4;
|
|
@@ -57783,11 +57790,13 @@ class ReadMarshal {
|
|
|
57783
57790
|
readHitCheckResult() {
|
|
57784
57791
|
const vimHandle = this.readUInt();
|
|
57785
57792
|
const nodeIndex = this.readUInt();
|
|
57793
|
+
const mElementIndex = this.readUInt();
|
|
57786
57794
|
const worldPosition = this.readVector3();
|
|
57787
57795
|
const worldNormal = this.readVector3();
|
|
57788
57796
|
return {
|
|
57789
57797
|
vimHandle,
|
|
57790
57798
|
nodeIndex,
|
|
57799
|
+
elementIndex: mElementIndex,
|
|
57791
57800
|
worldPosition,
|
|
57792
57801
|
worldNormal
|
|
57793
57802
|
};
|
|
@@ -57856,6 +57865,14 @@ class ReadMarshal {
|
|
|
57856
57865
|
readArrayOfUInt() {
|
|
57857
57866
|
return this.readArray(() => this.readUInt());
|
|
57858
57867
|
}
|
|
57868
|
+
readArrayOfUInt64() {
|
|
57869
|
+
const length = this.readUInt();
|
|
57870
|
+
const array = [];
|
|
57871
|
+
for (let i = 0; i < length; i++) {
|
|
57872
|
+
array.push(this.readUInt64());
|
|
57873
|
+
}
|
|
57874
|
+
return array;
|
|
57875
|
+
}
|
|
57859
57876
|
readArrayOfFloat() {
|
|
57860
57877
|
return this.readArray(() => this.readFloat());
|
|
57861
57878
|
}
|
|
@@ -57902,7 +57919,7 @@ class RpcClient {
|
|
|
57902
57919
|
constructor(_socket) {
|
|
57903
57920
|
__publicField(this, "_socket");
|
|
57904
57921
|
// RPC Generated Code
|
|
57905
|
-
__publicField(this, "API_VERSION", "
|
|
57922
|
+
__publicField(this, "API_VERSION", "6.0.0");
|
|
57906
57923
|
this._socket = _socket;
|
|
57907
57924
|
}
|
|
57908
57925
|
get connected() {
|
|
@@ -57911,25 +57928,12 @@ class RpcClient {
|
|
|
57911
57928
|
get url() {
|
|
57912
57929
|
return this._socket.url;
|
|
57913
57930
|
}
|
|
57914
|
-
RPCAddNodeFlags(componentHandle, nodes, flags) {
|
|
57915
|
-
const marshal = new Marshal();
|
|
57916
|
-
marshal.writeString("RPCAddNodeFlags");
|
|
57917
|
-
marshal.writeUInt(componentHandle);
|
|
57918
|
-
marshal.writeArrayOfUInt(nodes);
|
|
57919
|
-
marshal.writeUInt(flags);
|
|
57920
|
-
this._socket.sendRPC(marshal);
|
|
57921
|
-
}
|
|
57922
57931
|
RPCClearMaterialOverrides(componentHandle) {
|
|
57923
57932
|
const marshal = new Marshal();
|
|
57924
57933
|
marshal.writeString("RPCClearMaterialOverrides");
|
|
57925
57934
|
marshal.writeUInt(componentHandle);
|
|
57926
57935
|
this._socket.sendRPC(marshal);
|
|
57927
57936
|
}
|
|
57928
|
-
RPCClearScene() {
|
|
57929
|
-
const marshal = new Marshal();
|
|
57930
|
-
marshal.writeString("RPCClearScene");
|
|
57931
|
-
this._socket.sendRPC(marshal);
|
|
57932
|
-
}
|
|
57933
57937
|
async RPCCreateMaterialInstances(materialHandle, smoothness, colors) {
|
|
57934
57938
|
const marshal = new Marshal();
|
|
57935
57939
|
marshal.writeString("RPCCreateMaterialInstances");
|
|
@@ -57968,28 +57972,28 @@ class RpcClient {
|
|
|
57968
57972
|
marshal.writeBoolean(value);
|
|
57969
57973
|
this._socket.sendRPC(marshal);
|
|
57970
57974
|
}
|
|
57971
|
-
async
|
|
57975
|
+
async RPCFrameAABB(box, blendTime) {
|
|
57972
57976
|
const marshal = new Marshal();
|
|
57973
|
-
marshal.writeString("
|
|
57977
|
+
marshal.writeString("RPCFrameAABB");
|
|
57978
|
+
marshal.writeBox3(box);
|
|
57974
57979
|
marshal.writeFloat(blendTime);
|
|
57975
57980
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
57976
57981
|
const ret = returnMarshal.readSegment();
|
|
57977
57982
|
return ret;
|
|
57978
57983
|
}
|
|
57979
|
-
async
|
|
57984
|
+
async RPCFrameAll(blendTime) {
|
|
57980
57985
|
const marshal = new Marshal();
|
|
57981
|
-
marshal.writeString("
|
|
57982
|
-
marshal.writeBox3(box);
|
|
57986
|
+
marshal.writeString("RPCFrameAll");
|
|
57983
57987
|
marshal.writeFloat(blendTime);
|
|
57984
57988
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
57985
57989
|
const ret = returnMarshal.readSegment();
|
|
57986
57990
|
return ret;
|
|
57987
57991
|
}
|
|
57988
|
-
async
|
|
57992
|
+
async RPCFrameElements(componentHandle, elementIndices, blendTime) {
|
|
57989
57993
|
const marshal = new Marshal();
|
|
57990
|
-
marshal.writeString("
|
|
57994
|
+
marshal.writeString("RPCFrameElements");
|
|
57991
57995
|
marshal.writeUInt(componentHandle);
|
|
57992
|
-
marshal.writeArrayOfUInt(
|
|
57996
|
+
marshal.writeArrayOfUInt(elementIndices);
|
|
57993
57997
|
marshal.writeFloat(blendTime);
|
|
57994
57998
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
57995
57999
|
const ret = returnMarshal.readSegment();
|
|
@@ -58004,42 +58008,58 @@ class RpcClient {
|
|
|
58004
58008
|
const ret = returnMarshal.readSegment();
|
|
58005
58009
|
return ret;
|
|
58006
58010
|
}
|
|
58007
|
-
async
|
|
58011
|
+
async RPCGetAABBForAll() {
|
|
58008
58012
|
const marshal = new Marshal();
|
|
58009
|
-
marshal.writeString("
|
|
58013
|
+
marshal.writeString("RPCGetAABBForAll");
|
|
58010
58014
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58011
|
-
const ret = returnMarshal.
|
|
58015
|
+
const ret = returnMarshal.readBox3();
|
|
58012
58016
|
return ret;
|
|
58013
58017
|
}
|
|
58014
|
-
async
|
|
58018
|
+
async RPCGetAABBForElements(componentHandle, elementIndices) {
|
|
58015
58019
|
const marshal = new Marshal();
|
|
58016
|
-
marshal.writeString("
|
|
58020
|
+
marshal.writeString("RPCGetAABBForElements");
|
|
58017
58021
|
marshal.writeUInt(componentHandle);
|
|
58018
|
-
marshal.writeArrayOfUInt(
|
|
58022
|
+
marshal.writeArrayOfUInt(elementIndices);
|
|
58019
58023
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58020
58024
|
const ret = returnMarshal.readBox3();
|
|
58021
58025
|
return ret;
|
|
58022
58026
|
}
|
|
58023
|
-
async
|
|
58027
|
+
async RPCGetAABBForVim(componentHandle) {
|
|
58024
58028
|
const marshal = new Marshal();
|
|
58025
|
-
marshal.writeString("
|
|
58029
|
+
marshal.writeString("RPCGetAABBForVim");
|
|
58026
58030
|
marshal.writeUInt(componentHandle);
|
|
58027
58031
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58028
58032
|
const ret = returnMarshal.readBox3();
|
|
58029
58033
|
return ret;
|
|
58030
58034
|
}
|
|
58031
|
-
async
|
|
58035
|
+
async RPCGetAPIVersion() {
|
|
58036
|
+
const marshal = new Marshal();
|
|
58037
|
+
marshal.writeString("RPCGetAPIVersion");
|
|
58038
|
+
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58039
|
+
const ret = returnMarshal.readString();
|
|
58040
|
+
return ret;
|
|
58041
|
+
}
|
|
58042
|
+
async RPCGetCameraView() {
|
|
58032
58043
|
const marshal = new Marshal();
|
|
58033
|
-
marshal.writeString("
|
|
58044
|
+
marshal.writeString("RPCGetCameraView");
|
|
58034
58045
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58035
58046
|
const ret = returnMarshal.readSegment();
|
|
58036
58047
|
return ret;
|
|
58037
58048
|
}
|
|
58038
|
-
async
|
|
58049
|
+
async RPCGetElementCount(componentHandle) {
|
|
58050
|
+
const marshal = new Marshal();
|
|
58051
|
+
marshal.writeString("RPCGetElementCount");
|
|
58052
|
+
marshal.writeUInt(componentHandle);
|
|
58053
|
+
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58054
|
+
const ret = returnMarshal.readUInt();
|
|
58055
|
+
return ret;
|
|
58056
|
+
}
|
|
58057
|
+
async RPCGetElementIds(componentHandle) {
|
|
58039
58058
|
const marshal = new Marshal();
|
|
58040
|
-
marshal.writeString("
|
|
58059
|
+
marshal.writeString("RPCGetElementIds");
|
|
58060
|
+
marshal.writeUInt(componentHandle);
|
|
58041
58061
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58042
|
-
const ret = returnMarshal.
|
|
58062
|
+
const ret = returnMarshal.readArrayOfUInt64();
|
|
58043
58063
|
return ret;
|
|
58044
58064
|
}
|
|
58045
58065
|
async RPCGetLastError() {
|
|
@@ -58049,11 +58069,12 @@ class RpcClient {
|
|
|
58049
58069
|
const ret = returnMarshal.readString();
|
|
58050
58070
|
return ret;
|
|
58051
58071
|
}
|
|
58052
|
-
async
|
|
58072
|
+
async RPCGetRoomElements(componentHandle) {
|
|
58053
58073
|
const marshal = new Marshal();
|
|
58054
|
-
marshal.writeString("
|
|
58074
|
+
marshal.writeString("RPCGetRoomElements");
|
|
58075
|
+
marshal.writeUInt(componentHandle);
|
|
58055
58076
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58056
|
-
const ret = returnMarshal.
|
|
58077
|
+
const ret = returnMarshal.readArrayOfUInt();
|
|
58057
58078
|
return ret;
|
|
58058
58079
|
}
|
|
58059
58080
|
async RPCGetSectionBox() {
|
|
@@ -58071,58 +58092,6 @@ class RpcClient {
|
|
|
58071
58092
|
const ret = returnMarshal.readVimStatus();
|
|
58072
58093
|
return ret;
|
|
58073
58094
|
}
|
|
58074
|
-
RPCGhost(componentHandle, nodes) {
|
|
58075
|
-
const marshal = new Marshal();
|
|
58076
|
-
marshal.writeString("RPCGhost");
|
|
58077
|
-
marshal.writeUInt(componentHandle);
|
|
58078
|
-
marshal.writeArrayOfUInt(nodes);
|
|
58079
|
-
this._socket.sendRPC(marshal);
|
|
58080
|
-
}
|
|
58081
|
-
RPCGhostAll(componentHandle) {
|
|
58082
|
-
const marshal = new Marshal();
|
|
58083
|
-
marshal.writeString("RPCGhostAll");
|
|
58084
|
-
marshal.writeUInt(componentHandle);
|
|
58085
|
-
this._socket.sendRPC(marshal);
|
|
58086
|
-
}
|
|
58087
|
-
RPCHide(componentHandle, nodes) {
|
|
58088
|
-
const marshal = new Marshal();
|
|
58089
|
-
marshal.writeString("RPCHide");
|
|
58090
|
-
marshal.writeUInt(componentHandle);
|
|
58091
|
-
marshal.writeArrayOfUInt(nodes);
|
|
58092
|
-
this._socket.sendRPC(marshal);
|
|
58093
|
-
}
|
|
58094
|
-
RPCHideAABBs(componentHandle, nodes) {
|
|
58095
|
-
const marshal = new Marshal();
|
|
58096
|
-
marshal.writeString("RPCHideAABBs");
|
|
58097
|
-
marshal.writeUInt(componentHandle);
|
|
58098
|
-
marshal.writeArrayOfUInt(nodes);
|
|
58099
|
-
this._socket.sendRPC(marshal);
|
|
58100
|
-
}
|
|
58101
|
-
RPCHideAll(componentHandle) {
|
|
58102
|
-
const marshal = new Marshal();
|
|
58103
|
-
marshal.writeString("RPCHideAll");
|
|
58104
|
-
marshal.writeUInt(componentHandle);
|
|
58105
|
-
this._socket.sendRPC(marshal);
|
|
58106
|
-
}
|
|
58107
|
-
RPCHideAllAABBs(componentHandle) {
|
|
58108
|
-
const marshal = new Marshal();
|
|
58109
|
-
marshal.writeString("RPCHideAllAABBs");
|
|
58110
|
-
marshal.writeUInt(componentHandle);
|
|
58111
|
-
this._socket.sendRPC(marshal);
|
|
58112
|
-
}
|
|
58113
|
-
RPCHighlight(componentHandle, nodes) {
|
|
58114
|
-
const marshal = new Marshal();
|
|
58115
|
-
marshal.writeString("RPCHighlight");
|
|
58116
|
-
marshal.writeUInt(componentHandle);
|
|
58117
|
-
marshal.writeArrayOfUInt(nodes);
|
|
58118
|
-
this._socket.sendRPC(marshal);
|
|
58119
|
-
}
|
|
58120
|
-
RPCHighlightAll(componentHandle) {
|
|
58121
|
-
const marshal = new Marshal();
|
|
58122
|
-
marshal.writeString("RPCHighlightAll");
|
|
58123
|
-
marshal.writeUInt(componentHandle);
|
|
58124
|
-
this._socket.sendRPC(marshal);
|
|
58125
|
-
}
|
|
58126
58095
|
RPCKeyEvent(keyCode, down) {
|
|
58127
58096
|
const marshal = new Marshal();
|
|
58128
58097
|
marshal.writeString("RPCKeyEvent");
|
|
@@ -58147,12 +58116,6 @@ class RpcClient {
|
|
|
58147
58116
|
const ret = returnMarshal.readUInt();
|
|
58148
58117
|
return ret;
|
|
58149
58118
|
}
|
|
58150
|
-
RPCLockIblRotation(lock) {
|
|
58151
|
-
const marshal = new Marshal();
|
|
58152
|
-
marshal.writeString("RPCLockIblRotation");
|
|
58153
|
-
marshal.writeBoolean(lock);
|
|
58154
|
-
this._socket.sendRPC(marshal);
|
|
58155
|
-
}
|
|
58156
58119
|
RPCMouseButtonEvent(mousePos, mouseButton, down) {
|
|
58157
58120
|
const marshal = new Marshal();
|
|
58158
58121
|
marshal.writeString("RPCMouseButtonEvent");
|
|
@@ -58187,16 +58150,6 @@ class RpcClient {
|
|
|
58187
58150
|
marshal.writeInt(mouseButton);
|
|
58188
58151
|
this._socket.sendRPC(marshal);
|
|
58189
58152
|
}
|
|
58190
|
-
RPCMoveCameraTo(usePosition, useTarget, position, target, blendTime) {
|
|
58191
|
-
const marshal = new Marshal();
|
|
58192
|
-
marshal.writeString("RPCMoveCameraTo");
|
|
58193
|
-
marshal.writeBoolean(usePosition);
|
|
58194
|
-
marshal.writeBoolean(useTarget);
|
|
58195
|
-
marshal.writeVector3(position);
|
|
58196
|
-
marshal.writeVector3(target);
|
|
58197
|
-
marshal.writeFloat(blendTime);
|
|
58198
|
-
this._socket.sendRPC(marshal);
|
|
58199
|
-
}
|
|
58200
58153
|
RPCPauseRendering(pause) {
|
|
58201
58154
|
const marshal = new Marshal();
|
|
58202
58155
|
marshal.writeString("RPCPauseRendering");
|
|
@@ -58211,17 +58164,9 @@ class RpcClient {
|
|
|
58211
58164
|
const ret = returnMarshal.readHitCheckResult();
|
|
58212
58165
|
return ret;
|
|
58213
58166
|
}
|
|
58214
|
-
|
|
58215
|
-
const marshal = new Marshal();
|
|
58216
|
-
marshal.writeString("RPCRemoveNodeFlags");
|
|
58217
|
-
marshal.writeUInt(componentHandle);
|
|
58218
|
-
marshal.writeArrayOfUInt(nodes);
|
|
58219
|
-
marshal.writeUInt(flags);
|
|
58220
|
-
this._socket.sendRPC(marshal);
|
|
58221
|
-
}
|
|
58222
|
-
RPCSetAspectRatio(width, height) {
|
|
58167
|
+
RPCSetCameraAspectRatio(width, height) {
|
|
58223
58168
|
const marshal = new Marshal();
|
|
58224
|
-
marshal.writeString("
|
|
58169
|
+
marshal.writeString("RPCSetCameraAspectRatio");
|
|
58225
58170
|
marshal.writeUInt(width);
|
|
58226
58171
|
marshal.writeUInt(height);
|
|
58227
58172
|
this._socket.sendRPC(marshal);
|
|
@@ -58232,29 +58177,37 @@ class RpcClient {
|
|
|
58232
58177
|
marshal.writeBoolean(orbit2);
|
|
58233
58178
|
this._socket.sendRPC(marshal);
|
|
58234
58179
|
}
|
|
58235
|
-
RPCSetCameraPosition(
|
|
58180
|
+
RPCSetCameraPosition(position, blendTime) {
|
|
58236
58181
|
const marshal = new Marshal();
|
|
58237
58182
|
marshal.writeString("RPCSetCameraPosition");
|
|
58238
|
-
marshal.
|
|
58183
|
+
marshal.writeVector3(position);
|
|
58239
58184
|
marshal.writeFloat(blendTime);
|
|
58240
58185
|
this._socket.sendRPC(marshal);
|
|
58241
58186
|
}
|
|
58242
|
-
|
|
58187
|
+
RPCSetCameraSpeed(speed) {
|
|
58243
58188
|
const marshal = new Marshal();
|
|
58244
|
-
marshal.writeString("
|
|
58245
|
-
marshal.
|
|
58189
|
+
marshal.writeString("RPCSetCameraSpeed");
|
|
58190
|
+
marshal.writeFloat(speed);
|
|
58246
58191
|
this._socket.sendRPC(marshal);
|
|
58247
58192
|
}
|
|
58248
|
-
|
|
58193
|
+
RPCSetCameraTarget(target, blendTime) {
|
|
58249
58194
|
const marshal = new Marshal();
|
|
58250
|
-
marshal.writeString("
|
|
58251
|
-
marshal.
|
|
58195
|
+
marshal.writeString("RPCSetCameraTarget");
|
|
58196
|
+
marshal.writeVector3(target);
|
|
58197
|
+
marshal.writeFloat(blendTime);
|
|
58198
|
+
this._socket.sendRPC(marshal);
|
|
58199
|
+
}
|
|
58200
|
+
RPCSetCameraView(state, blendTime) {
|
|
58201
|
+
const marshal = new Marshal();
|
|
58202
|
+
marshal.writeString("RPCSetCameraView");
|
|
58203
|
+
marshal.writeSegment(state);
|
|
58204
|
+
marshal.writeFloat(blendTime);
|
|
58252
58205
|
this._socket.sendRPC(marshal);
|
|
58253
58206
|
}
|
|
58254
|
-
|
|
58207
|
+
RPCSetGhostColor(ghostColor) {
|
|
58255
58208
|
const marshal = new Marshal();
|
|
58256
|
-
marshal.writeString("
|
|
58257
|
-
marshal.
|
|
58209
|
+
marshal.writeString("RPCSetGhostColor");
|
|
58210
|
+
marshal.writeRGBA(ghostColor);
|
|
58258
58211
|
this._socket.sendRPC(marshal);
|
|
58259
58212
|
}
|
|
58260
58213
|
RPCSetLighting(toneMappingWhitePoint, hdrScale, hdrBackgroundScale, hdrBackgroundSaturation, backgroundBlur, backgroundColor) {
|
|
@@ -58268,45 +58221,41 @@ class RpcClient {
|
|
|
58268
58221
|
marshal.writeRGBA(backgroundColor);
|
|
58269
58222
|
this._socket.sendRPC(marshal);
|
|
58270
58223
|
}
|
|
58271
|
-
RPCSetMaterialOverrides(componentHandle,
|
|
58224
|
+
RPCSetMaterialOverrides(componentHandle, elementIndices, materialInstanceHandles) {
|
|
58272
58225
|
const marshal = new Marshal();
|
|
58273
58226
|
marshal.writeString("RPCSetMaterialOverrides");
|
|
58274
58227
|
marshal.writeUInt(componentHandle);
|
|
58275
|
-
marshal.writeArrayOfUInt(
|
|
58228
|
+
marshal.writeArrayOfUInt(elementIndices);
|
|
58276
58229
|
marshal.writeArrayOfUInt(materialInstanceHandles);
|
|
58277
58230
|
this._socket.sendRPC(marshal);
|
|
58278
58231
|
}
|
|
58279
|
-
RPCSetMoveSpeed(speed) {
|
|
58280
|
-
const marshal = new Marshal();
|
|
58281
|
-
marshal.writeString("RPCSetMoveSpeed");
|
|
58282
|
-
marshal.writeFloat(speed);
|
|
58283
|
-
this._socket.sendRPC(marshal);
|
|
58284
|
-
}
|
|
58285
58232
|
RPCSetSectionBox(state) {
|
|
58286
58233
|
const marshal = new Marshal();
|
|
58287
58234
|
marshal.writeString("RPCSetSectionBox");
|
|
58288
58235
|
marshal.writeSectionBoxState(state);
|
|
58289
58236
|
this._socket.sendRPC(marshal);
|
|
58290
58237
|
}
|
|
58291
|
-
|
|
58238
|
+
RPCSetStateVim(componentHandle, state) {
|
|
58292
58239
|
const marshal = new Marshal();
|
|
58293
|
-
marshal.writeString("
|
|
58240
|
+
marshal.writeString("RPCSetStateVim");
|
|
58294
58241
|
marshal.writeUInt(componentHandle);
|
|
58295
|
-
marshal.
|
|
58242
|
+
marshal.writeUInt(state);
|
|
58296
58243
|
this._socket.sendRPC(marshal);
|
|
58297
58244
|
}
|
|
58298
|
-
|
|
58245
|
+
RPCSetStateElements(componentHandle, elementIndices, state) {
|
|
58299
58246
|
const marshal = new Marshal();
|
|
58300
|
-
marshal.writeString("
|
|
58247
|
+
marshal.writeString("RPCSetStateElements");
|
|
58301
58248
|
marshal.writeUInt(componentHandle);
|
|
58302
|
-
marshal.writeArrayOfUInt(
|
|
58303
|
-
marshal.
|
|
58249
|
+
marshal.writeArrayOfUInt(elementIndices);
|
|
58250
|
+
marshal.writeUInt(state);
|
|
58304
58251
|
this._socket.sendRPC(marshal);
|
|
58305
58252
|
}
|
|
58306
|
-
|
|
58253
|
+
RPCSetStatesElements(componentHandle, elementIndices, states) {
|
|
58307
58254
|
const marshal = new Marshal();
|
|
58308
|
-
marshal.writeString("
|
|
58255
|
+
marshal.writeString("RPCSetStatesElements");
|
|
58309
58256
|
marshal.writeUInt(componentHandle);
|
|
58257
|
+
marshal.writeArrayOfUInt(elementIndices);
|
|
58258
|
+
marshal.writeArrayOfUInt(states);
|
|
58310
58259
|
this._socket.sendRPC(marshal);
|
|
58311
58260
|
}
|
|
58312
58261
|
async RPCStartScene(toneMappingWhitePoint, hdrScale, hdrBackgroundScale, hdrBackgroundSaturation, backgroundBlur, backgroundColor) {
|
|
@@ -58327,6 +58276,11 @@ class RpcClient {
|
|
|
58327
58276
|
marshal.writeString("RPCTriggerRenderDocCapture");
|
|
58328
58277
|
this._socket.sendRPC(marshal);
|
|
58329
58278
|
}
|
|
58279
|
+
RPCUnloadAll() {
|
|
58280
|
+
const marshal = new Marshal();
|
|
58281
|
+
marshal.writeString("RPCUnloadAll");
|
|
58282
|
+
this._socket.sendRPC(marshal);
|
|
58283
|
+
}
|
|
58330
58284
|
RPCUnloadVim(componentHandle) {
|
|
58331
58285
|
const marshal = new Marshal();
|
|
58332
58286
|
marshal.writeString("RPCUnloadVim");
|
|
@@ -58878,7 +58832,7 @@ function ultraInputAdapter(viewer) {
|
|
|
58878
58832
|
function createAdapter$1(viewer) {
|
|
58879
58833
|
return {
|
|
58880
58834
|
init: () => {
|
|
58881
|
-
viewer.rpc.
|
|
58835
|
+
viewer.rpc.RPCSetCameraSpeed(10);
|
|
58882
58836
|
},
|
|
58883
58837
|
orbitCamera: (value) => {
|
|
58884
58838
|
},
|
|
@@ -59085,7 +59039,7 @@ class Raycaster3 {
|
|
|
59085
59039
|
if (!test2) return void 0;
|
|
59086
59040
|
const vim = this._vims.getFromHandle(test2.vimHandle);
|
|
59087
59041
|
if (!vim) return void 0;
|
|
59088
|
-
const object = vim.
|
|
59042
|
+
const object = vim.getElement(test2.elementIndex);
|
|
59089
59043
|
if (!object) return void 0;
|
|
59090
59044
|
return new UltraRaycastResult(
|
|
59091
59045
|
object,
|
|
@@ -59178,118 +59132,39 @@ class RpcSafeClient {
|
|
|
59178
59132
|
Validation.clampRGBA01(s.backgroundColor)
|
|
59179
59133
|
);
|
|
59180
59134
|
}
|
|
59181
|
-
RPCLockIblRotation(lock) {
|
|
59182
|
-
this.rpc.RPCLockIblRotation(lock);
|
|
59183
|
-
}
|
|
59184
|
-
RPCGetSceneAABB() {
|
|
59185
|
-
return this.safeCall(
|
|
59186
|
-
() => this.rpc.RPCGetSceneAABB(),
|
|
59187
|
-
void 0
|
|
59188
|
-
);
|
|
59189
|
-
}
|
|
59190
59135
|
/*******************************************************************************
|
|
59191
59136
|
* NODE VISIBILITY METHODS
|
|
59192
59137
|
* Methods for controlling node visibility, including show/hide, ghosting,
|
|
59193
59138
|
* and highlighting functionality.
|
|
59194
59139
|
******************************************************************************/
|
|
59195
59140
|
/**
|
|
59196
|
-
*
|
|
59197
|
-
* @param componentHandle - The component to hide entirely
|
|
59198
|
-
* @throws {Error} If the component handle is invalid
|
|
59199
|
-
*/
|
|
59200
|
-
RPCHideAll(componentHandle) {
|
|
59201
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59202
|
-
this.rpc.RPCHideAll(componentHandle);
|
|
59203
|
-
}
|
|
59204
|
-
/**
|
|
59205
|
-
* Shows all nodes in a component, making the entire component visible.
|
|
59206
|
-
* @param componentHandle - The component to show entirely
|
|
59207
|
-
* @throws {Error} If the component handle is invalid
|
|
59208
|
-
*/
|
|
59209
|
-
RPCShowAll(componentHandle) {
|
|
59210
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59211
|
-
this.rpc.RPCShowAll(componentHandle);
|
|
59212
|
-
}
|
|
59213
|
-
/**
|
|
59214
|
-
* Makes all nodes in a component semi-transparent (ghosted).
|
|
59215
|
-
* @param componentHandle - The component to ghost entirely
|
|
59216
|
-
* @throws {Error} If the component handle is invalid
|
|
59217
|
-
*/
|
|
59218
|
-
RPCGhostAll(componentHandle) {
|
|
59219
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59220
|
-
this.rpc.RPCGhostAll(componentHandle);
|
|
59221
|
-
}
|
|
59222
|
-
/**
|
|
59223
|
-
* Highlights all nodes in a component.
|
|
59224
|
-
* @param componentHandle - The component to highlight entirely
|
|
59225
|
-
* @throws {Error} If the component handle is invalid
|
|
59226
|
-
*/
|
|
59227
|
-
RPCHighlightAll(componentHandle) {
|
|
59228
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59229
|
-
this.rpc.RPCHighlightAll(componentHandle);
|
|
59230
|
-
}
|
|
59231
|
-
/**
|
|
59232
|
-
* Hides specified nodes in a component, making them invisible.
|
|
59233
|
-
* Large node arrays are automatically processed in batches.
|
|
59234
|
-
* @param componentHandle - The component containing the nodes
|
|
59235
|
-
* @param nodes - Array of node indices to hide
|
|
59236
|
-
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59237
|
-
*/
|
|
59238
|
-
RPCHide(componentHandle, nodes) {
|
|
59239
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59240
|
-
if (!Validation.areComponentHandles(nodes)) return;
|
|
59241
|
-
const batches = batchArray(nodes, this.batchSize);
|
|
59242
|
-
for (const batch of batches) {
|
|
59243
|
-
this.rpc.RPCHide(componentHandle, batch);
|
|
59244
|
-
}
|
|
59245
|
-
}
|
|
59246
|
-
/**
|
|
59247
|
-
* Shows specified nodes in a component, making them visible.
|
|
59141
|
+
* Highlights specified nodes in a component.
|
|
59248
59142
|
* Large node arrays are automatically processed in batches.
|
|
59249
59143
|
* @param componentHandle - The component containing the nodes
|
|
59250
|
-
* @param nodes - Array of node indices to
|
|
59144
|
+
* @param nodes - Array of node indices to highlight
|
|
59251
59145
|
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59252
59146
|
*/
|
|
59253
|
-
|
|
59254
|
-
if (
|
|
59147
|
+
RPCSetStateElements(componentHandle, elements, state) {
|
|
59148
|
+
if (elements.length === 0) return;
|
|
59255
59149
|
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59256
|
-
if (!Validation.areComponentHandles(
|
|
59257
|
-
const batches = batchArray(
|
|
59150
|
+
if (!Validation.areComponentHandles(elements)) return;
|
|
59151
|
+
const batches = batchArray(elements, this.batchSize);
|
|
59258
59152
|
for (const batch of batches) {
|
|
59259
|
-
this.rpc.
|
|
59153
|
+
this.rpc.RPCSetStateElements(componentHandle, batch, state);
|
|
59260
59154
|
}
|
|
59261
59155
|
}
|
|
59262
|
-
|
|
59263
|
-
* Makes specified nodes semi-transparent (ghosted) in a component.
|
|
59264
|
-
* Large node arrays are automatically processed in batches.
|
|
59265
|
-
* @param componentHandle - The component containing the nodes
|
|
59266
|
-
* @param nodes - Array of node indices to ghost
|
|
59267
|
-
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59268
|
-
*/
|
|
59269
|
-
RPCGhost(componentHandle, nodes) {
|
|
59270
|
-
if (nodes.length === 0) return;
|
|
59156
|
+
RPCSetStatesElements(componentHandle, elements, states) {
|
|
59271
59157
|
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59272
|
-
if (!Validation.areComponentHandles(
|
|
59273
|
-
|
|
59274
|
-
|
|
59275
|
-
|
|
59158
|
+
if (!Validation.areComponentHandles(elements)) return;
|
|
59159
|
+
if (!Validation.areSameLength(elements, states)) return;
|
|
59160
|
+
const batches = batchArrays(elements, states, this.batchSize);
|
|
59161
|
+
for (const [batchedElements, batchedStates] of batches) {
|
|
59162
|
+
this.rpc.RPCSetStatesElements(componentHandle, batchedElements, batchedStates);
|
|
59276
59163
|
}
|
|
59277
59164
|
}
|
|
59278
|
-
|
|
59279
|
-
* Highlights specified nodes in a component.
|
|
59280
|
-
* Large node arrays are automatically processed in batches.
|
|
59281
|
-
* @param componentHandle - The component containing the nodes
|
|
59282
|
-
* @param nodes - Array of node indices to highlight
|
|
59283
|
-
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59284
|
-
*/
|
|
59285
|
-
RPCHighlight(componentHandle, nodes) {
|
|
59286
|
-
if (nodes.length === 0) return;
|
|
59165
|
+
RPCSetStateVim(componentHandle, state) {
|
|
59287
59166
|
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59288
|
-
|
|
59289
|
-
const batches = batchArray(nodes, this.batchSize);
|
|
59290
|
-
for (const batch of batches) {
|
|
59291
|
-
this.rpc.RPCHighlight(componentHandle, batch);
|
|
59292
|
-
}
|
|
59167
|
+
this.rpc.RPCSetStateVim(componentHandle, state);
|
|
59293
59168
|
}
|
|
59294
59169
|
/*******************************************************************************
|
|
59295
59170
|
* TEXT AND UI METHODS
|
|
@@ -59349,9 +59224,9 @@ class RpcSafeClient {
|
|
|
59349
59224
|
* Retrieves the current camera position and orientation.
|
|
59350
59225
|
* @returns Promise resolving to a segment representing the camera's current position and target
|
|
59351
59226
|
*/
|
|
59352
|
-
async
|
|
59227
|
+
async RPCGetCameraView() {
|
|
59353
59228
|
return await this.safeCall(
|
|
59354
|
-
() => this.rpc.
|
|
59229
|
+
() => this.rpc.RPCGetCameraView(),
|
|
59355
59230
|
void 0
|
|
59356
59231
|
);
|
|
59357
59232
|
}
|
|
@@ -59359,16 +59234,58 @@ class RpcSafeClient {
|
|
|
59359
59234
|
* Sets the camera position and orientation.
|
|
59360
59235
|
* @param segment - The desired camera position and target
|
|
59361
59236
|
* @param blendTime - Duration of the camera transition in seconds (non-negative)
|
|
59362
|
-
* @throws {Error} If segment is invalid or blendTime is negative
|
|
59363
59237
|
*/
|
|
59364
|
-
|
|
59238
|
+
RPCSetCameraView(segment, blendTime) {
|
|
59365
59239
|
if (!Validation.isValidSegment(segment)) return;
|
|
59366
59240
|
blendTime = Validation.clamp01(blendTime);
|
|
59367
|
-
this.rpc.
|
|
59241
|
+
this.rpc.RPCSetCameraView(segment, blendTime);
|
|
59242
|
+
}
|
|
59243
|
+
/**
|
|
59244
|
+
* Sets the camera's position without changing its target.
|
|
59245
|
+
* The camera will move to the specified position while maintaining its current look-at direction.
|
|
59246
|
+
*
|
|
59247
|
+
* @param position - The new position of the camera in world space
|
|
59248
|
+
* @param blendTime - Duration of the camera transition in seconds (non-negative)
|
|
59249
|
+
*/
|
|
59250
|
+
RPCSetCameraPosition(position, blendTime) {
|
|
59251
|
+
if (!Validation.isValidVector3(position)) return;
|
|
59252
|
+
blendTime = Validation.clamp01(blendTime);
|
|
59253
|
+
this.rpc.RPCSetCameraPosition(position, blendTime);
|
|
59254
|
+
}
|
|
59255
|
+
/**
|
|
59256
|
+
* Sets the camera's look-at target without changing its position.
|
|
59257
|
+
* The camera will rotate to face the specified target while remaining at its current position.
|
|
59258
|
+
*
|
|
59259
|
+
* @param target - The new look-at target of the camera in world space
|
|
59260
|
+
* @param blendTime - Duration of the camera transition in seconds (non-negative)
|
|
59261
|
+
*/
|
|
59262
|
+
RPCSetCameraTarget(target, blendTime) {
|
|
59263
|
+
if (!Validation.isValidVector3(target)) return;
|
|
59264
|
+
blendTime = Validation.clamp01(blendTime);
|
|
59265
|
+
this.rpc.RPCSetCameraTarget(target, blendTime);
|
|
59266
|
+
}
|
|
59267
|
+
/**
|
|
59268
|
+
* Retrieves the axis-aligned bounding box (AABB) that encompasses the entire scene.
|
|
59269
|
+
* This includes all loaded geometry across all VIM components.
|
|
59270
|
+
*
|
|
59271
|
+
* @returns Promise resolving to the global AABB of the scene, or undefined on failure
|
|
59272
|
+
*/
|
|
59273
|
+
RPCGetAABBForAll() {
|
|
59274
|
+
return this.safeCall(
|
|
59275
|
+
() => this.rpc.RPCGetAABBForAll(),
|
|
59276
|
+
void 0
|
|
59277
|
+
);
|
|
59368
59278
|
}
|
|
59369
|
-
|
|
59279
|
+
/**
|
|
59280
|
+
* Retrieves the axis-aligned bounding box (AABB) for a specific VIM component.
|
|
59281
|
+
* This bounding box represents the spatial bounds of all geometry within the given component.
|
|
59282
|
+
*
|
|
59283
|
+
* @param componentHandle - The handle of the VIM component to query
|
|
59284
|
+
* @returns Promise resolving to the component’s bounding box, or undefined on failure
|
|
59285
|
+
*/
|
|
59286
|
+
async RPCGetAABBForVim(componentHandle) {
|
|
59370
59287
|
return await this.safeCall(
|
|
59371
|
-
() => this.rpc.
|
|
59288
|
+
() => this.rpc.RPCGetAABBForVim(componentHandle),
|
|
59372
59289
|
void 0
|
|
59373
59290
|
);
|
|
59374
59291
|
}
|
|
@@ -59376,25 +59293,25 @@ class RpcSafeClient {
|
|
|
59376
59293
|
* Calculates the bounding box for specified nodes in a component.
|
|
59377
59294
|
* Large node arrays are automatically processed in batches for better performance.
|
|
59378
59295
|
* @param componentHandle - The component containing the nodes
|
|
59379
|
-
* @param
|
|
59296
|
+
* @param elements - Array of node indices to calculate bounds for
|
|
59380
59297
|
* @returns Promise resolving to the combined bounding box
|
|
59381
59298
|
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59382
59299
|
*/
|
|
59383
|
-
async
|
|
59300
|
+
async RPCGetAABBForElements(componentHandle, elements) {
|
|
59384
59301
|
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59385
|
-
if (!Validation.areComponentHandles(
|
|
59302
|
+
if (!Validation.areComponentHandles(elements)) return;
|
|
59386
59303
|
return await this.safeCall(
|
|
59387
|
-
() => this.
|
|
59304
|
+
() => this.RPCGetAABBForElementsBatched(componentHandle, elements),
|
|
59388
59305
|
void 0
|
|
59389
59306
|
);
|
|
59390
59307
|
}
|
|
59391
|
-
async
|
|
59392
|
-
if (
|
|
59308
|
+
async RPCGetAABBForElementsBatched(componentHandle, elements) {
|
|
59309
|
+
if (elements.length === 0) {
|
|
59393
59310
|
return new Box3();
|
|
59394
59311
|
}
|
|
59395
|
-
const batches = batchArray(
|
|
59312
|
+
const batches = batchArray(elements, this.batchSize);
|
|
59396
59313
|
const promises = batches.map(async (batch) => {
|
|
59397
|
-
const aabb = await this.rpc.
|
|
59314
|
+
const aabb = await this.rpc.RPCGetAABBForElements(componentHandle, batch);
|
|
59398
59315
|
const v1 = new Vector3(aabb.min.x, aabb.min.y, aabb.min.z);
|
|
59399
59316
|
const v2 = new Vector3(aabb.max.x, aabb.max.y, aabb.max.z);
|
|
59400
59317
|
return new Box3(v1, v2);
|
|
@@ -59435,28 +59352,28 @@ class RpcSafeClient {
|
|
|
59435
59352
|
* Frames specific instances within a component. For large numbers of instances,
|
|
59436
59353
|
* automatically switches to bounding box framing for better performance.
|
|
59437
59354
|
* @param componentHandle - The component containing the instances
|
|
59438
|
-
* @param
|
|
59355
|
+
* @param elements - Array of node indices to frame
|
|
59439
59356
|
* @param blendTime - Duration of the camera transition in seconds (non-negative)
|
|
59440
59357
|
* @returns Promise resolving to camera segment representing the final position
|
|
59441
59358
|
* @throws {Error} If the component handle is invalid or nodes array is empty
|
|
59442
59359
|
*/
|
|
59443
|
-
async
|
|
59360
|
+
async RPCFrameElements(componentHandle, elements, blendTime) {
|
|
59444
59361
|
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59445
|
-
if (!Validation.areComponentHandles(
|
|
59362
|
+
if (!Validation.areComponentHandles(elements)) return;
|
|
59446
59363
|
blendTime = Validation.clamp01(blendTime);
|
|
59447
|
-
if (
|
|
59364
|
+
if (elements.length < this.batchSize) {
|
|
59448
59365
|
return await this.safeCall(
|
|
59449
|
-
() => this.rpc.
|
|
59366
|
+
() => this.rpc.RPCFrameElements(componentHandle, elements, blendTime),
|
|
59450
59367
|
void 0
|
|
59451
59368
|
);
|
|
59452
59369
|
} else {
|
|
59453
59370
|
const box = await this.safeCall(
|
|
59454
|
-
() => this.
|
|
59371
|
+
() => this.RPCGetAABBForElementsBatched(componentHandle, elements),
|
|
59455
59372
|
void 0
|
|
59456
59373
|
);
|
|
59457
59374
|
if (!box) return void 0;
|
|
59458
59375
|
return await this.safeCall(
|
|
59459
|
-
() => this.rpc.
|
|
59376
|
+
() => this.rpc.RPCFrameAABB(box, blendTime),
|
|
59460
59377
|
void 0
|
|
59461
59378
|
);
|
|
59462
59379
|
}
|
|
@@ -59467,11 +59384,11 @@ class RpcSafeClient {
|
|
|
59467
59384
|
* @param blendTime - Duration of the camera transition in seconds (non-negative)
|
|
59468
59385
|
* @throws {Error} If the box is invalid (min values must be less than max values)
|
|
59469
59386
|
*/
|
|
59470
|
-
async
|
|
59387
|
+
async RPCFrameAABB(box, blendTime) {
|
|
59471
59388
|
if (!Validation.isValidBox(box)) return;
|
|
59472
59389
|
blendTime = Validation.clamp01(blendTime);
|
|
59473
59390
|
return await this.safeCall(
|
|
59474
|
-
() => this.rpc.
|
|
59391
|
+
() => this.rpc.RPCFrameAABB(box, blendTime),
|
|
59475
59392
|
void 0
|
|
59476
59393
|
);
|
|
59477
59394
|
}
|
|
@@ -59484,9 +59401,9 @@ class RpcSafeClient {
|
|
|
59484
59401
|
* @param speed - The desired movement speed (must be positive)
|
|
59485
59402
|
* @throws {Error} If speed is not positive
|
|
59486
59403
|
*/
|
|
59487
|
-
|
|
59404
|
+
RPCSetCameraSpeed(speed) {
|
|
59488
59405
|
speed = Validation.min0(speed);
|
|
59489
|
-
this.rpc.
|
|
59406
|
+
this.rpc.RPCSetCameraSpeed(speed);
|
|
59490
59407
|
}
|
|
59491
59408
|
RPCSetCameraMode(mode) {
|
|
59492
59409
|
this.rpc.RPCSetCameraMode(
|
|
@@ -59500,10 +59417,10 @@ class RpcSafeClient {
|
|
|
59500
59417
|
* @param height - The height component of the aspect ratio
|
|
59501
59418
|
* @throws {Error} If width or height are not positive integers
|
|
59502
59419
|
*/
|
|
59503
|
-
|
|
59420
|
+
RPCSetCameraAspectRatio(width, height) {
|
|
59504
59421
|
if (!Validation.isPositiveInteger(width)) return;
|
|
59505
59422
|
if (!Validation.isPositiveInteger(height)) return;
|
|
59506
|
-
this.rpc.
|
|
59423
|
+
this.rpc.RPCSetCameraAspectRatio(width, height);
|
|
59507
59424
|
}
|
|
59508
59425
|
/*******************************************************************************
|
|
59509
59426
|
* VIM FILE MANAGEMENT METHODS
|
|
@@ -59567,8 +59484,8 @@ class RpcSafeClient {
|
|
|
59567
59484
|
/**
|
|
59568
59485
|
* Clears the entire scene, removing all components and resetting to initial state.
|
|
59569
59486
|
*/
|
|
59570
|
-
|
|
59571
|
-
this.rpc.
|
|
59487
|
+
RPCUnloadAll() {
|
|
59488
|
+
this.rpc.RPCUnloadAll();
|
|
59572
59489
|
}
|
|
59573
59490
|
/**
|
|
59574
59491
|
* Sets the color used for ghosted geometry.
|
|
@@ -59576,7 +59493,7 @@ class RpcSafeClient {
|
|
|
59576
59493
|
*/
|
|
59577
59494
|
RPCSetGhostColor(ghostColor) {
|
|
59578
59495
|
const color = Validation.clampRGBA01(ghostColor);
|
|
59579
|
-
this.rpc.
|
|
59496
|
+
this.rpc.RPCSetGhostColor(color);
|
|
59580
59497
|
}
|
|
59581
59498
|
/**
|
|
59582
59499
|
* Performs hit testing at a specified screen position.
|
|
@@ -59772,46 +59689,6 @@ class RpcSafeClient {
|
|
|
59772
59689
|
RPCTriggerRenderDocCapture() {
|
|
59773
59690
|
this.rpc.RPCTriggerRenderDocCapture();
|
|
59774
59691
|
}
|
|
59775
|
-
/**
|
|
59776
|
-
* Shows axis-aligned bounding boxes (AABBs) for specified nodes with custom colors.
|
|
59777
|
-
* Large arrays are automatically processed in batches for better performance.
|
|
59778
|
-
* @param componentHandle - The component containing the nodes
|
|
59779
|
-
* @param nodes - Array of node indices to show AABBs for
|
|
59780
|
-
* @param colors - Array of colors for each AABB (must match nodes length)
|
|
59781
|
-
* @throws {Error} If arrays have different lengths or component handle is invalid
|
|
59782
|
-
*/
|
|
59783
|
-
RPCShowAABBs(componentHandle, nodes, colors) {
|
|
59784
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59785
|
-
if (!Validation.areComponentHandles(nodes)) return;
|
|
59786
|
-
const batches = batchArrays(nodes, colors, this.batchSize);
|
|
59787
|
-
for (const [batchedNodes, batchedColors] of batches) {
|
|
59788
|
-
this.rpc.RPCShowAABBs(componentHandle, batchedNodes, batchedColors);
|
|
59789
|
-
}
|
|
59790
|
-
}
|
|
59791
|
-
/**
|
|
59792
|
-
* Hides the axis-aligned bounding boxes (AABBs) for specified nodes.
|
|
59793
|
-
* Large node arrays are automatically processed in batches.
|
|
59794
|
-
* @param componentHandle - The component containing the nodes
|
|
59795
|
-
* @param nodes - Array of node indices whose AABBs should be hidden
|
|
59796
|
-
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59797
|
-
*/
|
|
59798
|
-
RPCHideAABBs(componentHandle, nodes) {
|
|
59799
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59800
|
-
if (!Validation.areComponentHandles(nodes)) return;
|
|
59801
|
-
const batches = batchArray(nodes, this.batchSize);
|
|
59802
|
-
for (const batch of batches) {
|
|
59803
|
-
this.rpc.RPCHideAABBs(componentHandle, batch);
|
|
59804
|
-
}
|
|
59805
|
-
}
|
|
59806
|
-
/**
|
|
59807
|
-
* Hides all axis-aligned bounding boxes (AABBs) in a component.
|
|
59808
|
-
* @param componentHandle - The component whose AABBs should be hidden
|
|
59809
|
-
* @throws {Error} If the component handle is invalid
|
|
59810
|
-
*/
|
|
59811
|
-
RPCHideAllAABBs(componentHandle) {
|
|
59812
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59813
|
-
this.rpc.RPCHideAllAABBs(componentHandle);
|
|
59814
|
-
}
|
|
59815
59692
|
async safeCall(func, defaultValue) {
|
|
59816
59693
|
try {
|
|
59817
59694
|
return await func();
|
|
@@ -59823,7 +59700,6 @@ class RpcSafeClient {
|
|
|
59823
59700
|
}
|
|
59824
59701
|
const defaultRenderSettings = {
|
|
59825
59702
|
...defaultSceneSettings,
|
|
59826
|
-
lockIblRotation: true,
|
|
59827
59703
|
ghostColor: new RGBA(14 / 255, 14 / 255, 14 / 255, 64 / 255)
|
|
59828
59704
|
};
|
|
59829
59705
|
class Renderer2 {
|
|
@@ -59839,7 +59715,6 @@ class Renderer2 {
|
|
|
59839
59715
|
__publicField(this, "_animationFrame");
|
|
59840
59716
|
__publicField(this, "_updateLighting", false);
|
|
59841
59717
|
__publicField(this, "_updateGhostColor", false);
|
|
59842
|
-
__publicField(this, "_updateIblRotation", false);
|
|
59843
59718
|
__publicField(this, "_onSceneUpdated", new distExports$1.SignalDispatcher());
|
|
59844
59719
|
this._rpc = rpc;
|
|
59845
59720
|
this._logger = logger;
|
|
@@ -59873,7 +59748,6 @@ class Renderer2 {
|
|
|
59873
59748
|
*/
|
|
59874
59749
|
onConnect() {
|
|
59875
59750
|
this._rpc.RPCSetGhostColor(this._settings.ghostColor);
|
|
59876
|
-
this._rpc.RPCLockIblRotation(this._settings.lockIblRotation);
|
|
59877
59751
|
}
|
|
59878
59752
|
notifySceneUpdated() {
|
|
59879
59753
|
this._onSceneUpdated.dispatch();
|
|
@@ -59886,13 +59760,6 @@ class Renderer2 {
|
|
|
59886
59760
|
get ghostColor() {
|
|
59887
59761
|
return this._settings.ghostColor;
|
|
59888
59762
|
}
|
|
59889
|
-
/**
|
|
59890
|
-
* Gets the IBL rotation lock setting
|
|
59891
|
-
* @returns Whether IBL rotation is locked
|
|
59892
|
-
*/
|
|
59893
|
-
get lockIblRotation() {
|
|
59894
|
-
return this._settings.lockIblRotation;
|
|
59895
|
-
}
|
|
59896
59763
|
/**
|
|
59897
59764
|
* Gets the tone mapping white point value
|
|
59898
59765
|
* @returns Current tone mapping white point
|
|
@@ -59947,16 +59814,6 @@ class Renderer2 {
|
|
|
59947
59814
|
this._updateGhostColor = true;
|
|
59948
59815
|
this.requestSettingsUpdate();
|
|
59949
59816
|
}
|
|
59950
|
-
/**
|
|
59951
|
-
* Updates the IBL rotation lock setting
|
|
59952
|
-
* @param value - Whether to lock IBL rotation
|
|
59953
|
-
*/
|
|
59954
|
-
set lockIblRotation(value) {
|
|
59955
|
-
if (this._settings.lockIblRotation === value) return;
|
|
59956
|
-
this._settings.lockIblRotation = value;
|
|
59957
|
-
this._updateIblRotation = true;
|
|
59958
|
-
this.requestSettingsUpdate();
|
|
59959
|
-
}
|
|
59960
59817
|
/**
|
|
59961
59818
|
* Sets the tone mapping white point value
|
|
59962
59819
|
* @param value - New tone mapping white point value
|
|
@@ -60024,7 +59881,7 @@ class Renderer2 {
|
|
|
60024
59881
|
this.requestSettingsUpdate();
|
|
60025
59882
|
}
|
|
60026
59883
|
getBoundingBox() {
|
|
60027
|
-
return this._rpc.
|
|
59884
|
+
return this._rpc.RPCGetAABBForAll();
|
|
60028
59885
|
}
|
|
60029
59886
|
/**
|
|
60030
59887
|
* Requests an update to be performed on the next animation frame.
|
|
@@ -60040,10 +59897,8 @@ class Renderer2 {
|
|
|
60040
59897
|
async applySettings() {
|
|
60041
59898
|
if (this._updateLighting) await this._rpc.RPCSetLighting(this._settings);
|
|
60042
59899
|
if (this._updateGhostColor) await this._rpc.RPCSetGhostColor(this._settings.ghostColor);
|
|
60043
|
-
if (this._updateIblRotation) await this._rpc.RPCLockIblRotation(this._settings.lockIblRotation);
|
|
60044
59900
|
this._updateLighting = false;
|
|
60045
59901
|
this._updateGhostColor = false;
|
|
60046
|
-
this._updateIblRotation = false;
|
|
60047
59902
|
this._animationFrame = void 0;
|
|
60048
59903
|
}
|
|
60049
59904
|
/**
|
|
@@ -60156,13 +60011,15 @@ class SectionBox2 {
|
|
|
60156
60011
|
this._onUpdate.clear();
|
|
60157
60012
|
}
|
|
60158
60013
|
}
|
|
60159
|
-
var
|
|
60160
|
-
|
|
60161
|
-
|
|
60162
|
-
|
|
60163
|
-
|
|
60164
|
-
|
|
60165
|
-
|
|
60014
|
+
var VisibilityState$1 = /* @__PURE__ */ ((VisibilityState2) => {
|
|
60015
|
+
VisibilityState2[VisibilityState2["VISIBLE"] = 0] = "VISIBLE";
|
|
60016
|
+
VisibilityState2[VisibilityState2["HIDDEN"] = 1] = "HIDDEN";
|
|
60017
|
+
VisibilityState2[VisibilityState2["GHOSTED"] = 2] = "GHOSTED";
|
|
60018
|
+
VisibilityState2[VisibilityState2["HIGHLIGHTED"] = 16] = "HIGHLIGHTED";
|
|
60019
|
+
VisibilityState2[VisibilityState2["HIDDEN_HIGHLIGHTED"] = 17] = "HIDDEN_HIGHLIGHTED";
|
|
60020
|
+
VisibilityState2[VisibilityState2["GHOSTED_HIGHLIGHTED"] = 18] = "GHOSTED_HIGHLIGHTED";
|
|
60021
|
+
return VisibilityState2;
|
|
60022
|
+
})(VisibilityState$1 || {});
|
|
60166
60023
|
class StateSynchronizer {
|
|
60167
60024
|
/**
|
|
60168
60025
|
* Creates a new StateSynchronizer instance.
|
|
@@ -60171,9 +60028,10 @@ class StateSynchronizer {
|
|
|
60171
60028
|
* @param getHandle - Function that returns the current handle identifier
|
|
60172
60029
|
* @param isConnected - Function that returns whether the connection to the remote system is active
|
|
60173
60030
|
* @param onUpdate - Callback function invoked when updates are sent to the remote system
|
|
60174
|
-
* @param defaultState - The default state for
|
|
60031
|
+
* @param defaultState - The default state for elements when not explicitly set (defaults to VISIBLE)
|
|
60175
60032
|
*/
|
|
60176
|
-
constructor(rpc, getHandle, isConnected, onUpdate, defaultState =
|
|
60033
|
+
constructor(rpc, getHandle, isConnected, onUpdate, defaultState = 0) {
|
|
60034
|
+
//TODO: Take advantage of the new rpcs that can take multiple states at once
|
|
60177
60035
|
__publicField(this, "_tracker");
|
|
60178
60036
|
__publicField(this, "_rpc");
|
|
60179
60037
|
__publicField(this, "_getHandle");
|
|
@@ -60188,34 +60046,34 @@ class StateSynchronizer {
|
|
|
60188
60046
|
}
|
|
60189
60047
|
// --- Getters ---
|
|
60190
60048
|
/**
|
|
60191
|
-
* Checks if all
|
|
60049
|
+
* Checks if all elements are in the specified state(s).
|
|
60192
60050
|
*
|
|
60193
60051
|
* @param state - A single state or array of states to check against
|
|
60194
|
-
* @returns True if all
|
|
60052
|
+
* @returns True if all elements are in the specified state(s), false otherwise
|
|
60195
60053
|
*/
|
|
60196
60054
|
areAllInState(state) {
|
|
60197
60055
|
return this._tracker.areAll(state);
|
|
60198
60056
|
}
|
|
60199
60057
|
/**
|
|
60200
|
-
* Gets the current state of a specific
|
|
60058
|
+
* Gets the current state of a specific element.
|
|
60201
60059
|
*
|
|
60202
|
-
* @param
|
|
60203
|
-
* @returns The current state of the
|
|
60060
|
+
* @param elementIndex - The element index
|
|
60061
|
+
* @returns The current state of the element
|
|
60204
60062
|
*/
|
|
60205
|
-
|
|
60206
|
-
return this._tracker.getState(
|
|
60063
|
+
getElementState(elementIndex) {
|
|
60064
|
+
return this._tracker.getState(elementIndex);
|
|
60207
60065
|
}
|
|
60208
60066
|
/**
|
|
60209
|
-
* Gets all
|
|
60067
|
+
* Gets all elements that are currently in the specified state.
|
|
60210
60068
|
*
|
|
60211
60069
|
* @param state - The state to query
|
|
60212
|
-
* @returns Either 'all' if all
|
|
60070
|
+
* @returns Either 'all' if all elements are in this state, or an array of element indices
|
|
60213
60071
|
*/
|
|
60214
|
-
|
|
60072
|
+
getElementsInState(state) {
|
|
60215
60073
|
return this._tracker.getAll(state);
|
|
60216
60074
|
}
|
|
60217
60075
|
/**
|
|
60218
|
-
* Gets the default state used for
|
|
60076
|
+
* Gets the default state used for elements without explicit state settings.
|
|
60219
60077
|
*
|
|
60220
60078
|
* @returns The current default state
|
|
60221
60079
|
*/
|
|
@@ -60224,27 +60082,27 @@ class StateSynchronizer {
|
|
|
60224
60082
|
}
|
|
60225
60083
|
// --- Setters ---
|
|
60226
60084
|
/**
|
|
60227
|
-
* Sets the state of a specific
|
|
60085
|
+
* Sets the state of a specific elements.
|
|
60228
60086
|
*
|
|
60229
|
-
* @param
|
|
60087
|
+
* @param elementIndex - The element index to update
|
|
60230
60088
|
* @param state - The new state to apply
|
|
60231
60089
|
*/
|
|
60232
|
-
|
|
60233
|
-
this._tracker.setState(
|
|
60090
|
+
setElementState(elementIndex, state) {
|
|
60091
|
+
this._tracker.setState(elementIndex, state);
|
|
60234
60092
|
this.scheduleUpdate();
|
|
60235
60093
|
}
|
|
60236
60094
|
/**
|
|
60237
|
-
* Sets the state of all
|
|
60095
|
+
* Sets the state of all elements to the specified value.
|
|
60238
60096
|
*
|
|
60239
|
-
* @param state - The state to apply to all
|
|
60240
|
-
* @param clear - If true, clears all
|
|
60097
|
+
* @param state - The state to apply to all elements
|
|
60098
|
+
* @param clear - If true, clears all elements-specific overrides
|
|
60241
60099
|
*/
|
|
60242
|
-
|
|
60100
|
+
setStateForAll(state) {
|
|
60243
60101
|
this._tracker.setAll(state);
|
|
60244
60102
|
this.scheduleUpdate();
|
|
60245
60103
|
}
|
|
60246
60104
|
/**
|
|
60247
|
-
* Replaces all
|
|
60105
|
+
* Replaces all elements in one state (or states) with another state.
|
|
60248
60106
|
*
|
|
60249
60107
|
* @param fromState - The state(s) to replace
|
|
60250
60108
|
* @param toState - The new state to apply
|
|
@@ -60281,76 +60139,25 @@ class StateSynchronizer {
|
|
|
60281
60139
|
* @private
|
|
60282
60140
|
*/
|
|
60283
60141
|
remoteUpdate() {
|
|
60284
|
-
const [defaultUpdate,
|
|
60142
|
+
const [defaultUpdate, elementUpdates] = this._tracker.getUpdates();
|
|
60285
60143
|
this._tracker.reset();
|
|
60286
|
-
if (defaultUpdate) {
|
|
60287
|
-
this.
|
|
60144
|
+
if (defaultUpdate !== void 0) {
|
|
60145
|
+
this._rpc.RPCSetStateVim(this._getHandle(), defaultUpdate);
|
|
60288
60146
|
}
|
|
60289
|
-
for (const [state,
|
|
60290
|
-
if (
|
|
60291
|
-
this.
|
|
60147
|
+
for (const [state, elements] of elementUpdates.entries()) {
|
|
60148
|
+
if (elements.length === 0) continue;
|
|
60149
|
+
this._rpc.RPCSetStateElements(this._getHandle(), elements, state);
|
|
60292
60150
|
}
|
|
60293
60151
|
this._onUpdate();
|
|
60294
60152
|
}
|
|
60295
|
-
/**
|
|
60296
|
-
* Calls the appropriate RPC method to update the state of all nodes.
|
|
60297
|
-
*
|
|
60298
|
-
* @param state - The state to apply to all nodes
|
|
60299
|
-
* @private
|
|
60300
|
-
*/
|
|
60301
|
-
callRPCForStateAll(state) {
|
|
60302
|
-
if (!this._isConnected()) {
|
|
60303
|
-
return;
|
|
60304
|
-
}
|
|
60305
|
-
switch (state) {
|
|
60306
|
-
case "visible":
|
|
60307
|
-
this._rpc.RPCShowAll(this._getHandle());
|
|
60308
|
-
break;
|
|
60309
|
-
case "hidden":
|
|
60310
|
-
this._rpc.RPCHideAll(this._getHandle());
|
|
60311
|
-
break;
|
|
60312
|
-
case "ghosted":
|
|
60313
|
-
this._rpc.RPCGhostAll(this._getHandle());
|
|
60314
|
-
break;
|
|
60315
|
-
case "highlighted":
|
|
60316
|
-
this._rpc.RPCHighlightAll(this._getHandle());
|
|
60317
|
-
break;
|
|
60318
|
-
}
|
|
60319
|
-
}
|
|
60320
|
-
/**
|
|
60321
|
-
* Calls the appropriate RPC method to update the state of specific nodes.
|
|
60322
|
-
*
|
|
60323
|
-
* @param state - The state to apply
|
|
60324
|
-
* @param nodes - Array of node IDs to update
|
|
60325
|
-
* @private
|
|
60326
|
-
*/
|
|
60327
|
-
callRPCForStateNodes(state, nodes) {
|
|
60328
|
-
if (!this._isConnected()) {
|
|
60329
|
-
return;
|
|
60330
|
-
}
|
|
60331
|
-
switch (state) {
|
|
60332
|
-
case "visible":
|
|
60333
|
-
this._rpc.RPCShow(this._getHandle(), nodes);
|
|
60334
|
-
break;
|
|
60335
|
-
case "hidden":
|
|
60336
|
-
this._rpc.RPCHide(this._getHandle(), nodes);
|
|
60337
|
-
break;
|
|
60338
|
-
case "ghosted":
|
|
60339
|
-
this._rpc.RPCGhost(this._getHandle(), nodes);
|
|
60340
|
-
break;
|
|
60341
|
-
case "highlighted":
|
|
60342
|
-
this._rpc.RPCHighlight(this._getHandle(), nodes);
|
|
60343
|
-
break;
|
|
60344
|
-
}
|
|
60345
|
-
}
|
|
60346
60153
|
}
|
|
60347
60154
|
class StateTracker {
|
|
60348
60155
|
/**
|
|
60349
60156
|
* Creates a new StateTracker instance.
|
|
60350
60157
|
*
|
|
60351
|
-
* @param defaultState - The default state for
|
|
60158
|
+
* @param defaultState - The default state for elements when not explicitly set
|
|
60352
60159
|
*/
|
|
60353
|
-
constructor(defaultState =
|
|
60160
|
+
constructor(defaultState = 0) {
|
|
60354
60161
|
__publicField(this, "_state", /* @__PURE__ */ new Map());
|
|
60355
60162
|
__publicField(this, "_updates", /* @__PURE__ */ new Set());
|
|
60356
60163
|
__publicField(this, "_default");
|
|
@@ -60358,10 +60165,9 @@ class StateTracker {
|
|
|
60358
60165
|
this._default = defaultState;
|
|
60359
60166
|
}
|
|
60360
60167
|
/**
|
|
60361
|
-
* Sets the default state for all
|
|
60168
|
+
* Sets the default state for all elements and optionally clears element-specific overrides.
|
|
60362
60169
|
*
|
|
60363
60170
|
* @param state - The new default state
|
|
60364
|
-
* @param clearNodes - If true, clears all node-specific overrides
|
|
60365
60171
|
*/
|
|
60366
60172
|
setAll(state) {
|
|
60367
60173
|
this._default = state;
|
|
@@ -60376,30 +60182,30 @@ class StateTracker {
|
|
|
60376
60182
|
reapply() {
|
|
60377
60183
|
this._updates.clear();
|
|
60378
60184
|
const toRemove = /* @__PURE__ */ new Set();
|
|
60379
|
-
for (const [
|
|
60185
|
+
for (const [elementIndex, state] of this._state.entries()) {
|
|
60380
60186
|
if (state === this._default) {
|
|
60381
|
-
toRemove.add(
|
|
60187
|
+
toRemove.add(elementIndex);
|
|
60382
60188
|
} else {
|
|
60383
|
-
this._updates.add(
|
|
60189
|
+
this._updates.add(elementIndex);
|
|
60384
60190
|
}
|
|
60385
60191
|
}
|
|
60386
|
-
toRemove.forEach((
|
|
60192
|
+
toRemove.forEach((elementIndex) => this._state.delete(elementIndex));
|
|
60387
60193
|
}
|
|
60388
60194
|
/**
|
|
60389
|
-
* Sets the state of a specific
|
|
60195
|
+
* Sets the state of a specific element.
|
|
60390
60196
|
*
|
|
60391
|
-
* @param
|
|
60197
|
+
* @param elementIndex - The element index to update
|
|
60392
60198
|
* @param state - The new state to apply
|
|
60393
60199
|
*/
|
|
60394
|
-
setState(
|
|
60200
|
+
setState(elementIndex, state) {
|
|
60395
60201
|
if (this._default === state) {
|
|
60396
|
-
this._state.delete(
|
|
60202
|
+
this._state.delete(elementIndex);
|
|
60397
60203
|
if (!this._updatedDefault) {
|
|
60398
|
-
this._updates.add(
|
|
60204
|
+
this._updates.add(elementIndex);
|
|
60399
60205
|
}
|
|
60400
60206
|
} else {
|
|
60401
|
-
this._state.set(
|
|
60402
|
-
this._updates.add(
|
|
60207
|
+
this._state.set(elementIndex, state);
|
|
60208
|
+
this._updates.add(elementIndex);
|
|
60403
60209
|
}
|
|
60404
60210
|
}
|
|
60405
60211
|
/**
|
|
@@ -60411,66 +60217,65 @@ class StateTracker {
|
|
|
60411
60217
|
return this._default;
|
|
60412
60218
|
}
|
|
60413
60219
|
/**
|
|
60414
|
-
* Returns whether every
|
|
60220
|
+
* Returns whether every element (override or not) is in the given state(s).
|
|
60415
60221
|
*
|
|
60416
60222
|
* @param state - A single state or array of states to check against
|
|
60417
|
-
* @returns True if all
|
|
60223
|
+
* @returns True if all element are in the specified state(s), false otherwise
|
|
60418
60224
|
*/
|
|
60419
60225
|
areAll(state) {
|
|
60420
60226
|
if (!matchesState(this._default, state)) {
|
|
60421
60227
|
return false;
|
|
60422
60228
|
}
|
|
60423
|
-
for (const
|
|
60424
|
-
if (!matchesState(
|
|
60229
|
+
for (const currentState of this._state.values()) {
|
|
60230
|
+
if (!matchesState(currentState, state)) {
|
|
60425
60231
|
return false;
|
|
60426
60232
|
}
|
|
60427
60233
|
}
|
|
60428
60234
|
return true;
|
|
60429
60235
|
}
|
|
60430
60236
|
/**
|
|
60431
|
-
* Returns
|
|
60237
|
+
* Returns an element effective state.
|
|
60432
60238
|
*
|
|
60433
|
-
* @param
|
|
60434
|
-
* @returns The current state of the
|
|
60239
|
+
* @param elementIndex - The element index
|
|
60240
|
+
* @returns The current state of the element (override or default)
|
|
60435
60241
|
*/
|
|
60436
|
-
getState(
|
|
60437
|
-
return this._state.get(
|
|
60242
|
+
getState(elementIndex) {
|
|
60243
|
+
return this._state.get(elementIndex) ?? this._default;
|
|
60438
60244
|
}
|
|
60439
60245
|
/**
|
|
60440
|
-
* Returns either 'all' if every
|
|
60441
|
-
* of
|
|
60246
|
+
* Returns either 'all' if every element is in the given state, or an array
|
|
60247
|
+
* of element index (from the overrides) whose state equals the provided state.
|
|
60442
60248
|
*
|
|
60443
60249
|
* @param state - The state to query
|
|
60444
|
-
* @returns Either 'all' if all
|
|
60250
|
+
* @returns Either 'all' if all elements are in this state, or an array of element indices
|
|
60445
60251
|
*/
|
|
60446
60252
|
getAll(state) {
|
|
60447
60253
|
if (this.areAll(state)) return "all";
|
|
60448
|
-
const
|
|
60449
|
-
for (const [
|
|
60450
|
-
if (
|
|
60451
|
-
|
|
60254
|
+
const elements = [];
|
|
60255
|
+
for (const [elementIndex, currentState] of this._state.entries()) {
|
|
60256
|
+
if (matchesState(currentState, state)) {
|
|
60257
|
+
elements.push(elementIndex);
|
|
60452
60258
|
}
|
|
60453
60259
|
}
|
|
60454
|
-
return
|
|
60260
|
+
return elements;
|
|
60455
60261
|
}
|
|
60456
60262
|
/**
|
|
60457
|
-
* Returns a mapping from state to an array of updated
|
|
60458
|
-
*
|
|
60459
|
-
* @returns A tuple with the updated default state (if any) and a map of states to node IDs
|
|
60263
|
+
* Returns a mapping from state to an array of updated elementIndices.
|
|
60264
|
+
* @returns A tuple with the updated default state (if any) and a map of states to element Indices
|
|
60460
60265
|
*/
|
|
60461
60266
|
getUpdates() {
|
|
60462
|
-
const
|
|
60463
|
-
Object.values(
|
|
60464
|
-
|
|
60267
|
+
const elementsByState = /* @__PURE__ */ new Map();
|
|
60268
|
+
Object.values(VisibilityState$1).filter((v) => typeof v === "number").forEach((state) => {
|
|
60269
|
+
elementsByState.set(state, []);
|
|
60465
60270
|
});
|
|
60466
|
-
for (const
|
|
60467
|
-
const state = this._state.get(
|
|
60468
|
-
const
|
|
60469
|
-
if (
|
|
60470
|
-
|
|
60271
|
+
for (const elementIndex of this._updates) {
|
|
60272
|
+
const state = this._state.get(elementIndex) ?? this._default;
|
|
60273
|
+
const elementArray = elementsByState.get(state);
|
|
60274
|
+
if (elementArray) {
|
|
60275
|
+
elementArray.push(elementIndex);
|
|
60471
60276
|
}
|
|
60472
60277
|
}
|
|
60473
|
-
return [this._updatedDefault ? this._default : void 0,
|
|
60278
|
+
return [this._updatedDefault ? this._default : void 0, elementsByState];
|
|
60474
60279
|
}
|
|
60475
60280
|
/**
|
|
60476
60281
|
* Checks if the default state has been updated.
|
|
@@ -60481,23 +60286,23 @@ class StateTracker {
|
|
|
60481
60286
|
return this._updatedDefault;
|
|
60482
60287
|
}
|
|
60483
60288
|
/**
|
|
60484
|
-
* Resets the update tracking, clearing the list of
|
|
60289
|
+
* Resets the update tracking, clearing the list of elements that need updates.
|
|
60485
60290
|
*/
|
|
60486
60291
|
reset() {
|
|
60487
60292
|
this._updates.clear();
|
|
60488
60293
|
this._updatedDefault = false;
|
|
60489
60294
|
}
|
|
60490
60295
|
/**
|
|
60491
|
-
* Returns an iterator over all
|
|
60296
|
+
* Returns an iterator over all elements overrides.
|
|
60492
60297
|
*
|
|
60493
|
-
* @returns An iterator of [
|
|
60298
|
+
* @returns An iterator of [elementIndex, state] pairs
|
|
60494
60299
|
*/
|
|
60495
60300
|
entries() {
|
|
60496
60301
|
return this._state.entries();
|
|
60497
60302
|
}
|
|
60498
60303
|
/**
|
|
60499
|
-
* Replaces all
|
|
60500
|
-
* If all
|
|
60304
|
+
* Replaces all elements that match the provided state(s) with a new state.
|
|
60305
|
+
* If all elements are in the given state(s), the default is updated.
|
|
60501
60306
|
*
|
|
60502
60307
|
* @param fromState - The state(s) to replace
|
|
60503
60308
|
* @param toState - The new state to apply
|
|
@@ -60510,36 +60315,40 @@ class StateTracker {
|
|
|
60510
60315
|
this.reapply();
|
|
60511
60316
|
return;
|
|
60512
60317
|
}
|
|
60513
|
-
for (const [
|
|
60318
|
+
for (const [elementIndex, state] of this._state.entries()) {
|
|
60514
60319
|
if (matchesState(state, fromState)) {
|
|
60515
|
-
this._state.set(
|
|
60516
|
-
this._updates.add(
|
|
60320
|
+
this._state.set(elementIndex, toState);
|
|
60321
|
+
this._updates.add(elementIndex);
|
|
60517
60322
|
}
|
|
60518
60323
|
}
|
|
60519
60324
|
}
|
|
60520
60325
|
// Clean up redundant overrides
|
|
60521
60326
|
purge() {
|
|
60522
60327
|
const toRemove = [];
|
|
60523
|
-
for (const [
|
|
60328
|
+
for (const [elementIndex, state] of this._state.entries()) {
|
|
60524
60329
|
if (state === this._default) {
|
|
60525
|
-
toRemove.push(
|
|
60330
|
+
toRemove.push(elementIndex);
|
|
60526
60331
|
}
|
|
60527
60332
|
}
|
|
60528
|
-
toRemove.forEach((
|
|
60333
|
+
toRemove.forEach((elementIndex) => this._state.delete(elementIndex));
|
|
60529
60334
|
}
|
|
60530
60335
|
}
|
|
60531
|
-
function matchesState(
|
|
60532
|
-
if (Array.isArray(
|
|
60533
|
-
return
|
|
60336
|
+
function matchesState(state, targetState) {
|
|
60337
|
+
if (Array.isArray(targetState)) {
|
|
60338
|
+
return targetState.includes(state);
|
|
60534
60339
|
}
|
|
60535
|
-
return
|
|
60340
|
+
return state === targetState;
|
|
60536
60341
|
}
|
|
60537
60342
|
function createSelection() {
|
|
60538
60343
|
return new Selection(new SelectionAdapter2());
|
|
60539
60344
|
}
|
|
60540
60345
|
class SelectionAdapter2 {
|
|
60541
60346
|
outline(object, state) {
|
|
60542
|
-
|
|
60347
|
+
if (state) {
|
|
60348
|
+
object.state = object.state === VisibilityState$1.VISIBLE ? VisibilityState$1.HIGHLIGHTED : object.state === VisibilityState$1.HIDDEN ? VisibilityState$1.HIDDEN_HIGHLIGHTED : object.state === VisibilityState$1.GHOSTED ? VisibilityState$1.GHOSTED_HIGHLIGHTED : VisibilityState$1.HIGHLIGHTED;
|
|
60349
|
+
} else {
|
|
60350
|
+
object.state = object.state === VisibilityState$1.HIGHLIGHTED ? VisibilityState$1.VISIBLE : object.state === VisibilityState$1.HIDDEN_HIGHLIGHTED ? VisibilityState$1.HIDDEN : object.state === VisibilityState$1.GHOSTED_HIGHLIGHTED ? VisibilityState$1.GHOSTED : VisibilityState$1.VISIBLE;
|
|
60351
|
+
}
|
|
60543
60352
|
}
|
|
60544
60353
|
}
|
|
60545
60354
|
const HEADER_SIZE = 16;
|
|
@@ -60935,7 +60744,7 @@ class Viewport2 {
|
|
|
60935
60744
|
*/
|
|
60936
60745
|
update() {
|
|
60937
60746
|
if (this._rpc.connected) {
|
|
60938
|
-
this._rpc.
|
|
60747
|
+
this._rpc.RPCSetCameraAspectRatio(this.canvas.offsetWidth, this.canvas.offsetHeight);
|
|
60939
60748
|
}
|
|
60940
60749
|
}
|
|
60941
60750
|
/**
|
|
@@ -60950,9 +60759,9 @@ class Element3D2 {
|
|
|
60950
60759
|
/**
|
|
60951
60760
|
* Creates a new `Element3D` instance.
|
|
60952
60761
|
* @param vim - The parent `Vim` model.
|
|
60953
|
-
* @param
|
|
60762
|
+
* @param element - The internal instance index.
|
|
60954
60763
|
*/
|
|
60955
|
-
constructor(vim,
|
|
60764
|
+
constructor(vim, element) {
|
|
60956
60765
|
/**
|
|
60957
60766
|
* The parent `Vim` instance this element belongs to.
|
|
60958
60767
|
*/
|
|
@@ -60962,9 +60771,9 @@ class Element3D2 {
|
|
|
60962
60771
|
/**
|
|
60963
60772
|
* The internal instance index within the `Vim` model.
|
|
60964
60773
|
*/
|
|
60965
|
-
__publicField(this, "
|
|
60774
|
+
__publicField(this, "element");
|
|
60966
60775
|
this.vim = vim;
|
|
60967
|
-
this.
|
|
60776
|
+
this.element = element;
|
|
60968
60777
|
}
|
|
60969
60778
|
/**
|
|
60970
60779
|
* The unique handle of the parent `Vim` model.
|
|
@@ -60976,19 +60785,19 @@ class Element3D2 {
|
|
|
60976
60785
|
* Gets or sets the display state of the element (e.g., visible, hidden).
|
|
60977
60786
|
*/
|
|
60978
60787
|
get state() {
|
|
60979
|
-
return this.vim.
|
|
60788
|
+
return this.vim.visibility.getElementState(this.element);
|
|
60980
60789
|
}
|
|
60981
60790
|
set state(state) {
|
|
60982
|
-
this.vim.
|
|
60791
|
+
this.vim.visibility.setElementState(this.element, state);
|
|
60983
60792
|
}
|
|
60984
60793
|
/**
|
|
60985
60794
|
* Gets or sets the color override of the element.
|
|
60986
60795
|
*/
|
|
60987
60796
|
get color() {
|
|
60988
|
-
return this.vim.getColor(this.
|
|
60797
|
+
return this.vim.getColor(this.element);
|
|
60989
60798
|
}
|
|
60990
60799
|
set color(color) {
|
|
60991
|
-
this.vim.setColor([this.
|
|
60800
|
+
this.vim.setColor([this.element], color);
|
|
60992
60801
|
}
|
|
60993
60802
|
/**
|
|
60994
60803
|
* Computes and returns the bounding box of the element.
|
|
@@ -60996,7 +60805,7 @@ class Element3D2 {
|
|
|
60996
60805
|
* @returns A promise resolving to the element's bounding box.
|
|
60997
60806
|
*/
|
|
60998
60807
|
async getBoundingBox() {
|
|
60999
|
-
return this.vim.getBoundingBoxNodes([this.
|
|
60808
|
+
return this.vim.getBoundingBoxNodes([this.element]);
|
|
61000
60809
|
}
|
|
61001
60810
|
}
|
|
61002
60811
|
class Vim2 {
|
|
@@ -61009,7 +60818,7 @@ class Vim2 {
|
|
|
61009
60818
|
__publicField(this, "_renderer");
|
|
61010
60819
|
__publicField(this, "_logger");
|
|
61011
60820
|
// The StateSynchronizer wraps a StateTracker and handles RPC synchronization.
|
|
61012
|
-
__publicField(this, "
|
|
60821
|
+
__publicField(this, "visibility");
|
|
61013
60822
|
// Color tracking remains unchanged.
|
|
61014
60823
|
__publicField(this, "_nodeColors", /* @__PURE__ */ new Map());
|
|
61015
60824
|
__publicField(this, "_updatedColors", /* @__PURE__ */ new Set());
|
|
@@ -61021,21 +60830,21 @@ class Vim2 {
|
|
|
61021
60830
|
this._colors = color;
|
|
61022
60831
|
this._renderer = renderer;
|
|
61023
60832
|
this._logger = logger;
|
|
61024
|
-
this.
|
|
60833
|
+
this.visibility = new StateSynchronizer(
|
|
61025
60834
|
this._rpc,
|
|
61026
60835
|
() => this._handle,
|
|
61027
60836
|
() => this.connected,
|
|
61028
60837
|
() => this._renderer.notifySceneUpdated(),
|
|
61029
|
-
|
|
60838
|
+
VisibilityState$1.VISIBLE
|
|
61030
60839
|
// default state
|
|
61031
60840
|
);
|
|
61032
60841
|
}
|
|
61033
|
-
|
|
61034
|
-
if (this._objects.has(
|
|
61035
|
-
return this._objects.get(
|
|
60842
|
+
getElement(elementIndex) {
|
|
60843
|
+
if (this._objects.has(elementIndex)) {
|
|
60844
|
+
return this._objects.get(elementIndex);
|
|
61036
60845
|
}
|
|
61037
|
-
const object = new Element3D2(this,
|
|
61038
|
-
this._objects.set(
|
|
60846
|
+
const object = new Element3D2(this, elementIndex);
|
|
60847
|
+
this._objects.set(elementIndex, object);
|
|
61039
60848
|
return object;
|
|
61040
60849
|
}
|
|
61041
60850
|
getElementsFromId(id2) {
|
|
@@ -61066,7 +60875,7 @@ class Vim2 {
|
|
|
61066
60875
|
const result = await request.getResult();
|
|
61067
60876
|
if (result.isSuccess) {
|
|
61068
60877
|
this._logger.log("Successfully loaded vim: ", this.source);
|
|
61069
|
-
this.
|
|
60878
|
+
this.visibility.reapplyStates();
|
|
61070
60879
|
this.reapplyColors();
|
|
61071
60880
|
} else {
|
|
61072
60881
|
this._logger.log("Failed to load vim: ", this.source);
|
|
@@ -61151,15 +60960,15 @@ class Vim2 {
|
|
|
61151
60960
|
return Promise.resolve(void 0);
|
|
61152
60961
|
}
|
|
61153
60962
|
if (nodes === "all") {
|
|
61154
|
-
return await this._rpc.
|
|
60963
|
+
return await this._rpc.RPCGetAABBForVim(this._handle);
|
|
61155
60964
|
}
|
|
61156
|
-
return await this._rpc.
|
|
60965
|
+
return await this._rpc.RPCGetAABBForElements(this._handle, nodes);
|
|
61157
60966
|
}
|
|
61158
60967
|
async getBoundingBox() {
|
|
61159
60968
|
if (!this.connected) {
|
|
61160
60969
|
return Promise.resolve(void 0);
|
|
61161
60970
|
}
|
|
61162
|
-
return await this._rpc.
|
|
60971
|
+
return await this._rpc.RPCGetAABBForVim(this._handle);
|
|
61163
60972
|
}
|
|
61164
60973
|
getColor(node) {
|
|
61165
60974
|
return this._nodeColors.get(node);
|
|
@@ -61545,13 +61354,13 @@ const index$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
61545
61354
|
INVALID_HANDLE,
|
|
61546
61355
|
InputMode,
|
|
61547
61356
|
MaterialHandles,
|
|
61548
|
-
NodeState: NodeState$1,
|
|
61549
61357
|
RGB,
|
|
61550
61358
|
RGBA,
|
|
61551
61359
|
RGBA32,
|
|
61552
61360
|
Segment,
|
|
61553
61361
|
Viewer: Viewer$2,
|
|
61554
61362
|
VimLoadingStatus,
|
|
61363
|
+
VisibilityState: VisibilityState$1,
|
|
61555
61364
|
materialHandles
|
|
61556
61365
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
61557
61366
|
const index$6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -76039,7 +75848,7 @@ function createWebglIsolationAdapter(viewer) {
|
|
|
76039
75848
|
show: (instances) => {
|
|
76040
75849
|
for (let i of instances) {
|
|
76041
75850
|
for (let v of viewer.vims) {
|
|
76042
|
-
const o = v.
|
|
75851
|
+
const o = v.getElement(i);
|
|
76043
75852
|
o.visible = true;
|
|
76044
75853
|
}
|
|
76045
75854
|
}
|
|
@@ -76047,7 +75856,7 @@ function createWebglIsolationAdapter(viewer) {
|
|
|
76047
75856
|
hide: (instances) => {
|
|
76048
75857
|
for (let i of instances) {
|
|
76049
75858
|
for (let v of viewer.vims) {
|
|
76050
|
-
const o = v.
|
|
75859
|
+
const o = v.getElement(i);
|
|
76051
75860
|
o.visible = false;
|
|
76052
75861
|
}
|
|
76053
75862
|
}
|
|
@@ -76362,7 +76171,7 @@ function useUltraCamera(viewer, section) {
|
|
|
76362
76171
|
getSceneBox: () => viewer.renderer.getBoundingBox()
|
|
76363
76172
|
}, section);
|
|
76364
76173
|
}
|
|
76365
|
-
const
|
|
76174
|
+
const VisibilityState = VisibilityState$1;
|
|
76366
76175
|
function useUltraIsolation(viewer) {
|
|
76367
76176
|
const adapter = createAdapter(viewer);
|
|
76368
76177
|
return useSharedIsolation(adapter);
|
|
@@ -76370,29 +76179,33 @@ function useUltraIsolation(viewer) {
|
|
|
76370
76179
|
function createAdapter(viewer) {
|
|
76371
76180
|
const ghost2 = useStateRef(false);
|
|
76372
76181
|
const hide = (objects) => {
|
|
76373
|
-
const state = ghost2.get() ?
|
|
76182
|
+
const state = ghost2.get() ? VisibilityState.GHOSTED : VisibilityState.HIDDEN;
|
|
76374
76183
|
if (objects === "all") {
|
|
76375
76184
|
viewer.vims.getAll().forEach((vim) => {
|
|
76376
|
-
vim.
|
|
76185
|
+
vim.visibility.setStateForAll(state);
|
|
76377
76186
|
});
|
|
76378
76187
|
return;
|
|
76379
76188
|
}
|
|
76380
|
-
|
|
76381
|
-
obj
|
|
76382
|
-
|
|
76189
|
+
for (const obj of objects) {
|
|
76190
|
+
if (viewer.selection.has(obj)) {
|
|
76191
|
+
obj.state = state == VisibilityState.GHOSTED ? VisibilityState.GHOSTED_HIGHLIGHTED : VisibilityState.HIDDEN_HIGHLIGHTED;
|
|
76192
|
+
} else {
|
|
76193
|
+
obj.state = state;
|
|
76194
|
+
}
|
|
76195
|
+
}
|
|
76383
76196
|
};
|
|
76384
76197
|
return {
|
|
76385
76198
|
onVisibilityChange: viewer.renderer.onSceneUpdated,
|
|
76386
76199
|
onSelectionChanged: viewer.selection.onSelectionChanged,
|
|
76387
76200
|
computeVisibility: () => getVisibilityState(viewer),
|
|
76388
76201
|
hasSelection: () => viewer.selection.any(),
|
|
76389
|
-
hasVisibleSelection: () => checkSelectionState(viewer, (s) => s ===
|
|
76390
|
-
hasHiddenSelection: () => checkSelectionState(viewer, (s) => s ===
|
|
76202
|
+
hasVisibleSelection: () => checkSelectionState(viewer, (s) => s === VisibilityState.VISIBLE || s === VisibilityState.HIGHLIGHTED),
|
|
76203
|
+
hasHiddenSelection: () => checkSelectionState(viewer, (s) => s === VisibilityState.HIDDEN || s === VisibilityState.GHOSTED),
|
|
76391
76204
|
clearSelection: () => viewer.selection.clear(),
|
|
76392
76205
|
isolateSelection: () => {
|
|
76393
76206
|
hide("all");
|
|
76394
76207
|
for (const obj of viewer.selection.getAll()) {
|
|
76395
|
-
obj.state =
|
|
76208
|
+
obj.state = VisibilityState.HIGHLIGHTED;
|
|
76396
76209
|
}
|
|
76397
76210
|
},
|
|
76398
76211
|
hideSelection: () => {
|
|
@@ -76401,7 +76214,7 @@ function createAdapter(viewer) {
|
|
|
76401
76214
|
},
|
|
76402
76215
|
showSelection: () => {
|
|
76403
76216
|
viewer.selection.getAll().forEach((obj) => {
|
|
76404
|
-
obj.state =
|
|
76217
|
+
obj.state = VisibilityState.VISIBLE;
|
|
76405
76218
|
});
|
|
76406
76219
|
},
|
|
76407
76220
|
hideAll: () => {
|
|
@@ -76409,29 +76222,29 @@ function createAdapter(viewer) {
|
|
|
76409
76222
|
},
|
|
76410
76223
|
showAll: () => {
|
|
76411
76224
|
for (const vim of viewer.vims.getAll()) {
|
|
76412
|
-
vim.
|
|
76225
|
+
vim.visibility.setStateForAll(VisibilityState.VISIBLE);
|
|
76413
76226
|
}
|
|
76414
76227
|
viewer.selection.getAll().forEach((obj) => {
|
|
76415
|
-
obj.state =
|
|
76228
|
+
obj.state = VisibilityState.HIGHLIGHTED;
|
|
76416
76229
|
});
|
|
76417
76230
|
},
|
|
76418
76231
|
isolate: (instances) => {
|
|
76419
76232
|
hide("all");
|
|
76420
76233
|
viewer.selection.getAll().forEach((obj) => {
|
|
76421
|
-
obj.state =
|
|
76234
|
+
obj.state = VisibilityState.HIGHLIGHTED;
|
|
76422
76235
|
});
|
|
76423
76236
|
},
|
|
76424
76237
|
show: (instances) => {
|
|
76425
76238
|
for (const vim of viewer.vims.getAll()) {
|
|
76426
76239
|
for (const i of instances) {
|
|
76427
|
-
vim.
|
|
76240
|
+
vim.getElement(i).state = VisibilityState.VISIBLE;
|
|
76428
76241
|
}
|
|
76429
76242
|
}
|
|
76430
76243
|
},
|
|
76431
76244
|
hide: (instances) => {
|
|
76432
76245
|
for (const vim of viewer.vims.getAll()) {
|
|
76433
76246
|
for (const i of instances) {
|
|
76434
|
-
const obj = vim.
|
|
76247
|
+
const obj = vim.getElement(i);
|
|
76435
76248
|
hide([obj]);
|
|
76436
76249
|
}
|
|
76437
76250
|
}
|
|
@@ -76442,9 +76255,9 @@ function createAdapter(viewer) {
|
|
|
76442
76255
|
ghost2.set(show);
|
|
76443
76256
|
for (const vim of viewer.vims.getAll()) {
|
|
76444
76257
|
if (show) {
|
|
76445
|
-
vim.
|
|
76258
|
+
vim.visibility.replaceState(VisibilityState.HIDDEN, VisibilityState.GHOSTED);
|
|
76446
76259
|
} else {
|
|
76447
|
-
vim.
|
|
76260
|
+
vim.visibility.replaceState(VisibilityState.GHOSTED, VisibilityState.HIDDEN);
|
|
76448
76261
|
}
|
|
76449
76262
|
}
|
|
76450
76263
|
},
|
|
@@ -76472,8 +76285,8 @@ function getVisibilityState(viewer) {
|
|
|
76472
76285
|
let allButSelectionFlag = true;
|
|
76473
76286
|
let onlySelectionFlag = true;
|
|
76474
76287
|
for (let v of viewer.vims.getAll()) {
|
|
76475
|
-
const allVisible = v.
|
|
76476
|
-
const allHidden = v.
|
|
76288
|
+
const allVisible = v.visibility.areAllInState([VisibilityState.VISIBLE, VisibilityState.HIGHLIGHTED]);
|
|
76289
|
+
const allHidden = v.visibility.areAllInState([VisibilityState.HIDDEN, VisibilityState.GHOSTED]);
|
|
76477
76290
|
all = all && allVisible;
|
|
76478
76291
|
none = none && allHidden;
|
|
76479
76292
|
onlySelectionFlag = onlySelection();
|