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.iife.js
CHANGED
|
@@ -45288,7 +45288,7 @@ void main() {
|
|
|
45288
45288
|
* Returns vim object for this submesh.
|
|
45289
45289
|
*/
|
|
45290
45290
|
get object() {
|
|
45291
|
-
return this.mesh.vim.
|
|
45291
|
+
return this.mesh.vim.getElement(this.instance);
|
|
45292
45292
|
}
|
|
45293
45293
|
saveColors(colors) {
|
|
45294
45294
|
if (this._colors) return;
|
|
@@ -46869,7 +46869,7 @@ void main() {
|
|
|
46869
46869
|
* @param {number} instance - The instance number of the object.
|
|
46870
46870
|
* @returns {THREE.Object3D | undefined} The object corresponding to the instance, or undefined if not found.
|
|
46871
46871
|
*/
|
|
46872
|
-
|
|
46872
|
+
getElement(instance) {
|
|
46873
46873
|
const element = this.map.getElementFromInstance(instance);
|
|
46874
46874
|
if (element === void 0) return;
|
|
46875
46875
|
return this.getElementFromIndex(element);
|
|
@@ -46922,7 +46922,7 @@ void main() {
|
|
|
46922
46922
|
const count = subset.getInstanceCount();
|
|
46923
46923
|
for (let i2 = 0; i2 < count; i2++) {
|
|
46924
46924
|
const instance = subset.getVimInstance(i2);
|
|
46925
|
-
const obj = this.
|
|
46925
|
+
const obj = this.getElement(instance);
|
|
46926
46926
|
if (!set2.has(obj)) {
|
|
46927
46927
|
result.push(obj);
|
|
46928
46928
|
set2.add(obj);
|
|
@@ -47283,7 +47283,7 @@ void main() {
|
|
|
47283
47283
|
this._instanceToMeshes.set(submesh.instance, meshes);
|
|
47284
47284
|
this.setDirty();
|
|
47285
47285
|
if (this.vim) {
|
|
47286
|
-
const obj = this.vim.
|
|
47286
|
+
const obj = this.vim.getElement(submesh.instance);
|
|
47287
47287
|
obj._addMesh(submesh);
|
|
47288
47288
|
}
|
|
47289
47289
|
}
|
|
@@ -48914,7 +48914,7 @@ void main() {
|
|
|
48914
48914
|
* Returns vim object for this submesh.
|
|
48915
48915
|
*/
|
|
48916
48916
|
get object() {
|
|
48917
|
-
return this.mesh.vim.
|
|
48917
|
+
return this.mesh.vim.getElement(this.instance);
|
|
48918
48918
|
}
|
|
48919
48919
|
}
|
|
48920
48920
|
class InstancedMesh {
|
|
@@ -57499,14 +57499,14 @@ void main() {
|
|
|
57499
57499
|
* @param segment - Optional segment to save as the camera position
|
|
57500
57500
|
*/
|
|
57501
57501
|
async save(segment) {
|
|
57502
|
-
this._savedPosition = segment ?? await this._rpc.
|
|
57502
|
+
this._savedPosition = segment ?? await this._rpc.RPCGetCameraView();
|
|
57503
57503
|
}
|
|
57504
57504
|
/**
|
|
57505
57505
|
* Resets the camera to the last saved position
|
|
57506
57506
|
*/
|
|
57507
57507
|
restoreSavedPosition(blendTime = this._defaultBlendTime) {
|
|
57508
57508
|
if (!this._savedPosition) return;
|
|
57509
|
-
this._rpc.
|
|
57509
|
+
this._rpc.RPCSetCameraView(this._savedPosition, blendTime);
|
|
57510
57510
|
}
|
|
57511
57511
|
/**
|
|
57512
57512
|
* Restores the camera to its last tracked position
|
|
@@ -57516,7 +57516,7 @@ void main() {
|
|
|
57516
57516
|
var _a3;
|
|
57517
57517
|
if ((_a3 = this._lastPosition) == null ? void 0 : _a3.isValid()) {
|
|
57518
57518
|
console.log("Restoring camera position: ", this._lastPosition);
|
|
57519
|
-
this._rpc.
|
|
57519
|
+
this._rpc.RPCSetCameraView(this._lastPosition, blendTime);
|
|
57520
57520
|
}
|
|
57521
57521
|
}
|
|
57522
57522
|
/**
|
|
@@ -57530,7 +57530,7 @@ void main() {
|
|
|
57530
57530
|
this._lastPosition = pose;
|
|
57531
57531
|
}
|
|
57532
57532
|
set(position, target, blendTime = this._defaultBlendTime) {
|
|
57533
|
-
this._rpc.
|
|
57533
|
+
this._rpc.RPCSetCameraView(new Segment(position, target), blendTime);
|
|
57534
57534
|
}
|
|
57535
57535
|
/**
|
|
57536
57536
|
* Pauses or resumes rendering
|
|
@@ -57555,7 +57555,7 @@ void main() {
|
|
|
57555
57555
|
* @param blendTime - Duration of the camera animation in seconds (defaults to 0.5)
|
|
57556
57556
|
*/
|
|
57557
57557
|
async frameBox(box, blendTime = this._defaultBlendTime) {
|
|
57558
|
-
const segment = await this._rpc.
|
|
57558
|
+
const segment = await this._rpc.RPCFrameAABB(box, blendTime);
|
|
57559
57559
|
this._savedPosition = this._savedPosition ?? segment;
|
|
57560
57560
|
return segment;
|
|
57561
57561
|
}
|
|
@@ -57571,13 +57571,13 @@ void main() {
|
|
|
57571
57571
|
if (nodes === "all") {
|
|
57572
57572
|
segment = await this._rpc.RPCFrameVim(vim.handle, blendTime);
|
|
57573
57573
|
} else {
|
|
57574
|
-
segment = await this._rpc.
|
|
57574
|
+
segment = await this._rpc.RPCFrameElements(vim.handle, nodes, blendTime);
|
|
57575
57575
|
}
|
|
57576
57576
|
this._savedPosition = this._savedPosition ?? segment;
|
|
57577
57577
|
return segment;
|
|
57578
57578
|
}
|
|
57579
57579
|
async frameObject(object, blendTime = this._defaultBlendTime) {
|
|
57580
|
-
const segment = await this._rpc.
|
|
57580
|
+
const segment = await this._rpc.RPCFrameElements(object.vim.handle, [object.element], blendTime);
|
|
57581
57581
|
this._savedPosition = this._savedPosition ?? segment;
|
|
57582
57582
|
return segment;
|
|
57583
57583
|
}
|
|
@@ -57653,9 +57653,10 @@ void main() {
|
|
|
57653
57653
|
}
|
|
57654
57654
|
// -------------------- HitCheckResult -------------------
|
|
57655
57655
|
writeHitCheckResult(data2) {
|
|
57656
|
-
this.ensureCapacity(4 + 4 + 4 * 3 + 4 * 3);
|
|
57656
|
+
this.ensureCapacity(4 + 4 + 4 + 4 * 3 + 4 * 3);
|
|
57657
57657
|
this.writeUInt(data2.vimHandle);
|
|
57658
57658
|
this.writeUInt(data2.nodeIndex);
|
|
57659
|
+
this.writeUInt(data2.elementIndex);
|
|
57659
57660
|
this.writeVector3(data2.worldPosition);
|
|
57660
57661
|
this.writeVector3(data2.worldNormal);
|
|
57661
57662
|
}
|
|
@@ -57779,6 +57780,12 @@ void main() {
|
|
|
57779
57780
|
this._offset += 4;
|
|
57780
57781
|
return value;
|
|
57781
57782
|
}
|
|
57783
|
+
//TODO: Maybe wrong
|
|
57784
|
+
readUInt64() {
|
|
57785
|
+
const low = this.readUInt();
|
|
57786
|
+
const high = this.readUInt();
|
|
57787
|
+
return BigInt(high) << 32n | BigInt(low);
|
|
57788
|
+
}
|
|
57782
57789
|
readFloat() {
|
|
57783
57790
|
const value = this._dataView.getFloat32(this._offset, true);
|
|
57784
57791
|
this._offset += 4;
|
|
@@ -57799,11 +57806,13 @@ void main() {
|
|
|
57799
57806
|
readHitCheckResult() {
|
|
57800
57807
|
const vimHandle = this.readUInt();
|
|
57801
57808
|
const nodeIndex = this.readUInt();
|
|
57809
|
+
const mElementIndex = this.readUInt();
|
|
57802
57810
|
const worldPosition = this.readVector3();
|
|
57803
57811
|
const worldNormal = this.readVector3();
|
|
57804
57812
|
return {
|
|
57805
57813
|
vimHandle,
|
|
57806
57814
|
nodeIndex,
|
|
57815
|
+
elementIndex: mElementIndex,
|
|
57807
57816
|
worldPosition,
|
|
57808
57817
|
worldNormal
|
|
57809
57818
|
};
|
|
@@ -57872,6 +57881,14 @@ void main() {
|
|
|
57872
57881
|
readArrayOfUInt() {
|
|
57873
57882
|
return this.readArray(() => this.readUInt());
|
|
57874
57883
|
}
|
|
57884
|
+
readArrayOfUInt64() {
|
|
57885
|
+
const length = this.readUInt();
|
|
57886
|
+
const array = [];
|
|
57887
|
+
for (let i2 = 0; i2 < length; i2++) {
|
|
57888
|
+
array.push(this.readUInt64());
|
|
57889
|
+
}
|
|
57890
|
+
return array;
|
|
57891
|
+
}
|
|
57875
57892
|
readArrayOfFloat() {
|
|
57876
57893
|
return this.readArray(() => this.readFloat());
|
|
57877
57894
|
}
|
|
@@ -57918,7 +57935,7 @@ void main() {
|
|
|
57918
57935
|
constructor(_socket) {
|
|
57919
57936
|
__publicField(this, "_socket");
|
|
57920
57937
|
// RPC Generated Code
|
|
57921
|
-
__publicField(this, "API_VERSION", "
|
|
57938
|
+
__publicField(this, "API_VERSION", "6.0.0");
|
|
57922
57939
|
this._socket = _socket;
|
|
57923
57940
|
}
|
|
57924
57941
|
get connected() {
|
|
@@ -57927,25 +57944,12 @@ void main() {
|
|
|
57927
57944
|
get url() {
|
|
57928
57945
|
return this._socket.url;
|
|
57929
57946
|
}
|
|
57930
|
-
RPCAddNodeFlags(componentHandle, nodes, flags) {
|
|
57931
|
-
const marshal = new Marshal();
|
|
57932
|
-
marshal.writeString("RPCAddNodeFlags");
|
|
57933
|
-
marshal.writeUInt(componentHandle);
|
|
57934
|
-
marshal.writeArrayOfUInt(nodes);
|
|
57935
|
-
marshal.writeUInt(flags);
|
|
57936
|
-
this._socket.sendRPC(marshal);
|
|
57937
|
-
}
|
|
57938
57947
|
RPCClearMaterialOverrides(componentHandle) {
|
|
57939
57948
|
const marshal = new Marshal();
|
|
57940
57949
|
marshal.writeString("RPCClearMaterialOverrides");
|
|
57941
57950
|
marshal.writeUInt(componentHandle);
|
|
57942
57951
|
this._socket.sendRPC(marshal);
|
|
57943
57952
|
}
|
|
57944
|
-
RPCClearScene() {
|
|
57945
|
-
const marshal = new Marshal();
|
|
57946
|
-
marshal.writeString("RPCClearScene");
|
|
57947
|
-
this._socket.sendRPC(marshal);
|
|
57948
|
-
}
|
|
57949
57953
|
async RPCCreateMaterialInstances(materialHandle, smoothness, colors) {
|
|
57950
57954
|
const marshal = new Marshal();
|
|
57951
57955
|
marshal.writeString("RPCCreateMaterialInstances");
|
|
@@ -57984,28 +57988,28 @@ void main() {
|
|
|
57984
57988
|
marshal.writeBoolean(value);
|
|
57985
57989
|
this._socket.sendRPC(marshal);
|
|
57986
57990
|
}
|
|
57987
|
-
async
|
|
57991
|
+
async RPCFrameAABB(box, blendTime) {
|
|
57988
57992
|
const marshal = new Marshal();
|
|
57989
|
-
marshal.writeString("
|
|
57993
|
+
marshal.writeString("RPCFrameAABB");
|
|
57994
|
+
marshal.writeBox3(box);
|
|
57990
57995
|
marshal.writeFloat(blendTime);
|
|
57991
57996
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
57992
57997
|
const ret = returnMarshal.readSegment();
|
|
57993
57998
|
return ret;
|
|
57994
57999
|
}
|
|
57995
|
-
async
|
|
58000
|
+
async RPCFrameAll(blendTime) {
|
|
57996
58001
|
const marshal = new Marshal();
|
|
57997
|
-
marshal.writeString("
|
|
57998
|
-
marshal.writeBox3(box);
|
|
58002
|
+
marshal.writeString("RPCFrameAll");
|
|
57999
58003
|
marshal.writeFloat(blendTime);
|
|
58000
58004
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58001
58005
|
const ret = returnMarshal.readSegment();
|
|
58002
58006
|
return ret;
|
|
58003
58007
|
}
|
|
58004
|
-
async
|
|
58008
|
+
async RPCFrameElements(componentHandle, elementIndices, blendTime) {
|
|
58005
58009
|
const marshal = new Marshal();
|
|
58006
|
-
marshal.writeString("
|
|
58010
|
+
marshal.writeString("RPCFrameElements");
|
|
58007
58011
|
marshal.writeUInt(componentHandle);
|
|
58008
|
-
marshal.writeArrayOfUInt(
|
|
58012
|
+
marshal.writeArrayOfUInt(elementIndices);
|
|
58009
58013
|
marshal.writeFloat(blendTime);
|
|
58010
58014
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58011
58015
|
const ret = returnMarshal.readSegment();
|
|
@@ -58020,42 +58024,58 @@ void main() {
|
|
|
58020
58024
|
const ret = returnMarshal.readSegment();
|
|
58021
58025
|
return ret;
|
|
58022
58026
|
}
|
|
58023
|
-
async
|
|
58027
|
+
async RPCGetAABBForAll() {
|
|
58024
58028
|
const marshal = new Marshal();
|
|
58025
|
-
marshal.writeString("
|
|
58029
|
+
marshal.writeString("RPCGetAABBForAll");
|
|
58026
58030
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58027
|
-
const ret = returnMarshal.
|
|
58031
|
+
const ret = returnMarshal.readBox3();
|
|
58028
58032
|
return ret;
|
|
58029
58033
|
}
|
|
58030
|
-
async
|
|
58034
|
+
async RPCGetAABBForElements(componentHandle, elementIndices) {
|
|
58031
58035
|
const marshal = new Marshal();
|
|
58032
|
-
marshal.writeString("
|
|
58036
|
+
marshal.writeString("RPCGetAABBForElements");
|
|
58033
58037
|
marshal.writeUInt(componentHandle);
|
|
58034
|
-
marshal.writeArrayOfUInt(
|
|
58038
|
+
marshal.writeArrayOfUInt(elementIndices);
|
|
58035
58039
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58036
58040
|
const ret = returnMarshal.readBox3();
|
|
58037
58041
|
return ret;
|
|
58038
58042
|
}
|
|
58039
|
-
async
|
|
58043
|
+
async RPCGetAABBForVim(componentHandle) {
|
|
58040
58044
|
const marshal = new Marshal();
|
|
58041
|
-
marshal.writeString("
|
|
58045
|
+
marshal.writeString("RPCGetAABBForVim");
|
|
58042
58046
|
marshal.writeUInt(componentHandle);
|
|
58043
58047
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58044
58048
|
const ret = returnMarshal.readBox3();
|
|
58045
58049
|
return ret;
|
|
58046
58050
|
}
|
|
58047
|
-
async
|
|
58051
|
+
async RPCGetAPIVersion() {
|
|
58052
|
+
const marshal = new Marshal();
|
|
58053
|
+
marshal.writeString("RPCGetAPIVersion");
|
|
58054
|
+
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58055
|
+
const ret = returnMarshal.readString();
|
|
58056
|
+
return ret;
|
|
58057
|
+
}
|
|
58058
|
+
async RPCGetCameraView() {
|
|
58048
58059
|
const marshal = new Marshal();
|
|
58049
|
-
marshal.writeString("
|
|
58060
|
+
marshal.writeString("RPCGetCameraView");
|
|
58050
58061
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58051
58062
|
const ret = returnMarshal.readSegment();
|
|
58052
58063
|
return ret;
|
|
58053
58064
|
}
|
|
58054
|
-
async
|
|
58065
|
+
async RPCGetElementCount(componentHandle) {
|
|
58066
|
+
const marshal = new Marshal();
|
|
58067
|
+
marshal.writeString("RPCGetElementCount");
|
|
58068
|
+
marshal.writeUInt(componentHandle);
|
|
58069
|
+
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58070
|
+
const ret = returnMarshal.readUInt();
|
|
58071
|
+
return ret;
|
|
58072
|
+
}
|
|
58073
|
+
async RPCGetElementIds(componentHandle) {
|
|
58055
58074
|
const marshal = new Marshal();
|
|
58056
|
-
marshal.writeString("
|
|
58075
|
+
marshal.writeString("RPCGetElementIds");
|
|
58076
|
+
marshal.writeUInt(componentHandle);
|
|
58057
58077
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58058
|
-
const ret = returnMarshal.
|
|
58078
|
+
const ret = returnMarshal.readArrayOfUInt64();
|
|
58059
58079
|
return ret;
|
|
58060
58080
|
}
|
|
58061
58081
|
async RPCGetLastError() {
|
|
@@ -58065,11 +58085,12 @@ void main() {
|
|
|
58065
58085
|
const ret = returnMarshal.readString();
|
|
58066
58086
|
return ret;
|
|
58067
58087
|
}
|
|
58068
|
-
async
|
|
58088
|
+
async RPCGetRoomElements(componentHandle) {
|
|
58069
58089
|
const marshal = new Marshal();
|
|
58070
|
-
marshal.writeString("
|
|
58090
|
+
marshal.writeString("RPCGetRoomElements");
|
|
58091
|
+
marshal.writeUInt(componentHandle);
|
|
58071
58092
|
const returnMarshal = await this._socket.sendRPCWithReturn(marshal);
|
|
58072
|
-
const ret = returnMarshal.
|
|
58093
|
+
const ret = returnMarshal.readArrayOfUInt();
|
|
58073
58094
|
return ret;
|
|
58074
58095
|
}
|
|
58075
58096
|
async RPCGetSectionBox() {
|
|
@@ -58087,58 +58108,6 @@ void main() {
|
|
|
58087
58108
|
const ret = returnMarshal.readVimStatus();
|
|
58088
58109
|
return ret;
|
|
58089
58110
|
}
|
|
58090
|
-
RPCGhost(componentHandle, nodes) {
|
|
58091
|
-
const marshal = new Marshal();
|
|
58092
|
-
marshal.writeString("RPCGhost");
|
|
58093
|
-
marshal.writeUInt(componentHandle);
|
|
58094
|
-
marshal.writeArrayOfUInt(nodes);
|
|
58095
|
-
this._socket.sendRPC(marshal);
|
|
58096
|
-
}
|
|
58097
|
-
RPCGhostAll(componentHandle) {
|
|
58098
|
-
const marshal = new Marshal();
|
|
58099
|
-
marshal.writeString("RPCGhostAll");
|
|
58100
|
-
marshal.writeUInt(componentHandle);
|
|
58101
|
-
this._socket.sendRPC(marshal);
|
|
58102
|
-
}
|
|
58103
|
-
RPCHide(componentHandle, nodes) {
|
|
58104
|
-
const marshal = new Marshal();
|
|
58105
|
-
marshal.writeString("RPCHide");
|
|
58106
|
-
marshal.writeUInt(componentHandle);
|
|
58107
|
-
marshal.writeArrayOfUInt(nodes);
|
|
58108
|
-
this._socket.sendRPC(marshal);
|
|
58109
|
-
}
|
|
58110
|
-
RPCHideAABBs(componentHandle, nodes) {
|
|
58111
|
-
const marshal = new Marshal();
|
|
58112
|
-
marshal.writeString("RPCHideAABBs");
|
|
58113
|
-
marshal.writeUInt(componentHandle);
|
|
58114
|
-
marshal.writeArrayOfUInt(nodes);
|
|
58115
|
-
this._socket.sendRPC(marshal);
|
|
58116
|
-
}
|
|
58117
|
-
RPCHideAll(componentHandle) {
|
|
58118
|
-
const marshal = new Marshal();
|
|
58119
|
-
marshal.writeString("RPCHideAll");
|
|
58120
|
-
marshal.writeUInt(componentHandle);
|
|
58121
|
-
this._socket.sendRPC(marshal);
|
|
58122
|
-
}
|
|
58123
|
-
RPCHideAllAABBs(componentHandle) {
|
|
58124
|
-
const marshal = new Marshal();
|
|
58125
|
-
marshal.writeString("RPCHideAllAABBs");
|
|
58126
|
-
marshal.writeUInt(componentHandle);
|
|
58127
|
-
this._socket.sendRPC(marshal);
|
|
58128
|
-
}
|
|
58129
|
-
RPCHighlight(componentHandle, nodes) {
|
|
58130
|
-
const marshal = new Marshal();
|
|
58131
|
-
marshal.writeString("RPCHighlight");
|
|
58132
|
-
marshal.writeUInt(componentHandle);
|
|
58133
|
-
marshal.writeArrayOfUInt(nodes);
|
|
58134
|
-
this._socket.sendRPC(marshal);
|
|
58135
|
-
}
|
|
58136
|
-
RPCHighlightAll(componentHandle) {
|
|
58137
|
-
const marshal = new Marshal();
|
|
58138
|
-
marshal.writeString("RPCHighlightAll");
|
|
58139
|
-
marshal.writeUInt(componentHandle);
|
|
58140
|
-
this._socket.sendRPC(marshal);
|
|
58141
|
-
}
|
|
58142
58111
|
RPCKeyEvent(keyCode, down) {
|
|
58143
58112
|
const marshal = new Marshal();
|
|
58144
58113
|
marshal.writeString("RPCKeyEvent");
|
|
@@ -58163,12 +58132,6 @@ void main() {
|
|
|
58163
58132
|
const ret = returnMarshal.readUInt();
|
|
58164
58133
|
return ret;
|
|
58165
58134
|
}
|
|
58166
|
-
RPCLockIblRotation(lock) {
|
|
58167
|
-
const marshal = new Marshal();
|
|
58168
|
-
marshal.writeString("RPCLockIblRotation");
|
|
58169
|
-
marshal.writeBoolean(lock);
|
|
58170
|
-
this._socket.sendRPC(marshal);
|
|
58171
|
-
}
|
|
58172
58135
|
RPCMouseButtonEvent(mousePos, mouseButton, down) {
|
|
58173
58136
|
const marshal = new Marshal();
|
|
58174
58137
|
marshal.writeString("RPCMouseButtonEvent");
|
|
@@ -58203,16 +58166,6 @@ void main() {
|
|
|
58203
58166
|
marshal.writeInt(mouseButton);
|
|
58204
58167
|
this._socket.sendRPC(marshal);
|
|
58205
58168
|
}
|
|
58206
|
-
RPCMoveCameraTo(usePosition, useTarget, position, target, blendTime) {
|
|
58207
|
-
const marshal = new Marshal();
|
|
58208
|
-
marshal.writeString("RPCMoveCameraTo");
|
|
58209
|
-
marshal.writeBoolean(usePosition);
|
|
58210
|
-
marshal.writeBoolean(useTarget);
|
|
58211
|
-
marshal.writeVector3(position);
|
|
58212
|
-
marshal.writeVector3(target);
|
|
58213
|
-
marshal.writeFloat(blendTime);
|
|
58214
|
-
this._socket.sendRPC(marshal);
|
|
58215
|
-
}
|
|
58216
58169
|
RPCPauseRendering(pause) {
|
|
58217
58170
|
const marshal = new Marshal();
|
|
58218
58171
|
marshal.writeString("RPCPauseRendering");
|
|
@@ -58227,17 +58180,9 @@ void main() {
|
|
|
58227
58180
|
const ret = returnMarshal.readHitCheckResult();
|
|
58228
58181
|
return ret;
|
|
58229
58182
|
}
|
|
58230
|
-
|
|
58231
|
-
const marshal = new Marshal();
|
|
58232
|
-
marshal.writeString("RPCRemoveNodeFlags");
|
|
58233
|
-
marshal.writeUInt(componentHandle);
|
|
58234
|
-
marshal.writeArrayOfUInt(nodes);
|
|
58235
|
-
marshal.writeUInt(flags);
|
|
58236
|
-
this._socket.sendRPC(marshal);
|
|
58237
|
-
}
|
|
58238
|
-
RPCSetAspectRatio(width, height) {
|
|
58183
|
+
RPCSetCameraAspectRatio(width, height) {
|
|
58239
58184
|
const marshal = new Marshal();
|
|
58240
|
-
marshal.writeString("
|
|
58185
|
+
marshal.writeString("RPCSetCameraAspectRatio");
|
|
58241
58186
|
marshal.writeUInt(width);
|
|
58242
58187
|
marshal.writeUInt(height);
|
|
58243
58188
|
this._socket.sendRPC(marshal);
|
|
@@ -58248,29 +58193,37 @@ void main() {
|
|
|
58248
58193
|
marshal.writeBoolean(orbit2);
|
|
58249
58194
|
this._socket.sendRPC(marshal);
|
|
58250
58195
|
}
|
|
58251
|
-
RPCSetCameraPosition(
|
|
58196
|
+
RPCSetCameraPosition(position, blendTime) {
|
|
58252
58197
|
const marshal = new Marshal();
|
|
58253
58198
|
marshal.writeString("RPCSetCameraPosition");
|
|
58254
|
-
marshal.
|
|
58199
|
+
marshal.writeVector3(position);
|
|
58255
58200
|
marshal.writeFloat(blendTime);
|
|
58256
58201
|
this._socket.sendRPC(marshal);
|
|
58257
58202
|
}
|
|
58258
|
-
|
|
58203
|
+
RPCSetCameraSpeed(speed) {
|
|
58259
58204
|
const marshal = new Marshal();
|
|
58260
|
-
marshal.writeString("
|
|
58261
|
-
marshal.
|
|
58205
|
+
marshal.writeString("RPCSetCameraSpeed");
|
|
58206
|
+
marshal.writeFloat(speed);
|
|
58262
58207
|
this._socket.sendRPC(marshal);
|
|
58263
58208
|
}
|
|
58264
|
-
|
|
58209
|
+
RPCSetCameraTarget(target, blendTime) {
|
|
58265
58210
|
const marshal = new Marshal();
|
|
58266
|
-
marshal.writeString("
|
|
58267
|
-
marshal.
|
|
58211
|
+
marshal.writeString("RPCSetCameraTarget");
|
|
58212
|
+
marshal.writeVector3(target);
|
|
58213
|
+
marshal.writeFloat(blendTime);
|
|
58214
|
+
this._socket.sendRPC(marshal);
|
|
58215
|
+
}
|
|
58216
|
+
RPCSetCameraView(state, blendTime) {
|
|
58217
|
+
const marshal = new Marshal();
|
|
58218
|
+
marshal.writeString("RPCSetCameraView");
|
|
58219
|
+
marshal.writeSegment(state);
|
|
58220
|
+
marshal.writeFloat(blendTime);
|
|
58268
58221
|
this._socket.sendRPC(marshal);
|
|
58269
58222
|
}
|
|
58270
|
-
|
|
58223
|
+
RPCSetGhostColor(ghostColor) {
|
|
58271
58224
|
const marshal = new Marshal();
|
|
58272
|
-
marshal.writeString("
|
|
58273
|
-
marshal.
|
|
58225
|
+
marshal.writeString("RPCSetGhostColor");
|
|
58226
|
+
marshal.writeRGBA(ghostColor);
|
|
58274
58227
|
this._socket.sendRPC(marshal);
|
|
58275
58228
|
}
|
|
58276
58229
|
RPCSetLighting(toneMappingWhitePoint, hdrScale, hdrBackgroundScale, hdrBackgroundSaturation, backgroundBlur, backgroundColor) {
|
|
@@ -58284,45 +58237,41 @@ void main() {
|
|
|
58284
58237
|
marshal.writeRGBA(backgroundColor);
|
|
58285
58238
|
this._socket.sendRPC(marshal);
|
|
58286
58239
|
}
|
|
58287
|
-
RPCSetMaterialOverrides(componentHandle,
|
|
58240
|
+
RPCSetMaterialOverrides(componentHandle, elementIndices, materialInstanceHandles) {
|
|
58288
58241
|
const marshal = new Marshal();
|
|
58289
58242
|
marshal.writeString("RPCSetMaterialOverrides");
|
|
58290
58243
|
marshal.writeUInt(componentHandle);
|
|
58291
|
-
marshal.writeArrayOfUInt(
|
|
58244
|
+
marshal.writeArrayOfUInt(elementIndices);
|
|
58292
58245
|
marshal.writeArrayOfUInt(materialInstanceHandles);
|
|
58293
58246
|
this._socket.sendRPC(marshal);
|
|
58294
58247
|
}
|
|
58295
|
-
RPCSetMoveSpeed(speed) {
|
|
58296
|
-
const marshal = new Marshal();
|
|
58297
|
-
marshal.writeString("RPCSetMoveSpeed");
|
|
58298
|
-
marshal.writeFloat(speed);
|
|
58299
|
-
this._socket.sendRPC(marshal);
|
|
58300
|
-
}
|
|
58301
58248
|
RPCSetSectionBox(state) {
|
|
58302
58249
|
const marshal = new Marshal();
|
|
58303
58250
|
marshal.writeString("RPCSetSectionBox");
|
|
58304
58251
|
marshal.writeSectionBoxState(state);
|
|
58305
58252
|
this._socket.sendRPC(marshal);
|
|
58306
58253
|
}
|
|
58307
|
-
|
|
58254
|
+
RPCSetStateVim(componentHandle, state) {
|
|
58308
58255
|
const marshal = new Marshal();
|
|
58309
|
-
marshal.writeString("
|
|
58256
|
+
marshal.writeString("RPCSetStateVim");
|
|
58310
58257
|
marshal.writeUInt(componentHandle);
|
|
58311
|
-
marshal.
|
|
58258
|
+
marshal.writeUInt(state);
|
|
58312
58259
|
this._socket.sendRPC(marshal);
|
|
58313
58260
|
}
|
|
58314
|
-
|
|
58261
|
+
RPCSetStateElements(componentHandle, elementIndices, state) {
|
|
58315
58262
|
const marshal = new Marshal();
|
|
58316
|
-
marshal.writeString("
|
|
58263
|
+
marshal.writeString("RPCSetStateElements");
|
|
58317
58264
|
marshal.writeUInt(componentHandle);
|
|
58318
|
-
marshal.writeArrayOfUInt(
|
|
58319
|
-
marshal.
|
|
58265
|
+
marshal.writeArrayOfUInt(elementIndices);
|
|
58266
|
+
marshal.writeUInt(state);
|
|
58320
58267
|
this._socket.sendRPC(marshal);
|
|
58321
58268
|
}
|
|
58322
|
-
|
|
58269
|
+
RPCSetStatesElements(componentHandle, elementIndices, states) {
|
|
58323
58270
|
const marshal = new Marshal();
|
|
58324
|
-
marshal.writeString("
|
|
58271
|
+
marshal.writeString("RPCSetStatesElements");
|
|
58325
58272
|
marshal.writeUInt(componentHandle);
|
|
58273
|
+
marshal.writeArrayOfUInt(elementIndices);
|
|
58274
|
+
marshal.writeArrayOfUInt(states);
|
|
58326
58275
|
this._socket.sendRPC(marshal);
|
|
58327
58276
|
}
|
|
58328
58277
|
async RPCStartScene(toneMappingWhitePoint, hdrScale, hdrBackgroundScale, hdrBackgroundSaturation, backgroundBlur, backgroundColor) {
|
|
@@ -58343,6 +58292,11 @@ void main() {
|
|
|
58343
58292
|
marshal.writeString("RPCTriggerRenderDocCapture");
|
|
58344
58293
|
this._socket.sendRPC(marshal);
|
|
58345
58294
|
}
|
|
58295
|
+
RPCUnloadAll() {
|
|
58296
|
+
const marshal = new Marshal();
|
|
58297
|
+
marshal.writeString("RPCUnloadAll");
|
|
58298
|
+
this._socket.sendRPC(marshal);
|
|
58299
|
+
}
|
|
58346
58300
|
RPCUnloadVim(componentHandle) {
|
|
58347
58301
|
const marshal = new Marshal();
|
|
58348
58302
|
marshal.writeString("RPCUnloadVim");
|
|
@@ -58894,7 +58848,7 @@ void main() {
|
|
|
58894
58848
|
function createAdapter$1(viewer) {
|
|
58895
58849
|
return {
|
|
58896
58850
|
init: () => {
|
|
58897
|
-
viewer.rpc.
|
|
58851
|
+
viewer.rpc.RPCSetCameraSpeed(10);
|
|
58898
58852
|
},
|
|
58899
58853
|
orbitCamera: (value) => {
|
|
58900
58854
|
},
|
|
@@ -59101,7 +59055,7 @@ void main() {
|
|
|
59101
59055
|
if (!test2) return void 0;
|
|
59102
59056
|
const vim = this._vims.getFromHandle(test2.vimHandle);
|
|
59103
59057
|
if (!vim) return void 0;
|
|
59104
|
-
const object = vim.
|
|
59058
|
+
const object = vim.getElement(test2.elementIndex);
|
|
59105
59059
|
if (!object) return void 0;
|
|
59106
59060
|
return new UltraRaycastResult(
|
|
59107
59061
|
object,
|
|
@@ -59194,118 +59148,39 @@ void main() {
|
|
|
59194
59148
|
Validation.clampRGBA01(s.backgroundColor)
|
|
59195
59149
|
);
|
|
59196
59150
|
}
|
|
59197
|
-
RPCLockIblRotation(lock) {
|
|
59198
|
-
this.rpc.RPCLockIblRotation(lock);
|
|
59199
|
-
}
|
|
59200
|
-
RPCGetSceneAABB() {
|
|
59201
|
-
return this.safeCall(
|
|
59202
|
-
() => this.rpc.RPCGetSceneAABB(),
|
|
59203
|
-
void 0
|
|
59204
|
-
);
|
|
59205
|
-
}
|
|
59206
59151
|
/*******************************************************************************
|
|
59207
59152
|
* NODE VISIBILITY METHODS
|
|
59208
59153
|
* Methods for controlling node visibility, including show/hide, ghosting,
|
|
59209
59154
|
* and highlighting functionality.
|
|
59210
59155
|
******************************************************************************/
|
|
59211
59156
|
/**
|
|
59212
|
-
*
|
|
59213
|
-
* @param componentHandle - The component to hide entirely
|
|
59214
|
-
* @throws {Error} If the component handle is invalid
|
|
59215
|
-
*/
|
|
59216
|
-
RPCHideAll(componentHandle) {
|
|
59217
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59218
|
-
this.rpc.RPCHideAll(componentHandle);
|
|
59219
|
-
}
|
|
59220
|
-
/**
|
|
59221
|
-
* Shows all nodes in a component, making the entire component visible.
|
|
59222
|
-
* @param componentHandle - The component to show entirely
|
|
59223
|
-
* @throws {Error} If the component handle is invalid
|
|
59224
|
-
*/
|
|
59225
|
-
RPCShowAll(componentHandle) {
|
|
59226
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59227
|
-
this.rpc.RPCShowAll(componentHandle);
|
|
59228
|
-
}
|
|
59229
|
-
/**
|
|
59230
|
-
* Makes all nodes in a component semi-transparent (ghosted).
|
|
59231
|
-
* @param componentHandle - The component to ghost entirely
|
|
59232
|
-
* @throws {Error} If the component handle is invalid
|
|
59233
|
-
*/
|
|
59234
|
-
RPCGhostAll(componentHandle) {
|
|
59235
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59236
|
-
this.rpc.RPCGhostAll(componentHandle);
|
|
59237
|
-
}
|
|
59238
|
-
/**
|
|
59239
|
-
* Highlights all nodes in a component.
|
|
59240
|
-
* @param componentHandle - The component to highlight entirely
|
|
59241
|
-
* @throws {Error} If the component handle is invalid
|
|
59242
|
-
*/
|
|
59243
|
-
RPCHighlightAll(componentHandle) {
|
|
59244
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59245
|
-
this.rpc.RPCHighlightAll(componentHandle);
|
|
59246
|
-
}
|
|
59247
|
-
/**
|
|
59248
|
-
* Hides specified nodes in a component, making them invisible.
|
|
59249
|
-
* Large node arrays are automatically processed in batches.
|
|
59250
|
-
* @param componentHandle - The component containing the nodes
|
|
59251
|
-
* @param nodes - Array of node indices to hide
|
|
59252
|
-
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59253
|
-
*/
|
|
59254
|
-
RPCHide(componentHandle, nodes) {
|
|
59255
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59256
|
-
if (!Validation.areComponentHandles(nodes)) return;
|
|
59257
|
-
const batches = batchArray(nodes, this.batchSize);
|
|
59258
|
-
for (const batch of batches) {
|
|
59259
|
-
this.rpc.RPCHide(componentHandle, batch);
|
|
59260
|
-
}
|
|
59261
|
-
}
|
|
59262
|
-
/**
|
|
59263
|
-
* Shows specified nodes in a component, making them visible.
|
|
59157
|
+
* Highlights specified nodes in a component.
|
|
59264
59158
|
* Large node arrays are automatically processed in batches.
|
|
59265
59159
|
* @param componentHandle - The component containing the nodes
|
|
59266
|
-
* @param nodes - Array of node indices to
|
|
59160
|
+
* @param nodes - Array of node indices to highlight
|
|
59267
59161
|
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59268
59162
|
*/
|
|
59269
|
-
|
|
59270
|
-
if (
|
|
59163
|
+
RPCSetStateElements(componentHandle, elements, state) {
|
|
59164
|
+
if (elements.length === 0) return;
|
|
59271
59165
|
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59272
|
-
if (!Validation.areComponentHandles(
|
|
59273
|
-
const batches = batchArray(
|
|
59166
|
+
if (!Validation.areComponentHandles(elements)) return;
|
|
59167
|
+
const batches = batchArray(elements, this.batchSize);
|
|
59274
59168
|
for (const batch of batches) {
|
|
59275
|
-
this.rpc.
|
|
59169
|
+
this.rpc.RPCSetStateElements(componentHandle, batch, state);
|
|
59276
59170
|
}
|
|
59277
59171
|
}
|
|
59278
|
-
|
|
59279
|
-
* Makes specified nodes semi-transparent (ghosted) 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 ghost
|
|
59283
|
-
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59284
|
-
*/
|
|
59285
|
-
RPCGhost(componentHandle, nodes) {
|
|
59286
|
-
if (nodes.length === 0) return;
|
|
59172
|
+
RPCSetStatesElements(componentHandle, elements, states) {
|
|
59287
59173
|
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59288
|
-
if (!Validation.areComponentHandles(
|
|
59289
|
-
|
|
59290
|
-
|
|
59291
|
-
|
|
59174
|
+
if (!Validation.areComponentHandles(elements)) return;
|
|
59175
|
+
if (!Validation.areSameLength(elements, states)) return;
|
|
59176
|
+
const batches = batchArrays(elements, states, this.batchSize);
|
|
59177
|
+
for (const [batchedElements, batchedStates] of batches) {
|
|
59178
|
+
this.rpc.RPCSetStatesElements(componentHandle, batchedElements, batchedStates);
|
|
59292
59179
|
}
|
|
59293
59180
|
}
|
|
59294
|
-
|
|
59295
|
-
* Highlights specified nodes in a component.
|
|
59296
|
-
* Large node arrays are automatically processed in batches.
|
|
59297
|
-
* @param componentHandle - The component containing the nodes
|
|
59298
|
-
* @param nodes - Array of node indices to highlight
|
|
59299
|
-
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59300
|
-
*/
|
|
59301
|
-
RPCHighlight(componentHandle, nodes) {
|
|
59302
|
-
if (nodes.length === 0) return;
|
|
59181
|
+
RPCSetStateVim(componentHandle, state) {
|
|
59303
59182
|
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59304
|
-
|
|
59305
|
-
const batches = batchArray(nodes, this.batchSize);
|
|
59306
|
-
for (const batch of batches) {
|
|
59307
|
-
this.rpc.RPCHighlight(componentHandle, batch);
|
|
59308
|
-
}
|
|
59183
|
+
this.rpc.RPCSetStateVim(componentHandle, state);
|
|
59309
59184
|
}
|
|
59310
59185
|
/*******************************************************************************
|
|
59311
59186
|
* TEXT AND UI METHODS
|
|
@@ -59365,9 +59240,9 @@ void main() {
|
|
|
59365
59240
|
* Retrieves the current camera position and orientation.
|
|
59366
59241
|
* @returns Promise resolving to a segment representing the camera's current position and target
|
|
59367
59242
|
*/
|
|
59368
|
-
async
|
|
59243
|
+
async RPCGetCameraView() {
|
|
59369
59244
|
return await this.safeCall(
|
|
59370
|
-
() => this.rpc.
|
|
59245
|
+
() => this.rpc.RPCGetCameraView(),
|
|
59371
59246
|
void 0
|
|
59372
59247
|
);
|
|
59373
59248
|
}
|
|
@@ -59375,16 +59250,58 @@ void main() {
|
|
|
59375
59250
|
* Sets the camera position and orientation.
|
|
59376
59251
|
* @param segment - The desired camera position and target
|
|
59377
59252
|
* @param blendTime - Duration of the camera transition in seconds (non-negative)
|
|
59378
|
-
* @throws {Error} If segment is invalid or blendTime is negative
|
|
59379
59253
|
*/
|
|
59380
|
-
|
|
59254
|
+
RPCSetCameraView(segment, blendTime) {
|
|
59381
59255
|
if (!Validation.isValidSegment(segment)) return;
|
|
59382
59256
|
blendTime = Validation.clamp01(blendTime);
|
|
59383
|
-
this.rpc.
|
|
59257
|
+
this.rpc.RPCSetCameraView(segment, blendTime);
|
|
59258
|
+
}
|
|
59259
|
+
/**
|
|
59260
|
+
* Sets the camera's position without changing its target.
|
|
59261
|
+
* The camera will move to the specified position while maintaining its current look-at direction.
|
|
59262
|
+
*
|
|
59263
|
+
* @param position - The new position of the camera in world space
|
|
59264
|
+
* @param blendTime - Duration of the camera transition in seconds (non-negative)
|
|
59265
|
+
*/
|
|
59266
|
+
RPCSetCameraPosition(position, blendTime) {
|
|
59267
|
+
if (!Validation.isValidVector3(position)) return;
|
|
59268
|
+
blendTime = Validation.clamp01(blendTime);
|
|
59269
|
+
this.rpc.RPCSetCameraPosition(position, blendTime);
|
|
59270
|
+
}
|
|
59271
|
+
/**
|
|
59272
|
+
* Sets the camera's look-at target without changing its position.
|
|
59273
|
+
* The camera will rotate to face the specified target while remaining at its current position.
|
|
59274
|
+
*
|
|
59275
|
+
* @param target - The new look-at target of the camera in world space
|
|
59276
|
+
* @param blendTime - Duration of the camera transition in seconds (non-negative)
|
|
59277
|
+
*/
|
|
59278
|
+
RPCSetCameraTarget(target, blendTime) {
|
|
59279
|
+
if (!Validation.isValidVector3(target)) return;
|
|
59280
|
+
blendTime = Validation.clamp01(blendTime);
|
|
59281
|
+
this.rpc.RPCSetCameraTarget(target, blendTime);
|
|
59282
|
+
}
|
|
59283
|
+
/**
|
|
59284
|
+
* Retrieves the axis-aligned bounding box (AABB) that encompasses the entire scene.
|
|
59285
|
+
* This includes all loaded geometry across all VIM components.
|
|
59286
|
+
*
|
|
59287
|
+
* @returns Promise resolving to the global AABB of the scene, or undefined on failure
|
|
59288
|
+
*/
|
|
59289
|
+
RPCGetAABBForAll() {
|
|
59290
|
+
return this.safeCall(
|
|
59291
|
+
() => this.rpc.RPCGetAABBForAll(),
|
|
59292
|
+
void 0
|
|
59293
|
+
);
|
|
59384
59294
|
}
|
|
59385
|
-
|
|
59295
|
+
/**
|
|
59296
|
+
* Retrieves the axis-aligned bounding box (AABB) for a specific VIM component.
|
|
59297
|
+
* This bounding box represents the spatial bounds of all geometry within the given component.
|
|
59298
|
+
*
|
|
59299
|
+
* @param componentHandle - The handle of the VIM component to query
|
|
59300
|
+
* @returns Promise resolving to the component’s bounding box, or undefined on failure
|
|
59301
|
+
*/
|
|
59302
|
+
async RPCGetAABBForVim(componentHandle) {
|
|
59386
59303
|
return await this.safeCall(
|
|
59387
|
-
() => this.rpc.
|
|
59304
|
+
() => this.rpc.RPCGetAABBForVim(componentHandle),
|
|
59388
59305
|
void 0
|
|
59389
59306
|
);
|
|
59390
59307
|
}
|
|
@@ -59392,25 +59309,25 @@ void main() {
|
|
|
59392
59309
|
* Calculates the bounding box for specified nodes in a component.
|
|
59393
59310
|
* Large node arrays are automatically processed in batches for better performance.
|
|
59394
59311
|
* @param componentHandle - The component containing the nodes
|
|
59395
|
-
* @param
|
|
59312
|
+
* @param elements - Array of node indices to calculate bounds for
|
|
59396
59313
|
* @returns Promise resolving to the combined bounding box
|
|
59397
59314
|
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59398
59315
|
*/
|
|
59399
|
-
async
|
|
59316
|
+
async RPCGetAABBForElements(componentHandle, elements) {
|
|
59400
59317
|
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59401
|
-
if (!Validation.areComponentHandles(
|
|
59318
|
+
if (!Validation.areComponentHandles(elements)) return;
|
|
59402
59319
|
return await this.safeCall(
|
|
59403
|
-
() => this.
|
|
59320
|
+
() => this.RPCGetAABBForElementsBatched(componentHandle, elements),
|
|
59404
59321
|
void 0
|
|
59405
59322
|
);
|
|
59406
59323
|
}
|
|
59407
|
-
async
|
|
59408
|
-
if (
|
|
59324
|
+
async RPCGetAABBForElementsBatched(componentHandle, elements) {
|
|
59325
|
+
if (elements.length === 0) {
|
|
59409
59326
|
return new Box3();
|
|
59410
59327
|
}
|
|
59411
|
-
const batches = batchArray(
|
|
59328
|
+
const batches = batchArray(elements, this.batchSize);
|
|
59412
59329
|
const promises = batches.map(async (batch) => {
|
|
59413
|
-
const aabb = await this.rpc.
|
|
59330
|
+
const aabb = await this.rpc.RPCGetAABBForElements(componentHandle, batch);
|
|
59414
59331
|
const v1 = new Vector3(aabb.min.x, aabb.min.y, aabb.min.z);
|
|
59415
59332
|
const v2 = new Vector3(aabb.max.x, aabb.max.y, aabb.max.z);
|
|
59416
59333
|
return new Box3(v1, v2);
|
|
@@ -59451,28 +59368,28 @@ void main() {
|
|
|
59451
59368
|
* Frames specific instances within a component. For large numbers of instances,
|
|
59452
59369
|
* automatically switches to bounding box framing for better performance.
|
|
59453
59370
|
* @param componentHandle - The component containing the instances
|
|
59454
|
-
* @param
|
|
59371
|
+
* @param elements - Array of node indices to frame
|
|
59455
59372
|
* @param blendTime - Duration of the camera transition in seconds (non-negative)
|
|
59456
59373
|
* @returns Promise resolving to camera segment representing the final position
|
|
59457
59374
|
* @throws {Error} If the component handle is invalid or nodes array is empty
|
|
59458
59375
|
*/
|
|
59459
|
-
async
|
|
59376
|
+
async RPCFrameElements(componentHandle, elements, blendTime) {
|
|
59460
59377
|
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59461
|
-
if (!Validation.areComponentHandles(
|
|
59378
|
+
if (!Validation.areComponentHandles(elements)) return;
|
|
59462
59379
|
blendTime = Validation.clamp01(blendTime);
|
|
59463
|
-
if (
|
|
59380
|
+
if (elements.length < this.batchSize) {
|
|
59464
59381
|
return await this.safeCall(
|
|
59465
|
-
() => this.rpc.
|
|
59382
|
+
() => this.rpc.RPCFrameElements(componentHandle, elements, blendTime),
|
|
59466
59383
|
void 0
|
|
59467
59384
|
);
|
|
59468
59385
|
} else {
|
|
59469
59386
|
const box = await this.safeCall(
|
|
59470
|
-
() => this.
|
|
59387
|
+
() => this.RPCGetAABBForElementsBatched(componentHandle, elements),
|
|
59471
59388
|
void 0
|
|
59472
59389
|
);
|
|
59473
59390
|
if (!box) return void 0;
|
|
59474
59391
|
return await this.safeCall(
|
|
59475
|
-
() => this.rpc.
|
|
59392
|
+
() => this.rpc.RPCFrameAABB(box, blendTime),
|
|
59476
59393
|
void 0
|
|
59477
59394
|
);
|
|
59478
59395
|
}
|
|
@@ -59483,11 +59400,11 @@ void main() {
|
|
|
59483
59400
|
* @param blendTime - Duration of the camera transition in seconds (non-negative)
|
|
59484
59401
|
* @throws {Error} If the box is invalid (min values must be less than max values)
|
|
59485
59402
|
*/
|
|
59486
|
-
async
|
|
59403
|
+
async RPCFrameAABB(box, blendTime) {
|
|
59487
59404
|
if (!Validation.isValidBox(box)) return;
|
|
59488
59405
|
blendTime = Validation.clamp01(blendTime);
|
|
59489
59406
|
return await this.safeCall(
|
|
59490
|
-
() => this.rpc.
|
|
59407
|
+
() => this.rpc.RPCFrameAABB(box, blendTime),
|
|
59491
59408
|
void 0
|
|
59492
59409
|
);
|
|
59493
59410
|
}
|
|
@@ -59500,9 +59417,9 @@ void main() {
|
|
|
59500
59417
|
* @param speed - The desired movement speed (must be positive)
|
|
59501
59418
|
* @throws {Error} If speed is not positive
|
|
59502
59419
|
*/
|
|
59503
|
-
|
|
59420
|
+
RPCSetCameraSpeed(speed) {
|
|
59504
59421
|
speed = Validation.min0(speed);
|
|
59505
|
-
this.rpc.
|
|
59422
|
+
this.rpc.RPCSetCameraSpeed(speed);
|
|
59506
59423
|
}
|
|
59507
59424
|
RPCSetCameraMode(mode) {
|
|
59508
59425
|
this.rpc.RPCSetCameraMode(
|
|
@@ -59516,10 +59433,10 @@ void main() {
|
|
|
59516
59433
|
* @param height - The height component of the aspect ratio
|
|
59517
59434
|
* @throws {Error} If width or height are not positive integers
|
|
59518
59435
|
*/
|
|
59519
|
-
|
|
59436
|
+
RPCSetCameraAspectRatio(width, height) {
|
|
59520
59437
|
if (!Validation.isPositiveInteger(width)) return;
|
|
59521
59438
|
if (!Validation.isPositiveInteger(height)) return;
|
|
59522
|
-
this.rpc.
|
|
59439
|
+
this.rpc.RPCSetCameraAspectRatio(width, height);
|
|
59523
59440
|
}
|
|
59524
59441
|
/*******************************************************************************
|
|
59525
59442
|
* VIM FILE MANAGEMENT METHODS
|
|
@@ -59583,8 +59500,8 @@ void main() {
|
|
|
59583
59500
|
/**
|
|
59584
59501
|
* Clears the entire scene, removing all components and resetting to initial state.
|
|
59585
59502
|
*/
|
|
59586
|
-
|
|
59587
|
-
this.rpc.
|
|
59503
|
+
RPCUnloadAll() {
|
|
59504
|
+
this.rpc.RPCUnloadAll();
|
|
59588
59505
|
}
|
|
59589
59506
|
/**
|
|
59590
59507
|
* Sets the color used for ghosted geometry.
|
|
@@ -59592,7 +59509,7 @@ void main() {
|
|
|
59592
59509
|
*/
|
|
59593
59510
|
RPCSetGhostColor(ghostColor) {
|
|
59594
59511
|
const color = Validation.clampRGBA01(ghostColor);
|
|
59595
|
-
this.rpc.
|
|
59512
|
+
this.rpc.RPCSetGhostColor(color);
|
|
59596
59513
|
}
|
|
59597
59514
|
/**
|
|
59598
59515
|
* Performs hit testing at a specified screen position.
|
|
@@ -59788,46 +59705,6 @@ void main() {
|
|
|
59788
59705
|
RPCTriggerRenderDocCapture() {
|
|
59789
59706
|
this.rpc.RPCTriggerRenderDocCapture();
|
|
59790
59707
|
}
|
|
59791
|
-
/**
|
|
59792
|
-
* Shows axis-aligned bounding boxes (AABBs) for specified nodes with custom colors.
|
|
59793
|
-
* Large arrays are automatically processed in batches for better performance.
|
|
59794
|
-
* @param componentHandle - The component containing the nodes
|
|
59795
|
-
* @param nodes - Array of node indices to show AABBs for
|
|
59796
|
-
* @param colors - Array of colors for each AABB (must match nodes length)
|
|
59797
|
-
* @throws {Error} If arrays have different lengths or component handle is invalid
|
|
59798
|
-
*/
|
|
59799
|
-
RPCShowAABBs(componentHandle, nodes, colors) {
|
|
59800
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59801
|
-
if (!Validation.areComponentHandles(nodes)) return;
|
|
59802
|
-
const batches = batchArrays(nodes, colors, this.batchSize);
|
|
59803
|
-
for (const [batchedNodes, batchedColors] of batches) {
|
|
59804
|
-
this.rpc.RPCShowAABBs(componentHandle, batchedNodes, batchedColors);
|
|
59805
|
-
}
|
|
59806
|
-
}
|
|
59807
|
-
/**
|
|
59808
|
-
* Hides the axis-aligned bounding boxes (AABBs) for specified nodes.
|
|
59809
|
-
* Large node arrays are automatically processed in batches.
|
|
59810
|
-
* @param componentHandle - The component containing the nodes
|
|
59811
|
-
* @param nodes - Array of node indices whose AABBs should be hidden
|
|
59812
|
-
* @throws {Error} If the component handle is invalid or nodes array is invalid
|
|
59813
|
-
*/
|
|
59814
|
-
RPCHideAABBs(componentHandle, nodes) {
|
|
59815
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59816
|
-
if (!Validation.areComponentHandles(nodes)) return;
|
|
59817
|
-
const batches = batchArray(nodes, this.batchSize);
|
|
59818
|
-
for (const batch of batches) {
|
|
59819
|
-
this.rpc.RPCHideAABBs(componentHandle, batch);
|
|
59820
|
-
}
|
|
59821
|
-
}
|
|
59822
|
-
/**
|
|
59823
|
-
* Hides all axis-aligned bounding boxes (AABBs) in a component.
|
|
59824
|
-
* @param componentHandle - The component whose AABBs should be hidden
|
|
59825
|
-
* @throws {Error} If the component handle is invalid
|
|
59826
|
-
*/
|
|
59827
|
-
RPCHideAllAABBs(componentHandle) {
|
|
59828
|
-
if (!Validation.isComponentHandle(componentHandle)) return;
|
|
59829
|
-
this.rpc.RPCHideAllAABBs(componentHandle);
|
|
59830
|
-
}
|
|
59831
59708
|
async safeCall(func, defaultValue) {
|
|
59832
59709
|
try {
|
|
59833
59710
|
return await func();
|
|
@@ -59839,7 +59716,6 @@ void main() {
|
|
|
59839
59716
|
}
|
|
59840
59717
|
const defaultRenderSettings = {
|
|
59841
59718
|
...defaultSceneSettings,
|
|
59842
|
-
lockIblRotation: true,
|
|
59843
59719
|
ghostColor: new RGBA(14 / 255, 14 / 255, 14 / 255, 64 / 255)
|
|
59844
59720
|
};
|
|
59845
59721
|
class Renderer {
|
|
@@ -59855,7 +59731,6 @@ void main() {
|
|
|
59855
59731
|
__publicField(this, "_animationFrame");
|
|
59856
59732
|
__publicField(this, "_updateLighting", false);
|
|
59857
59733
|
__publicField(this, "_updateGhostColor", false);
|
|
59858
|
-
__publicField(this, "_updateIblRotation", false);
|
|
59859
59734
|
__publicField(this, "_onSceneUpdated", new distExports$1.SignalDispatcher());
|
|
59860
59735
|
this._rpc = rpc;
|
|
59861
59736
|
this._logger = logger;
|
|
@@ -59889,7 +59764,6 @@ void main() {
|
|
|
59889
59764
|
*/
|
|
59890
59765
|
onConnect() {
|
|
59891
59766
|
this._rpc.RPCSetGhostColor(this._settings.ghostColor);
|
|
59892
|
-
this._rpc.RPCLockIblRotation(this._settings.lockIblRotation);
|
|
59893
59767
|
}
|
|
59894
59768
|
notifySceneUpdated() {
|
|
59895
59769
|
this._onSceneUpdated.dispatch();
|
|
@@ -59902,13 +59776,6 @@ void main() {
|
|
|
59902
59776
|
get ghostColor() {
|
|
59903
59777
|
return this._settings.ghostColor;
|
|
59904
59778
|
}
|
|
59905
|
-
/**
|
|
59906
|
-
* Gets the IBL rotation lock setting
|
|
59907
|
-
* @returns Whether IBL rotation is locked
|
|
59908
|
-
*/
|
|
59909
|
-
get lockIblRotation() {
|
|
59910
|
-
return this._settings.lockIblRotation;
|
|
59911
|
-
}
|
|
59912
59779
|
/**
|
|
59913
59780
|
* Gets the tone mapping white point value
|
|
59914
59781
|
* @returns Current tone mapping white point
|
|
@@ -59963,16 +59830,6 @@ void main() {
|
|
|
59963
59830
|
this._updateGhostColor = true;
|
|
59964
59831
|
this.requestSettingsUpdate();
|
|
59965
59832
|
}
|
|
59966
|
-
/**
|
|
59967
|
-
* Updates the IBL rotation lock setting
|
|
59968
|
-
* @param value - Whether to lock IBL rotation
|
|
59969
|
-
*/
|
|
59970
|
-
set lockIblRotation(value) {
|
|
59971
|
-
if (this._settings.lockIblRotation === value) return;
|
|
59972
|
-
this._settings.lockIblRotation = value;
|
|
59973
|
-
this._updateIblRotation = true;
|
|
59974
|
-
this.requestSettingsUpdate();
|
|
59975
|
-
}
|
|
59976
59833
|
/**
|
|
59977
59834
|
* Sets the tone mapping white point value
|
|
59978
59835
|
* @param value - New tone mapping white point value
|
|
@@ -60040,7 +59897,7 @@ void main() {
|
|
|
60040
59897
|
this.requestSettingsUpdate();
|
|
60041
59898
|
}
|
|
60042
59899
|
getBoundingBox() {
|
|
60043
|
-
return this._rpc.
|
|
59900
|
+
return this._rpc.RPCGetAABBForAll();
|
|
60044
59901
|
}
|
|
60045
59902
|
/**
|
|
60046
59903
|
* Requests an update to be performed on the next animation frame.
|
|
@@ -60056,10 +59913,8 @@ void main() {
|
|
|
60056
59913
|
async applySettings() {
|
|
60057
59914
|
if (this._updateLighting) await this._rpc.RPCSetLighting(this._settings);
|
|
60058
59915
|
if (this._updateGhostColor) await this._rpc.RPCSetGhostColor(this._settings.ghostColor);
|
|
60059
|
-
if (this._updateIblRotation) await this._rpc.RPCLockIblRotation(this._settings.lockIblRotation);
|
|
60060
59916
|
this._updateLighting = false;
|
|
60061
59917
|
this._updateGhostColor = false;
|
|
60062
|
-
this._updateIblRotation = false;
|
|
60063
59918
|
this._animationFrame = void 0;
|
|
60064
59919
|
}
|
|
60065
59920
|
/**
|
|
@@ -60172,13 +60027,15 @@ void main() {
|
|
|
60172
60027
|
this._onUpdate.clear();
|
|
60173
60028
|
}
|
|
60174
60029
|
}
|
|
60175
|
-
var
|
|
60176
|
-
|
|
60177
|
-
|
|
60178
|
-
|
|
60179
|
-
|
|
60180
|
-
|
|
60181
|
-
|
|
60030
|
+
var VisibilityState$1 = /* @__PURE__ */ ((VisibilityState2) => {
|
|
60031
|
+
VisibilityState2[VisibilityState2["VISIBLE"] = 0] = "VISIBLE";
|
|
60032
|
+
VisibilityState2[VisibilityState2["HIDDEN"] = 1] = "HIDDEN";
|
|
60033
|
+
VisibilityState2[VisibilityState2["GHOSTED"] = 2] = "GHOSTED";
|
|
60034
|
+
VisibilityState2[VisibilityState2["HIGHLIGHTED"] = 16] = "HIGHLIGHTED";
|
|
60035
|
+
VisibilityState2[VisibilityState2["HIDDEN_HIGHLIGHTED"] = 17] = "HIDDEN_HIGHLIGHTED";
|
|
60036
|
+
VisibilityState2[VisibilityState2["GHOSTED_HIGHLIGHTED"] = 18] = "GHOSTED_HIGHLIGHTED";
|
|
60037
|
+
return VisibilityState2;
|
|
60038
|
+
})(VisibilityState$1 || {});
|
|
60182
60039
|
class StateSynchronizer {
|
|
60183
60040
|
/**
|
|
60184
60041
|
* Creates a new StateSynchronizer instance.
|
|
@@ -60187,9 +60044,10 @@ void main() {
|
|
|
60187
60044
|
* @param getHandle - Function that returns the current handle identifier
|
|
60188
60045
|
* @param isConnected - Function that returns whether the connection to the remote system is active
|
|
60189
60046
|
* @param onUpdate - Callback function invoked when updates are sent to the remote system
|
|
60190
|
-
* @param defaultState - The default state for
|
|
60047
|
+
* @param defaultState - The default state for elements when not explicitly set (defaults to VISIBLE)
|
|
60191
60048
|
*/
|
|
60192
|
-
constructor(rpc, getHandle, isConnected, onUpdate, defaultState =
|
|
60049
|
+
constructor(rpc, getHandle, isConnected, onUpdate, defaultState = 0) {
|
|
60050
|
+
//TODO: Take advantage of the new rpcs that can take multiple states at once
|
|
60193
60051
|
__publicField(this, "_tracker");
|
|
60194
60052
|
__publicField(this, "_rpc");
|
|
60195
60053
|
__publicField(this, "_getHandle");
|
|
@@ -60204,34 +60062,34 @@ void main() {
|
|
|
60204
60062
|
}
|
|
60205
60063
|
// --- Getters ---
|
|
60206
60064
|
/**
|
|
60207
|
-
* Checks if all
|
|
60065
|
+
* Checks if all elements are in the specified state(s).
|
|
60208
60066
|
*
|
|
60209
60067
|
* @param state - A single state or array of states to check against
|
|
60210
|
-
* @returns True if all
|
|
60068
|
+
* @returns True if all elements are in the specified state(s), false otherwise
|
|
60211
60069
|
*/
|
|
60212
60070
|
areAllInState(state) {
|
|
60213
60071
|
return this._tracker.areAll(state);
|
|
60214
60072
|
}
|
|
60215
60073
|
/**
|
|
60216
|
-
* Gets the current state of a specific
|
|
60074
|
+
* Gets the current state of a specific element.
|
|
60217
60075
|
*
|
|
60218
|
-
* @param
|
|
60219
|
-
* @returns The current state of the
|
|
60076
|
+
* @param elementIndex - The element index
|
|
60077
|
+
* @returns The current state of the element
|
|
60220
60078
|
*/
|
|
60221
|
-
|
|
60222
|
-
return this._tracker.getState(
|
|
60079
|
+
getElementState(elementIndex) {
|
|
60080
|
+
return this._tracker.getState(elementIndex);
|
|
60223
60081
|
}
|
|
60224
60082
|
/**
|
|
60225
|
-
* Gets all
|
|
60083
|
+
* Gets all elements that are currently in the specified state.
|
|
60226
60084
|
*
|
|
60227
60085
|
* @param state - The state to query
|
|
60228
|
-
* @returns Either 'all' if all
|
|
60086
|
+
* @returns Either 'all' if all elements are in this state, or an array of element indices
|
|
60229
60087
|
*/
|
|
60230
|
-
|
|
60088
|
+
getElementsInState(state) {
|
|
60231
60089
|
return this._tracker.getAll(state);
|
|
60232
60090
|
}
|
|
60233
60091
|
/**
|
|
60234
|
-
* Gets the default state used for
|
|
60092
|
+
* Gets the default state used for elements without explicit state settings.
|
|
60235
60093
|
*
|
|
60236
60094
|
* @returns The current default state
|
|
60237
60095
|
*/
|
|
@@ -60240,27 +60098,27 @@ void main() {
|
|
|
60240
60098
|
}
|
|
60241
60099
|
// --- Setters ---
|
|
60242
60100
|
/**
|
|
60243
|
-
* Sets the state of a specific
|
|
60101
|
+
* Sets the state of a specific elements.
|
|
60244
60102
|
*
|
|
60245
|
-
* @param
|
|
60103
|
+
* @param elementIndex - The element index to update
|
|
60246
60104
|
* @param state - The new state to apply
|
|
60247
60105
|
*/
|
|
60248
|
-
|
|
60249
|
-
this._tracker.setState(
|
|
60106
|
+
setElementState(elementIndex, state) {
|
|
60107
|
+
this._tracker.setState(elementIndex, state);
|
|
60250
60108
|
this.scheduleUpdate();
|
|
60251
60109
|
}
|
|
60252
60110
|
/**
|
|
60253
|
-
* Sets the state of all
|
|
60111
|
+
* Sets the state of all elements to the specified value.
|
|
60254
60112
|
*
|
|
60255
|
-
* @param state - The state to apply to all
|
|
60256
|
-
* @param clear - If true, clears all
|
|
60113
|
+
* @param state - The state to apply to all elements
|
|
60114
|
+
* @param clear - If true, clears all elements-specific overrides
|
|
60257
60115
|
*/
|
|
60258
|
-
|
|
60116
|
+
setStateForAll(state) {
|
|
60259
60117
|
this._tracker.setAll(state);
|
|
60260
60118
|
this.scheduleUpdate();
|
|
60261
60119
|
}
|
|
60262
60120
|
/**
|
|
60263
|
-
* Replaces all
|
|
60121
|
+
* Replaces all elements in one state (or states) with another state.
|
|
60264
60122
|
*
|
|
60265
60123
|
* @param fromState - The state(s) to replace
|
|
60266
60124
|
* @param toState - The new state to apply
|
|
@@ -60297,76 +60155,25 @@ void main() {
|
|
|
60297
60155
|
* @private
|
|
60298
60156
|
*/
|
|
60299
60157
|
remoteUpdate() {
|
|
60300
|
-
const [defaultUpdate,
|
|
60158
|
+
const [defaultUpdate, elementUpdates] = this._tracker.getUpdates();
|
|
60301
60159
|
this._tracker.reset();
|
|
60302
|
-
if (defaultUpdate) {
|
|
60303
|
-
this.
|
|
60160
|
+
if (defaultUpdate !== void 0) {
|
|
60161
|
+
this._rpc.RPCSetStateVim(this._getHandle(), defaultUpdate);
|
|
60304
60162
|
}
|
|
60305
|
-
for (const [state,
|
|
60306
|
-
if (
|
|
60307
|
-
this.
|
|
60163
|
+
for (const [state, elements] of elementUpdates.entries()) {
|
|
60164
|
+
if (elements.length === 0) continue;
|
|
60165
|
+
this._rpc.RPCSetStateElements(this._getHandle(), elements, state);
|
|
60308
60166
|
}
|
|
60309
60167
|
this._onUpdate();
|
|
60310
60168
|
}
|
|
60311
|
-
/**
|
|
60312
|
-
* Calls the appropriate RPC method to update the state of all nodes.
|
|
60313
|
-
*
|
|
60314
|
-
* @param state - The state to apply to all nodes
|
|
60315
|
-
* @private
|
|
60316
|
-
*/
|
|
60317
|
-
callRPCForStateAll(state) {
|
|
60318
|
-
if (!this._isConnected()) {
|
|
60319
|
-
return;
|
|
60320
|
-
}
|
|
60321
|
-
switch (state) {
|
|
60322
|
-
case "visible":
|
|
60323
|
-
this._rpc.RPCShowAll(this._getHandle());
|
|
60324
|
-
break;
|
|
60325
|
-
case "hidden":
|
|
60326
|
-
this._rpc.RPCHideAll(this._getHandle());
|
|
60327
|
-
break;
|
|
60328
|
-
case "ghosted":
|
|
60329
|
-
this._rpc.RPCGhostAll(this._getHandle());
|
|
60330
|
-
break;
|
|
60331
|
-
case "highlighted":
|
|
60332
|
-
this._rpc.RPCHighlightAll(this._getHandle());
|
|
60333
|
-
break;
|
|
60334
|
-
}
|
|
60335
|
-
}
|
|
60336
|
-
/**
|
|
60337
|
-
* Calls the appropriate RPC method to update the state of specific nodes.
|
|
60338
|
-
*
|
|
60339
|
-
* @param state - The state to apply
|
|
60340
|
-
* @param nodes - Array of node IDs to update
|
|
60341
|
-
* @private
|
|
60342
|
-
*/
|
|
60343
|
-
callRPCForStateNodes(state, nodes) {
|
|
60344
|
-
if (!this._isConnected()) {
|
|
60345
|
-
return;
|
|
60346
|
-
}
|
|
60347
|
-
switch (state) {
|
|
60348
|
-
case "visible":
|
|
60349
|
-
this._rpc.RPCShow(this._getHandle(), nodes);
|
|
60350
|
-
break;
|
|
60351
|
-
case "hidden":
|
|
60352
|
-
this._rpc.RPCHide(this._getHandle(), nodes);
|
|
60353
|
-
break;
|
|
60354
|
-
case "ghosted":
|
|
60355
|
-
this._rpc.RPCGhost(this._getHandle(), nodes);
|
|
60356
|
-
break;
|
|
60357
|
-
case "highlighted":
|
|
60358
|
-
this._rpc.RPCHighlight(this._getHandle(), nodes);
|
|
60359
|
-
break;
|
|
60360
|
-
}
|
|
60361
|
-
}
|
|
60362
60169
|
}
|
|
60363
60170
|
class StateTracker {
|
|
60364
60171
|
/**
|
|
60365
60172
|
* Creates a new StateTracker instance.
|
|
60366
60173
|
*
|
|
60367
|
-
* @param defaultState - The default state for
|
|
60174
|
+
* @param defaultState - The default state for elements when not explicitly set
|
|
60368
60175
|
*/
|
|
60369
|
-
constructor(defaultState =
|
|
60176
|
+
constructor(defaultState = 0) {
|
|
60370
60177
|
__publicField(this, "_state", /* @__PURE__ */ new Map());
|
|
60371
60178
|
__publicField(this, "_updates", /* @__PURE__ */ new Set());
|
|
60372
60179
|
__publicField(this, "_default");
|
|
@@ -60374,10 +60181,9 @@ void main() {
|
|
|
60374
60181
|
this._default = defaultState;
|
|
60375
60182
|
}
|
|
60376
60183
|
/**
|
|
60377
|
-
* Sets the default state for all
|
|
60184
|
+
* Sets the default state for all elements and optionally clears element-specific overrides.
|
|
60378
60185
|
*
|
|
60379
60186
|
* @param state - The new default state
|
|
60380
|
-
* @param clearNodes - If true, clears all node-specific overrides
|
|
60381
60187
|
*/
|
|
60382
60188
|
setAll(state) {
|
|
60383
60189
|
this._default = state;
|
|
@@ -60392,30 +60198,30 @@ void main() {
|
|
|
60392
60198
|
reapply() {
|
|
60393
60199
|
this._updates.clear();
|
|
60394
60200
|
const toRemove = /* @__PURE__ */ new Set();
|
|
60395
|
-
for (const [
|
|
60201
|
+
for (const [elementIndex, state] of this._state.entries()) {
|
|
60396
60202
|
if (state === this._default) {
|
|
60397
|
-
toRemove.add(
|
|
60203
|
+
toRemove.add(elementIndex);
|
|
60398
60204
|
} else {
|
|
60399
|
-
this._updates.add(
|
|
60205
|
+
this._updates.add(elementIndex);
|
|
60400
60206
|
}
|
|
60401
60207
|
}
|
|
60402
|
-
toRemove.forEach((
|
|
60208
|
+
toRemove.forEach((elementIndex) => this._state.delete(elementIndex));
|
|
60403
60209
|
}
|
|
60404
60210
|
/**
|
|
60405
|
-
* Sets the state of a specific
|
|
60211
|
+
* Sets the state of a specific element.
|
|
60406
60212
|
*
|
|
60407
|
-
* @param
|
|
60213
|
+
* @param elementIndex - The element index to update
|
|
60408
60214
|
* @param state - The new state to apply
|
|
60409
60215
|
*/
|
|
60410
|
-
setState(
|
|
60216
|
+
setState(elementIndex, state) {
|
|
60411
60217
|
if (this._default === state) {
|
|
60412
|
-
this._state.delete(
|
|
60218
|
+
this._state.delete(elementIndex);
|
|
60413
60219
|
if (!this._updatedDefault) {
|
|
60414
|
-
this._updates.add(
|
|
60220
|
+
this._updates.add(elementIndex);
|
|
60415
60221
|
}
|
|
60416
60222
|
} else {
|
|
60417
|
-
this._state.set(
|
|
60418
|
-
this._updates.add(
|
|
60223
|
+
this._state.set(elementIndex, state);
|
|
60224
|
+
this._updates.add(elementIndex);
|
|
60419
60225
|
}
|
|
60420
60226
|
}
|
|
60421
60227
|
/**
|
|
@@ -60427,66 +60233,65 @@ void main() {
|
|
|
60427
60233
|
return this._default;
|
|
60428
60234
|
}
|
|
60429
60235
|
/**
|
|
60430
|
-
* Returns whether every
|
|
60236
|
+
* Returns whether every element (override or not) is in the given state(s).
|
|
60431
60237
|
*
|
|
60432
60238
|
* @param state - A single state or array of states to check against
|
|
60433
|
-
* @returns True if all
|
|
60239
|
+
* @returns True if all element are in the specified state(s), false otherwise
|
|
60434
60240
|
*/
|
|
60435
60241
|
areAll(state) {
|
|
60436
60242
|
if (!matchesState(this._default, state)) {
|
|
60437
60243
|
return false;
|
|
60438
60244
|
}
|
|
60439
|
-
for (const
|
|
60440
|
-
if (!matchesState(
|
|
60245
|
+
for (const currentState of this._state.values()) {
|
|
60246
|
+
if (!matchesState(currentState, state)) {
|
|
60441
60247
|
return false;
|
|
60442
60248
|
}
|
|
60443
60249
|
}
|
|
60444
60250
|
return true;
|
|
60445
60251
|
}
|
|
60446
60252
|
/**
|
|
60447
|
-
* Returns
|
|
60253
|
+
* Returns an element effective state.
|
|
60448
60254
|
*
|
|
60449
|
-
* @param
|
|
60450
|
-
* @returns The current state of the
|
|
60255
|
+
* @param elementIndex - The element index
|
|
60256
|
+
* @returns The current state of the element (override or default)
|
|
60451
60257
|
*/
|
|
60452
|
-
getState(
|
|
60453
|
-
return this._state.get(
|
|
60258
|
+
getState(elementIndex) {
|
|
60259
|
+
return this._state.get(elementIndex) ?? this._default;
|
|
60454
60260
|
}
|
|
60455
60261
|
/**
|
|
60456
|
-
* Returns either 'all' if every
|
|
60457
|
-
* of
|
|
60262
|
+
* Returns either 'all' if every element is in the given state, or an array
|
|
60263
|
+
* of element index (from the overrides) whose state equals the provided state.
|
|
60458
60264
|
*
|
|
60459
60265
|
* @param state - The state to query
|
|
60460
|
-
* @returns Either 'all' if all
|
|
60266
|
+
* @returns Either 'all' if all elements are in this state, or an array of element indices
|
|
60461
60267
|
*/
|
|
60462
60268
|
getAll(state) {
|
|
60463
60269
|
if (this.areAll(state)) return "all";
|
|
60464
|
-
const
|
|
60465
|
-
for (const [
|
|
60466
|
-
if (
|
|
60467
|
-
|
|
60270
|
+
const elements = [];
|
|
60271
|
+
for (const [elementIndex, currentState] of this._state.entries()) {
|
|
60272
|
+
if (matchesState(currentState, state)) {
|
|
60273
|
+
elements.push(elementIndex);
|
|
60468
60274
|
}
|
|
60469
60275
|
}
|
|
60470
|
-
return
|
|
60276
|
+
return elements;
|
|
60471
60277
|
}
|
|
60472
60278
|
/**
|
|
60473
|
-
* Returns a mapping from state to an array of updated
|
|
60474
|
-
*
|
|
60475
|
-
* @returns A tuple with the updated default state (if any) and a map of states to node IDs
|
|
60279
|
+
* Returns a mapping from state to an array of updated elementIndices.
|
|
60280
|
+
* @returns A tuple with the updated default state (if any) and a map of states to element Indices
|
|
60476
60281
|
*/
|
|
60477
60282
|
getUpdates() {
|
|
60478
|
-
const
|
|
60479
|
-
Object.values(
|
|
60480
|
-
|
|
60283
|
+
const elementsByState = /* @__PURE__ */ new Map();
|
|
60284
|
+
Object.values(VisibilityState$1).filter((v) => typeof v === "number").forEach((state) => {
|
|
60285
|
+
elementsByState.set(state, []);
|
|
60481
60286
|
});
|
|
60482
|
-
for (const
|
|
60483
|
-
const state = this._state.get(
|
|
60484
|
-
const
|
|
60485
|
-
if (
|
|
60486
|
-
|
|
60287
|
+
for (const elementIndex of this._updates) {
|
|
60288
|
+
const state = this._state.get(elementIndex) ?? this._default;
|
|
60289
|
+
const elementArray = elementsByState.get(state);
|
|
60290
|
+
if (elementArray) {
|
|
60291
|
+
elementArray.push(elementIndex);
|
|
60487
60292
|
}
|
|
60488
60293
|
}
|
|
60489
|
-
return [this._updatedDefault ? this._default : void 0,
|
|
60294
|
+
return [this._updatedDefault ? this._default : void 0, elementsByState];
|
|
60490
60295
|
}
|
|
60491
60296
|
/**
|
|
60492
60297
|
* Checks if the default state has been updated.
|
|
@@ -60497,23 +60302,23 @@ void main() {
|
|
|
60497
60302
|
return this._updatedDefault;
|
|
60498
60303
|
}
|
|
60499
60304
|
/**
|
|
60500
|
-
* Resets the update tracking, clearing the list of
|
|
60305
|
+
* Resets the update tracking, clearing the list of elements that need updates.
|
|
60501
60306
|
*/
|
|
60502
60307
|
reset() {
|
|
60503
60308
|
this._updates.clear();
|
|
60504
60309
|
this._updatedDefault = false;
|
|
60505
60310
|
}
|
|
60506
60311
|
/**
|
|
60507
|
-
* Returns an iterator over all
|
|
60312
|
+
* Returns an iterator over all elements overrides.
|
|
60508
60313
|
*
|
|
60509
|
-
* @returns An iterator of [
|
|
60314
|
+
* @returns An iterator of [elementIndex, state] pairs
|
|
60510
60315
|
*/
|
|
60511
60316
|
entries() {
|
|
60512
60317
|
return this._state.entries();
|
|
60513
60318
|
}
|
|
60514
60319
|
/**
|
|
60515
|
-
* Replaces all
|
|
60516
|
-
* If all
|
|
60320
|
+
* Replaces all elements that match the provided state(s) with a new state.
|
|
60321
|
+
* If all elements are in the given state(s), the default is updated.
|
|
60517
60322
|
*
|
|
60518
60323
|
* @param fromState - The state(s) to replace
|
|
60519
60324
|
* @param toState - The new state to apply
|
|
@@ -60526,36 +60331,40 @@ void main() {
|
|
|
60526
60331
|
this.reapply();
|
|
60527
60332
|
return;
|
|
60528
60333
|
}
|
|
60529
|
-
for (const [
|
|
60334
|
+
for (const [elementIndex, state] of this._state.entries()) {
|
|
60530
60335
|
if (matchesState(state, fromState)) {
|
|
60531
|
-
this._state.set(
|
|
60532
|
-
this._updates.add(
|
|
60336
|
+
this._state.set(elementIndex, toState);
|
|
60337
|
+
this._updates.add(elementIndex);
|
|
60533
60338
|
}
|
|
60534
60339
|
}
|
|
60535
60340
|
}
|
|
60536
60341
|
// Clean up redundant overrides
|
|
60537
60342
|
purge() {
|
|
60538
60343
|
const toRemove = [];
|
|
60539
|
-
for (const [
|
|
60344
|
+
for (const [elementIndex, state] of this._state.entries()) {
|
|
60540
60345
|
if (state === this._default) {
|
|
60541
|
-
toRemove.push(
|
|
60346
|
+
toRemove.push(elementIndex);
|
|
60542
60347
|
}
|
|
60543
60348
|
}
|
|
60544
|
-
toRemove.forEach((
|
|
60349
|
+
toRemove.forEach((elementIndex) => this._state.delete(elementIndex));
|
|
60545
60350
|
}
|
|
60546
60351
|
}
|
|
60547
|
-
function matchesState(
|
|
60548
|
-
if (Array.isArray(
|
|
60549
|
-
return
|
|
60352
|
+
function matchesState(state, targetState) {
|
|
60353
|
+
if (Array.isArray(targetState)) {
|
|
60354
|
+
return targetState.includes(state);
|
|
60550
60355
|
}
|
|
60551
|
-
return
|
|
60356
|
+
return state === targetState;
|
|
60552
60357
|
}
|
|
60553
60358
|
function createSelection() {
|
|
60554
60359
|
return new Selection(new SelectionAdapter());
|
|
60555
60360
|
}
|
|
60556
60361
|
class SelectionAdapter {
|
|
60557
60362
|
outline(object, state) {
|
|
60558
|
-
|
|
60363
|
+
if (state) {
|
|
60364
|
+
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;
|
|
60365
|
+
} else {
|
|
60366
|
+
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;
|
|
60367
|
+
}
|
|
60559
60368
|
}
|
|
60560
60369
|
}
|
|
60561
60370
|
const HEADER_SIZE = 16;
|
|
@@ -60951,7 +60760,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
60951
60760
|
*/
|
|
60952
60761
|
update() {
|
|
60953
60762
|
if (this._rpc.connected) {
|
|
60954
|
-
this._rpc.
|
|
60763
|
+
this._rpc.RPCSetCameraAspectRatio(this.canvas.offsetWidth, this.canvas.offsetHeight);
|
|
60955
60764
|
}
|
|
60956
60765
|
}
|
|
60957
60766
|
/**
|
|
@@ -60966,9 +60775,9 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
60966
60775
|
/**
|
|
60967
60776
|
* Creates a new `Element3D` instance.
|
|
60968
60777
|
* @param vim - The parent `Vim` model.
|
|
60969
|
-
* @param
|
|
60778
|
+
* @param element - The internal instance index.
|
|
60970
60779
|
*/
|
|
60971
|
-
constructor(vim,
|
|
60780
|
+
constructor(vim, element) {
|
|
60972
60781
|
/**
|
|
60973
60782
|
* The parent `Vim` instance this element belongs to.
|
|
60974
60783
|
*/
|
|
@@ -60978,9 +60787,9 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
60978
60787
|
/**
|
|
60979
60788
|
* The internal instance index within the `Vim` model.
|
|
60980
60789
|
*/
|
|
60981
|
-
__publicField(this, "
|
|
60790
|
+
__publicField(this, "element");
|
|
60982
60791
|
this.vim = vim;
|
|
60983
|
-
this.
|
|
60792
|
+
this.element = element;
|
|
60984
60793
|
}
|
|
60985
60794
|
/**
|
|
60986
60795
|
* The unique handle of the parent `Vim` model.
|
|
@@ -60992,19 +60801,19 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
60992
60801
|
* Gets or sets the display state of the element (e.g., visible, hidden).
|
|
60993
60802
|
*/
|
|
60994
60803
|
get state() {
|
|
60995
|
-
return this.vim.
|
|
60804
|
+
return this.vim.visibility.getElementState(this.element);
|
|
60996
60805
|
}
|
|
60997
60806
|
set state(state) {
|
|
60998
|
-
this.vim.
|
|
60807
|
+
this.vim.visibility.setElementState(this.element, state);
|
|
60999
60808
|
}
|
|
61000
60809
|
/**
|
|
61001
60810
|
* Gets or sets the color override of the element.
|
|
61002
60811
|
*/
|
|
61003
60812
|
get color() {
|
|
61004
|
-
return this.vim.getColor(this.
|
|
60813
|
+
return this.vim.getColor(this.element);
|
|
61005
60814
|
}
|
|
61006
60815
|
set color(color) {
|
|
61007
|
-
this.vim.setColor([this.
|
|
60816
|
+
this.vim.setColor([this.element], color);
|
|
61008
60817
|
}
|
|
61009
60818
|
/**
|
|
61010
60819
|
* Computes and returns the bounding box of the element.
|
|
@@ -61012,7 +60821,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61012
60821
|
* @returns A promise resolving to the element's bounding box.
|
|
61013
60822
|
*/
|
|
61014
60823
|
async getBoundingBox() {
|
|
61015
|
-
return this.vim.getBoundingBoxNodes([this.
|
|
60824
|
+
return this.vim.getBoundingBoxNodes([this.element]);
|
|
61016
60825
|
}
|
|
61017
60826
|
}
|
|
61018
60827
|
class Vim {
|
|
@@ -61025,7 +60834,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61025
60834
|
__publicField(this, "_renderer");
|
|
61026
60835
|
__publicField(this, "_logger");
|
|
61027
60836
|
// The StateSynchronizer wraps a StateTracker and handles RPC synchronization.
|
|
61028
|
-
__publicField(this, "
|
|
60837
|
+
__publicField(this, "visibility");
|
|
61029
60838
|
// Color tracking remains unchanged.
|
|
61030
60839
|
__publicField(this, "_nodeColors", /* @__PURE__ */ new Map());
|
|
61031
60840
|
__publicField(this, "_updatedColors", /* @__PURE__ */ new Set());
|
|
@@ -61037,21 +60846,21 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61037
60846
|
this._colors = color;
|
|
61038
60847
|
this._renderer = renderer;
|
|
61039
60848
|
this._logger = logger;
|
|
61040
|
-
this.
|
|
60849
|
+
this.visibility = new StateSynchronizer(
|
|
61041
60850
|
this._rpc,
|
|
61042
60851
|
() => this._handle,
|
|
61043
60852
|
() => this.connected,
|
|
61044
60853
|
() => this._renderer.notifySceneUpdated(),
|
|
61045
|
-
|
|
60854
|
+
VisibilityState$1.VISIBLE
|
|
61046
60855
|
// default state
|
|
61047
60856
|
);
|
|
61048
60857
|
}
|
|
61049
|
-
|
|
61050
|
-
if (this._objects.has(
|
|
61051
|
-
return this._objects.get(
|
|
60858
|
+
getElement(elementIndex) {
|
|
60859
|
+
if (this._objects.has(elementIndex)) {
|
|
60860
|
+
return this._objects.get(elementIndex);
|
|
61052
60861
|
}
|
|
61053
|
-
const object = new Element3D(this,
|
|
61054
|
-
this._objects.set(
|
|
60862
|
+
const object = new Element3D(this, elementIndex);
|
|
60863
|
+
this._objects.set(elementIndex, object);
|
|
61055
60864
|
return object;
|
|
61056
60865
|
}
|
|
61057
60866
|
getElementsFromId(id2) {
|
|
@@ -61082,7 +60891,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61082
60891
|
const result = await request.getResult();
|
|
61083
60892
|
if (result.isSuccess) {
|
|
61084
60893
|
this._logger.log("Successfully loaded vim: ", this.source);
|
|
61085
|
-
this.
|
|
60894
|
+
this.visibility.reapplyStates();
|
|
61086
60895
|
this.reapplyColors();
|
|
61087
60896
|
} else {
|
|
61088
60897
|
this._logger.log("Failed to load vim: ", this.source);
|
|
@@ -61167,15 +60976,15 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61167
60976
|
return Promise.resolve(void 0);
|
|
61168
60977
|
}
|
|
61169
60978
|
if (nodes === "all") {
|
|
61170
|
-
return await this._rpc.
|
|
60979
|
+
return await this._rpc.RPCGetAABBForVim(this._handle);
|
|
61171
60980
|
}
|
|
61172
|
-
return await this._rpc.
|
|
60981
|
+
return await this._rpc.RPCGetAABBForElements(this._handle, nodes);
|
|
61173
60982
|
}
|
|
61174
60983
|
async getBoundingBox() {
|
|
61175
60984
|
if (!this.connected) {
|
|
61176
60985
|
return Promise.resolve(void 0);
|
|
61177
60986
|
}
|
|
61178
|
-
return await this._rpc.
|
|
60987
|
+
return await this._rpc.RPCGetAABBForVim(this._handle);
|
|
61179
60988
|
}
|
|
61180
60989
|
getColor(node) {
|
|
61181
60990
|
return this._nodeColors.get(node);
|
|
@@ -61561,13 +61370,13 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61561
61370
|
INVALID_HANDLE,
|
|
61562
61371
|
InputMode,
|
|
61563
61372
|
MaterialHandles,
|
|
61564
|
-
NodeState: NodeState$1,
|
|
61565
61373
|
RGB,
|
|
61566
61374
|
RGBA,
|
|
61567
61375
|
RGBA32,
|
|
61568
61376
|
Segment,
|
|
61569
61377
|
Viewer: Viewer$2,
|
|
61570
61378
|
VimLoadingStatus,
|
|
61379
|
+
VisibilityState: VisibilityState$1,
|
|
61571
61380
|
materialHandles
|
|
61572
61381
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
61573
61382
|
const index$6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -76055,7 +75864,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76055
75864
|
show: (instances) => {
|
|
76056
75865
|
for (let i2 of instances) {
|
|
76057
75866
|
for (let v of viewer.vims) {
|
|
76058
|
-
const o = v.
|
|
75867
|
+
const o = v.getElement(i2);
|
|
76059
75868
|
o.visible = true;
|
|
76060
75869
|
}
|
|
76061
75870
|
}
|
|
@@ -76063,7 +75872,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76063
75872
|
hide: (instances) => {
|
|
76064
75873
|
for (let i2 of instances) {
|
|
76065
75874
|
for (let v of viewer.vims) {
|
|
76066
|
-
const o = v.
|
|
75875
|
+
const o = v.getElement(i2);
|
|
76067
75876
|
o.visible = false;
|
|
76068
75877
|
}
|
|
76069
75878
|
}
|
|
@@ -76378,7 +76187,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76378
76187
|
getSceneBox: () => viewer.renderer.getBoundingBox()
|
|
76379
76188
|
}, section);
|
|
76380
76189
|
}
|
|
76381
|
-
const
|
|
76190
|
+
const VisibilityState = VisibilityState$1;
|
|
76382
76191
|
function useUltraIsolation(viewer) {
|
|
76383
76192
|
const adapter = createAdapter(viewer);
|
|
76384
76193
|
return useSharedIsolation(adapter);
|
|
@@ -76386,29 +76195,33 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76386
76195
|
function createAdapter(viewer) {
|
|
76387
76196
|
const ghost2 = useStateRef(false);
|
|
76388
76197
|
const hide = (objects) => {
|
|
76389
|
-
const state = ghost2.get() ?
|
|
76198
|
+
const state = ghost2.get() ? VisibilityState.GHOSTED : VisibilityState.HIDDEN;
|
|
76390
76199
|
if (objects === "all") {
|
|
76391
76200
|
viewer.vims.getAll().forEach((vim) => {
|
|
76392
|
-
vim.
|
|
76201
|
+
vim.visibility.setStateForAll(state);
|
|
76393
76202
|
});
|
|
76394
76203
|
return;
|
|
76395
76204
|
}
|
|
76396
|
-
|
|
76397
|
-
obj
|
|
76398
|
-
|
|
76205
|
+
for (const obj of objects) {
|
|
76206
|
+
if (viewer.selection.has(obj)) {
|
|
76207
|
+
obj.state = state == VisibilityState.GHOSTED ? VisibilityState.GHOSTED_HIGHLIGHTED : VisibilityState.HIDDEN_HIGHLIGHTED;
|
|
76208
|
+
} else {
|
|
76209
|
+
obj.state = state;
|
|
76210
|
+
}
|
|
76211
|
+
}
|
|
76399
76212
|
};
|
|
76400
76213
|
return {
|
|
76401
76214
|
onVisibilityChange: viewer.renderer.onSceneUpdated,
|
|
76402
76215
|
onSelectionChanged: viewer.selection.onSelectionChanged,
|
|
76403
76216
|
computeVisibility: () => getVisibilityState(viewer),
|
|
76404
76217
|
hasSelection: () => viewer.selection.any(),
|
|
76405
|
-
hasVisibleSelection: () => checkSelectionState(viewer, (s) => s ===
|
|
76406
|
-
hasHiddenSelection: () => checkSelectionState(viewer, (s) => s ===
|
|
76218
|
+
hasVisibleSelection: () => checkSelectionState(viewer, (s) => s === VisibilityState.VISIBLE || s === VisibilityState.HIGHLIGHTED),
|
|
76219
|
+
hasHiddenSelection: () => checkSelectionState(viewer, (s) => s === VisibilityState.HIDDEN || s === VisibilityState.GHOSTED),
|
|
76407
76220
|
clearSelection: () => viewer.selection.clear(),
|
|
76408
76221
|
isolateSelection: () => {
|
|
76409
76222
|
hide("all");
|
|
76410
76223
|
for (const obj of viewer.selection.getAll()) {
|
|
76411
|
-
obj.state =
|
|
76224
|
+
obj.state = VisibilityState.HIGHLIGHTED;
|
|
76412
76225
|
}
|
|
76413
76226
|
},
|
|
76414
76227
|
hideSelection: () => {
|
|
@@ -76417,7 +76230,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76417
76230
|
},
|
|
76418
76231
|
showSelection: () => {
|
|
76419
76232
|
viewer.selection.getAll().forEach((obj) => {
|
|
76420
|
-
obj.state =
|
|
76233
|
+
obj.state = VisibilityState.VISIBLE;
|
|
76421
76234
|
});
|
|
76422
76235
|
},
|
|
76423
76236
|
hideAll: () => {
|
|
@@ -76425,29 +76238,29 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76425
76238
|
},
|
|
76426
76239
|
showAll: () => {
|
|
76427
76240
|
for (const vim of viewer.vims.getAll()) {
|
|
76428
|
-
vim.
|
|
76241
|
+
vim.visibility.setStateForAll(VisibilityState.VISIBLE);
|
|
76429
76242
|
}
|
|
76430
76243
|
viewer.selection.getAll().forEach((obj) => {
|
|
76431
|
-
obj.state =
|
|
76244
|
+
obj.state = VisibilityState.HIGHLIGHTED;
|
|
76432
76245
|
});
|
|
76433
76246
|
},
|
|
76434
76247
|
isolate: (instances) => {
|
|
76435
76248
|
hide("all");
|
|
76436
76249
|
viewer.selection.getAll().forEach((obj) => {
|
|
76437
|
-
obj.state =
|
|
76250
|
+
obj.state = VisibilityState.HIGHLIGHTED;
|
|
76438
76251
|
});
|
|
76439
76252
|
},
|
|
76440
76253
|
show: (instances) => {
|
|
76441
76254
|
for (const vim of viewer.vims.getAll()) {
|
|
76442
76255
|
for (const i2 of instances) {
|
|
76443
|
-
vim.
|
|
76256
|
+
vim.getElement(i2).state = VisibilityState.VISIBLE;
|
|
76444
76257
|
}
|
|
76445
76258
|
}
|
|
76446
76259
|
},
|
|
76447
76260
|
hide: (instances) => {
|
|
76448
76261
|
for (const vim of viewer.vims.getAll()) {
|
|
76449
76262
|
for (const i2 of instances) {
|
|
76450
|
-
const obj = vim.
|
|
76263
|
+
const obj = vim.getElement(i2);
|
|
76451
76264
|
hide([obj]);
|
|
76452
76265
|
}
|
|
76453
76266
|
}
|
|
@@ -76458,9 +76271,9 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76458
76271
|
ghost2.set(show);
|
|
76459
76272
|
for (const vim of viewer.vims.getAll()) {
|
|
76460
76273
|
if (show) {
|
|
76461
|
-
vim.
|
|
76274
|
+
vim.visibility.replaceState(VisibilityState.HIDDEN, VisibilityState.GHOSTED);
|
|
76462
76275
|
} else {
|
|
76463
|
-
vim.
|
|
76276
|
+
vim.visibility.replaceState(VisibilityState.GHOSTED, VisibilityState.HIDDEN);
|
|
76464
76277
|
}
|
|
76465
76278
|
}
|
|
76466
76279
|
},
|
|
@@ -76488,8 +76301,8 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76488
76301
|
let allButSelectionFlag = true;
|
|
76489
76302
|
let onlySelectionFlag = true;
|
|
76490
76303
|
for (let v of viewer.vims.getAll()) {
|
|
76491
|
-
const allVisible = v.
|
|
76492
|
-
const allHidden = v.
|
|
76304
|
+
const allVisible = v.visibility.areAllInState([VisibilityState.VISIBLE, VisibilityState.HIGHLIGHTED]);
|
|
76305
|
+
const allHidden = v.visibility.areAllInState([VisibilityState.HIDDEN, VisibilityState.GHOSTED]);
|
|
76493
76306
|
all = all && allVisible;
|
|
76494
76307
|
none = none && allHidden;
|
|
76495
76308
|
onlySelectionFlag = onlySelection();
|