@vived/app 4.27.0 → 4.27.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/lib/AppObjectComponents/ChannelModel/Entities/ChannelModel.d.ts +42 -0
- package/lib/AppObjectComponents/ChannelModel/Entities/ChannelModel.js +99 -0
- package/lib/AppObjectComponents/ChannelModel/Entities/ChannelModelRepo.d.ts +12 -0
- package/lib/AppObjectComponents/ChannelModel/Entities/ChannelModelRepo.js +45 -0
- package/lib/AppObjectComponents/ChannelModel/index.d.ts +2 -0
- package/lib/AppObjectComponents/ChannelModel/index.js +14 -0
- package/lib/AppObjectComponents/Dispatcher/Entities/AppDispatcher.d.ts +16 -0
- package/lib/AppObjectComponents/Dispatcher/Entities/AppDispatcher.js +40 -0
- package/lib/AppObjectComponents/Dispatcher/Factories/makeBasicDispatcher.d.ts +5 -0
- package/lib/AppObjectComponents/Dispatcher/Factories/makeBasicDispatcher.js +25 -0
- package/lib/AppObjectComponents/Dispatcher/UC/DispatchStartZSpaceUC.d.ts +10 -0
- package/lib/AppObjectComponents/Dispatcher/UC/DispatchStartZSpaceUC.js +44 -0
- package/lib/AppObjectComponents/Dispatcher/UC/DispatchStopZSpaceUC.d.ts +10 -0
- package/lib/AppObjectComponents/Dispatcher/UC/DispatchStopZSpaceUC.js +44 -0
- package/lib/AppObjectComponents/Dispatcher/UC/GoToNextStateUC.d.ts +10 -0
- package/lib/AppObjectComponents/Dispatcher/UC/GoToNextStateUC.js +44 -0
- package/lib/AppObjectComponents/Dispatcher/UC/GoToPreviousStateUC.d.ts +10 -0
- package/lib/AppObjectComponents/Dispatcher/UC/GoToPreviousStateUC.js +44 -0
- package/lib/AppObjectComponents/Dispatcher/UC/HasNextStateUC.d.ts +10 -0
- package/lib/AppObjectComponents/Dispatcher/UC/HasNextStateUC.js +54 -0
- package/lib/AppObjectComponents/Dispatcher/UC/HasPreviousStateUC.d.ts +10 -0
- package/lib/AppObjectComponents/Dispatcher/UC/HasPreviousStateUC.js +54 -0
- package/lib/AppObjectComponents/Dispatcher/UC/IsZSpaceAvailableUC.d.ts +10 -0
- package/lib/AppObjectComponents/Dispatcher/UC/IsZSpaceAvailableUC.js +54 -0
- package/lib/AppObjectComponents/Dispatcher/index.d.ts +9 -0
- package/lib/AppObjectComponents/Dispatcher/index.js +21 -0
- package/lib/AppObjectComponents/Enablement/Entities/EnablablementEntity.d.ts +16 -0
- package/lib/AppObjectComponents/Enablement/Entities/EnablablementEntity.js +28 -0
- package/lib/AppObjectComponents/Enablement/PM/EnablableStatePM.d.ts +14 -0
- package/lib/AppObjectComponents/Enablement/PM/EnablableStatePM.js +41 -0
- package/lib/AppObjectComponents/Enablement/index.d.ts +2 -0
- package/lib/AppObjectComponents/Enablement/index.js +14 -0
- package/lib/AppObjectComponents/Hideable/Entities/Hideable.d.ts +10 -0
- package/lib/AppObjectComponents/Hideable/Entities/Hideable.js +31 -0
- package/lib/AppObjectComponents/Hideable/PresentationManagers/IsHiddenPM.d.ts +12 -0
- package/lib/AppObjectComponents/Hideable/PresentationManagers/IsHiddenPM.js +43 -0
- package/lib/AppObjectComponents/Hideable/index.d.ts +2 -0
- package/lib/AppObjectComponents/Hideable/index.js +14 -0
- package/lib/AppObjectComponents/Label/Entities/Label.d.ts +17 -0
- package/lib/AppObjectComponents/Label/Entities/Label.js +58 -0
- package/lib/AppObjectComponents/Label/PresentationManagers/LabelPM.d.ts +19 -0
- package/lib/AppObjectComponents/Label/PresentationManagers/LabelPM.js +62 -0
- package/lib/AppObjectComponents/Label/index.d.ts +2 -0
- package/lib/AppObjectComponents/Label/index.js +14 -0
- package/lib/AppObjectComponents/Mesh/Entities/Mesh.d.ts +21 -0
- package/lib/AppObjectComponents/Mesh/Entities/Mesh.js +45 -0
- package/lib/AppObjectComponents/Mesh/index.d.ts +1 -0
- package/lib/{Components/Camera/Adapters → AppObjectComponents/Mesh}/index.js +1 -1
- package/lib/AppObjectComponents/OverlayColor/Entities/OverlayColor.d.ts +25 -0
- package/lib/AppObjectComponents/OverlayColor/Entities/OverlayColor.js +59 -0
- package/lib/AppObjectComponents/OverlayColor/PresentationManagers/OverlayColorPM.d.ts +13 -0
- package/lib/AppObjectComponents/OverlayColor/PresentationManagers/OverlayColorPM.js +43 -0
- package/lib/AppObjectComponents/OverlayColor/index.d.ts +2 -0
- package/lib/AppObjectComponents/OverlayColor/index.js +14 -0
- package/lib/AppObjectComponents/SceneRoot/Entities/SceneRoot.d.ts +31 -0
- package/lib/AppObjectComponents/SceneRoot/Entities/SceneRoot.js +106 -0
- package/lib/AppObjectComponents/SceneRoot/UC/SerializeSceneRoot.d.ts +31 -0
- package/lib/AppObjectComponents/SceneRoot/UC/SerializeSceneRoot.js +109 -0
- package/lib/AppObjectComponents/SceneRoot/index.d.ts +2 -0
- package/lib/AppObjectComponents/SceneRoot/index.js +14 -0
- package/lib/AppObjectComponents/StoredView/Entities/StoredView.d.ts +13 -0
- package/lib/AppObjectComponents/StoredView/Entities/StoredView.js +64 -0
- package/lib/AppObjectComponents/StoredView/UC/SerializeStoredView.d.ts +27 -0
- package/lib/AppObjectComponents/StoredView/UC/SerializeStoredView.js +82 -0
- package/lib/AppObjectComponents/StoredView/index.d.ts +2 -0
- package/lib/AppObjectComponents/StoredView/index.js +14 -0
- package/lib/AppObjectComponents/Transform3D/Entities/Transform3D.d.ts +45 -0
- package/lib/AppObjectComponents/Transform3D/Entities/Transform3D.js +226 -0
- package/lib/AppObjectComponents/Transform3D/PresentationManagers/CanBeStuckPM.d.ts +12 -0
- package/lib/AppObjectComponents/Transform3D/PresentationManagers/CanBeStuckPM.js +46 -0
- package/lib/AppObjectComponents/Transform3D/PresentationManagers/Transform3DPM.d.ts +19 -0
- package/lib/AppObjectComponents/Transform3D/PresentationManagers/Transform3DPM.js +60 -0
- package/lib/AppObjectComponents/Transform3D/UseCases/PeelTransform3D.d.ts +20 -0
- package/lib/AppObjectComponents/Transform3D/UseCases/PeelTransform3D.js +67 -0
- package/lib/AppObjectComponents/Transform3D/UseCases/StickTransform3D.d.ts +14 -0
- package/lib/AppObjectComponents/Transform3D/UseCases/StickTransform3D.js +53 -0
- package/lib/AppObjectComponents/Transform3D/index.d.ts +5 -0
- package/lib/{Components/BaseApp/PM → AppObjectComponents/Transform3D}/index.js +5 -4
- package/lib/AppObjectComponents/index.d.ts +10 -0
- package/lib/AppObjectComponents/index.js +22 -0
- package/lib/Components/App/PM/HasNextPreviousStatePM.d.ts +15 -0
- package/lib/Components/App/PM/HasNextPreviousStatePM.js +44 -0
- package/lib/Components/ChannelModel/Controllers/setModelObjectLabel.js +1 -1
- package/lib/Components/ChannelModel/UC/ProcessChannelModelUC.d.ts +6 -0
- package/lib/Components/ChannelModel/UC/ProcessChannelModelUC.js +9 -0
- package/lib/Components/ChannelModel/UC/SetupChannelModelUC.d.ts +10 -0
- package/lib/Components/ChannelModel/UC/SetupChannelModelUC.js +141 -0
- package/lib/Components/Hideable/UCs/SerializeHideableObjects.d.ts +2 -2
- package/lib/Components/Hideable/UCs/SerializeHideableObjects.js +9 -9
- package/lib/Components/Hideable/UCs/index.d.ts +1 -0
- package/lib/Components/Hideable/UCs/index.js +1 -0
- package/lib/Components/Label/Entities/Label.d.ts +1 -2
- package/lib/Components/Label/Entities/Label.js +0 -6
- package/lib/Components/Landmarks/UseCases/AddLandmarkUC.js +1 -1
- package/lib/Components/SceneRoot/Controllers/StylusMove.d.ts +14 -0
- package/lib/Components/SceneRoot/Controllers/StylusMove.js +56 -0
- package/lib/Components/SceneRoot/Controllers/StylusScale.d.ts +14 -0
- package/lib/Components/SceneRoot/Controllers/StylusScale.js +58 -0
- package/lib/Components/Selection/Controller/StylusHoverOnAppObject.d.ts +11 -0
- package/lib/Components/Selection/Controller/StylusHoverOnAppObject.js +42 -0
- package/lib/Components/Selection/Controller/StylusPressOnAppObject.d.ts +18 -0
- package/lib/Components/Selection/Controller/StylusPressOnAppObject.js +77 -0
- package/lib/Components/Selection/Controller/StylusSelectAppObject.d.ts +11 -0
- package/lib/Components/Selection/Controller/StylusSelectAppObject.js +44 -0
- package/lib/Components/XR/Mocks/index.d.ts +2 -0
- package/lib/Components/{ObjectPick/Adapters → XR/Mocks}/index.js +2 -1
- package/lib/Components/zSpace/Controllers/EmulateStylus.d.ts +9 -0
- package/lib/Components/zSpace/Controllers/EmulateStylus.js +100 -0
- package/lib/Components/zSpace/Controllers/ZSpaceScaleRoot.d.ts +14 -0
- package/lib/Components/zSpace/Controllers/ZSpaceScaleRoot.js +57 -0
- package/lib/Components/zSpace/Controllers/index.d.ts +1 -0
- package/lib/Components/{ObjectPick/PM → zSpace/Controllers}/index.js +1 -1
- package/lib/Components/zSpace/Entities/ZSpaceStylusEntity.d.ts +27 -0
- package/lib/Components/zSpace/Entities/ZSpaceStylusEntity.js +111 -0
- package/lib/Components/zSpace/PM/StylusColorLengthPM.d.ts +13 -0
- package/lib/Components/zSpace/PM/StylusColorLengthPM.js +77 -0
- package/lib/Components/zSpace/PM/StylusIsInUsePM.d.ts +6 -0
- package/lib/Components/zSpace/PM/StylusIsInUsePM.js +42 -0
- package/lib/Controllers/HoverLabelMouse.d.ts +10 -0
- package/lib/Controllers/HoverLabelMouse.js +23 -0
- package/lib/Controllers/HoverLabelTouch.d.ts +14 -0
- package/lib/Controllers/HoverLabelTouch.js +41 -0
- package/lib/Controllers/ToolHotkeys.d.ts +6 -0
- package/lib/Controllers/ToolHotkeys.js +25 -0
- package/lib/Controllers/index.d.ts +3 -0
- package/lib/{Components/Callouts/Entities → Controllers}/index.js +3 -3
- package/lib/Entities/AppBoundary.d.ts +6 -0
- package/lib/Entities/AppBoundary.js +2 -0
- package/lib/Entities/AppDispatcher.d.ts +63 -0
- package/lib/Entities/AppDispatcher.js +336 -0
- package/lib/Entities/AppHandler.d.ts +20 -0
- package/lib/Entities/AppHandler.js +94 -0
- package/lib/Entities/Babylon.d.ts +48 -0
- package/lib/Entities/Babylon.js +146 -0
- package/lib/Entities/BaseApp.d.ts +9 -0
- package/lib/Entities/BaseApp.js +30 -0
- package/lib/Entities/DevicePreview.d.ts +11 -0
- package/lib/Entities/DevicePreview.js +49 -0
- package/lib/Entities/FocusCamera.d.ts +70 -0
- package/lib/Entities/FocusCamera.js +272 -0
- package/lib/Entities/FramedScreen.d.ts +15 -0
- package/lib/Entities/FramedScreen.js +58 -0
- package/lib/Entities/FramedScreenContainer.d.ts +12 -0
- package/lib/Entities/FramedScreenContainer.js +41 -0
- package/lib/Entities/HoverLabels.d.ts +42 -0
- package/lib/Entities/HoverLabels.js +82 -0
- package/lib/Entities/KeyboardInput.d.ts +13 -0
- package/lib/Entities/KeyboardInput.js +68 -0
- package/lib/Entities/Memoized/MemoizedAngle.d.ts +9 -0
- package/lib/Entities/Memoized/MemoizedAngle.js +22 -0
- package/lib/Entities/Memoized/MemoizedBoolean.d.ts +8 -0
- package/lib/Entities/Memoized/MemoizedBoolean.js +22 -0
- package/lib/Entities/Memoized/MemoizedColor.d.ts +9 -0
- package/lib/Entities/Memoized/MemoizedColor.js +23 -0
- package/lib/Entities/Memoized/MemoizedNumber.d.ts +8 -0
- package/lib/Entities/Memoized/MemoizedNumber.js +22 -0
- package/lib/Entities/Memoized/MemoizedQuaternion.d.ts +9 -0
- package/lib/Entities/Memoized/MemoizedQuaternion.js +23 -0
- package/lib/Entities/Memoized/MemoizedString.d.ts +8 -0
- package/lib/Entities/Memoized/MemoizedString.js +22 -0
- package/lib/Entities/Memoized/MemoizedVector2.d.ts +9 -0
- package/lib/Entities/Memoized/MemoizedVector2.js +23 -0
- package/lib/Entities/Memoized/MemoizedVector3.d.ts +9 -0
- package/lib/Entities/Memoized/MemoizedVector3.js +23 -0
- package/lib/Entities/MeshModel.d.ts +68 -0
- package/lib/Entities/MeshModel.js +174 -0
- package/lib/Entities/ModelObject.d.ts +10 -0
- package/lib/Entities/ModelObject.js +42 -0
- package/lib/Entities/MouseInput.d.ts +21 -0
- package/lib/Entities/MouseInput.js +127 -0
- package/lib/Entities/ObservableEntityRepo.d.ts +20 -0
- package/lib/Entities/ObservableEntityRepo.js +80 -0
- package/lib/Entities/QuestionChallenge.d.ts +21 -0
- package/lib/Entities/QuestionChallenge.js +103 -0
- package/lib/Entities/QuestionChallengeAnswer.d.ts +32 -0
- package/lib/Entities/QuestionChallengeAnswer.js +51 -0
- package/lib/Entities/SceneModel.d.ts +85 -0
- package/lib/Entities/SceneModel.js +202 -0
- package/lib/Entities/SceneModelMesh.d.ts +40 -0
- package/lib/Entities/SceneModelMesh.js +75 -0
- package/lib/Entities/SceneModelRepo.d.ts +11 -0
- package/lib/Entities/SceneModelRepo.js +48 -0
- package/lib/Entities/SceneObject.d.ts +23 -0
- package/lib/Entities/SceneObject.js +79 -0
- package/lib/Entities/SceneObjectsRepo.d.ts +12 -0
- package/lib/Entities/SceneObjectsRepo.js +58 -0
- package/lib/Entities/SceneRoot.d.ts +29 -0
- package/lib/Entities/SceneRoot.js +145 -0
- package/lib/Entities/StateMachine.d.ts +29 -0
- package/lib/Entities/StateMachine.js +98 -0
- package/lib/Entities/Tool.d.ts +81 -0
- package/lib/Entities/Tool.js +94 -0
- package/lib/Entities/ToolRepository.d.ts +46 -0
- package/lib/Entities/ToolRepository.js +118 -0
- package/lib/Entities/TouchInput.d.ts +28 -0
- package/lib/Entities/TouchInput.js +144 -0
- package/lib/Entities/UndoRedo.d.ts +22 -0
- package/lib/Entities/UndoRedo.js +61 -0
- package/lib/PresentationManagers/DevicePreviewPM.d.ts +14 -0
- package/lib/PresentationManagers/DevicePreviewPM.js +30 -0
- package/lib/PresentationManagers/FocusCameraPM.d.ts +15 -0
- package/lib/PresentationManagers/FocusCameraPM.js +31 -0
- package/lib/PresentationManagers/FocusCameraPosRotPM.d.ts +13 -0
- package/lib/PresentationManagers/FocusCameraPosRotPM.js +28 -0
- package/lib/PresentationManagers/FramedScreenContainerPM.d.ts +18 -0
- package/lib/PresentationManagers/FramedScreenContainerPM.js +55 -0
- package/lib/PresentationManagers/HasRedoPM.d.ts +9 -0
- package/lib/PresentationManagers/HasRedoPM.js +22 -0
- package/lib/PresentationManagers/HasUndoPM.d.ts +9 -0
- package/lib/PresentationManagers/HasUndoPM.js +22 -0
- package/lib/PresentationManagers/HoverLabels/AllowHoverLabelPM.d.ts +9 -0
- package/lib/PresentationManagers/HoverLabels/AllowHoverLabelPM.js +19 -0
- package/lib/PresentationManagers/HoverLabels/HoverLabelPM.d.ts +17 -0
- package/lib/PresentationManagers/HoverLabels/HoverLabelPM.js +32 -0
- package/lib/PresentationManagers/HoverLabels/index.d.ts +2 -0
- package/lib/PresentationManagers/HoverLabels/index.js +14 -0
- package/lib/PresentationManagers/IsAuthoringPM.d.ts +9 -0
- package/lib/PresentationManagers/IsAuthoringPM.js +20 -0
- package/lib/PresentationManagers/PresentationManager.d.ts +8 -0
- package/lib/PresentationManagers/PresentationManager.js +16 -0
- package/lib/PresentationManagers/QuestionChallenge/AuthorQuestionChallengeAnswerPM.d.ts +24 -0
- package/lib/PresentationManagers/QuestionChallenge/AuthorQuestionChallengeAnswerPM.js +65 -0
- package/lib/PresentationManagers/QuestionChallenge/AuthorQuestionChallengePM.d.ts +17 -0
- package/lib/PresentationManagers/QuestionChallenge/AuthorQuestionChallengePM.js +46 -0
- package/lib/PresentationManagers/QuestionChallenge/QuestionChallengeAnswerPM.d.ts +17 -0
- package/lib/PresentationManagers/QuestionChallenge/QuestionChallengeAnswerPM.js +51 -0
- package/lib/PresentationManagers/QuestionChallenge/QuestionChallengePM.d.ts +15 -0
- package/lib/PresentationManagers/QuestionChallenge/QuestionChallengePM.js +34 -0
- package/lib/PresentationManagers/QuestionChallenge/index.d.ts +4 -0
- package/lib/{Components/Callouts/Adapters → PresentationManagers/QuestionChallenge}/index.js +4 -4
- package/lib/PresentationManagers/SceneModel/SceneMeshOverlayPM.d.ts +15 -0
- package/lib/PresentationManagers/SceneModel/SceneMeshOverlayPM.js +34 -0
- package/lib/PresentationManagers/SceneModel/SceneModelPM.d.ts +15 -0
- package/lib/PresentationManagers/SceneModel/SceneModelPM.js +36 -0
- package/lib/PresentationManagers/SceneModel/index.d.ts +1 -0
- package/lib/{Components/BaseApp/Entity → PresentationManagers/SceneModel}/index.js +1 -1
- package/lib/PresentationManagers/SceneObject/SceneObjectPM.d.ts +22 -0
- package/lib/PresentationManagers/SceneObject/SceneObjectPM.js +57 -0
- package/lib/PresentationManagers/SceneObject/index.d.ts +1 -0
- package/lib/{Components/Camera/Mocks → PresentationManagers/SceneObject}/index.js +1 -1
- package/lib/PresentationManagers/ShowBabylonInspectorPM.d.ts +9 -0
- package/lib/PresentationManagers/ShowBabylonInspectorPM.js +24 -0
- package/lib/PresentationManagers/ToolPM.d.ts +17 -0
- package/lib/PresentationManagers/ToolPM.js +35 -0
- package/lib/PresentationManagers/TransformNodePM.d.ts +14 -0
- package/lib/PresentationManagers/TransformNodePM.js +23 -0
- package/lib/PresentationManagers/index.d.ts +13 -0
- package/lib/PresentationManagers/index.js +25 -0
- package/lib/Types/ChannelModelData.d.ts +68 -0
- package/lib/Types/ChannelModelData.js +21 -0
- package/lib/UseCases/FocusCamera/BumpDollyFocusCamera.d.ts +17 -0
- package/lib/UseCases/FocusCamera/BumpDollyFocusCamera.js +64 -0
- package/lib/UseCases/FocusCamera/LerpFocusCamera.d.ts +36 -0
- package/lib/UseCases/FocusCamera/LerpFocusCamera.js +71 -0
- package/lib/UseCases/FocusCamera/PinchDollyFocusCamera.d.ts +11 -0
- package/lib/UseCases/FocusCamera/PinchDollyFocusCamera.js +36 -0
- package/lib/UseCases/FocusCamera/PixelDollyFocusCamera.d.ts +11 -0
- package/lib/UseCases/FocusCamera/PixelDollyFocusCamera.js +36 -0
- package/lib/UseCases/FocusCamera/PixelOrbitFocusCamera.d.ts +11 -0
- package/lib/UseCases/FocusCamera/PixelOrbitFocusCamera.js +26 -0
- package/lib/UseCases/FocusCamera/PixelPlanePanFocusCamera.d.ts +11 -0
- package/lib/UseCases/FocusCamera/PixelPlanePanFocusCamera.js +33 -0
- package/lib/UseCases/FocusCamera/SerializeFocusCamera.d.ts +22 -0
- package/lib/UseCases/FocusCamera/SerializeFocusCamera.js +81 -0
- package/lib/UseCases/FocusCamera/index.d.ts +7 -0
- package/lib/UseCases/FocusCamera/index.js +19 -0
- package/lib/UseCases/Handlers/DisposeAppBase.d.ts +8 -0
- package/lib/UseCases/Handlers/DisposeAppBase.js +24 -0
- package/lib/UseCases/Handlers/SetAppStateBase.d.ts +10 -0
- package/lib/UseCases/Handlers/SetAppStateBase.js +32 -0
- package/lib/UseCases/Handlers/SetDevicePreviewBase.d.ts +10 -0
- package/lib/UseCases/Handlers/SetDevicePreviewBase.js +32 -0
- package/lib/UseCases/Handlers/SetIsAuthoringBase.d.ts +10 -0
- package/lib/UseCases/Handlers/SetIsAuthoringBase.js +32 -0
- package/lib/UseCases/Handlers/ShowBabylonInspectorBase.d.ts +10 -0
- package/lib/UseCases/Handlers/ShowBabylonInspectorBase.js +32 -0
- package/lib/UseCases/Handlers/StartAppBase.d.ts +10 -0
- package/lib/UseCases/Handlers/StartAppBase.js +32 -0
- package/lib/UseCases/Handlers/StartZSpaceBase.d.ts +10 -0
- package/lib/UseCases/Handlers/StartZSpaceBase.js +35 -0
- package/lib/UseCases/Handlers/StopAppBase.d.ts +8 -0
- package/lib/UseCases/Handlers/StopAppBase.js +24 -0
- package/lib/UseCases/Handlers/StopZSpaceBase.d.ts +8 -0
- package/lib/UseCases/Handlers/StopZSpaceBase.js +24 -0
- package/lib/UseCases/Handlers/index.d.ts +9 -0
- package/lib/UseCases/Handlers/index.js +21 -0
- package/lib/UseCases/HoverLabels/SerializeAllowHoverLabel.d.ts +14 -0
- package/lib/UseCases/HoverLabels/SerializeAllowHoverLabel.js +35 -0
- package/lib/UseCases/HoverLabels/trySetHoverLabel.d.ts +3 -0
- package/lib/UseCases/HoverLabels/trySetHoverLabel.js +12 -0
- package/lib/UseCases/LerpVector3.d.ts +26 -0
- package/lib/UseCases/LerpVector3.js +66 -0
- package/lib/UseCases/QuestionChallenge/SerializeQuestionChallenge.d.ts +25 -0
- package/lib/UseCases/QuestionChallenge/SerializeQuestionChallenge.js +70 -0
- package/lib/UseCases/QuestionChallenge/index.d.ts +4 -0
- package/lib/{Components/BaseApp/Controller → UseCases/QuestionChallenge}/index.js +4 -5
- package/lib/UseCases/QuestionChallenge/setQuesionChallengeAnswerFeedback.d.ts +2 -0
- package/lib/UseCases/QuestionChallenge/setQuesionChallengeAnswerFeedback.js +16 -0
- package/lib/UseCases/QuestionChallenge/setQuesionChallengeAnswerText.d.ts +2 -0
- package/lib/UseCases/QuestionChallenge/setQuesionChallengeAnswerText.js +16 -0
- package/lib/UseCases/QuestionChallenge/toggleQuesionChallengeAnswerIsCorrect.d.ts +2 -0
- package/lib/UseCases/QuestionChallenge/toggleQuesionChallengeAnswerIsCorrect.js +16 -0
- package/lib/UseCases/SceneModel/SerializeActiveModel.d.ts +18 -0
- package/lib/UseCases/SceneModel/SerializeActiveModel.js +74 -0
- package/lib/UseCases/SceneModel/SetMeshesEnabledHook.d.ts +7 -0
- package/lib/UseCases/SceneModel/SetMeshesEnabledHook.js +22 -0
- package/lib/UseCases/SceneModel/SetSceneModelMeshOverlayColor.d.ts +2 -0
- package/lib/UseCases/SceneModel/SetSceneModelMeshOverlayColor.js +13 -0
- package/lib/UseCases/SceneModel/index.d.ts +5 -0
- package/lib/{Components/BaseApp/Adapters → UseCases/SceneModel}/index.js +5 -4
- package/lib/UseCases/SceneModel/loadNewModel.d.ts +2 -0
- package/lib/UseCases/SceneModel/loadNewModel.js +84 -0
- package/lib/UseCases/SceneModel/modelDataLoader.d.ts +3 -0
- package/lib/UseCases/SceneModel/modelDataLoader.js +33 -0
- package/lib/UseCases/SceneObjects/PeelSceneObject.d.ts +18 -0
- package/lib/UseCases/SceneObjects/PeelSceneObject.js +61 -0
- package/lib/UseCases/SceneObjects/index.d.ts +1 -0
- package/lib/UseCases/SceneObjects/index.js +13 -0
- package/lib/UseCases/SceneRoot/SerializeSceneRoot.d.ts +33 -0
- package/lib/UseCases/SceneRoot/SerializeSceneRoot.js +67 -0
- package/lib/UseCases/SceneRoot/index.d.ts +2 -0
- package/lib/UseCases/SceneRoot/index.js +14 -0
- package/lib/UseCases/SceneRoot/setupSceneRoot.d.ts +2 -0
- package/lib/UseCases/SceneRoot/setupSceneRoot.js +11 -0
- package/lib/UseCases/index.d.ts +7 -0
- package/lib/{Components/BaseApp/Mocks → UseCases}/index.js +7 -7
- package/lib/UseCases/setDevicePreview.d.ts +2 -0
- package/lib/UseCases/setDevicePreview.js +14 -0
- package/lib/UseCases/setupStandardAppObjects.d.ts +2 -0
- package/lib/UseCases/setupStandardAppObjects.js +10 -0
- package/lib/ValueObjects/Result.d.ts +30 -0
- package/lib/ValueObjects/Result.js +45 -0
- package/package.json +1 -1
- package/lib/Components/BaseApp/Adapters/index.d.ts +0 -4
- package/lib/Components/BaseApp/Adapters/isAuthoringAdapter.d.ts +0 -2
- package/lib/Components/BaseApp/Adapters/isAuthoringAdapter.js +0 -23
- package/lib/Components/BaseApp/Adapters/isReviewingAdapter.d.ts +0 -2
- package/lib/Components/BaseApp/Adapters/isReviewingAdapter.js +0 -23
- package/lib/Components/BaseApp/Adapters/slideNavigationAdapter.d.ts +0 -3
- package/lib/Components/BaseApp/Adapters/slideNavigationAdapter.js +0 -23
- package/lib/Components/BaseApp/Adapters/slideTextAdapter.d.ts +0 -2
- package/lib/Components/BaseApp/Adapters/slideTextAdapter.js +0 -23
- package/lib/Components/BaseApp/Controller/clickContinue.d.ts +0 -2
- package/lib/Components/BaseApp/Controller/clickContinue.js +0 -13
- package/lib/Components/BaseApp/Controller/clickEditSlideText.d.ts +0 -2
- package/lib/Components/BaseApp/Controller/clickEditSlideText.js +0 -13
- package/lib/Components/BaseApp/Controller/index.d.ts +0 -5
- package/lib/Components/BaseApp/Controller/removeRenderCanvas.d.ts +0 -2
- package/lib/Components/BaseApp/Controller/removeRenderCanvas.js +0 -13
- package/lib/Components/BaseApp/Controller/submitRenderCanvas.d.ts +0 -2
- package/lib/Components/BaseApp/Controller/submitRenderCanvas.js +0 -13
- package/lib/Components/BaseApp/Controller/updateContentSize.d.ts +0 -2
- package/lib/Components/BaseApp/Controller/updateContentSize.js +0 -13
- package/lib/Components/BaseApp/Entity/BaseAppState.d.ts +0 -20
- package/lib/Components/BaseApp/Entity/BaseAppState.js +0 -68
- package/lib/Components/BaseApp/Entity/index.d.ts +0 -1
- package/lib/Components/BaseApp/Mocks/IsAuthoringMock.d.ts +0 -8
- package/lib/Components/BaseApp/Mocks/IsAuthoringMock.js +0 -15
- package/lib/Components/BaseApp/Mocks/IsReviewingMock.d.ts +0 -8
- package/lib/Components/BaseApp/Mocks/IsReviewingMock.js +0 -15
- package/lib/Components/BaseApp/Mocks/MockAppRenderingUC.d.ts +0 -10
- package/lib/Components/BaseApp/Mocks/MockAppRenderingUC.js +0 -16
- package/lib/Components/BaseApp/Mocks/MockRenderCanvasUC.d.ts +0 -10
- package/lib/Components/BaseApp/Mocks/MockRenderCanvasUC.js +0 -16
- package/lib/Components/BaseApp/Mocks/MockUpdateContentSizeUC.d.ts +0 -9
- package/lib/Components/BaseApp/Mocks/MockUpdateContentSizeUC.js +0 -15
- package/lib/Components/BaseApp/Mocks/SlideNavigationMock.d.ts +0 -8
- package/lib/Components/BaseApp/Mocks/SlideNavigationMock.js +0 -15
- package/lib/Components/BaseApp/Mocks/SlideTextMock.d.ts +0 -8
- package/lib/Components/BaseApp/Mocks/SlideTextMock.js +0 -15
- package/lib/Components/BaseApp/Mocks/index.d.ts +0 -7
- package/lib/Components/BaseApp/PM/IsAuthoringPM.d.ts +0 -6
- package/lib/Components/BaseApp/PM/IsAuthoringPM.js +0 -39
- package/lib/Components/BaseApp/PM/IsReviewingPM.d.ts +0 -6
- package/lib/Components/BaseApp/PM/IsReviewingPM.js +0 -39
- package/lib/Components/BaseApp/PM/SlideNavigationPM.d.ts +0 -12
- package/lib/Components/BaseApp/PM/SlideNavigationPM.js +0 -49
- package/lib/Components/BaseApp/PM/SlideTextPM.d.ts +0 -6
- package/lib/Components/BaseApp/PM/SlideTextPM.js +0 -34
- package/lib/Components/BaseApp/PM/index.d.ts +0 -4
- package/lib/Components/BaseApp/UC/AppRenderingUC.d.ts +0 -7
- package/lib/Components/BaseApp/UC/AppRenderingUC.js +0 -9
- package/lib/Components/BaseApp/UC/EditSlideTextUC.d.ts +0 -10
- package/lib/Components/BaseApp/UC/EditSlideTextUC.js +0 -57
- package/lib/Components/BaseApp/UC/RenderCanvasUC.d.ts +0 -10
- package/lib/Components/BaseApp/UC/RenderCanvasUC.js +0 -88
- package/lib/Components/BaseApp/UC/SerializeBaseAppState.d.ts +0 -17
- package/lib/Components/BaseApp/UC/SerializeBaseAppState.js +0 -59
- package/lib/Components/BaseApp/UC/UndoRedoEditSlideText.d.ts +0 -11
- package/lib/Components/BaseApp/UC/UndoRedoEditSlideText.js +0 -43
- package/lib/Components/BaseApp/UC/UpdateContentSizeUC.d.ts +0 -7
- package/lib/Components/BaseApp/UC/UpdateContentSizeUC.js +0 -33
- package/lib/Components/BaseApp/UC/index.d.ts +0 -7
- package/lib/Components/BaseApp/UC/index.js +0 -19
- package/lib/Components/BaseApp/index.d.ts +0 -6
- package/lib/Components/BaseApp/index.js +0 -18
- package/lib/Components/Callouts/Adapters/calloutLinePointsAdapter.d.ts +0 -3
- package/lib/Components/Callouts/Adapters/calloutLinePointsAdapter.js +0 -23
- package/lib/Components/Callouts/Adapters/calloutListAdapter.d.ts +0 -2
- package/lib/Components/Callouts/Adapters/calloutListAdapter.js +0 -23
- package/lib/Components/Callouts/Adapters/calloutOffsetAdapter.d.ts +0 -3
- package/lib/Components/Callouts/Adapters/calloutOffsetAdapter.js +0 -23
- package/lib/Components/Callouts/Adapters/calloutSizeAdapter.d.ts +0 -2
- package/lib/Components/Callouts/Adapters/calloutSizeAdapter.js +0 -23
- package/lib/Components/Callouts/Adapters/index.d.ts +0 -4
- package/lib/Components/Callouts/Controller/MouseAddCalloutMC.d.ts +0 -13
- package/lib/Components/Callouts/Controller/MouseAddCalloutMC.js +0 -43
- package/lib/Components/Callouts/Controller/MouseCalloutRoll.d.ts +0 -9
- package/lib/Components/Callouts/Controller/MouseCalloutRoll.js +0 -27
- package/lib/Components/Callouts/Controller/TouchAddCalloutTC.d.ts +0 -13
- package/lib/Components/Callouts/Controller/TouchAddCalloutTC.js +0 -47
- package/lib/Components/Callouts/Controller/deleteAllCallouts.d.ts +0 -2
- package/lib/Components/Callouts/Controller/deleteAllCallouts.js +0 -13
- package/lib/Components/Callouts/Controller/deleteCallout.d.ts +0 -2
- package/lib/Components/Callouts/Controller/deleteCallout.js +0 -13
- package/lib/Components/Callouts/Controller/index.d.ts +0 -6
- package/lib/Components/Callouts/Controller/index.js +0 -18
- package/lib/Components/Callouts/Controller/submitCalloutSize.d.ts +0 -2
- package/lib/Components/Callouts/Controller/submitCalloutSize.js +0 -13
- package/lib/Components/Callouts/Controller/updateCalloutSize.d.ts +0 -2
- package/lib/Components/Callouts/Controller/updateCalloutSize.js +0 -13
- package/lib/Components/Callouts/Entities/CalloutEntity.d.ts +0 -51
- package/lib/Components/Callouts/Entities/CalloutEntity.js +0 -141
- package/lib/Components/Callouts/Entities/CalloutGlobals.d.ts +0 -11
- package/lib/Components/Callouts/Entities/CalloutGlobals.js +0 -29
- package/lib/Components/Callouts/Entities/CalloutRepo.d.ts +0 -15
- package/lib/Components/Callouts/Entities/CalloutRepo.js +0 -57
- package/lib/Components/Callouts/Entities/index.d.ts +0 -3
- package/lib/Components/Callouts/Mocks/CalloutLinePointsPmMock.d.ts +0 -7
- package/lib/Components/Callouts/Mocks/CalloutLinePointsPmMock.js +0 -11
- package/lib/Components/Callouts/Mocks/CalloutListPmMock.d.ts +0 -7
- package/lib/Components/Callouts/Mocks/CalloutListPmMock.js +0 -11
- package/lib/Components/Callouts/Mocks/CalloutOffsetPmMock.d.ts +0 -7
- package/lib/Components/Callouts/Mocks/CalloutOffsetPmMock.js +0 -11
- package/lib/Components/Callouts/Mocks/CalloutSizePmMock.d.ts +0 -7
- package/lib/Components/Callouts/Mocks/CalloutSizePmMock.js +0 -11
- package/lib/Components/Callouts/Mocks/CreateCalloutUcMock.d.ts +0 -8
- package/lib/Components/Callouts/Mocks/CreateCalloutUcMock.js +0 -12
- package/lib/Components/Callouts/Mocks/DeleteCalloutUcMock.d.ts +0 -7
- package/lib/Components/Callouts/Mocks/DeleteCalloutUcMock.js +0 -11
- package/lib/Components/Callouts/Mocks/MoveCalloutToCamUcMock.d.ts +0 -7
- package/lib/Components/Callouts/Mocks/MoveCalloutToCamUcMock.js +0 -11
- package/lib/Components/Callouts/Mocks/SetCalloutSizeUcMock.d.ts +0 -8
- package/lib/Components/Callouts/Mocks/SetCalloutSizeUcMock.js +0 -12
- package/lib/Components/Callouts/Mocks/TryAddCalloutMock.d.ts +0 -14
- package/lib/Components/Callouts/Mocks/TryAddCalloutMock.js +0 -21
- package/lib/Components/Callouts/Mocks/TryBumpLabelUcMock.d.ts +0 -9
- package/lib/Components/Callouts/Mocks/TryBumpLabelUcMock.js +0 -13
- package/lib/Components/Callouts/Mocks/index.d.ts +0 -8
- package/lib/Components/Callouts/Mocks/index.js +0 -20
- package/lib/Components/Callouts/PM/CalloutLinePointsPM.d.ts +0 -7
- package/lib/Components/Callouts/PM/CalloutLinePointsPM.js +0 -97
- package/lib/Components/Callouts/PM/CalloutListPM.d.ts +0 -6
- package/lib/Components/Callouts/PM/CalloutListPM.js +0 -49
- package/lib/Components/Callouts/PM/CalloutOffsetPM.d.ts +0 -7
- package/lib/Components/Callouts/PM/CalloutOffsetPM.js +0 -37
- package/lib/Components/Callouts/PM/CalloutSizePM.d.ts +0 -6
- package/lib/Components/Callouts/PM/CalloutSizePM.js +0 -41
- package/lib/Components/Callouts/PM/index.d.ts +0 -4
- package/lib/Components/Callouts/PM/index.js +0 -16
- package/lib/Components/Callouts/UC/CalloutScaleHook.d.ts +0 -11
- package/lib/Components/Callouts/UC/CalloutScaleHook.js +0 -48
- package/lib/Components/Callouts/UC/CreateCalloutUC.d.ts +0 -11
- package/lib/Components/Callouts/UC/CreateCalloutUC.js +0 -64
- package/lib/Components/Callouts/UC/CreateCalloutUndoRedo.d.ts +0 -10
- package/lib/Components/Callouts/UC/CreateCalloutUndoRedo.js +0 -36
- package/lib/Components/Callouts/UC/DeleteAllCalloutsUC.d.ts +0 -8
- package/lib/Components/Callouts/UC/DeleteAllCalloutsUC.js +0 -43
- package/lib/Components/Callouts/UC/DeleteAllCalloutsUndoRedo.d.ts +0 -10
- package/lib/Components/Callouts/UC/DeleteAllCalloutsUndoRedo.js +0 -40
- package/lib/Components/Callouts/UC/DeleteCallout.d.ts +0 -8
- package/lib/Components/Callouts/UC/DeleteCallout.js +0 -38
- package/lib/Components/Callouts/UC/DeleteCalloutUndoRedo.d.ts +0 -10
- package/lib/Components/Callouts/UC/DeleteCalloutUndoRedo.js +0 -36
- package/lib/Components/Callouts/UC/LookAtCameraUC.d.ts +0 -7
- package/lib/Components/Callouts/UC/LookAtCameraUC.js +0 -104
- package/lib/Components/Callouts/UC/MoveCalloutToCamUC.d.ts +0 -14
- package/lib/Components/Callouts/UC/MoveCalloutToCamUC.js +0 -35
- package/lib/Components/Callouts/UC/SerializeCallouts.d.ts +0 -17
- package/lib/Components/Callouts/UC/SerializeCallouts.js +0 -94
- package/lib/Components/Callouts/UC/SetCalloutSizeUC.d.ts +0 -9
- package/lib/Components/Callouts/UC/SetCalloutSizeUC.js +0 -63
- package/lib/Components/Callouts/UC/SetCalloutSizeUndoRedo.d.ts +0 -15
- package/lib/Components/Callouts/UC/SetCalloutSizeUndoRedo.js +0 -28
- package/lib/Components/Callouts/UC/TryAddCallout.d.ts +0 -14
- package/lib/Components/Callouts/UC/TryAddCallout.js +0 -111
- package/lib/Components/Callouts/UC/TryBumpLabelUC.d.ts +0 -9
- package/lib/Components/Callouts/UC/TryBumpLabelUC.js +0 -61
- package/lib/Components/Callouts/UC/TryPanLabelUC.d.ts +0 -3
- package/lib/Components/Callouts/UC/TryPanLabelUC.js +0 -38
- package/lib/Components/Callouts/UC/index.d.ts +0 -13
- package/lib/Components/Callouts/UC/index.js +0 -25
- package/lib/Components/Callouts/index.d.ts +0 -6
- package/lib/Components/Callouts/index.js +0 -18
- package/lib/Components/Camera/Adapters/cameraAdapter.d.ts +0 -3
- package/lib/Components/Camera/Adapters/cameraAdapter.js +0 -19
- package/lib/Components/Camera/Adapters/index.d.ts +0 -1
- package/lib/Components/Camera/Mocks/CameraPmMock.d.ts +0 -8
- package/lib/Components/Camera/Mocks/CameraPmMock.js +0 -15
- package/lib/Components/Camera/Mocks/index.d.ts +0 -1
- package/lib/Components/Challenge/Mocks/ChallengeEntityMock.d.ts +0 -17
- package/lib/Components/Challenge/Mocks/ChallengeEntityMock.js +0 -38
- package/lib/Components/Challenge/Mocks/ChallengeMock.d.ts +0 -11
- package/lib/Components/Challenge/Mocks/ChallengeMock.js +0 -13
- package/lib/Components/ChannelModel/Adapters/modelHasCalloutsAdapter.d.ts +0 -2
- package/lib/Components/ChannelModel/Adapters/modelHasCalloutsAdapter.js +0 -27
- package/lib/Components/ChannelModel/Adapters/modelObjectsHaveOverlayAdapter.d.ts +0 -2
- package/lib/Components/ChannelModel/Adapters/modelObjectsHaveOverlayAdapter.js +0 -27
- package/lib/Components/ChannelModel/Controllers/clearActiveObjectsOverlays.d.ts +0 -2
- package/lib/Components/ChannelModel/Controllers/clearActiveObjectsOverlays.js +0 -23
- package/lib/Components/ChannelModel/Mocks/ClearModelObjectOverlaysUCMock.d.ts +0 -7
- package/lib/Components/ChannelModel/Mocks/ClearModelObjectOverlaysUCMock.js +0 -11
- package/lib/Components/ChannelModel/Mocks/ModelHasCalloutsPmMock.d.ts +0 -7
- package/lib/Components/ChannelModel/Mocks/ModelHasCalloutsPmMock.js +0 -11
- package/lib/Components/ChannelModel/Mocks/ModelObjectsHaveOverlayPMMock.d.ts +0 -7
- package/lib/Components/ChannelModel/Mocks/ModelObjectsHaveOverlayPMMock.js +0 -11
- package/lib/Components/ChannelModel/PMs/ModelHasCalloutsPM.d.ts +0 -6
- package/lib/Components/ChannelModel/PMs/ModelHasCalloutsPM.js +0 -47
- package/lib/Components/ChannelModel/PMs/ModelObjectsHaveOverlayPM.d.ts +0 -6
- package/lib/Components/ChannelModel/PMs/ModelObjectsHaveOverlayPM.js +0 -58
- package/lib/Components/ChannelModel/UC/ClearAllColorOverlayUndoRedo.d.ts +0 -13
- package/lib/Components/ChannelModel/UC/ClearAllColorOverlayUndoRedo.js +0 -37
- package/lib/Components/ChannelModel/UC/ClearModelObjectOverlaysUC.d.ts +0 -7
- package/lib/Components/ChannelModel/UC/ClearModelObjectOverlaysUC.js +0 -53
- package/lib/Components/Landmarks/Controller/submitLandmarkSizeX.d.ts +0 -2
- package/lib/Components/Landmarks/Controller/submitLandmarkSizeX.js +0 -19
- package/lib/Components/Landmarks/Controller/updateLandmarkSizeX.d.ts +0 -2
- package/lib/Components/Landmarks/Controller/updateLandmarkSizeX.js +0 -19
- package/lib/Components/ObjectPick/Adapters/index.d.ts +0 -1
- package/lib/Components/ObjectPick/Adapters/objectPickAdapter.d.ts +0 -3
- package/lib/Components/ObjectPick/Adapters/objectPickAdapter.js +0 -19
- package/lib/Components/ObjectPick/Controllers/MouseObjectPickMC.d.ts +0 -11
- package/lib/Components/ObjectPick/Controllers/MouseObjectPickMC.js +0 -45
- package/lib/Components/ObjectPick/Controllers/StylusObjectPickSC.d.ts +0 -9
- package/lib/Components/ObjectPick/Controllers/StylusObjectPickSC.js +0 -30
- package/lib/Components/ObjectPick/Controllers/TouchObjectPickTC.d.ts +0 -11
- package/lib/Components/ObjectPick/Controllers/TouchObjectPickTC.js +0 -42
- package/lib/Components/ObjectPick/Controllers/addCorrectObjectPickID.d.ts +0 -2
- package/lib/Components/ObjectPick/Controllers/addCorrectObjectPickID.js +0 -13
- package/lib/Components/ObjectPick/Controllers/clearCorrectObjectPickIDs.d.ts +0 -2
- package/lib/Components/ObjectPick/Controllers/clearCorrectObjectPickIDs.js +0 -13
- package/lib/Components/ObjectPick/Controllers/index.d.ts +0 -7
- package/lib/Components/ObjectPick/Controllers/index.js +0 -19
- package/lib/Components/ObjectPick/Controllers/removeCorrectObjectPickID.d.ts +0 -2
- package/lib/Components/ObjectPick/Controllers/removeCorrectObjectPickID.js +0 -13
- package/lib/Components/ObjectPick/Controllers/toggleIsSelectingCorrectObjectPicks.d.ts +0 -2
- package/lib/Components/ObjectPick/Controllers/toggleIsSelectingCorrectObjectPicks.js +0 -14
- package/lib/Components/ObjectPick/Entities/ObjectPickEntity.d.ts +0 -22
- package/lib/Components/ObjectPick/Entities/ObjectPickEntity.js +0 -82
- package/lib/Components/ObjectPick/Entities/index.d.ts +0 -1
- package/lib/Components/ObjectPick/Entities/index.js +0 -13
- package/lib/Components/ObjectPick/Mocks/AddCorrectObjectIdUcMock.d.ts +0 -8
- package/lib/Components/ObjectPick/Mocks/AddCorrectObjectIdUcMock.js +0 -15
- package/lib/Components/ObjectPick/Mocks/ClearCorrectObjectIdsUCMock.d.ts +0 -8
- package/lib/Components/ObjectPick/Mocks/ClearCorrectObjectIdsUCMock.js +0 -15
- package/lib/Components/ObjectPick/Mocks/ObjectPickPmMock.d.ts +0 -8
- package/lib/Components/ObjectPick/Mocks/ObjectPickPmMock.js +0 -15
- package/lib/Components/ObjectPick/Mocks/RemoveCorrectObjectIdUcMock.d.ts +0 -8
- package/lib/Components/ObjectPick/Mocks/RemoveCorrectObjectIdUcMock.js +0 -15
- package/lib/Components/ObjectPick/Mocks/TrySelectObjectPickUCMock.d.ts +0 -9
- package/lib/Components/ObjectPick/Mocks/TrySelectObjectPickUCMock.js +0 -16
- package/lib/Components/ObjectPick/Mocks/TrySubmitObjectPickUCMock.d.ts +0 -9
- package/lib/Components/ObjectPick/Mocks/TrySubmitObjectPickUCMock.js +0 -16
- package/lib/Components/ObjectPick/Mocks/ValidateObjectPickUcMock.d.ts +0 -8
- package/lib/Components/ObjectPick/Mocks/ValidateObjectPickUcMock.js +0 -15
- package/lib/Components/ObjectPick/Mocks/index.d.ts +0 -7
- package/lib/Components/ObjectPick/Mocks/index.js +0 -19
- package/lib/Components/ObjectPick/PM/ObjectPickPM.d.ts +0 -14
- package/lib/Components/ObjectPick/PM/ObjectPickPM.js +0 -72
- package/lib/Components/ObjectPick/PM/index.d.ts +0 -1
- package/lib/Components/ObjectPick/UseCases/AddCorrectObjectIdUC.d.ts +0 -7
- package/lib/Components/ObjectPick/UseCases/AddCorrectObjectIdUC.js +0 -48
- package/lib/Components/ObjectPick/UseCases/ClearCorrectObjectIdsUC.d.ts +0 -7
- package/lib/Components/ObjectPick/UseCases/ClearCorrectObjectIdsUC.js +0 -55
- package/lib/Components/ObjectPick/UseCases/RemoveCorrectObjectIdUC.d.ts +0 -7
- package/lib/Components/ObjectPick/UseCases/RemoveCorrectObjectIdUC.js +0 -48
- package/lib/Components/ObjectPick/UseCases/SerializeObjectPick.d.ts +0 -16
- package/lib/Components/ObjectPick/UseCases/SerializeObjectPick.js +0 -54
- package/lib/Components/ObjectPick/UseCases/TrySelectObjectPickUC.d.ts +0 -9
- package/lib/Components/ObjectPick/UseCases/TrySelectObjectPickUC.js +0 -83
- package/lib/Components/ObjectPick/UseCases/TrySubmitObjectPickUC.d.ts +0 -9
- package/lib/Components/ObjectPick/UseCases/TrySubmitObjectPickUC.js +0 -69
- package/lib/Components/ObjectPick/UseCases/ValidateObjectPickUC.d.ts +0 -10
- package/lib/Components/ObjectPick/UseCases/ValidateObjectPickUC.js +0 -62
- package/lib/Components/ObjectPick/UseCases/index.d.ts +0 -7
- package/lib/Components/ObjectPick/UseCases/index.js +0 -19
- package/lib/Components/ObjectPick/index.d.ts +0 -6
- package/lib/Components/ObjectPick/index.js +0 -18
- package/lib/Components/Question/UC/registerQuestionChallenge.d.ts +0 -2
- package/lib/Components/Question/UC/registerQuestionChallenge.js +0 -20
- package/lib/Components/Transform3D/Controllers/Mouse/TryMousePanTransformMC.d.ts +0 -13
- package/lib/Components/Transform3D/Controllers/Mouse/TryMousePanTransformMC.js +0 -51
- package/lib/Components/Transform3D/Controllers/Touch/TryTouchPanTransformTC.d.ts +0 -12
- package/lib/Components/Transform3D/Controllers/Touch/TryTouchPanTransformTC.js +0 -53
- package/lib/Components/Transform3D/Mocks/TryPanTransformUcMock.d.ts +0 -13
- package/lib/Components/Transform3D/Mocks/TryPanTransformUcMock.js +0 -17
- package/lib/Components/Transform3D/UC/TryPanTransformUC.d.ts +0 -27
- package/lib/Components/Transform3D/UC/TryPanTransformUC.js +0 -79
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeSceneRoot = exports.SceneRoot = exports.SCENE_ROOT_ID = void 0;
|
|
4
|
+
const ValueObjects_1 = require("../ValueObjects");
|
|
5
|
+
const ObservableEntity_1 = require("./ObservableEntity");
|
|
6
|
+
exports.SCENE_ROOT_ID = "scene-root";
|
|
7
|
+
class SceneRoot extends ObservableEntity_1.ObservableEntity {
|
|
8
|
+
}
|
|
9
|
+
exports.SceneRoot = SceneRoot;
|
|
10
|
+
function makeSceneRoot() {
|
|
11
|
+
return new SceneRootImp();
|
|
12
|
+
}
|
|
13
|
+
exports.makeSceneRoot = makeSceneRoot;
|
|
14
|
+
class SceneRootImp extends SceneRoot {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this._defaultPosition = ValueObjects_1.Vector3.Zero();
|
|
18
|
+
this._defaultRoation = ValueObjects_1.Quaternion.Identity();
|
|
19
|
+
this._defaultScale = 1;
|
|
20
|
+
this._minScale = 0.01;
|
|
21
|
+
this._maxScale = 10;
|
|
22
|
+
this.applyDefaultData = (data) => {
|
|
23
|
+
this._defaultPosition = ValueObjects_1.Vector3.FromArray(data.position);
|
|
24
|
+
this._defaultRoation = ValueObjects_1.Quaternion.FromArray(data.rotation);
|
|
25
|
+
this._defaultScale = data.scale;
|
|
26
|
+
this._maxScale = data.maxScale;
|
|
27
|
+
this._minScale = data.minScale;
|
|
28
|
+
};
|
|
29
|
+
this.centerOnPoint = (point, durationMS, easeFn, onCompleted) => {
|
|
30
|
+
if (!this.sceneObject) {
|
|
31
|
+
console.warn("SceneRoot does not have a scene object");
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const finalPosition = ValueObjects_1.Vector3.Subtract(this.sceneObject.transform.worldPosition, point);
|
|
35
|
+
this.sceneObject.transform.lerp(durationMS, easeFn, finalPosition, undefined, undefined, onCompleted);
|
|
36
|
+
};
|
|
37
|
+
this.bumpScaleAboutPoint = (amount, worldPoint) => {
|
|
38
|
+
if (!this.sceneObject) {
|
|
39
|
+
console.warn("SceneRoot does not have a scene object");
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const localPickOffset = this.sceneObject.transform.worldPointToLocal(worldPoint);
|
|
43
|
+
const currentScale = this.sceneObject.transform.worldScale.x;
|
|
44
|
+
let newScale = currentScale + amount;
|
|
45
|
+
if (newScale < this.minScale) {
|
|
46
|
+
newScale = this.minScale;
|
|
47
|
+
}
|
|
48
|
+
else if (newScale > this.maxScale) {
|
|
49
|
+
newScale = this.maxScale;
|
|
50
|
+
}
|
|
51
|
+
this.sceneObject.transform.worldScale = new ValueObjects_1.Vector3(newScale, newScale, newScale);
|
|
52
|
+
const worldPickOffset = this.sceneObject.transform.localPointToWorld(localPickOffset);
|
|
53
|
+
const bump = ValueObjects_1.Vector3.Subtract(worldPoint, worldPickOffset);
|
|
54
|
+
this.sceneObject.transform.worldPosition = ValueObjects_1.Vector3.Add(bump, this.sceneObject.transform.worldPosition);
|
|
55
|
+
};
|
|
56
|
+
this.lerpToDefault = (durationMS, easeFn, onCompleted) => {
|
|
57
|
+
if (!this.sceneObject) {
|
|
58
|
+
console.warn("SceneRoot does not have a scene object");
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
this.sceneObject.transform.lerp(durationMS, easeFn, this.defaultPosition, this.defaultRoation, new ValueObjects_1.Vector3(this.defaultScale, this.defaultScale, this.defaultScale), onCompleted);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
get position() {
|
|
65
|
+
if (this.sceneObject) {
|
|
66
|
+
return this.sceneObject.transform.localPosition;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
console.warn("SceneRoot does not have a scene object");
|
|
70
|
+
return ValueObjects_1.Vector3.Zero();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
set position(p) {
|
|
74
|
+
if (this.sceneObject) {
|
|
75
|
+
this.sceneObject.transform.localPosition = p;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
console.warn("SceneRoot does not have a scene object");
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
get rotation() {
|
|
82
|
+
if (this.sceneObject) {
|
|
83
|
+
return this.sceneObject.transform.localRotation;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
console.warn("SceneRoot does not have a scene object");
|
|
87
|
+
return ValueObjects_1.Quaternion.Identity();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
set rotation(r) {
|
|
91
|
+
if (this.sceneObject) {
|
|
92
|
+
this.sceneObject.transform.localRotation = r;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
console.warn("SceneRoot does not have a scene object");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
get scale() {
|
|
99
|
+
if (this.sceneObject) {
|
|
100
|
+
return this.sceneObject.transform.localScale.x;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
console.warn("SceneRoot does not have a scene object");
|
|
104
|
+
return 1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
set scale(s) {
|
|
108
|
+
if (this.sceneObject) {
|
|
109
|
+
this.sceneObject.transform.localScale = new ValueObjects_1.Vector3(s, s, s);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
console.warn("SceneRoot does not have a scene object");
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
get sceneObject() {
|
|
116
|
+
return this._sceneObject;
|
|
117
|
+
}
|
|
118
|
+
set sceneObject(so) {
|
|
119
|
+
if (this._sceneObject) {
|
|
120
|
+
this._sceneObject.removeObserver(this.notify);
|
|
121
|
+
}
|
|
122
|
+
this._sceneObject = so;
|
|
123
|
+
if (this._sceneObject) {
|
|
124
|
+
this._sceneObject.addObserver(this.notify);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
get defaultPosition() {
|
|
128
|
+
return this._defaultPosition;
|
|
129
|
+
}
|
|
130
|
+
get defaultRoation() {
|
|
131
|
+
return this._defaultRoation;
|
|
132
|
+
}
|
|
133
|
+
get defaultScale() {
|
|
134
|
+
return this._defaultScale;
|
|
135
|
+
}
|
|
136
|
+
get minScale() {
|
|
137
|
+
return this._minScale;
|
|
138
|
+
}
|
|
139
|
+
get maxScale() {
|
|
140
|
+
return this._maxScale;
|
|
141
|
+
}
|
|
142
|
+
get id() {
|
|
143
|
+
return exports.SCENE_ROOT_ID;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Result } from "../ValueObjects";
|
|
2
|
+
export declare type OnStateHasBeenApplied = () => void;
|
|
3
|
+
export interface SerializedStates {
|
|
4
|
+
version: number;
|
|
5
|
+
systems: SystemState[];
|
|
6
|
+
}
|
|
7
|
+
export interface SystemState {
|
|
8
|
+
name: string;
|
|
9
|
+
seriliziationVersion: number;
|
|
10
|
+
state: object;
|
|
11
|
+
}
|
|
12
|
+
export interface SerializedSystem {
|
|
13
|
+
name: string;
|
|
14
|
+
seriliziationVersion: number;
|
|
15
|
+
getSystemState(): object;
|
|
16
|
+
applySystemState(state: object, version: number, transitionDuration: number): void;
|
|
17
|
+
applyDefaultState(transitionDuration: number): void;
|
|
18
|
+
}
|
|
19
|
+
export interface StateMachine {
|
|
20
|
+
transitionEaseFunction: (normalizedTime: number) => number;
|
|
21
|
+
getSerializedStates(): SerializedStates;
|
|
22
|
+
setSerializedStates(state: SerializedStates, transitionTime: number): Result<null, Error>;
|
|
23
|
+
applySerializedStatesString: (state: string, duration?: number) => void;
|
|
24
|
+
setDefaultState(transitionTime: number): void;
|
|
25
|
+
registerSerializedSystem(serializedSystem: SerializedSystem): Result<null, Error>;
|
|
26
|
+
addStateHasBeenAppliedObserver: (observer: OnStateHasBeenApplied) => void;
|
|
27
|
+
removeStateHasBeenAppliedObserver: (observer: OnStateHasBeenApplied) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare function makeStateMachine(): StateMachine;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeStateMachine = void 0;
|
|
4
|
+
const ValueObjects_1 = require("../ValueObjects");
|
|
5
|
+
const ObserverList_1 = require("./ObserverList");
|
|
6
|
+
function makeStateMachine() {
|
|
7
|
+
return new StateMachineImp();
|
|
8
|
+
}
|
|
9
|
+
exports.makeStateMachine = makeStateMachine;
|
|
10
|
+
class StateMachineImp {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.serializedSystems = new Map();
|
|
13
|
+
this.serilizationVersion = 2;
|
|
14
|
+
this.stateAppliedObservers = new ObserverList_1.ObserverList();
|
|
15
|
+
this.transitionEaseFunction = (normalizedTime) => {
|
|
16
|
+
return normalizedTime; // default to a linear function
|
|
17
|
+
};
|
|
18
|
+
this.applySerializedStatesString = (state, duration = 0) => {
|
|
19
|
+
if (state === "") {
|
|
20
|
+
this.setDefaultState(duration);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
try {
|
|
24
|
+
const stateObj = JSON.parse(state);
|
|
25
|
+
this.setSerializedStates(stateObj, duration);
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
this.setDefaultState(duration);
|
|
29
|
+
console.warn("[StateMachine] Failed to deserialize state string: " + e);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
this.registerSerializedSystem = (serializedSystem) => {
|
|
34
|
+
if (this.serializedSystems.has(serializedSystem.name)) {
|
|
35
|
+
const err = new Error(`[StateMachine] Duplicate stateable systems encountered: ${serializedSystem.name}`);
|
|
36
|
+
console.error(err.message);
|
|
37
|
+
return ValueObjects_1.reject(err);
|
|
38
|
+
}
|
|
39
|
+
this.serializedSystems.set(serializedSystem.name, serializedSystem);
|
|
40
|
+
return ValueObjects_1.resolve(null);
|
|
41
|
+
};
|
|
42
|
+
this.getSerializedStates = () => {
|
|
43
|
+
const systems = Array.from(this.serializedSystems.values());
|
|
44
|
+
const serializedStates = systems.map((system) => {
|
|
45
|
+
const state = system.getSystemState();
|
|
46
|
+
return {
|
|
47
|
+
seriliziationVersion: system.seriliziationVersion,
|
|
48
|
+
name: system.name,
|
|
49
|
+
state,
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
version: this.serilizationVersion,
|
|
54
|
+
systems: serializedStates,
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
this.setSerializedStates = (state, duration) => {
|
|
58
|
+
if (state.version === 2) {
|
|
59
|
+
const appliedToSystems = [];
|
|
60
|
+
state.systems.forEach((systemState) => {
|
|
61
|
+
const seriliazableSystem = this.serializedSystems.get(systemState.name);
|
|
62
|
+
if (seriliazableSystem) {
|
|
63
|
+
seriliazableSystem.applySystemState(systemState.state, systemState.seriliziationVersion, duration);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
console.warn("Unable to find seriarializedSystem " + systemState.name);
|
|
67
|
+
}
|
|
68
|
+
appliedToSystems.push(systemState.name);
|
|
69
|
+
});
|
|
70
|
+
this.serializedSystems.forEach((system) => {
|
|
71
|
+
if (!appliedToSystems.includes(system.name)) {
|
|
72
|
+
system.applyDefaultState(duration);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
this.stateAppliedObservers.notify();
|
|
76
|
+
return ValueObjects_1.resolve(null);
|
|
77
|
+
}
|
|
78
|
+
// Here is where we will add support for future versions
|
|
79
|
+
else {
|
|
80
|
+
const err = new Error(`[StateMachine] Unsupported sereialized state encountered: ${state.version}`);
|
|
81
|
+
console.error(err.message);
|
|
82
|
+
return ValueObjects_1.reject(err);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
this.setDefaultState = (duration) => {
|
|
86
|
+
this.serializedSystems.forEach((system) => {
|
|
87
|
+
system.applyDefaultState(duration);
|
|
88
|
+
});
|
|
89
|
+
this.stateAppliedObservers.notify();
|
|
90
|
+
};
|
|
91
|
+
this.addStateHasBeenAppliedObserver = (observer) => {
|
|
92
|
+
this.stateAppliedObservers.add(observer);
|
|
93
|
+
};
|
|
94
|
+
this.removeStateHasBeenAppliedObserver = (observer) => {
|
|
95
|
+
this.stateAppliedObservers.remove(observer);
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ObservableEntity } from "./ObservableEntity";
|
|
2
|
+
export declare enum ToolState {
|
|
3
|
+
HIDDEN = "HIDDEN",
|
|
4
|
+
DISABLED = "DISABLED",
|
|
5
|
+
ENABLED = "ENABLED",
|
|
6
|
+
ACTIVE = "ACTIVE"
|
|
7
|
+
}
|
|
8
|
+
export interface ToolData<ToolTypes> {
|
|
9
|
+
type: ToolTypes;
|
|
10
|
+
isDefault: boolean;
|
|
11
|
+
label: string;
|
|
12
|
+
shortcutLabel: string;
|
|
13
|
+
hotkeys: HotKey[];
|
|
14
|
+
}
|
|
15
|
+
export interface HotKey {
|
|
16
|
+
keyCode: string;
|
|
17
|
+
control?: boolean;
|
|
18
|
+
shift?: boolean;
|
|
19
|
+
meta?: boolean;
|
|
20
|
+
alt?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare abstract class Tool<ToolTypes> extends ObservableEntity {
|
|
23
|
+
/**
|
|
24
|
+
* The tool's type
|
|
25
|
+
*/
|
|
26
|
+
abstract readonly type: ToolTypes;
|
|
27
|
+
/**
|
|
28
|
+
* Gets label for this tool. This will be human readable
|
|
29
|
+
*/
|
|
30
|
+
abstract get label(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Sets label for this tool. This should be human readable. A change will notify
|
|
33
|
+
*/
|
|
34
|
+
abstract set label(toolLabel: string);
|
|
35
|
+
/**
|
|
36
|
+
* Is this the default tool? The default tool is what is initiall set Active and
|
|
37
|
+
* is what will be set active if the currently active tool is hidden or disabled.
|
|
38
|
+
*/
|
|
39
|
+
abstract readonly isDefault: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the keyboard shorcut label. This will be displayed to the user via the tool tip
|
|
42
|
+
* Example 'z'
|
|
43
|
+
*/
|
|
44
|
+
abstract get shortcutLabel(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Sets the keyboard shorcut label. This will be displayed to the user via the tool tip
|
|
47
|
+
* Example 'z'. This will notify when changed
|
|
48
|
+
*/
|
|
49
|
+
abstract set shortcutLabel(shorcut: string);
|
|
50
|
+
/**
|
|
51
|
+
* Get the current tool state
|
|
52
|
+
*/
|
|
53
|
+
abstract get state(): ToolState;
|
|
54
|
+
/**
|
|
55
|
+
* Sets the current tool state. This will notify on change
|
|
56
|
+
*/
|
|
57
|
+
abstract set state(val: ToolState);
|
|
58
|
+
/**
|
|
59
|
+
* The keyboard shortcuts for this tool
|
|
60
|
+
*/
|
|
61
|
+
abstract readonly hotkeys: HotKey[];
|
|
62
|
+
/**
|
|
63
|
+
* Is this tool an action tool. In other words do you just click it and something should happen
|
|
64
|
+
*/
|
|
65
|
+
abstract get isAction(): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* If this is an action tool calling this will trigger any actions that have been registered
|
|
68
|
+
*/
|
|
69
|
+
abstract triggerActions(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Registers an action with this tool. This action will be called when this tool is triggered
|
|
72
|
+
* @param action The action to call when this tool is triggered
|
|
73
|
+
*/
|
|
74
|
+
abstract registerAction(action: () => void): void;
|
|
75
|
+
/**
|
|
76
|
+
* Returns a true if the passed hotkey is in my hotkey list
|
|
77
|
+
* @param hotkey The Hotkey to chekc
|
|
78
|
+
*/
|
|
79
|
+
abstract isMyHotkey(hotkey: HotKey): boolean;
|
|
80
|
+
}
|
|
81
|
+
export declare function makeTool<ToolTypes>(data: ToolData<ToolTypes>): Tool<ToolTypes>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeTool = exports.Tool = exports.ToolState = void 0;
|
|
4
|
+
const MemoizedString_1 = require("./Memoized/MemoizedString");
|
|
5
|
+
const ObservableEntity_1 = require("./ObservableEntity");
|
|
6
|
+
var ToolState;
|
|
7
|
+
(function (ToolState) {
|
|
8
|
+
ToolState["HIDDEN"] = "HIDDEN";
|
|
9
|
+
ToolState["DISABLED"] = "DISABLED";
|
|
10
|
+
ToolState["ENABLED"] = "ENABLED";
|
|
11
|
+
ToolState["ACTIVE"] = "ACTIVE";
|
|
12
|
+
})(ToolState = exports.ToolState || (exports.ToolState = {}));
|
|
13
|
+
class Tool extends ObservableEntity_1.ObservableEntity {
|
|
14
|
+
}
|
|
15
|
+
exports.Tool = Tool;
|
|
16
|
+
function makeTool(data) {
|
|
17
|
+
return new ToolImp(data);
|
|
18
|
+
}
|
|
19
|
+
exports.makeTool = makeTool;
|
|
20
|
+
class ToolImp extends Tool {
|
|
21
|
+
constructor(data) {
|
|
22
|
+
super();
|
|
23
|
+
this.memoizedState = new MemoizedString_1.MemoizedString(ToolState.ENABLED, this.notify);
|
|
24
|
+
this.actions = [];
|
|
25
|
+
this._isAction = false;
|
|
26
|
+
this.registerAction = (action) => {
|
|
27
|
+
this.actions.push(action);
|
|
28
|
+
this._isAction = true;
|
|
29
|
+
};
|
|
30
|
+
this.triggerActions = () => {
|
|
31
|
+
this.actions.forEach((action) => {
|
|
32
|
+
action();
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
this.isMyHotkey = (hotkey) => {
|
|
36
|
+
let isMine = false;
|
|
37
|
+
this.hotkeys.forEach((myHotkey) => {
|
|
38
|
+
if (this.hotkeysMatch(myHotkey, hotkey)) {
|
|
39
|
+
isMine = true;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return isMine;
|
|
43
|
+
};
|
|
44
|
+
this.type = data.type;
|
|
45
|
+
this.memoizedLabel = new MemoizedString_1.MemoizedString(data.label, this.notify);
|
|
46
|
+
this.isDefault = data.isDefault;
|
|
47
|
+
this.memoizedShortcut = new MemoizedString_1.MemoizedString(data.shortcutLabel, this.notify);
|
|
48
|
+
this.hotkeys = data.hotkeys;
|
|
49
|
+
}
|
|
50
|
+
get label() {
|
|
51
|
+
return this.memoizedLabel.val;
|
|
52
|
+
}
|
|
53
|
+
set label(toolLabel) {
|
|
54
|
+
this.memoizedLabel.val = toolLabel;
|
|
55
|
+
}
|
|
56
|
+
get shortcutLabel() {
|
|
57
|
+
return this.memoizedShortcut.val;
|
|
58
|
+
}
|
|
59
|
+
set shortcutLabel(shorcut) {
|
|
60
|
+
this.memoizedShortcut.val = shorcut;
|
|
61
|
+
}
|
|
62
|
+
get state() {
|
|
63
|
+
return this.memoizedState.val;
|
|
64
|
+
}
|
|
65
|
+
set state(val) {
|
|
66
|
+
this.memoizedState.val = val;
|
|
67
|
+
}
|
|
68
|
+
get isAction() {
|
|
69
|
+
return this._isAction;
|
|
70
|
+
}
|
|
71
|
+
hotkeysMatch(a, b) {
|
|
72
|
+
if (a.keyCode !== b.keyCode)
|
|
73
|
+
return false;
|
|
74
|
+
const aComplete = this.fillInMissingModifiers(a);
|
|
75
|
+
const bComplete = this.fillInMissingModifiers(b);
|
|
76
|
+
if (aComplete.alt !== bComplete.alt)
|
|
77
|
+
return false;
|
|
78
|
+
if (aComplete.control !== bComplete.control)
|
|
79
|
+
return false;
|
|
80
|
+
if (aComplete.meta !== bComplete.meta)
|
|
81
|
+
return false;
|
|
82
|
+
if (aComplete.shift !== bComplete.shift)
|
|
83
|
+
return false;
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
fillInMissingModifiers(hotkey) {
|
|
87
|
+
const rVal = Object.assign({}, hotkey);
|
|
88
|
+
rVal.alt = hotkey.alt === undefined ? false : hotkey.alt;
|
|
89
|
+
rVal.control = hotkey.control === undefined ? false : hotkey.control;
|
|
90
|
+
rVal.meta = hotkey.meta === undefined ? false : hotkey.meta;
|
|
91
|
+
rVal.shift = hotkey.shift === undefined ? false : hotkey.shift;
|
|
92
|
+
return rVal;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ObservableEntity } from "./ObservableEntity";
|
|
2
|
+
import { HotKey, Tool, ToolData } from "./Tool";
|
|
3
|
+
export declare abstract class ToolRepository<ToolTypes> extends ObservableEntity {
|
|
4
|
+
/**
|
|
5
|
+
* Retuns the active tool. If no tool is active it will return undefined.
|
|
6
|
+
*/
|
|
7
|
+
abstract get activeTool(): Tool<ToolTypes> | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Returns all the tools.
|
|
10
|
+
*/
|
|
11
|
+
abstract get allTools(): Tool<ToolTypes>[];
|
|
12
|
+
/**
|
|
13
|
+
* Set up the tools from a JSON data file. This should be called during construction.
|
|
14
|
+
* It is assumed this is only called once.
|
|
15
|
+
* @param toolData
|
|
16
|
+
*/
|
|
17
|
+
abstract setupToolsFromData(toolData: ToolData<ToolTypes>[]): void;
|
|
18
|
+
/**
|
|
19
|
+
* Get's a tool by it's type. Retruns undefined if no tool could be found
|
|
20
|
+
* @param toolType The tool type
|
|
21
|
+
*/
|
|
22
|
+
abstract getTool(toolType: ToolTypes): Tool<ToolTypes> | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the tool that has been assinged to a particular key code.
|
|
25
|
+
* Will return undefined of no tool is found
|
|
26
|
+
* @param hotkey Key Code
|
|
27
|
+
*/
|
|
28
|
+
abstract getToolForHotkey(hotkey: HotKey): Tool<ToolTypes> | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Call this to set the default tool as active
|
|
31
|
+
*/
|
|
32
|
+
abstract setDefaultToolActive(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Triggers a tool of type
|
|
35
|
+
* @param toolType Tool's type
|
|
36
|
+
*/
|
|
37
|
+
abstract triggerTool(toolType: ToolTypes): void;
|
|
38
|
+
/**
|
|
39
|
+
* Toggls a tool between Hidden and shown.
|
|
40
|
+
* If the tool is tool is currently Active, the default tool will be set active
|
|
41
|
+
* The Default Tool cannot be toggled
|
|
42
|
+
* @param toolType Tool's type
|
|
43
|
+
*/
|
|
44
|
+
abstract toggleToolVisibility(toolType: ToolTypes): void;
|
|
45
|
+
}
|
|
46
|
+
export declare function makeToolRepo<ToolTypes>(): ToolRepository<ToolTypes>;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeToolRepo = exports.ToolRepository = void 0;
|
|
4
|
+
const ObservableEntity_1 = require("./ObservableEntity");
|
|
5
|
+
const Tool_1 = require("./Tool");
|
|
6
|
+
class ToolRepository extends ObservableEntity_1.ObservableEntity {
|
|
7
|
+
}
|
|
8
|
+
exports.ToolRepository = ToolRepository;
|
|
9
|
+
function makeToolRepo() {
|
|
10
|
+
return new ToolRepositoryImp();
|
|
11
|
+
}
|
|
12
|
+
exports.makeToolRepo = makeToolRepo;
|
|
13
|
+
class ToolRepositoryImp extends ToolRepository {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.toolLookup = new Map();
|
|
17
|
+
}
|
|
18
|
+
get allTools() {
|
|
19
|
+
return Array.from(this.toolLookup.values());
|
|
20
|
+
}
|
|
21
|
+
setDefaultToolActive() {
|
|
22
|
+
if (this._defaultToolType !== undefined) {
|
|
23
|
+
this.triggerTool(this._defaultToolType);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
console.warn(`[ToolRepository] No default tools has been specified`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
setupToolsFromData(toolDatas) {
|
|
30
|
+
toolDatas.forEach((toolData) => {
|
|
31
|
+
const type = toolData.type;
|
|
32
|
+
if (this.toolLookup.has(type)) {
|
|
33
|
+
console.warn(`[ToolRepository] A tool with the ID ${toolData.type} already exists. Replacing`);
|
|
34
|
+
}
|
|
35
|
+
const tool = Tool_1.makeTool(toolData);
|
|
36
|
+
this.toolLookup.set(type, tool);
|
|
37
|
+
if (toolData.isDefault) {
|
|
38
|
+
if (this._defaultToolType) {
|
|
39
|
+
console.warn(`[ToolRepository] More than one tools is marked as default. Replacing`);
|
|
40
|
+
}
|
|
41
|
+
this._defaultToolType = type;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
if (!this._defaultToolType) {
|
|
45
|
+
console.warn(`[ToolRepository] No default tools was specified. Defaulting to the first tool in the list`);
|
|
46
|
+
this._defaultToolType = Array.from(this.toolLookup.keys())[0];
|
|
47
|
+
}
|
|
48
|
+
if (this._defaultToolType) {
|
|
49
|
+
this.triggerTool(this._defaultToolType);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
getTool(type) {
|
|
53
|
+
return this.toolLookup.get(type);
|
|
54
|
+
}
|
|
55
|
+
getToolForHotkey(hotkey) {
|
|
56
|
+
let tool;
|
|
57
|
+
this.allTools.forEach((t) => {
|
|
58
|
+
if (t.isMyHotkey(hotkey)) {
|
|
59
|
+
tool = t;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
return tool;
|
|
63
|
+
}
|
|
64
|
+
get activeTool() {
|
|
65
|
+
if (!this._activeToolType)
|
|
66
|
+
return undefined;
|
|
67
|
+
return this.getTool(this._activeToolType);
|
|
68
|
+
}
|
|
69
|
+
triggerTool(type) {
|
|
70
|
+
if (this._activeToolType === type)
|
|
71
|
+
return;
|
|
72
|
+
const newActiveTool = this.toolLookup.get(type);
|
|
73
|
+
if (!newActiveTool) {
|
|
74
|
+
console.warn(`[ToolRepository] Unable to find tool ${type}`);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (newActiveTool.isAction) {
|
|
78
|
+
newActiveTool.triggerActions();
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (newActiveTool.state === Tool_1.ToolState.DISABLED) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (newActiveTool.state === Tool_1.ToolState.HIDDEN) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.toolLookup.forEach((tool) => {
|
|
88
|
+
if (tool.type === type) {
|
|
89
|
+
this._activeToolType = type;
|
|
90
|
+
tool.state = Tool_1.ToolState.ACTIVE;
|
|
91
|
+
}
|
|
92
|
+
else if (tool.state === Tool_1.ToolState.ACTIVE) {
|
|
93
|
+
tool.state = Tool_1.ToolState.ENABLED;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
this.notify();
|
|
97
|
+
}
|
|
98
|
+
toggleToolVisibility(type) {
|
|
99
|
+
const tool = this.getTool(type);
|
|
100
|
+
if (!tool) {
|
|
101
|
+
console.warn(`[ToolRepository] Unable to find tool to toggle: ${type}`);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (tool.type === this._defaultToolType) {
|
|
105
|
+
console.warn(`[ToolRepository] The default tool's visibility cannot be toggled`);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (tool.state === Tool_1.ToolState.HIDDEN) {
|
|
109
|
+
tool.state = Tool_1.ToolState.ENABLED;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
if (tool.state === Tool_1.ToolState.ACTIVE) {
|
|
113
|
+
this.setDefaultToolActive();
|
|
114
|
+
}
|
|
115
|
+
tool.state = Tool_1.ToolState.HIDDEN;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Vector2 } from "../ValueObjects";
|
|
2
|
+
export interface TouchInputEvent {
|
|
3
|
+
touchCount: number;
|
|
4
|
+
touchCenter: Vector2;
|
|
5
|
+
touches: TouchData[];
|
|
6
|
+
event: TouchEvent;
|
|
7
|
+
}
|
|
8
|
+
export interface TouchData {
|
|
9
|
+
id: number;
|
|
10
|
+
position: Vector2;
|
|
11
|
+
touch?: Touch;
|
|
12
|
+
}
|
|
13
|
+
export interface TouchController {
|
|
14
|
+
onTouchStart?: (e: TouchInputEvent) => void;
|
|
15
|
+
onTouchMove?: (e: TouchInputEvent) => void;
|
|
16
|
+
onTouchEnd?: (e: TouchInputEvent) => void;
|
|
17
|
+
onTouchCancel?: (e: TouchInputEvent) => void;
|
|
18
|
+
}
|
|
19
|
+
export interface TouchInput {
|
|
20
|
+
eventElement: HTMLElement | undefined;
|
|
21
|
+
eventElementBounds?: DOMRect;
|
|
22
|
+
setEventElement: (eventElement: HTMLElement) => void;
|
|
23
|
+
clearInputElement: () => void;
|
|
24
|
+
updateInputElementBounds: () => void;
|
|
25
|
+
registerController: (controller: TouchController) => void;
|
|
26
|
+
removeController: (controller: TouchController) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function makeTouchInput(): TouchInput;
|