@vived/app 4.22.0 → 4.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AppObject/index.d.ts +1 -0
- package/lib/AppObject/index.js +1 -0
- package/lib/AppObject/printAppObjectDetails.d.ts +2 -0
- package/lib/AppObject/printAppObjectDetails.js +18 -0
- package/lib/Components/App/Adapters/index.d.ts +4 -0
- package/lib/Components/App/Adapters/index.js +16 -0
- package/lib/Components/App/Adapters/isAuthoringAdapter.d.ts +2 -0
- package/lib/Components/App/Adapters/isAuthoringAdapter.js +23 -0
- package/lib/Components/App/Adapters/isReviewingAdapter.d.ts +2 -0
- package/lib/Components/App/Adapters/isReviewingAdapter.js +23 -0
- package/lib/Components/App/Adapters/slideNavigationAdapter.d.ts +3 -0
- package/lib/Components/App/Adapters/slideNavigationAdapter.js +23 -0
- package/lib/Components/App/Adapters/slideTextAdapter.d.ts +2 -0
- package/lib/Components/App/Adapters/slideTextAdapter.js +23 -0
- package/lib/Components/App/Entity/BaseAppState.d.ts +2 -0
- package/lib/Components/App/Entity/BaseAppState.js +7 -0
- package/lib/Components/App/Mocks/IsAuthoringMock.d.ts +8 -0
- package/lib/Components/App/Mocks/IsAuthoringMock.js +15 -0
- package/lib/Components/App/Mocks/IsReviewingMock.d.ts +8 -0
- package/lib/Components/App/Mocks/IsReviewingMock.js +15 -0
- package/lib/Components/App/Mocks/SlideNavigationMock.d.ts +8 -0
- package/lib/Components/App/Mocks/SlideNavigationMock.js +15 -0
- package/lib/Components/App/Mocks/SlideTextMock.d.ts +8 -0
- package/lib/Components/App/Mocks/SlideTextMock.js +15 -0
- package/lib/Components/App/Mocks/index.d.ts +4 -0
- package/lib/Components/App/Mocks/index.js +4 -0
- package/lib/Components/App/PM/IsAuthoringPM.d.ts +2 -6
- package/lib/Components/App/PM/IsAuthoringPM.js +16 -10
- package/lib/Components/App/PM/IsReviewingPM.d.ts +2 -6
- package/lib/Components/App/PM/IsReviewingPM.js +16 -10
- package/lib/Components/App/PM/SlideNavigationPM.d.ts +12 -0
- package/lib/Components/App/PM/SlideNavigationPM.js +49 -0
- package/lib/Components/App/PM/SlideTextPM.d.ts +2 -5
- package/lib/Components/App/PM/SlideTextPM.js +17 -10
- package/lib/Components/App/PM/index.d.ts +1 -1
- package/lib/Components/App/PM/index.js +1 -1
- package/lib/Components/App/index.d.ts +1 -0
- package/lib/Components/App/index.js +1 -0
- package/lib/Components/ChannelModel/Adapters/activeModelAdapter.js +2 -2
- package/lib/Components/ChannelModel/Adapters/activeModelObjectListAdapter.d.ts +2 -0
- package/lib/Components/ChannelModel/Adapters/activeModelObjectListAdapter.js +23 -0
- package/lib/Components/ChannelModel/Adapters/index.d.ts +2 -0
- package/lib/Components/ChannelModel/Adapters/index.js +2 -0
- package/lib/Components/ChannelModel/Adapters/modelObjectsAreHiddenAdapter.d.ts +2 -0
- package/lib/Components/ChannelModel/Adapters/modelObjectsAreHiddenAdapter.js +27 -0
- package/lib/Components/ChannelModel/Controllers/index.d.ts +1 -1
- package/lib/Components/ChannelModel/Controllers/index.js +1 -1
- package/lib/Components/ChannelModel/Controllers/setModelObjectLabel.js +1 -1
- package/lib/Components/ChannelModel/Controllers/unhideAllActiveObjects.d.ts +2 -0
- package/lib/Components/ChannelModel/Controllers/unhideAllActiveObjects.js +23 -0
- package/lib/Components/ChannelModel/Entities/ChannelModel.d.ts +2 -0
- package/lib/Components/ChannelModel/Entities/ChannelModel.js +11 -2
- package/lib/Components/ChannelModel/Entities/ChannelModelObject.d.ts +2 -4
- package/lib/Components/ChannelModel/Entities/ChannelModelObject.js +3 -20
- package/lib/Components/ChannelModel/Mocks/ActiveModelObjectListMock.d.ts +8 -0
- package/lib/Components/ChannelModel/Mocks/ActiveModelObjectListMock.js +15 -0
- package/lib/Components/ChannelModel/Mocks/ModelObjectsAreHiddenPMMock.d.ts +7 -0
- package/lib/Components/ChannelModel/Mocks/ModelObjectsAreHiddenPMMock.js +11 -0
- package/lib/Components/ChannelModel/Mocks/UnhideAllChannelModelObjectsUCMock.d.ts +7 -0
- package/lib/Components/ChannelModel/Mocks/UnhideAllChannelModelObjectsUCMock.js +11 -0
- package/lib/Components/ChannelModel/Mocks/index.d.ts +3 -0
- package/lib/Components/ChannelModel/Mocks/index.js +3 -0
- package/lib/Components/ChannelModel/PMs/ActiveModelObjectListPM.d.ts +14 -0
- package/lib/Components/ChannelModel/PMs/ActiveModelObjectListPM.js +60 -0
- package/lib/Components/ChannelModel/PMs/ChannelModelObjectPM.js +2 -2
- package/lib/Components/ChannelModel/PMs/ChannelModelPM.js +1 -1
- package/lib/Components/ChannelModel/PMs/ModelObjectsAreHiddenPM.d.ts +6 -0
- package/lib/Components/ChannelModel/PMs/ModelObjectsAreHiddenPM.js +58 -0
- package/lib/Components/ChannelModel/PMs/index.d.ts +2 -0
- package/lib/Components/ChannelModel/PMs/index.js +2 -0
- package/lib/Components/ChannelModel/UC/SelectChannelModelUC.js +3 -0
- package/lib/Components/ChannelModel/UC/UnhideAllAppObjectsUndoRedo.d.ts +10 -0
- package/lib/Components/ChannelModel/UC/UnhideAllAppObjectsUndoRedo.js +39 -0
- package/lib/Components/ChannelModel/UC/UnhideAllChannelModelObjectsUC.d.ts +7 -0
- package/lib/Components/ChannelModel/UC/UnhideAllChannelModelObjectsUC.js +51 -0
- package/lib/Components/ChannelModel/UC/index.d.ts +2 -0
- package/lib/Components/ChannelModel/UC/index.js +2 -0
- package/lib/Components/Enablement/Adapters/enablementAdapter.d.ts +2 -0
- package/lib/Components/Enablement/Adapters/enablementAdapter.js +23 -0
- package/lib/Components/Enablement/Adapters/index.d.ts +1 -0
- package/lib/Components/{RequestHandler/Mocks → Enablement/Adapters}/index.js +1 -1
- package/lib/Components/Enablement/Entities/EnablementEntity.d.ts +17 -0
- package/lib/Components/Enablement/Entities/EnablementEntity.js +37 -0
- package/lib/Components/Enablement/Entities/index.d.ts +1 -1
- package/lib/Components/Enablement/Entities/index.js +1 -1
- package/lib/Components/Enablement/Mocks/EnabledStatePMMock.d.ts +7 -0
- package/lib/Components/Enablement/Mocks/EnabledStatePMMock.js +11 -0
- package/lib/Components/Enablement/Mocks/index.d.ts +1 -0
- package/lib/Components/Enablement/Mocks/index.js +13 -0
- package/lib/Components/Enablement/PM/EnabledStatePM.d.ts +8 -0
- package/lib/Components/Enablement/PM/EnabledStatePM.js +46 -0
- package/lib/Components/Enablement/PM/index.d.ts +1 -1
- package/lib/Components/Enablement/PM/index.js +1 -1
- package/lib/Components/Enablement/index.d.ts +2 -0
- package/lib/Components/Enablement/index.js +2 -0
- package/lib/Components/Hideable/Adapters/index.d.ts +1 -0
- package/lib/Components/Hideable/Adapters/index.js +13 -0
- package/lib/Components/Hideable/Adapters/isHiddenAdapter.d.ts +2 -0
- package/lib/Components/Hideable/Adapters/isHiddenAdapter.js +23 -0
- package/lib/Components/Hideable/Controllers/HideMC.d.ts +10 -0
- package/lib/Components/Hideable/Controllers/HideMC.js +32 -0
- package/lib/Components/Hideable/Controllers/HideTC.d.ts +10 -0
- package/lib/Components/Hideable/Controllers/HideTC.js +32 -0
- package/lib/Components/Hideable/Controllers/clickToggleIsHidden.d.ts +2 -0
- package/lib/Components/Hideable/Controllers/clickToggleIsHidden.js +14 -0
- package/lib/Components/Hideable/Controllers/index.d.ts +3 -0
- package/lib/Components/{Question/Mocks → Hideable/Controllers}/index.js +3 -2
- package/lib/Components/Hideable/Entities/Hideable.d.ts +2 -2
- package/lib/Components/Hideable/Entities/Hideable.js +6 -2
- package/lib/Components/Hideable/Mocks/HideUCMock.d.ts +8 -0
- package/lib/Components/Hideable/Mocks/HideUCMock.js +12 -0
- package/lib/Components/Hideable/Mocks/IsHiddenPMock.d.ts +7 -0
- package/lib/Components/Hideable/Mocks/IsHiddenPMock.js +11 -0
- package/lib/Components/Hideable/Mocks/TryHideWithPickUCMock.d.ts +9 -0
- package/lib/Components/Hideable/Mocks/TryHideWithPickUCMock.js +16 -0
- package/lib/Components/Hideable/Mocks/index.d.ts +3 -0
- package/lib/Components/Hideable/Mocks/index.js +15 -0
- package/lib/Components/Hideable/PM/IsHiddenPM.d.ts +3 -7
- package/lib/Components/Hideable/PM/IsHiddenPM.js +20 -12
- package/lib/Components/Hideable/UCs/HideUC.d.ts +8 -0
- package/lib/Components/Hideable/UCs/HideUC.js +74 -0
- package/lib/Components/Hideable/UCs/TryHideWithPickUC.d.ts +9 -0
- package/lib/Components/Hideable/UCs/TryHideWithPickUC.js +62 -0
- package/lib/Components/Hideable/UCs/index.d.ts +2 -0
- package/lib/Components/Hideable/UCs/index.js +14 -0
- package/lib/Components/Hideable/index.d.ts +4 -0
- package/lib/Components/Hideable/index.js +4 -0
- package/lib/Components/HoverLabel/Adapters/allowHoverLabelAdapter.d.ts +2 -0
- package/lib/Components/HoverLabel/Adapters/allowHoverLabelAdapter.js +23 -0
- package/lib/Components/HoverLabel/Adapters/index.d.ts +3 -0
- package/lib/Components/HoverLabel/Adapters/index.js +15 -0
- package/lib/Components/HoverLabel/Adapters/screenHoverLabelAdapter.d.ts +3 -0
- package/lib/Components/HoverLabel/Adapters/screenHoverLabelAdapter.js +23 -0
- package/lib/Components/HoverLabel/Adapters/worldHoverLabelAdapter.d.ts +3 -0
- package/lib/Components/HoverLabel/Adapters/worldHoverLabelAdapter.js +23 -0
- package/lib/Components/HoverLabel/Controllers/HoverLabelMouse.js +2 -2
- package/lib/Components/HoverLabel/Controllers/HoverLabelTouch.js +2 -2
- package/lib/Components/HoverLabel/Controllers/index.d.ts +1 -1
- package/lib/Components/HoverLabel/Controllers/index.js +1 -1
- package/lib/Components/HoverLabel/Controllers/toggleAllowHoverLabel.d.ts +2 -0
- package/lib/Components/HoverLabel/Controllers/toggleAllowHoverLabel.js +13 -0
- package/lib/Components/HoverLabel/Entities/HoverLabelEntity.d.ts +23 -0
- package/lib/Components/HoverLabel/Entities/HoverLabelEntity.js +102 -0
- package/lib/Components/HoverLabel/Entities/index.d.ts +1 -1
- package/lib/Components/HoverLabel/Entities/index.js +1 -1
- package/lib/Components/HoverLabel/Mocks/AllowHoverLabelPmMock.d.ts +8 -0
- package/lib/Components/HoverLabel/Mocks/AllowHoverLabelPmMock.js +15 -0
- package/lib/Components/HoverLabel/Mocks/ScreenHoverLabelPmMock.d.ts +8 -0
- package/lib/Components/HoverLabel/Mocks/ScreenHoverLabelPmMock.js +15 -0
- package/lib/Components/HoverLabel/Mocks/WorldHoverLabelPmMock.d.ts +8 -0
- package/lib/Components/HoverLabel/Mocks/WorldHoverLabelPmMock.js +15 -0
- package/lib/Components/HoverLabel/Mocks/index.d.ts +3 -0
- package/lib/Components/HoverLabel/Mocks/index.js +3 -0
- package/lib/Components/HoverLabel/PM/AllowHoverLabelPM.d.ts +4 -9
- package/lib/Components/HoverLabel/PM/AllowHoverLabelPM.js +16 -26
- package/lib/Components/HoverLabel/PM/ScreenHoverLabelPM.d.ts +2 -6
- package/lib/Components/HoverLabel/PM/ScreenHoverLabelPM.js +18 -20
- package/lib/Components/HoverLabel/PM/WorldHoverLabelPM.d.ts +2 -6
- package/lib/Components/HoverLabel/PM/WorldHoverLabelPM.js +18 -20
- package/lib/Components/HoverLabel/UseCases/SerializeAllowHoverLabel.js +2 -2
- package/lib/Components/HoverLabel/UseCases/ToggleAllowHoverLabel.js +2 -2
- package/lib/Components/HoverLabel/UseCases/TryShowHoverLabel.js +3 -3
- package/lib/Components/HoverLabel/index.d.ts +2 -0
- package/lib/Components/HoverLabel/index.js +2 -0
- package/lib/Components/KeyboardInput/index.d.ts +1 -0
- package/lib/Components/KeyboardInput/index.js +1 -0
- package/lib/Components/Label/Adapters/index.d.ts +1 -0
- package/lib/Components/{Landmarks/Mocks → Label/Adapters}/index.js +1 -1
- package/lib/Components/Label/Adapters/labelAdapter.d.ts +3 -0
- package/lib/Components/Label/Adapters/labelAdapter.js +23 -0
- package/lib/Components/Label/Entities/Label.d.ts +2 -1
- package/lib/Components/Label/Entities/Label.js +6 -0
- package/lib/Components/Label/Entities/LabelEntity.d.ts +16 -0
- package/lib/Components/Label/Entities/LabelEntity.js +67 -0
- package/lib/Components/Label/Entities/index.d.ts +1 -1
- package/lib/Components/Label/Entities/index.js +1 -1
- package/lib/Components/Label/Mocks/LabelPMMock.d.ts +7 -0
- package/lib/Components/Label/Mocks/LabelPMMock.js +11 -0
- package/lib/Components/Label/Mocks/index.d.ts +1 -0
- package/lib/Components/{zSpace/Controllers → Label/Mocks}/index.js +1 -1
- package/lib/Components/Label/PM/LabelPM.d.ts +3 -7
- package/lib/Components/Label/PM/LabelPM.js +26 -20
- package/lib/Components/Label/UC/ClearCustomLabelUC.d.ts +1 -1
- package/lib/Components/Label/UC/ClearCustomLabelUC.js +3 -4
- package/lib/Components/Label/UC/ClearCustomLabelUndoRedo.js +1 -1
- package/lib/Components/Label/UC/SetCustomLabelUC.d.ts +1 -1
- package/lib/Components/Label/UC/SetCustomLabelUC.js +3 -4
- package/lib/Components/Label/UC/SetCustomLabelUndoRedo.js +1 -1
- package/lib/Components/Label/index.d.ts +3 -1
- package/lib/Components/Label/index.js +3 -1
- package/lib/Components/Landmarks/Entities/LandmarkEntity.d.ts +2 -2
- package/lib/Components/Landmarks/Entities/LandmarkEntity.js +1 -1
- package/lib/Components/Landmarks/Mocks/MockLandmark.d.ts +2 -2
- package/lib/Components/Landmarks/UseCases/AddLandmarkUC.js +1 -1
- package/lib/Components/Landmarks/UseCases/SerializeLandmarks.d.ts +1 -1
- package/lib/Components/Landmarks/UseCases/SerializeLandmarks.js +4 -4
- package/lib/Components/Landmarks/UseCases/TryAddNewLandmarkUC.js +1 -1
- package/lib/Components/OverlayColor/Adapters/index.d.ts +1 -0
- package/lib/Components/OverlayColor/Adapters/index.js +13 -0
- package/lib/Components/OverlayColor/Adapters/overlayColorAdapter.d.ts +3 -0
- package/lib/Components/OverlayColor/Adapters/overlayColorAdapter.js +24 -0
- package/lib/Components/OverlayColor/Entities/OverlayColor.d.ts +2 -1
- package/lib/Components/OverlayColor/Entities/OverlayColor.js +4 -0
- package/lib/Components/OverlayColor/Mocks/OverlayColorPMMock.d.ts +7 -0
- package/lib/Components/OverlayColor/Mocks/OverlayColorPMMock.js +11 -0
- package/lib/Components/OverlayColor/Mocks/index.d.ts +1 -0
- package/lib/Components/OverlayColor/Mocks/index.js +13 -0
- package/lib/Components/OverlayColor/PM/OverlayColorPM.d.ts +2 -6
- package/lib/Components/OverlayColor/PM/OverlayColorPM.js +20 -12
- package/lib/Components/OverlayColor/index.d.ts +3 -1
- package/lib/Components/OverlayColor/index.js +3 -1
- package/lib/Components/RequestHandler/UC/SetAppStateUC.d.ts +9 -2
- package/lib/Components/RequestHandler/UC/SetAppStateUC.js +35 -27
- package/lib/Components/Selection/Adapters/index.d.ts +2 -0
- package/lib/Components/Selection/Adapters/index.js +14 -0
- package/lib/Components/Selection/Adapters/selectableStateAdapter.d.ts +3 -0
- package/lib/Components/Selection/Adapters/selectableStateAdapter.js +23 -0
- package/lib/Components/Selection/Adapters/selectedObjectAdapter.d.ts +2 -0
- package/lib/Components/Selection/Adapters/selectedObjectAdapter.js +23 -0
- package/lib/Components/Selection/Controller/MouseHoverOnAppObject.js +1 -1
- package/lib/Components/Selection/Controller/MousePressOnAppObject.js +3 -3
- package/lib/Components/Selection/Controller/MouseSelectAppObject.js +1 -1
- package/lib/Components/Selection/Controller/{StylusHoverOnAppObject.d.ts → StylusHoverOnAppObjectSC.d.ts} +3 -3
- package/lib/Components/Selection/Controller/{StylusHoverOnAppObject.js → StylusHoverOnAppObjectSC.js} +10 -11
- package/lib/Components/Selection/Controller/StylusPressOnAppObjectSC.d.ts +18 -0
- package/lib/Components/Selection/Controller/{StylusPressOnAppObject.js → StylusPressOnAppObjectSC.js} +18 -25
- package/lib/Components/Selection/Controller/StylusSelectAppObjectSC.d.ts +11 -0
- package/lib/Components/Selection/Controller/StylusSelectAppObjectSC.js +39 -0
- package/lib/Components/Selection/Controller/TapToSelectAppObject.js +1 -1
- package/lib/Components/Selection/Controller/TouchPressOnAppObject.js +4 -4
- package/lib/Components/Selection/Controller/index.d.ts +5 -3
- package/lib/Components/Selection/Controller/index.js +5 -3
- package/lib/Components/Selection/Controller/selectAppObject.d.ts +2 -0
- package/lib/Components/Selection/Controller/selectAppObject.js +14 -0
- package/lib/Components/Selection/Controller/setHoverOnAppObject.d.ts +2 -0
- package/lib/Components/Selection/Controller/setHoverOnAppObject.js +14 -0
- package/lib/Components/Selection/Entities/Selection.d.ts +1 -0
- package/lib/Components/Selection/Entities/Selection.js +9 -3
- package/lib/Components/Selection/Mocks/HoverAppObjectUCMock.d.ts +10 -0
- package/lib/Components/Selection/Mocks/HoverAppObjectUCMock.js +14 -0
- package/lib/Components/Selection/Mocks/PressAppObjectUCMock.d.ts +10 -0
- package/lib/Components/Selection/Mocks/PressAppObjectUCMock.js +14 -0
- package/lib/Components/Selection/Mocks/SelectAppObjectUCMock.d.ts +10 -0
- package/lib/Components/Selection/Mocks/SelectAppObjectUCMock.js +14 -0
- package/lib/Components/Selection/Mocks/SelectableStatePMMock.d.ts +7 -0
- package/lib/Components/Selection/Mocks/SelectableStatePMMock.js +11 -0
- package/lib/Components/Selection/Mocks/SelectedObjectPMMock.d.ts +8 -0
- package/lib/Components/Selection/Mocks/SelectedObjectPMMock.js +15 -0
- package/lib/Components/Selection/Mocks/index.d.ts +5 -0
- package/lib/Components/Selection/Mocks/index.js +17 -0
- package/lib/Components/Selection/PM/SelectableStatePM.d.ts +5 -7
- package/lib/Components/Selection/PM/SelectableStatePM.js +25 -18
- package/lib/Components/Selection/PM/SelectedObjectPM.d.ts +2 -0
- package/lib/Components/Selection/PM/SelectedObjectPM.js +10 -14
- package/lib/Components/Selection/UC/HoverAppObjectUC.d.ts +4 -2
- package/lib/Components/Selection/UC/HoverAppObjectUC.js +10 -6
- package/lib/Components/Selection/UC/PressAppObjectUC.d.ts +4 -2
- package/lib/Components/Selection/UC/PressAppObjectUC.js +10 -6
- package/lib/Components/Selection/UC/SelectAppObjectUC.d.ts +4 -2
- package/lib/Components/Selection/UC/SelectAppObjectUC.js +10 -6
- package/lib/Components/Selection/index.d.ts +4 -2
- package/lib/Components/Selection/index.js +4 -2
- package/lib/Components/Tools/Adapters/index.d.ts +1 -0
- package/lib/Components/{MouseInput/Mocks → Tools/Adapters}/index.js +1 -1
- package/lib/Components/Tools/Adapters/toolAdapter.d.ts +3 -0
- package/lib/Components/Tools/Adapters/toolAdapter.js +26 -0
- package/lib/Components/Tools/Controller/ToolHotkeys.js +1 -1
- package/lib/Components/Tools/Entities/ToolEntity.d.ts +5 -2
- package/lib/Components/Tools/Entities/ToolEntity.js +28 -8
- package/lib/Components/Tools/Entities/ToolRepository.js +4 -1
- package/lib/Components/Tools/Mocks/ToolPMMock.d.ts +8 -0
- package/lib/Components/Tools/Mocks/ToolPMMock.js +15 -0
- package/lib/Components/Tools/Mocks/index.d.ts +1 -0
- package/lib/Components/Tools/Mocks/index.js +13 -0
- package/lib/Components/Tools/PM/ToolPM.d.ts +16 -4
- package/lib/Components/Tools/PM/ToolPM.js +28 -21
- package/lib/Components/Tools/index.d.ts +3 -1
- package/lib/Components/Tools/index.js +3 -1
- package/lib/Components/TouchController/Entities/TouchInput.d.ts +1 -0
- package/lib/Components/TouchController/Entities/TouchInput.js +34 -0
- package/lib/Components/TouchController/index.d.ts +1 -0
- package/lib/Components/TouchController/index.js +1 -0
- package/lib/Components/Transform3D/Adapters/canBeStuckAdapter.d.ts +2 -0
- package/lib/Components/Transform3D/Adapters/canBeStuckAdapter.js +23 -0
- package/lib/Components/Transform3D/Adapters/index.d.ts +2 -0
- package/lib/Components/{XR/Mocks → Transform3D/Adapters}/index.js +2 -2
- package/lib/Components/Transform3D/Adapters/transform3dAdapter.d.ts +3 -0
- package/lib/Components/Transform3D/Adapters/transform3dAdapter.js +23 -0
- package/lib/Components/Transform3D/Entities/Transform3D.d.ts +2 -1
- package/lib/Components/Transform3D/Entities/Transform3D.js +4 -0
- package/lib/Components/Transform3D/Mocks/CanBeStuckPmMock.d.ts +7 -0
- package/lib/Components/Transform3D/Mocks/CanBeStuckPmMock.js +11 -0
- package/lib/Components/Transform3D/Mocks/Transform3dPmMock.d.ts +7 -0
- package/lib/Components/Transform3D/Mocks/Transform3dPmMock.js +11 -0
- package/lib/Components/Transform3D/Mocks/index.d.ts +2 -0
- package/lib/Components/Transform3D/Mocks/index.js +2 -0
- package/lib/Components/Transform3D/PM/Transform3DPM.d.ts +1 -0
- package/lib/Components/Transform3D/PM/Transform3DPM.js +6 -13
- package/lib/Components/Transform3D/index.d.ts +1 -0
- package/lib/Components/Transform3D/index.js +1 -0
- package/lib/Components/UndoRedo/Mocks/MockUndoRedo.d.ts +2 -0
- package/lib/Components/UndoRedo/Mocks/MockUndoRedo.js +5 -1
- package/lib/Components/UndoRedo/index.d.ts +1 -0
- package/lib/Components/UndoRedo/index.js +1 -0
- package/package.json +1 -1
- package/lib/Components/App/PM/HasNextPreviousStatePM.d.ts +0 -15
- package/lib/Components/App/PM/HasNextPreviousStatePM.js +0 -44
- package/lib/Components/ChannelModel/Mocks/ProcessChannelModelUCMock.d.ts +0 -8
- package/lib/Components/ChannelModel/Mocks/ProcessChannelModelUCMock.js +0 -15
- package/lib/Components/ChannelModel/UC/InitializeChannelModelFromGLB.d.ts +0 -0
- package/lib/Components/ChannelModel/UC/InitializeChannelModelFromGLB.js +0 -1
- package/lib/Components/ChannelModel/UC/ProcessChannelModelUC.d.ts +0 -6
- package/lib/Components/ChannelModel/UC/ProcessChannelModelUC.js +0 -9
- package/lib/Components/ChannelModel/UC/SetupChannelModelUC.d.ts +0 -9
- package/lib/Components/ChannelModel/UC/SetupChannelModelUC.js +0 -11
- package/lib/Components/HoverLabel/PM/HoverLabelPM.d.ts +0 -19
- package/lib/Components/HoverLabel/PM/HoverLabelPM.js +0 -65
- package/lib/Components/Landmarks/Mocks/index.d.ts +0 -1
- package/lib/Components/MouseInput/Mocks/index.d.ts +0 -1
- package/lib/Components/Question/Mocks/index.d.ts +0 -2
- package/lib/Components/RequestHandler/Mocks/index.d.ts +0 -1
- package/lib/Components/SceneRoot/Controllers/StylusMove.d.ts +0 -14
- package/lib/Components/SceneRoot/Controllers/StylusMove.js +0 -56
- package/lib/Components/SceneRoot/Controllers/StylusScale.d.ts +0 -14
- package/lib/Components/SceneRoot/Controllers/StylusScale.js +0 -58
- package/lib/Components/Selection/Controller/StylusPressOnAppObject.d.ts +0 -18
- package/lib/Components/Selection/Controller/StylusSelectAppObject.d.ts +0 -11
- package/lib/Components/Selection/Controller/StylusSelectAppObject.js +0 -44
- package/lib/Components/XR/Mocks/index.d.ts +0 -2
- package/lib/Components/zSpace/Controllers/EmulateStylus.d.ts +0 -10
- package/lib/Components/zSpace/Controllers/EmulateStylus.js +0 -113
- package/lib/Components/zSpace/Controllers/ZSpaceScaleRoot.d.ts +0 -14
- package/lib/Components/zSpace/Controllers/ZSpaceScaleRoot.js +0 -57
- package/lib/Components/zSpace/Controllers/index.d.ts +0 -1
- package/lib/Components/zSpace/Entities/ZSpaceStylusEntity.d.ts +0 -29
- package/lib/Components/zSpace/Entities/ZSpaceStylusEntity.js +0 -115
- package/lib/Components/zSpace/Mocks/index.d.ts +0 -1
- package/lib/Components/zSpace/Mocks/index.js +0 -13
- package/lib/Components/zSpace/PM/StylusColorLengthPM.d.ts +0 -13
- package/lib/Components/zSpace/PM/StylusColorLengthPM.js +0 -77
- package/lib/Components/zSpace/PM/StylusIsInUsePM.d.ts +0 -6
- package/lib/Components/zSpace/PM/StylusIsInUsePM.js +0 -42
- package/lib/Types/ChannelModelData.d.ts +0 -67
- package/lib/Types/ChannelModelData.js +0 -21
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StylusMove = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const ZSpaceStylusEntity_1 = require("../../zSpace/Entities/ZSpaceStylusEntity");
|
|
6
|
-
const StylusMoveTransformUC_1 = require("../../Transform3D/UC/StylusMoveTransformUC");
|
|
7
|
-
const zSpace_1 = require("../../zSpace");
|
|
8
|
-
class StylusMove extends AppObjectController_1.AppObjectController {
|
|
9
|
-
constructor(appObject) {
|
|
10
|
-
super(appObject, StylusMove.type);
|
|
11
|
-
this.isMoving = false;
|
|
12
|
-
this.allow = (button) => {
|
|
13
|
-
if (button === ZSpaceStylusEntity_1.ZSpaceStylusButton.PRIMARY)
|
|
14
|
-
return true;
|
|
15
|
-
return false;
|
|
16
|
-
};
|
|
17
|
-
this.onButtonDown = (button) => {
|
|
18
|
-
var _a;
|
|
19
|
-
this.isMoving = false;
|
|
20
|
-
if (!this.stylus)
|
|
21
|
-
return;
|
|
22
|
-
if (!this.allow(button))
|
|
23
|
-
return;
|
|
24
|
-
(_a = this.stylusRootMovementUC) === null || _a === void 0 ? void 0 : _a.initialize();
|
|
25
|
-
this.isMoving = true;
|
|
26
|
-
};
|
|
27
|
-
this.onButtonUp = () => {
|
|
28
|
-
var _a;
|
|
29
|
-
this.isMoving = true;
|
|
30
|
-
if (!this.stylus)
|
|
31
|
-
return;
|
|
32
|
-
(_a = this.stylusRootMovementUC) === null || _a === void 0 ? void 0 : _a.stop();
|
|
33
|
-
};
|
|
34
|
-
this.onStylusMove = () => {
|
|
35
|
-
var _a;
|
|
36
|
-
if (!this.stylus || !this.isMoving)
|
|
37
|
-
return;
|
|
38
|
-
(_a = this.stylusRootMovementUC) === null || _a === void 0 ? void 0 : _a.move();
|
|
39
|
-
};
|
|
40
|
-
const zSpaceEntity = zSpace_1.ZSpaceEntity.get(this.appObject.appObjectRepo);
|
|
41
|
-
if (!zSpaceEntity) {
|
|
42
|
-
this.warn("Unable to find ZSpaceEntity");
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
this.stylus = zSpaceEntity.stylus;
|
|
46
|
-
this.stylusRootMovementUC = appObject.getComponent(StylusMoveTransformUC_1.StylusMoveTransformUC.type);
|
|
47
|
-
if (!this.stylusRootMovementUC) {
|
|
48
|
-
this.warn("StylusMoveSceneRoot has been added to an App Object that does not have a StylusMoveTransformUC");
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
this.stylus.registerController(this);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.StylusMove = StylusMove;
|
|
56
|
-
StylusMove.type = "StylusMove";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { ZSpaceStylusButton, ZSpaceStylusController } from "../../zSpace/Entities/ZSpaceStylusEntity";
|
|
4
|
-
export declare class StylusScale extends AppObjectController implements ZSpaceStylusController {
|
|
5
|
-
static readonly type = "ZSpaceScaleRoot";
|
|
6
|
-
private stylus?;
|
|
7
|
-
private scaleSceneRootWithRay?;
|
|
8
|
-
private isScaling;
|
|
9
|
-
allow: (button: ZSpaceStylusButton) => boolean;
|
|
10
|
-
onButtonDown: (button: ZSpaceStylusButton) => void;
|
|
11
|
-
onStylusMove: () => void;
|
|
12
|
-
onButtonUp: () => void;
|
|
13
|
-
constructor(appObject: AppObject);
|
|
14
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StylusScale = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const ScaleSceneRootWithRay_1 = require("../UC/ScaleSceneRootWithRay");
|
|
6
|
-
const ZSpaceStylusEntity_1 = require("../../zSpace/Entities/ZSpaceStylusEntity");
|
|
7
|
-
const zSpace_1 = require("../../zSpace");
|
|
8
|
-
class StylusScale extends AppObjectController_1.AppObjectController {
|
|
9
|
-
constructor(appObject) {
|
|
10
|
-
super(appObject, StylusScale.type);
|
|
11
|
-
this.isScaling = false;
|
|
12
|
-
this.allow = (button) => {
|
|
13
|
-
if (button === ZSpaceStylusEntity_1.ZSpaceStylusButton.BACK_RIGHT)
|
|
14
|
-
return true;
|
|
15
|
-
return false;
|
|
16
|
-
};
|
|
17
|
-
this.onButtonDown = (button) => {
|
|
18
|
-
var _a;
|
|
19
|
-
this.isScaling = false;
|
|
20
|
-
if (!this.stylus)
|
|
21
|
-
return;
|
|
22
|
-
if (!this.allow(button))
|
|
23
|
-
return;
|
|
24
|
-
const pointerRay = this.stylus.pickRay;
|
|
25
|
-
const rayStart = this.stylus.transform.localPosition;
|
|
26
|
-
(_a = this.scaleSceneRootWithRay) === null || _a === void 0 ? void 0 : _a.initializeScale(pointerRay, rayStart);
|
|
27
|
-
this.isScaling = true;
|
|
28
|
-
};
|
|
29
|
-
this.onStylusMove = () => {
|
|
30
|
-
var _a;
|
|
31
|
-
if (!this.stylus)
|
|
32
|
-
return;
|
|
33
|
-
if (!this.isScaling)
|
|
34
|
-
return;
|
|
35
|
-
const pointerRay = this.stylus.pickRay;
|
|
36
|
-
const rayStart = this.stylus.transform.localPosition;
|
|
37
|
-
(_a = this.scaleSceneRootWithRay) === null || _a === void 0 ? void 0 : _a.doScale(pointerRay, rayStart);
|
|
38
|
-
};
|
|
39
|
-
this.onButtonUp = () => {
|
|
40
|
-
this.isScaling = false;
|
|
41
|
-
};
|
|
42
|
-
const zSpaceEntity = zSpace_1.ZSpaceEntity.get(this.appObject.appObjectRepo);
|
|
43
|
-
if (!zSpaceEntity) {
|
|
44
|
-
this.warn("Unable to find ZSpaceEntity");
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
this.stylus = zSpaceEntity.stylus;
|
|
48
|
-
this.scaleSceneRootWithRay = appObject.getComponent(ScaleSceneRootWithRay_1.ScaleSceneRootWithRay.type);
|
|
49
|
-
if (!this.scaleSceneRootWithRay) {
|
|
50
|
-
this.warn("StylusMoveSceneRoot has been added to an App Object that does not have a scaleSceneRootWithRay");
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
this.stylus.registerController(this);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.StylusScale = StylusScale;
|
|
58
|
-
StylusScale.type = "ZSpaceScaleRoot";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { ZSpaceStylusButton, ZSpaceStylusController } from "../../zSpace/Entities/ZSpaceStylusEntity";
|
|
4
|
-
export declare class StylusPressOnAppObject extends AppObjectController implements ZSpaceStylusController {
|
|
5
|
-
static readonly type = "StylusPressOnAppObject";
|
|
6
|
-
static readonly maxTapDistancePx = 5;
|
|
7
|
-
private stylus?;
|
|
8
|
-
private pressUC?;
|
|
9
|
-
private startPosition;
|
|
10
|
-
private endPosition;
|
|
11
|
-
private pressedID;
|
|
12
|
-
private isPressed;
|
|
13
|
-
allow: (button: ZSpaceStylusButton) => boolean;
|
|
14
|
-
onButtonDown: (button: ZSpaceStylusButton) => void;
|
|
15
|
-
onButtonUp: (button: ZSpaceStylusButton) => void;
|
|
16
|
-
onStylusMove: () => void;
|
|
17
|
-
constructor(appObject: AppObject);
|
|
18
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { ZSpaceStylusButton, ZSpaceStylusController } from "../../zSpace/Entities/ZSpaceStylusEntity";
|
|
4
|
-
export declare class StylusSelectAppObject extends AppObjectController implements ZSpaceStylusController {
|
|
5
|
-
static readonly type = "StylusSelectAppObject";
|
|
6
|
-
private stylus?;
|
|
7
|
-
private selectUC?;
|
|
8
|
-
allow: () => boolean;
|
|
9
|
-
onButtonClick: (button: ZSpaceStylusButton) => void;
|
|
10
|
-
constructor(appObject: AppObject);
|
|
11
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StylusSelectAppObject = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const ZSpaceEntity_1 = require("../../zSpace/Entities/ZSpaceEntity");
|
|
6
|
-
const UC_1 = require("../UC");
|
|
7
|
-
class StylusSelectAppObject extends AppObjectController_1.AppObjectController {
|
|
8
|
-
constructor(appObject) {
|
|
9
|
-
super(appObject, StylusSelectAppObject.type);
|
|
10
|
-
this.allow = () => {
|
|
11
|
-
return true;
|
|
12
|
-
};
|
|
13
|
-
this.onButtonClick = (button) => {
|
|
14
|
-
if (button !== 0)
|
|
15
|
-
return;
|
|
16
|
-
if (!this.stylus)
|
|
17
|
-
return;
|
|
18
|
-
if (!this.selectUC)
|
|
19
|
-
return;
|
|
20
|
-
if (!this.allow())
|
|
21
|
-
return;
|
|
22
|
-
const pointerRay = this.stylus.pickRay;
|
|
23
|
-
this.selectUC.trySelectSceneObject(pointerRay);
|
|
24
|
-
};
|
|
25
|
-
const zSpaceEntity = ZSpaceEntity_1.ZSpaceEntity.get(this.appObjects);
|
|
26
|
-
if (!zSpaceEntity) {
|
|
27
|
-
this.warn("Unable to find ZSpaceEntity");
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
this.stylus = zSpaceEntity.stylus;
|
|
31
|
-
this.selectUC = appObject.getComponent(UC_1.SelectAppObjectUC.type);
|
|
32
|
-
if (!this.stylus) {
|
|
33
|
-
console.warn("StylusInputPointer Controller has been added to an app object that does not have a ZSpaceStylusEntity");
|
|
34
|
-
}
|
|
35
|
-
else if (!this.selectUC) {
|
|
36
|
-
console.warn("SelectAppObjectUC has not been found on any objects in the app object repo");
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
this.stylus.registerController(this);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.StylusSelectAppObject = StylusSelectAppObject;
|
|
44
|
-
StylusSelectAppObject.type = "StylusSelectAppObject";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AppObject, AppObjectController } from "../../../AppObject";
|
|
2
|
-
import { MouseController, MouseInputEvent, MouseWheelEvent } from "../../MouseInput";
|
|
3
|
-
export default abstract class EmulateZSpaceStylus extends AppObjectController implements MouseController {
|
|
4
|
-
static readonly type = "EmulateZSpaceStylus";
|
|
5
|
-
abstract onDown: (e: MouseInputEvent) => void;
|
|
6
|
-
abstract onMove: (e: MouseInputEvent) => void;
|
|
7
|
-
abstract onUp: (e: MouseInputEvent) => void;
|
|
8
|
-
abstract onWheel: (e: MouseWheelEvent) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare function makeEmulateZSpaceStylus(appObject: AppObject): EmulateZSpaceStylus;
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeEmulateZSpaceStylus = void 0;
|
|
4
|
-
const AppObject_1 = require("../../../AppObject");
|
|
5
|
-
const ValueObjects_1 = require("../../../ValueObjects");
|
|
6
|
-
const Babylon_1 = require("../../Babylon");
|
|
7
|
-
const MouseInput_1 = require("../../MouseInput");
|
|
8
|
-
const Entities_1 = require("../Entities/");
|
|
9
|
-
const PM_1 = require("../PM");
|
|
10
|
-
class EmulateZSpaceStylus extends AppObject_1.AppObjectController {
|
|
11
|
-
}
|
|
12
|
-
exports.default = EmulateZSpaceStylus;
|
|
13
|
-
EmulateZSpaceStylus.type = "EmulateZSpaceStylus";
|
|
14
|
-
function makeEmulateZSpaceStylus(appObject) {
|
|
15
|
-
return new EmulateZSpaceStylusImp(appObject);
|
|
16
|
-
}
|
|
17
|
-
exports.makeEmulateZSpaceStylus = makeEmulateZSpaceStylus;
|
|
18
|
-
class EmulateZSpaceStylusImp extends EmulateZSpaceStylus {
|
|
19
|
-
constructor(appObject) {
|
|
20
|
-
super(appObject, EmulateZSpaceStylus.type);
|
|
21
|
-
this.emulationIsActive = false;
|
|
22
|
-
this.screenPlane = ValueObjects_1.ParametricPlane.FromPointNormal(ValueObjects_1.Vector3.Zero(), ValueObjects_1.Vector3.Backward());
|
|
23
|
-
this.onDown = (e) => {
|
|
24
|
-
if (!this.emulationIsActive)
|
|
25
|
-
return;
|
|
26
|
-
if (!this.stylus)
|
|
27
|
-
return;
|
|
28
|
-
this.stylus.updateButtonState(e.button, true);
|
|
29
|
-
};
|
|
30
|
-
this.onMove = (e) => {
|
|
31
|
-
if (!this.emulationIsActive)
|
|
32
|
-
return;
|
|
33
|
-
if (!this.stylusTransform)
|
|
34
|
-
return;
|
|
35
|
-
const ray = this.pixelToSceneRay(e.position);
|
|
36
|
-
const hit = this.screenPlane.intersectLine(ray);
|
|
37
|
-
if (!hit) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
const direction = ValueObjects_1.Vector3.Subtract(hit, this.stylusTransform.localPosition);
|
|
41
|
-
this.stylusTransform.localRotation = ValueObjects_1.Quaternion.FromDirectionVector(direction);
|
|
42
|
-
};
|
|
43
|
-
this.onUp = (e) => {
|
|
44
|
-
if (!this.emulationIsActive)
|
|
45
|
-
return;
|
|
46
|
-
if (!this.stylus)
|
|
47
|
-
return;
|
|
48
|
-
this.stylus.updateButtonState(e.button, false);
|
|
49
|
-
};
|
|
50
|
-
this.onWheel = (e) => {
|
|
51
|
-
if (!this.emulationIsActive)
|
|
52
|
-
return;
|
|
53
|
-
if (!this.stylus)
|
|
54
|
-
return;
|
|
55
|
-
if (!this.stylusTransform)
|
|
56
|
-
return;
|
|
57
|
-
const bumpAmount = 0.01;
|
|
58
|
-
const bump = e.event.deltaY > 0 ? -bumpAmount : bumpAmount;
|
|
59
|
-
const newPos = this.stylusTransform.localPointToWorld(new ValueObjects_1.Vector3(0, 0, bump));
|
|
60
|
-
this.stylusTransform.worldPosition = newPos;
|
|
61
|
-
console.log(newPos);
|
|
62
|
-
};
|
|
63
|
-
this.onZpsaceEnabledChange = (enabled) => {
|
|
64
|
-
this.emulationIsActive = false;
|
|
65
|
-
if (!enabled)
|
|
66
|
-
return;
|
|
67
|
-
if (!this.zSpaceEntity)
|
|
68
|
-
return;
|
|
69
|
-
if (!this.zSpaceEntity.emulate)
|
|
70
|
-
return;
|
|
71
|
-
this.emulationIsActive = true;
|
|
72
|
-
if (this.stylusTransform) {
|
|
73
|
-
this.stylusTransform.localPosition = new ValueObjects_1.Vector3(0.05, -0.05, -0.5);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
this.zSpaceEntity = Entities_1.ZSpaceEntity.get(this.appObjects);
|
|
77
|
-
if (!this.zSpaceEntity) {
|
|
78
|
-
this.warn("Unable to find ZSpaceEntity");
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
const pm = this.zSpaceEntity.appObject.getComponent(PM_1.ZSpaceIsEnabledPM.type);
|
|
82
|
-
if (!pm) {
|
|
83
|
-
this.warn("Unable to find ZSpaceIsEnabledPM");
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
this.stylus = appObject.getComponent(Entities_1.ZSpaceStylusEntity.type);
|
|
87
|
-
if (!this.stylus) {
|
|
88
|
-
this.warn("Controller has been added to an app object that does not have a ZSpaceStylusEntity");
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
this.stylusTransform = this.stylus.transform;
|
|
92
|
-
const mouseInput = MouseInput_1.MouseInputEntity.get(appObject.appObjectRepo);
|
|
93
|
-
if (mouseInput) {
|
|
94
|
-
mouseInput.registerController(this);
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
this.warn("Unable to find MouseInputEntity");
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
mouseInput.registerController(this);
|
|
101
|
-
pm.addView(this.onZpsaceEnabledChange);
|
|
102
|
-
}
|
|
103
|
-
pixelToSceneRay(pixelPos) {
|
|
104
|
-
if (!this.pixelToSceneRayUC) {
|
|
105
|
-
this.pixelToSceneRayUC = Babylon_1.PixelToSceneRayUC.get(this.appObjects);
|
|
106
|
-
if (!this.pixelToSceneRayUC) {
|
|
107
|
-
this.warn("Unable to find PixelToSceneRayUC");
|
|
108
|
-
return ValueObjects_1.ParametricLine.Forward();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return this.pixelToSceneRayUC.pixelToSceneRay(pixelPos);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
-
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
-
import { ZSpaceStylusButton, ZSpaceStylusController } from "../Entities/ZSpaceStylusEntity";
|
|
4
|
-
export declare class ZSpaceScaleRoot extends AppObjectController implements ZSpaceStylusController {
|
|
5
|
-
static readonly type = "ZSpaceScaleRoot";
|
|
6
|
-
private stylus?;
|
|
7
|
-
private scaleSceneRootWithRay?;
|
|
8
|
-
private isScaling;
|
|
9
|
-
allow: (button: ZSpaceStylusButton) => boolean;
|
|
10
|
-
onButtonDown: (button: ZSpaceStylusButton) => void;
|
|
11
|
-
onStylusMove: () => void;
|
|
12
|
-
onButtonUp: () => void;
|
|
13
|
-
constructor(appObject: AppObject);
|
|
14
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZSpaceScaleRoot = void 0;
|
|
4
|
-
const AppObjectController_1 = require("../../../AppObject/AppObjectController");
|
|
5
|
-
const SceneRoot_1 = require("../../SceneRoot");
|
|
6
|
-
const ScaleSceneRootWithRay_1 = require("../../SceneRoot/UC/ScaleSceneRootWithRay");
|
|
7
|
-
const ZSpaceStylusEntity_1 = require("../Entities/ZSpaceStylusEntity");
|
|
8
|
-
class ZSpaceScaleRoot extends AppObjectController_1.AppObjectController {
|
|
9
|
-
constructor(appObject) {
|
|
10
|
-
super(appObject, ZSpaceScaleRoot.type);
|
|
11
|
-
this.isScaling = false;
|
|
12
|
-
this.allow = (button) => {
|
|
13
|
-
if (button === ZSpaceStylusEntity_1.ZSpaceStylusButton.BACK_RIGHT)
|
|
14
|
-
return true;
|
|
15
|
-
return false;
|
|
16
|
-
};
|
|
17
|
-
this.onButtonDown = (button) => {
|
|
18
|
-
var _a;
|
|
19
|
-
this.isScaling = false;
|
|
20
|
-
if (!this.stylus)
|
|
21
|
-
return;
|
|
22
|
-
if (!this.allow(button))
|
|
23
|
-
return;
|
|
24
|
-
const pointerRay = this.stylus.pickRay;
|
|
25
|
-
const rayStart = this.stylus.transform.localPosition;
|
|
26
|
-
(_a = this.scaleSceneRootWithRay) === null || _a === void 0 ? void 0 : _a.initializeScale(pointerRay, rayStart);
|
|
27
|
-
this.isScaling = true;
|
|
28
|
-
};
|
|
29
|
-
this.onStylusMove = () => {
|
|
30
|
-
var _a;
|
|
31
|
-
if (!this.stylus)
|
|
32
|
-
return;
|
|
33
|
-
if (!this.isScaling)
|
|
34
|
-
return;
|
|
35
|
-
const pointerRay = this.stylus.pickRay;
|
|
36
|
-
const rayStart = this.stylus.transform.localPosition;
|
|
37
|
-
(_a = this.scaleSceneRootWithRay) === null || _a === void 0 ? void 0 : _a.doScale(pointerRay, rayStart);
|
|
38
|
-
};
|
|
39
|
-
this.onButtonUp = () => {
|
|
40
|
-
this.isScaling = false;
|
|
41
|
-
};
|
|
42
|
-
this.stylus = appObject.getComponent(ZSpaceStylusEntity_1.ZSpaceStylusEntity.type);
|
|
43
|
-
const sceneRoot = SceneRoot_1.SceneRootEntity.get(appObject.appObjectRepo);
|
|
44
|
-
this.scaleSceneRootWithRay = sceneRoot === null || sceneRoot === void 0 ? void 0 : sceneRoot.appObject.getComponent(ScaleSceneRootWithRay_1.ScaleSceneRootWithRay.type);
|
|
45
|
-
if (!this.stylus) {
|
|
46
|
-
this.warn("StylusInputPointer Controller has been added to an app object that does not have a ZSpaceStylusEntity");
|
|
47
|
-
}
|
|
48
|
-
else if (!this.scaleSceneRootWithRay) {
|
|
49
|
-
this.warn("StylusRootScaleSceneRootWithRay was not found on the Scene Root App Object");
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
this.stylus.registerController(this);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.ZSpaceScaleRoot = ZSpaceScaleRoot;
|
|
57
|
-
ZSpaceScaleRoot.type = "ZSpaceScaleRoot";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./EmulateStylus";
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { AppObjectRepo } from "../../../AppObject";
|
|
2
|
-
import { AppObject } from "../../../AppObject/AppObject";
|
|
3
|
-
import { AppObjectEntity } from "../../../AppObject/AppObjectEntity";
|
|
4
|
-
import { ParametricLine } from "../../../ValueObjects";
|
|
5
|
-
import { Transform3D } from "../../Transform3D";
|
|
6
|
-
export declare enum ZSpaceStylusButton {
|
|
7
|
-
PRIMARY = 0,
|
|
8
|
-
BACK_RIGHT = 1,
|
|
9
|
-
BACK_LEFT = 2
|
|
10
|
-
}
|
|
11
|
-
export interface ZSpaceStylusController {
|
|
12
|
-
onButtonDown?: (button: ZSpaceStylusButton) => void;
|
|
13
|
-
onButtonUp?: (button: ZSpaceStylusButton) => void;
|
|
14
|
-
onButtonClick?: (button: ZSpaceStylusButton) => void;
|
|
15
|
-
onStylusMove?: (transform: Transform3D) => void;
|
|
16
|
-
}
|
|
17
|
-
export declare abstract class ZSpaceStylusEntity extends AppObjectEntity {
|
|
18
|
-
static readonly type = "ZSpaceStylusEntity";
|
|
19
|
-
static clickMovementThreshold: number;
|
|
20
|
-
static clickTimeThresholdMS: number;
|
|
21
|
-
abstract registerController: (controller: ZSpaceStylusController) => void;
|
|
22
|
-
abstract updateButtonState: (button: ZSpaceStylusButton, isPressed: boolean) => void;
|
|
23
|
-
abstract readonly transform: Transform3D;
|
|
24
|
-
abstract readonly helperTransform: Transform3D;
|
|
25
|
-
abstract get pickRay(): ParametricLine;
|
|
26
|
-
abstract get isInUse(): boolean;
|
|
27
|
-
static get(appObjects: AppObjectRepo): ZSpaceStylusEntity | undefined;
|
|
28
|
-
}
|
|
29
|
-
export declare function makeZSpaceStylus(appObj: AppObject): ZSpaceStylusEntity;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeZSpaceStylus = exports.ZSpaceStylusEntity = exports.ZSpaceStylusButton = void 0;
|
|
4
|
-
const AppObject_1 = require("../../../AppObject");
|
|
5
|
-
const AppObjectEntity_1 = require("../../../AppObject/AppObjectEntity");
|
|
6
|
-
const Entities_1 = require("../../../Entities");
|
|
7
|
-
const ValueObjects_1 = require("../../../ValueObjects");
|
|
8
|
-
const Transform3D_1 = require("../../Transform3D");
|
|
9
|
-
var ZSpaceStylusButton;
|
|
10
|
-
(function (ZSpaceStylusButton) {
|
|
11
|
-
ZSpaceStylusButton[ZSpaceStylusButton["PRIMARY"] = 0] = "PRIMARY";
|
|
12
|
-
ZSpaceStylusButton[ZSpaceStylusButton["BACK_RIGHT"] = 1] = "BACK_RIGHT";
|
|
13
|
-
ZSpaceStylusButton[ZSpaceStylusButton["BACK_LEFT"] = 2] = "BACK_LEFT";
|
|
14
|
-
})(ZSpaceStylusButton = exports.ZSpaceStylusButton || (exports.ZSpaceStylusButton = {}));
|
|
15
|
-
class ZSpaceStylusEntity extends AppObjectEntity_1.AppObjectEntity {
|
|
16
|
-
static get(appObjects) {
|
|
17
|
-
return AppObject_1.getSingletonComponent(ZSpaceStylusEntity.type, appObjects);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.ZSpaceStylusEntity = ZSpaceStylusEntity;
|
|
21
|
-
ZSpaceStylusEntity.type = "ZSpaceStylusEntity";
|
|
22
|
-
ZSpaceStylusEntity.clickMovementThreshold = 0.32;
|
|
23
|
-
ZSpaceStylusEntity.clickTimeThresholdMS = 350;
|
|
24
|
-
function makeZSpaceStylus(appObj) {
|
|
25
|
-
const transform = Transform3D_1.Transform3D.addIfMissing(appObj);
|
|
26
|
-
return new StylusImp(appObj, transform);
|
|
27
|
-
}
|
|
28
|
-
exports.makeZSpaceStylus = makeZSpaceStylus;
|
|
29
|
-
class StylusImp extends ZSpaceStylusEntity {
|
|
30
|
-
constructor(appObject, transform) {
|
|
31
|
-
super(appObject, ZSpaceStylusEntity.type);
|
|
32
|
-
this.controllers = [];
|
|
33
|
-
this.buttonStates = [false, false, false];
|
|
34
|
-
this.pressPosition = ValueObjects_1.Vector3.Zero();
|
|
35
|
-
this.pressTime = 0;
|
|
36
|
-
this.registerController = (controller) => {
|
|
37
|
-
this.controllers.push(controller);
|
|
38
|
-
};
|
|
39
|
-
this.updateButtonState = (button, isPressed) => {
|
|
40
|
-
if (this.buttonStates[button] === isPressed)
|
|
41
|
-
return;
|
|
42
|
-
this.controllers.forEach((controller) => {
|
|
43
|
-
if (isPressed) {
|
|
44
|
-
if (controller.onButtonDown) {
|
|
45
|
-
controller.onButtonDown(button);
|
|
46
|
-
}
|
|
47
|
-
this.lassPressedButton = button;
|
|
48
|
-
this.pressPosition = this.transform.localPosition;
|
|
49
|
-
this.pressTime = Date.now();
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
if (controller.onButtonUp) {
|
|
53
|
-
controller.onButtonUp(button);
|
|
54
|
-
}
|
|
55
|
-
if (this.isClick(button) && controller.onButtonClick) {
|
|
56
|
-
controller.onButtonClick(button);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
this.buttonStates[button] = isPressed;
|
|
61
|
-
this.notifyOnChange();
|
|
62
|
-
};
|
|
63
|
-
this.isClick = (button) => {
|
|
64
|
-
const buttonIsCorrect = button === this.lassPressedButton;
|
|
65
|
-
const movement = ValueObjects_1.Vector3.Subtract(this.transform.localPosition, this.pressPosition).magnitude;
|
|
66
|
-
const movementIsSmallEnough = movement < ZSpaceStylusEntity.clickMovementThreshold;
|
|
67
|
-
const passedTime = Date.now() - this.pressTime;
|
|
68
|
-
const pressTimeIsShortEnough = passedTime < ZSpaceStylusEntity.clickTimeThresholdMS;
|
|
69
|
-
if (buttonIsCorrect && movementIsSmallEnough && pressTimeIsShortEnough) {
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
this.onTransformUpdate = () => {
|
|
77
|
-
this.checkIfStylusIsInUse(this.transform.worldMatrix);
|
|
78
|
-
this.controllers.forEach((controller) => {
|
|
79
|
-
if (controller.onStylusMove) {
|
|
80
|
-
controller.onStylusMove(this.transform);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
this.notifyOnChange();
|
|
84
|
-
};
|
|
85
|
-
this.memoizedIsInUse = new Entities_1.MemoizedBoolean(false, this.notifyOnChange);
|
|
86
|
-
this.transform = transform;
|
|
87
|
-
this.transform.addChangeObserver(this.onTransformUpdate);
|
|
88
|
-
const helperTransformAO = appObject.appObjectRepo.getOrCreate("StylusHelper");
|
|
89
|
-
this.helperTransform = Transform3D_1.Transform3D.addIfMissing(helperTransformAO);
|
|
90
|
-
this.helperTransform.parent = this.transform;
|
|
91
|
-
}
|
|
92
|
-
get pickRay() {
|
|
93
|
-
return ValueObjects_1.ParametricLine.FromPointDirection(this.transform.worldPosition, this.transform.localDirectionToWorld(ValueObjects_1.Vector3.Forward()));
|
|
94
|
-
}
|
|
95
|
-
get isInUse() {
|
|
96
|
-
return this.memoizedIsInUse.val;
|
|
97
|
-
}
|
|
98
|
-
checkIfStylusIsInUse(worldMatrix) {
|
|
99
|
-
const m = worldMatrix.m;
|
|
100
|
-
if (m[1] === 0 &&
|
|
101
|
-
m[2] === 0 &&
|
|
102
|
-
m[3] === 0 &&
|
|
103
|
-
m[4] === 0 &&
|
|
104
|
-
m[7] === 0 &&
|
|
105
|
-
m[8] === 0 &&
|
|
106
|
-
m[11] === 0 &&
|
|
107
|
-
m[12] === 0 &&
|
|
108
|
-
m[15] === 1) {
|
|
109
|
-
this.memoizedIsInUse.val = false;
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
this.memoizedIsInUse.val = true;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./MockCheckZSpaceDisplaySizeUC";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./MockCheckZSpaceDisplaySizeUC"), exports);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AppObject, AppObjectPM } from "../../../AppObject";
|
|
2
|
-
import { Color } from "../../../ValueObjects";
|
|
3
|
-
export interface StylusColorLengthVM {
|
|
4
|
-
color: Color;
|
|
5
|
-
length: number;
|
|
6
|
-
}
|
|
7
|
-
export declare abstract class StylusColorLengthPM extends AppObjectPM<StylusColorLengthVM> {
|
|
8
|
-
static readonly type = "StylusColorLengthPM";
|
|
9
|
-
abstract rayColorNoPick: Color;
|
|
10
|
-
abstract rayColorPick: Color;
|
|
11
|
-
abstract defaultLength: number;
|
|
12
|
-
}
|
|
13
|
-
export declare function makeStylusColorLengthPM(appObject: AppObject): StylusColorLengthPM;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeStylusColorLengthPM = exports.StylusColorLengthPM = void 0;
|
|
4
|
-
const AppObject_1 = require("../../../AppObject");
|
|
5
|
-
const ValueObjects_1 = require("../../../ValueObjects");
|
|
6
|
-
const Babylon_1 = require("../../Babylon");
|
|
7
|
-
const ZSpaceStylusEntity_1 = require("../Entities/ZSpaceStylusEntity");
|
|
8
|
-
class StylusColorLengthPM extends AppObject_1.AppObjectPM {
|
|
9
|
-
}
|
|
10
|
-
exports.StylusColorLengthPM = StylusColorLengthPM;
|
|
11
|
-
StylusColorLengthPM.type = "StylusColorLengthPM";
|
|
12
|
-
function makeStylusColorLengthPM(appObject) {
|
|
13
|
-
return new StylusColorLengthPMImp(appObject);
|
|
14
|
-
}
|
|
15
|
-
exports.makeStylusColorLengthPM = makeStylusColorLengthPM;
|
|
16
|
-
class StylusColorLengthPMImp extends StylusColorLengthPM {
|
|
17
|
-
constructor(appObject) {
|
|
18
|
-
super(appObject, StylusColorLengthPM.type);
|
|
19
|
-
this.defaultLength = 1;
|
|
20
|
-
this.rayColorNoPick = ValueObjects_1.Color.RGB(128, 128, 128);
|
|
21
|
-
this.rayColorPick = ValueObjects_1.Color.RGB(0, 255, 0);
|
|
22
|
-
this.onEntityChange = () => {
|
|
23
|
-
if (!this.stylus || !this.stylus.isInUse) {
|
|
24
|
-
this.setDefaultVM();
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const pickRay = this.stylus.pickRay;
|
|
28
|
-
const scenePickUC = Babylon_1.SceneRayPickUC.get(this.appObject.appObjectRepo);
|
|
29
|
-
if (!scenePickUC) {
|
|
30
|
-
this.setDefaultVM();
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const scenePick = scenePickUC.sceneRayPick(pickRay);
|
|
34
|
-
let color = this.rayColorNoPick;
|
|
35
|
-
let length = this.defaultLength;
|
|
36
|
-
if (scenePick && (scenePick === null || scenePick === void 0 ? void 0 : scenePick.hit) && scenePick.worldPickPoint) {
|
|
37
|
-
color = this.rayColorPick;
|
|
38
|
-
length = Math.abs(ValueObjects_1.Vector3.Subtract(this.stylus.transform.worldPosition, scenePick.worldPickPoint).magnitude);
|
|
39
|
-
}
|
|
40
|
-
const vm = {
|
|
41
|
-
color,
|
|
42
|
-
length,
|
|
43
|
-
};
|
|
44
|
-
this.doUpdateView(vm);
|
|
45
|
-
};
|
|
46
|
-
this.dispose = () => {
|
|
47
|
-
var _a, _b;
|
|
48
|
-
super.dispose();
|
|
49
|
-
(_a = this.stylus) === null || _a === void 0 ? void 0 : _a.removeChangeObserver(this.onEntityChange);
|
|
50
|
-
(_b = this.stylus) === null || _b === void 0 ? void 0 : _b.removeOnDisposeObserver(this.dispose);
|
|
51
|
-
};
|
|
52
|
-
this.stylus = appObject.getComponent(ZSpaceStylusEntity_1.ZSpaceStylusEntity.type);
|
|
53
|
-
if (this.stylus) {
|
|
54
|
-
this.stylus.addChangeObserver(this.onEntityChange);
|
|
55
|
-
this.stylus.addOnDisposeObserver(() => {
|
|
56
|
-
this.dispose();
|
|
57
|
-
});
|
|
58
|
-
this.onEntityChange();
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
this.warn("App Object does not have a Stylus Entity");
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
vmsAreEqual(a, b) {
|
|
65
|
-
if (ValueObjects_1.Color.Equal(a.color, b.color) && a.length === b.length) {
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
setDefaultVM() {
|
|
71
|
-
const vm = {
|
|
72
|
-
color: this.rayColorNoPick,
|
|
73
|
-
length: 0,
|
|
74
|
-
};
|
|
75
|
-
this.doUpdateView(vm);
|
|
76
|
-
}
|
|
77
|
-
}
|