@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,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeBabylon = void 0;
|
|
4
|
+
const ValueObjects_1 = require("../ValueObjects");
|
|
5
|
+
const MemoizedBoolean_1 = require("./Memoized/MemoizedBoolean");
|
|
6
|
+
const MemoizedVector2_1 = require("./Memoized/MemoizedVector2");
|
|
7
|
+
const ObserverList_1 = require("./ObserverList");
|
|
8
|
+
function makeBabylon() {
|
|
9
|
+
return new BabylonImp();
|
|
10
|
+
}
|
|
11
|
+
exports.makeBabylon = makeBabylon;
|
|
12
|
+
class BabylonImp {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.observers = new ObserverList_1.ObserverList();
|
|
15
|
+
this.updateCanvasSize = () => {
|
|
16
|
+
if (!this.workingCanvas)
|
|
17
|
+
return;
|
|
18
|
+
if (!this._renderCanvas)
|
|
19
|
+
return;
|
|
20
|
+
if (this.workingCanvas.height === this._renderCanvas.height &&
|
|
21
|
+
this.workingCanvas.width === this._renderCanvas.width) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (this.resizeEngine) {
|
|
25
|
+
this.resizeEngine();
|
|
26
|
+
}
|
|
27
|
+
this.workingCanvas.height = this._renderCanvas.height;
|
|
28
|
+
this.workingCanvas.width = this._renderCanvas.width;
|
|
29
|
+
this.observers.notify();
|
|
30
|
+
};
|
|
31
|
+
this.submitRenderCanvas = (canvas) => {
|
|
32
|
+
if (canvas === this._renderCanvas)
|
|
33
|
+
return;
|
|
34
|
+
if (this._renderCanvas && this.stopRendering) {
|
|
35
|
+
this.stopRendering(this._renderCanvas);
|
|
36
|
+
}
|
|
37
|
+
this._renderCanvas = canvas;
|
|
38
|
+
this.updateCanvasSize();
|
|
39
|
+
if (this.startRendering) {
|
|
40
|
+
this.startRendering(canvas);
|
|
41
|
+
}
|
|
42
|
+
this.observers.notify();
|
|
43
|
+
};
|
|
44
|
+
this.clearRenderCanvas = () => {
|
|
45
|
+
if (!this._renderCanvas)
|
|
46
|
+
return;
|
|
47
|
+
if (this.stopRendering) {
|
|
48
|
+
this.stopRendering(this._renderCanvas);
|
|
49
|
+
}
|
|
50
|
+
this._renderCanvas = undefined;
|
|
51
|
+
this.observers.notify();
|
|
52
|
+
};
|
|
53
|
+
this.registerResizeEnging = (resizeEngine) => {
|
|
54
|
+
this.resizeEngine = resizeEngine;
|
|
55
|
+
};
|
|
56
|
+
this.registerStartRendering = (startRendering) => {
|
|
57
|
+
this.startRendering = startRendering;
|
|
58
|
+
};
|
|
59
|
+
this.registerStopRendering = (stopRendering) => {
|
|
60
|
+
this.stopRendering = stopRendering;
|
|
61
|
+
};
|
|
62
|
+
this.addObserver = (observer) => {
|
|
63
|
+
this.observers.add(observer);
|
|
64
|
+
};
|
|
65
|
+
this.removeObserver = (observer) => {
|
|
66
|
+
this.observers.remove(observer);
|
|
67
|
+
};
|
|
68
|
+
this.makeSceneObjectMeta = (id) => {
|
|
69
|
+
return { sceneObjectID: id };
|
|
70
|
+
};
|
|
71
|
+
this.getSceneObjectIDFromMeta = (meta) => {
|
|
72
|
+
if (meta === null || meta === void 0 ? void 0 : meta.hasOwnProperty("sceneObjectID")) {
|
|
73
|
+
return meta.sceneObjectID;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
this.memoizedIsRendering = new MemoizedBoolean_1.MemoizedBoolean(false, this.observers.notify);
|
|
80
|
+
this.sceneRayPick = (ray) => {
|
|
81
|
+
throw new Error("Scene ray pick has not been injected");
|
|
82
|
+
};
|
|
83
|
+
this.captureScreenshot = (size = 512) => {
|
|
84
|
+
throw new Error("CaptureScreenshot has not been injected");
|
|
85
|
+
};
|
|
86
|
+
this.sceneObjectRayPick = (ray) => {
|
|
87
|
+
try {
|
|
88
|
+
const pick = this.sceneRayPick(ray);
|
|
89
|
+
if (pick === undefined)
|
|
90
|
+
return;
|
|
91
|
+
const sceneObjectId = this.getSceneObjectIDFromMeta(pick.objectPickMeta);
|
|
92
|
+
return sceneObjectId;
|
|
93
|
+
}
|
|
94
|
+
catch (e) {
|
|
95
|
+
console.warn(e);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
this.sceneObjectPixelPick = (pixelPos) => {
|
|
100
|
+
try {
|
|
101
|
+
const ray = this.pixelToSceneRay(pixelPos);
|
|
102
|
+
return this.sceneObjectRayPick(ray);
|
|
103
|
+
}
|
|
104
|
+
catch (e) {
|
|
105
|
+
console.warn(e);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
this.scenePixelPick = (pixelPos) => {
|
|
110
|
+
try {
|
|
111
|
+
const ray = this.pixelToSceneRay(pixelPos);
|
|
112
|
+
return this.sceneRayPick(ray);
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
console.warn(e);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
this.pixelToSceneRay = (pixelPos) => {
|
|
120
|
+
throw new Error("Pixel to scene ray has not been injected");
|
|
121
|
+
};
|
|
122
|
+
this.memoizedShowInspector = new MemoizedBoolean_1.MemoizedBoolean(false, this.observers.notify);
|
|
123
|
+
this.memoizedCanvasSize = new MemoizedVector2_1.MemoizedVector2(ValueObjects_1.Vector2.One(), this.observers.notify);
|
|
124
|
+
}
|
|
125
|
+
get showInspector() {
|
|
126
|
+
return this.memoizedShowInspector.val;
|
|
127
|
+
}
|
|
128
|
+
set showInspector(val) {
|
|
129
|
+
this.memoizedShowInspector.val = val;
|
|
130
|
+
}
|
|
131
|
+
get renderCanvas() {
|
|
132
|
+
return this._renderCanvas;
|
|
133
|
+
}
|
|
134
|
+
get canvasSize() {
|
|
135
|
+
return this.memoizedCanvasSize.val;
|
|
136
|
+
}
|
|
137
|
+
set canvasSize(val) {
|
|
138
|
+
this.memoizedCanvasSize.val = val;
|
|
139
|
+
}
|
|
140
|
+
get isRendering() {
|
|
141
|
+
return this.memoizedIsRendering.val;
|
|
142
|
+
}
|
|
143
|
+
set isRendering(val) {
|
|
144
|
+
this.memoizedIsRendering.val = val;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ObservableEntity } from "./ObservableEntity";
|
|
2
|
+
export declare type OnBaseAppChange = () => void;
|
|
3
|
+
export declare abstract class BaseApp extends ObservableEntity {
|
|
4
|
+
abstract get isAuthoring(): boolean;
|
|
5
|
+
abstract set isAuthoring(val: boolean);
|
|
6
|
+
abstract startRendering: (container: HTMLElement) => void;
|
|
7
|
+
abstract stopRendering: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function makeBaseApp(): BaseApp;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeBaseApp = exports.BaseApp = void 0;
|
|
4
|
+
const MemoizedBoolean_1 = require("./Memoized/MemoizedBoolean");
|
|
5
|
+
const ObservableEntity_1 = require("./ObservableEntity");
|
|
6
|
+
class BaseApp extends ObservableEntity_1.ObservableEntity {
|
|
7
|
+
}
|
|
8
|
+
exports.BaseApp = BaseApp;
|
|
9
|
+
function makeBaseApp() {
|
|
10
|
+
return new BaseAppImp();
|
|
11
|
+
}
|
|
12
|
+
exports.makeBaseApp = makeBaseApp;
|
|
13
|
+
class BaseAppImp extends BaseApp {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.startRendering = (container) => {
|
|
17
|
+
throw new Error("[Base App] Start rendering function has not been injected");
|
|
18
|
+
};
|
|
19
|
+
this.stopRendering = () => {
|
|
20
|
+
throw new Error("[Base App] Stop rendering function has not been injected");
|
|
21
|
+
};
|
|
22
|
+
this.memoizedIsAuthoring = new MemoizedBoolean_1.MemoizedBoolean(false, this.notify);
|
|
23
|
+
}
|
|
24
|
+
get isAuthoring() {
|
|
25
|
+
return this.memoizedIsAuthoring.val;
|
|
26
|
+
}
|
|
27
|
+
set isAuthoring(val) {
|
|
28
|
+
this.memoizedIsAuthoring.val = val;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Vector2 } from "../ValueObjects";
|
|
2
|
+
export declare type OnDevicePreviewChange = () => void;
|
|
3
|
+
export interface DevicePreview {
|
|
4
|
+
useDevicePreview: boolean;
|
|
5
|
+
previewSize: Vector2;
|
|
6
|
+
setDevicePreview(x: number, y: number): void;
|
|
7
|
+
clearDevicePreview(): void;
|
|
8
|
+
addObserver(observer: OnDevicePreviewChange): void;
|
|
9
|
+
removeObserver(observer: OnDevicePreviewChange): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function makeDevicePreview(): DevicePreview;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeDevicePreview = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const ValueObjects_1 = require("../ValueObjects");
|
|
6
|
+
function makeDevicePreview() {
|
|
7
|
+
return new DevicePreviewImp();
|
|
8
|
+
}
|
|
9
|
+
exports.makeDevicePreview = makeDevicePreview;
|
|
10
|
+
class DevicePreviewImp {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.observers = new _1.ObserverList();
|
|
13
|
+
this._usePreview = false;
|
|
14
|
+
this._previewSize = ValueObjects_1.Vector2.Zero();
|
|
15
|
+
this.setDevicePreview = (x, y) => {
|
|
16
|
+
if (this._previewSize.x === x &&
|
|
17
|
+
this._previewSize.y === y)
|
|
18
|
+
return;
|
|
19
|
+
this._usePreview = true;
|
|
20
|
+
this._previewSize = new ValueObjects_1.Vector2(x, y);
|
|
21
|
+
if (x > 0 && y > 0) {
|
|
22
|
+
this._usePreview = true;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this._usePreview = false;
|
|
26
|
+
}
|
|
27
|
+
this.observers.notify();
|
|
28
|
+
};
|
|
29
|
+
this.clearDevicePreview = () => {
|
|
30
|
+
if (!this._usePreview)
|
|
31
|
+
return;
|
|
32
|
+
this._previewSize = ValueObjects_1.Vector2.Zero();
|
|
33
|
+
this._usePreview = false;
|
|
34
|
+
this.observers.notify();
|
|
35
|
+
};
|
|
36
|
+
this.addObserver = (observer) => {
|
|
37
|
+
this.observers.add(observer);
|
|
38
|
+
};
|
|
39
|
+
this.removeObserver = (observer) => {
|
|
40
|
+
this.observers.remove(observer);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
get useDevicePreview() {
|
|
44
|
+
return this._usePreview;
|
|
45
|
+
}
|
|
46
|
+
get previewSize() {
|
|
47
|
+
return this._previewSize;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Vector3 } from "../ValueObjects";
|
|
2
|
+
export declare type OnFocusCameraChange = () => void;
|
|
3
|
+
export interface FocusCameraLerper {
|
|
4
|
+
cancelLerp: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface FocusCameraData {
|
|
7
|
+
defaultAlpha?: number;
|
|
8
|
+
defaultBeta?: number;
|
|
9
|
+
defaultRadius?: number;
|
|
10
|
+
defaultTarget?: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
z: number;
|
|
14
|
+
};
|
|
15
|
+
nearClip?: number;
|
|
16
|
+
farClip?: number;
|
|
17
|
+
alphaLimit?: {
|
|
18
|
+
min: number;
|
|
19
|
+
max: number;
|
|
20
|
+
};
|
|
21
|
+
betaLimit?: {
|
|
22
|
+
min: number;
|
|
23
|
+
max: number;
|
|
24
|
+
};
|
|
25
|
+
radiusLimit?: {
|
|
26
|
+
min: number;
|
|
27
|
+
max: number;
|
|
28
|
+
};
|
|
29
|
+
targetLimit?: {
|
|
30
|
+
min: {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
z: number;
|
|
34
|
+
};
|
|
35
|
+
max: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
z: number;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export interface FocusCamera {
|
|
43
|
+
alpha: number;
|
|
44
|
+
beta: number;
|
|
45
|
+
radius: number;
|
|
46
|
+
target: Vector3;
|
|
47
|
+
direction: Vector3;
|
|
48
|
+
cameraPosition: Vector3;
|
|
49
|
+
nearClip: number;
|
|
50
|
+
farClip: number;
|
|
51
|
+
defaultAlpha: number;
|
|
52
|
+
defaultBeta: number;
|
|
53
|
+
defaultRadius: number;
|
|
54
|
+
defaultTarget: Vector3;
|
|
55
|
+
setAlphaLimits: (min: number, max: number) => void;
|
|
56
|
+
clearAlphaLimits: () => void;
|
|
57
|
+
setBetaLimits: (min: number, max: number) => void;
|
|
58
|
+
clearBetaLimits: () => void;
|
|
59
|
+
setRadiusLimits: (min: number, max: number) => void;
|
|
60
|
+
clearRadiusLimits: () => void;
|
|
61
|
+
setTargetLimits: (min: Vector3, max: Vector3) => void;
|
|
62
|
+
clearTargetLimits: () => void;
|
|
63
|
+
registerLerp: (lerper: FocusCameraLerper) => void;
|
|
64
|
+
lerpCompleted: () => void;
|
|
65
|
+
cancelLerp: () => void;
|
|
66
|
+
applyData: (data: FocusCameraData) => void;
|
|
67
|
+
addObserver: (observer: OnFocusCameraChange) => void;
|
|
68
|
+
removeObserver: (observer: OnFocusCameraChange) => void;
|
|
69
|
+
}
|
|
70
|
+
export declare function makeFocusCamera(): FocusCamera;
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeFocusCamera = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const ValueObjects_1 = require("../ValueObjects");
|
|
6
|
+
function makeFocusCamera() {
|
|
7
|
+
return new FocusCameraImp();
|
|
8
|
+
}
|
|
9
|
+
exports.makeFocusCamera = makeFocusCamera;
|
|
10
|
+
class FocusCameraImp {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.farClip = 100;
|
|
13
|
+
this.nearClip = 0.01;
|
|
14
|
+
this.defaultAlpha = 0;
|
|
15
|
+
this.defaultBeta = 30;
|
|
16
|
+
this.defaultRadius = 8;
|
|
17
|
+
this.defaultTarget = ValueObjects_1.Vector3.Zero();
|
|
18
|
+
this.limitRadius = false;
|
|
19
|
+
this.minRadius = 0;
|
|
20
|
+
this.maxRadius = 0;
|
|
21
|
+
this.limitAlpha = false;
|
|
22
|
+
this.minAlpha = 0;
|
|
23
|
+
this.maxAlpha = 0;
|
|
24
|
+
this.limitBeta = false;
|
|
25
|
+
this.minBeta = 0;
|
|
26
|
+
this.maxBeta = 0;
|
|
27
|
+
this.limitTarget = false;
|
|
28
|
+
this.maxTargetPosition = ValueObjects_1.Vector3.Zero();
|
|
29
|
+
this.minTargetPosition = ValueObjects_1.Vector3.Zero();
|
|
30
|
+
this.observers = new _1.ObserverList();
|
|
31
|
+
this.memoizedAlpha = new _1.MemoizedNumber(0, this.observers.notify);
|
|
32
|
+
this.memoizedBeta = new _1.MemoizedNumber(0, this.observers.notify);
|
|
33
|
+
this.memoizedRadius = new _1.MemoizedNumber(1, this.observers.notify);
|
|
34
|
+
this.memoizedTarget = new _1.MemoizedVector3(ValueObjects_1.Vector3.Zero(), this.observers.notify);
|
|
35
|
+
this.setRadiusLimits = (min, max) => {
|
|
36
|
+
let minToUse = min;
|
|
37
|
+
let maxToUse = max;
|
|
38
|
+
if (min < 0) {
|
|
39
|
+
console.warn("[Orbit Camera Entity] Mininum Radius must be greater >= 0, forcing to 0");
|
|
40
|
+
minToUse = 0;
|
|
41
|
+
}
|
|
42
|
+
if (max < minToUse) {
|
|
43
|
+
console.warn(`[Orbit Camera] Max radius must be >= min radius. Forcing to ${minToUse}`);
|
|
44
|
+
maxToUse = minToUse;
|
|
45
|
+
}
|
|
46
|
+
this.maxRadius = maxToUse;
|
|
47
|
+
this.minRadius = minToUse;
|
|
48
|
+
this.limitRadius = true;
|
|
49
|
+
this.radius = this.radius;
|
|
50
|
+
};
|
|
51
|
+
this.clearRadiusLimits = () => {
|
|
52
|
+
this.maxRadius = 0;
|
|
53
|
+
this.minRadius = 0;
|
|
54
|
+
this.limitRadius = false;
|
|
55
|
+
};
|
|
56
|
+
this.setAlphaLimits = (min, max) => {
|
|
57
|
+
let minToUse = min;
|
|
58
|
+
let maxToUse = max;
|
|
59
|
+
if (min < -180) {
|
|
60
|
+
minToUse = -180;
|
|
61
|
+
console.warn("[Orbit Camera] Min alpha must be >= -180. Forcing to -180");
|
|
62
|
+
}
|
|
63
|
+
if (max > 180) {
|
|
64
|
+
maxToUse = 180;
|
|
65
|
+
console.warn("[Orbit Camera] Max alpha must be <= 180. Forcing to 180");
|
|
66
|
+
}
|
|
67
|
+
if (minToUse > maxToUse) {
|
|
68
|
+
const absMin = Math.abs(minToUse);
|
|
69
|
+
const absMax = Math.abs(maxToUse);
|
|
70
|
+
const closestToZero = absMin < absMax ? minToUse : maxToUse;
|
|
71
|
+
minToUse = closestToZero;
|
|
72
|
+
maxToUse = closestToZero;
|
|
73
|
+
console.warn(`[Orbit Camera] Max alpha must be <= Min Alpha. Forcing to ${closestToZero}`);
|
|
74
|
+
}
|
|
75
|
+
this.maxAlpha = maxToUse;
|
|
76
|
+
this.minAlpha = minToUse;
|
|
77
|
+
this.limitAlpha = true;
|
|
78
|
+
this.alpha = this.alpha;
|
|
79
|
+
};
|
|
80
|
+
this.clearAlphaLimits = () => {
|
|
81
|
+
this.maxAlpha = 0;
|
|
82
|
+
this.minAlpha = 0;
|
|
83
|
+
this.limitAlpha = false;
|
|
84
|
+
};
|
|
85
|
+
this.setBetaLimits = (min, max) => {
|
|
86
|
+
let minToUse = min;
|
|
87
|
+
let maxToUse = max;
|
|
88
|
+
if (min < -180) {
|
|
89
|
+
minToUse = -180;
|
|
90
|
+
console.warn("[Orbit Camera] Min beta must be >= -180. Forcing to -180");
|
|
91
|
+
}
|
|
92
|
+
if (max > 180) {
|
|
93
|
+
maxToUse = 180;
|
|
94
|
+
console.warn("[Orbit Camera] Max beta must be <= 180. Forcing to 180");
|
|
95
|
+
}
|
|
96
|
+
if (minToUse > maxToUse) {
|
|
97
|
+
const absMin = Math.abs(minToUse);
|
|
98
|
+
const absMax = Math.abs(maxToUse);
|
|
99
|
+
const closestToZero = absMin < absMax ? minToUse : maxToUse;
|
|
100
|
+
minToUse = closestToZero;
|
|
101
|
+
maxToUse = closestToZero;
|
|
102
|
+
console.warn(`[Orbit Camera] Max beta must be <= Min beta. Forcing to ${closestToZero}`);
|
|
103
|
+
}
|
|
104
|
+
this.maxBeta = maxToUse;
|
|
105
|
+
this.minBeta = minToUse;
|
|
106
|
+
this.limitBeta = true;
|
|
107
|
+
this.beta = this.beta;
|
|
108
|
+
};
|
|
109
|
+
this.clearBetaLimits = () => {
|
|
110
|
+
this.maxBeta = 0;
|
|
111
|
+
this.minBeta = 0;
|
|
112
|
+
this.limitBeta = false;
|
|
113
|
+
};
|
|
114
|
+
this.setTargetLimits = (min, max) => {
|
|
115
|
+
const minArray = min.array;
|
|
116
|
+
const maxArray = max.array;
|
|
117
|
+
for (let i = 0; i < 3; i++) {
|
|
118
|
+
if (minArray[i] > maxArray[i]) {
|
|
119
|
+
console.warn("[Orbit Camera] Target limit min's components must all be <= the max. Limits not set");
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
this.maxTargetPosition = max;
|
|
124
|
+
this.minTargetPosition = min;
|
|
125
|
+
this.limitTarget = true;
|
|
126
|
+
this.target = this.target;
|
|
127
|
+
};
|
|
128
|
+
this.clearTargetLimits = () => {
|
|
129
|
+
this.maxTargetPosition = ValueObjects_1.Vector3.Zero();
|
|
130
|
+
this.minTargetPosition = ValueObjects_1.Vector3.Zero();
|
|
131
|
+
this.limitTarget = false;
|
|
132
|
+
};
|
|
133
|
+
this.registerLerp = (lerper) => {
|
|
134
|
+
if (this.currentLerp) {
|
|
135
|
+
this.currentLerp.cancelLerp();
|
|
136
|
+
}
|
|
137
|
+
this.currentLerp = lerper;
|
|
138
|
+
};
|
|
139
|
+
this.lerpCompleted = () => {
|
|
140
|
+
this.currentLerp = undefined;
|
|
141
|
+
};
|
|
142
|
+
this.cancelLerp = () => {
|
|
143
|
+
var _a;
|
|
144
|
+
(_a = this.currentLerp) === null || _a === void 0 ? void 0 : _a.cancelLerp();
|
|
145
|
+
this.currentLerp = undefined;
|
|
146
|
+
};
|
|
147
|
+
this.applyData = (data) => {
|
|
148
|
+
if (data.defaultAlpha !== undefined) {
|
|
149
|
+
this.defaultAlpha = data.defaultAlpha;
|
|
150
|
+
}
|
|
151
|
+
if (data.defaultBeta !== undefined) {
|
|
152
|
+
this.defaultBeta = data.defaultBeta;
|
|
153
|
+
}
|
|
154
|
+
if (data.defaultRadius !== undefined) {
|
|
155
|
+
this.defaultRadius = data.defaultRadius;
|
|
156
|
+
}
|
|
157
|
+
if (data.defaultTarget !== undefined) {
|
|
158
|
+
const { x, y, z } = data.defaultTarget;
|
|
159
|
+
this.defaultTarget = new ValueObjects_1.Vector3(x, y, z);
|
|
160
|
+
}
|
|
161
|
+
if (data.nearClip !== undefined) {
|
|
162
|
+
this.nearClip = data.nearClip;
|
|
163
|
+
}
|
|
164
|
+
if (data.farClip !== undefined) {
|
|
165
|
+
this.farClip = data.farClip;
|
|
166
|
+
}
|
|
167
|
+
if (data.alphaLimit !== undefined) {
|
|
168
|
+
this.setAlphaLimits(data.alphaLimit.min, data.alphaLimit.max);
|
|
169
|
+
}
|
|
170
|
+
if (data.betaLimit !== undefined) {
|
|
171
|
+
this.setBetaLimits(data.betaLimit.min, data.betaLimit.max);
|
|
172
|
+
}
|
|
173
|
+
if (data.radiusLimit !== undefined) {
|
|
174
|
+
this.setRadiusLimits(data.radiusLimit.min, data.radiusLimit.max);
|
|
175
|
+
}
|
|
176
|
+
if (data.targetLimit !== undefined) {
|
|
177
|
+
const { max, min } = data.targetLimit;
|
|
178
|
+
this.setTargetLimits(new ValueObjects_1.Vector3(min.x, min.y, min.z), new ValueObjects_1.Vector3(max.x, max.y, max.z));
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
this.addObserver = (observer) => {
|
|
182
|
+
this.observers.add(observer);
|
|
183
|
+
};
|
|
184
|
+
this.removeObserver = (observer) => {
|
|
185
|
+
this.observers.remove(observer);
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
get alpha() {
|
|
189
|
+
return this.memoizedAlpha.val;
|
|
190
|
+
}
|
|
191
|
+
set alpha(val) {
|
|
192
|
+
let valToUse = val;
|
|
193
|
+
if (this.limitAlpha) {
|
|
194
|
+
valToUse = Math.min(valToUse, this.maxAlpha);
|
|
195
|
+
valToUse = Math.max(valToUse, this.minAlpha);
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
valToUse = this.clampAngle(val);
|
|
199
|
+
}
|
|
200
|
+
this.memoizedAlpha.val = valToUse;
|
|
201
|
+
}
|
|
202
|
+
get beta() {
|
|
203
|
+
return this.memoizedBeta.val;
|
|
204
|
+
}
|
|
205
|
+
set beta(val) {
|
|
206
|
+
let valToUse = val;
|
|
207
|
+
if (this.limitBeta) {
|
|
208
|
+
valToUse = Math.min(valToUse, this.maxBeta);
|
|
209
|
+
valToUse = Math.max(valToUse, this.minBeta);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
valToUse = this.clampAngle(val);
|
|
213
|
+
}
|
|
214
|
+
this.memoizedBeta.val = valToUse;
|
|
215
|
+
}
|
|
216
|
+
get radius() {
|
|
217
|
+
return this.memoizedRadius.val;
|
|
218
|
+
}
|
|
219
|
+
set radius(val) {
|
|
220
|
+
let clampedVal = Math.max(val, 0);
|
|
221
|
+
if (this.limitRadius) {
|
|
222
|
+
clampedVal = Math.min(clampedVal, this.maxRadius);
|
|
223
|
+
clampedVal = Math.max(clampedVal, this.minRadius);
|
|
224
|
+
}
|
|
225
|
+
this.memoizedRadius.val = clampedVal;
|
|
226
|
+
}
|
|
227
|
+
get target() {
|
|
228
|
+
return this.memoizedTarget.val;
|
|
229
|
+
}
|
|
230
|
+
set target(val) {
|
|
231
|
+
const targetVals = val.array;
|
|
232
|
+
if (this.limitTarget) {
|
|
233
|
+
const maxVals = this.maxTargetPosition.array;
|
|
234
|
+
const minVals = this.minTargetPosition.array;
|
|
235
|
+
for (let i = 0; i < 3; i++) {
|
|
236
|
+
let v = targetVals[i];
|
|
237
|
+
v = Math.min(v, maxVals[i]);
|
|
238
|
+
v = Math.max(v, minVals[i]);
|
|
239
|
+
targetVals[i] = v;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
this.memoizedTarget.val = ValueObjects_1.Vector3.FromArray(targetVals);
|
|
243
|
+
}
|
|
244
|
+
get direction() {
|
|
245
|
+
const yLength = -Math.sin(this.degToRad(this.beta));
|
|
246
|
+
const horizontalLenght = Math.cos(this.degToRad(this.beta));
|
|
247
|
+
const alphaRadians = this.degToRad(this.alpha);
|
|
248
|
+
const xLength = horizontalLenght * Math.sin(alphaRadians);
|
|
249
|
+
const zLength = horizontalLenght * Math.cos(alphaRadians);
|
|
250
|
+
return new ValueObjects_1.Vector3(xLength, yLength, zLength);
|
|
251
|
+
}
|
|
252
|
+
get cameraPosition() {
|
|
253
|
+
const localOffset = ValueObjects_1.Vector3.NewVectorOfLength(this.direction, -this.radius);
|
|
254
|
+
return ValueObjects_1.Vector3.Add(this.target, localOffset);
|
|
255
|
+
}
|
|
256
|
+
degToRad(degrees) {
|
|
257
|
+
return (degrees * Math.PI) / 180;
|
|
258
|
+
}
|
|
259
|
+
clampAngle(angle) {
|
|
260
|
+
const isNegative = angle < 0 ? true : false;
|
|
261
|
+
const absAngle = Math.abs(angle);
|
|
262
|
+
const revolutions = Math.floor(absAngle / 360);
|
|
263
|
+
let angleWithoutRevolutions = absAngle - revolutions * 360;
|
|
264
|
+
if (angleWithoutRevolutions > 180) {
|
|
265
|
+
angleWithoutRevolutions = angleWithoutRevolutions - 360;
|
|
266
|
+
}
|
|
267
|
+
if (isNegative) {
|
|
268
|
+
angleWithoutRevolutions *= -1;
|
|
269
|
+
}
|
|
270
|
+
return angleWithoutRevolutions;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FramedScreenContainer } from "./FramedScreenContainer";
|
|
2
|
+
import { ObservableEntity } from "./ObservableEntity";
|
|
3
|
+
export declare abstract class FramedScreen extends ObservableEntity {
|
|
4
|
+
abstract get containers(): FramedScreenContainer[];
|
|
5
|
+
abstract addContainer(container: FramedScreenContainer): void;
|
|
6
|
+
abstract addContainerByID(id: string): FramedScreenContainer;
|
|
7
|
+
abstract removeContainer(id: string): void;
|
|
8
|
+
abstract hasContainer(id: string): boolean;
|
|
9
|
+
abstract getContainerByID(id: string): FramedScreenContainer | undefined;
|
|
10
|
+
abstract get screenWidth(): number;
|
|
11
|
+
abstract set screenWidth(width: number);
|
|
12
|
+
abstract get screenHeight(): number;
|
|
13
|
+
abstract set screenHeight(height: number);
|
|
14
|
+
}
|
|
15
|
+
export declare function makeFramedScreen(): FramedScreen;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeFramedScreen = exports.FramedScreen = void 0;
|
|
4
|
+
const FramedScreenContainer_1 = require("./FramedScreenContainer");
|
|
5
|
+
const MemoizedNumber_1 = require("./Memoized/MemoizedNumber");
|
|
6
|
+
const ObservableEntity_1 = require("./ObservableEntity");
|
|
7
|
+
class FramedScreen extends ObservableEntity_1.ObservableEntity {
|
|
8
|
+
}
|
|
9
|
+
exports.FramedScreen = FramedScreen;
|
|
10
|
+
function makeFramedScreen() {
|
|
11
|
+
return new FramedScreenImp();
|
|
12
|
+
}
|
|
13
|
+
exports.makeFramedScreen = makeFramedScreen;
|
|
14
|
+
class FramedScreenImp extends FramedScreen {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.memoizeWidth = new MemoizedNumber_1.MemoizedNumber(0, this.notify);
|
|
18
|
+
this.memoizeHeight = new MemoizedNumber_1.MemoizedNumber(0, this.notify);
|
|
19
|
+
this._containerLookup = new Map();
|
|
20
|
+
}
|
|
21
|
+
get screenWidth() {
|
|
22
|
+
return this.memoizeWidth.val;
|
|
23
|
+
}
|
|
24
|
+
set screenWidth(val) {
|
|
25
|
+
this.memoizeWidth.val = val;
|
|
26
|
+
}
|
|
27
|
+
get screenHeight() {
|
|
28
|
+
return this.memoizeHeight.val;
|
|
29
|
+
}
|
|
30
|
+
set screenHeight(val) {
|
|
31
|
+
this.memoizeHeight.val = val;
|
|
32
|
+
}
|
|
33
|
+
get containers() {
|
|
34
|
+
return Array.from(this._containerLookup.values());
|
|
35
|
+
}
|
|
36
|
+
addContainer(container) {
|
|
37
|
+
this._containerLookup.set(container.id, container);
|
|
38
|
+
this.notify();
|
|
39
|
+
}
|
|
40
|
+
addContainerByID(id) {
|
|
41
|
+
const newContainer = FramedScreenContainer_1.makeFramedScreenContainer(id);
|
|
42
|
+
this.addContainer(newContainer);
|
|
43
|
+
return newContainer;
|
|
44
|
+
}
|
|
45
|
+
removeContainer(id) {
|
|
46
|
+
const container = this._containerLookup.get(id);
|
|
47
|
+
if (container) {
|
|
48
|
+
this._containerLookup.delete(id);
|
|
49
|
+
this.notify();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
hasContainer(id) {
|
|
53
|
+
return this._containerLookup.has(id);
|
|
54
|
+
}
|
|
55
|
+
getContainerByID(id) {
|
|
56
|
+
return this._containerLookup.get(id);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Vector2 } from "../ValueObjects";
|
|
2
|
+
import { ObservableEntity } from "./ObservableEntity";
|
|
3
|
+
export declare abstract class FramedScreenContainer extends ObservableEntity {
|
|
4
|
+
abstract readonly id: string;
|
|
5
|
+
abstract get position(): Vector2;
|
|
6
|
+
abstract set position(p: Vector2);
|
|
7
|
+
abstract get size(): Vector2;
|
|
8
|
+
abstract set size(s: Vector2);
|
|
9
|
+
abstract get show(): boolean;
|
|
10
|
+
abstract set show(s: boolean);
|
|
11
|
+
}
|
|
12
|
+
export declare function makeFramedScreenContainer(id: string): FramedScreenContainer;
|