@vived/app 4.3.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) hide show
  1. package/lib/Components/App/UC/submitError.d.ts +2 -0
  2. package/lib/Components/App/UC/submitError.js +28 -0
  3. package/lib/Components/App/UC/submitFatal.d.ts +2 -0
  4. package/lib/Components/App/UC/submitFatal.js +28 -0
  5. package/lib/Components/App/UC/submitLog.d.ts +2 -0
  6. package/lib/Components/App/UC/submitLog.js +28 -0
  7. package/lib/Components/App/UC/submitWarning.d.ts +2 -0
  8. package/lib/Components/App/UC/submitWarning.js +28 -0
  9. package/lib/Components/Babylon/Mocks/MockSceneRayPickUC.d.ts +2 -0
  10. package/lib/Components/Babylon/Mocks/MockSceneRayPickUC.js +2 -2
  11. package/lib/Components/Camera/Factory/CameraFactoryImp.d.ts +4 -0
  12. package/lib/Components/Camera/Factory/CameraFactoryImp.js +25 -0
  13. package/lib/Components/Dispatcher/Mocks/MockLogUC.d.ts +10 -0
  14. package/lib/Components/Dispatcher/Mocks/MockLogUC.js +14 -0
  15. package/lib/Components/Landmarks/Controller/Mouse/MouseLandmark.d.ts +22 -0
  16. package/lib/Components/Landmarks/Controller/Mouse/MouseLandmark.js +91 -0
  17. package/lib/Components/Landmarks/Controller/MouseLandmark.d.ts +22 -0
  18. package/lib/Components/Landmarks/Controller/MouseLandmark.js +91 -0
  19. package/lib/Components/Landmarks/Controller/SetSelectedLandmarkColor.d.ts +3 -0
  20. package/lib/Components/Landmarks/Controller/SetSelectedLandmarkColor.js +24 -0
  21. package/lib/Components/Landmarks/Controller/SubmitLandmarkSize.d.ts +2 -0
  22. package/lib/Components/Landmarks/Controller/SubmitLandmarkSize.js +19 -0
  23. package/lib/Components/Landmarks/Controller/Touch/TouchLandmark.d.ts +20 -0
  24. package/lib/Components/Landmarks/Controller/Touch/TouchLandmark.js +84 -0
  25. package/lib/Components/Landmarks/Controller/TouchLandmark.d.ts +20 -0
  26. package/lib/Components/Landmarks/Controller/TouchLandmark.js +84 -0
  27. package/lib/Components/Landmarks/Controller/UpdateLandmarkSize.d.ts +2 -0
  28. package/lib/Components/Landmarks/Controller/UpdateLandmarkSize.js +19 -0
  29. package/lib/Components/Landmarks/Controller/index.d.ts +5 -0
  30. package/lib/{AppObjectComponents/Enablement → Components/Landmarks/Controller}/index.js +5 -2
  31. package/lib/Components/Landmarks/Entities/LandmarkEntity.d.ts +40 -0
  32. package/lib/Components/Landmarks/Entities/LandmarkEntity.js +111 -0
  33. package/lib/Components/Landmarks/Entities/LandmarkGlobals.d.ts +14 -0
  34. package/lib/Components/Landmarks/Entities/LandmarkGlobals.js +32 -0
  35. package/lib/Components/Landmarks/Entities/LandmarkRepo.d.ts +9 -0
  36. package/lib/Components/Landmarks/Entities/LandmarkRepo.js +33 -0
  37. package/lib/Components/Landmarks/Entities/index.d.ts +3 -0
  38. package/lib/{AppObjectComponents/ChannelModel → Components/Landmarks/Entities}/index.js +3 -2
  39. package/lib/Components/Landmarks/Mocks/MockLandmark.d.ts +27 -0
  40. package/lib/Components/Landmarks/Mocks/MockLandmark.js +50 -0
  41. package/lib/Components/Landmarks/PM/LandmarkListPM.d.ts +10 -0
  42. package/lib/Components/Landmarks/PM/LandmarkListPM.js +46 -0
  43. package/lib/Components/Landmarks/PM/LandmarkSizePM.d.ts +10 -0
  44. package/lib/Components/Landmarks/PM/LandmarkSizePM.js +44 -0
  45. package/lib/Components/Landmarks/PM/index.d.ts +2 -0
  46. package/lib/{UseCases/SceneObjects → Components/Landmarks/PM}/index.js +2 -1
  47. package/lib/Components/Landmarks/UseCases/AddLandmarkUC.d.ts +8 -0
  48. package/lib/Components/Landmarks/UseCases/AddLandmarkUC.js +67 -0
  49. package/lib/Components/Landmarks/UseCases/AddLandmarkUndoRedo.d.ts +13 -0
  50. package/lib/Components/Landmarks/UseCases/AddLandmarkUndoRedo.js +48 -0
  51. package/lib/Components/Landmarks/UseCases/DeleteLandmarkUC.d.ts +9 -0
  52. package/lib/Components/Landmarks/UseCases/DeleteLandmarkUC.js +48 -0
  53. package/lib/Components/Landmarks/UseCases/DeleteLandmarkUndoRedo.d.ts +13 -0
  54. package/lib/Components/Landmarks/UseCases/DeleteLandmarkUndoRedo.js +48 -0
  55. package/lib/Components/Landmarks/UseCases/SerializeLandmarks.d.ts +16 -0
  56. package/lib/Components/Landmarks/UseCases/SerializeLandmarks.js +108 -0
  57. package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUC.d.ts +12 -0
  58. package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUC.js +57 -0
  59. package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUndoRedo.d.ts +11 -0
  60. package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUndoRedo.js +37 -0
  61. package/lib/Components/Landmarks/UseCases/SetOverlayColorUC.d.ts +11 -0
  62. package/lib/Components/Landmarks/UseCases/SetOverlayColorUC.js +46 -0
  63. package/lib/Components/Landmarks/UseCases/SetOverlayColorUndoRedo.d.ts +12 -0
  64. package/lib/Components/Landmarks/UseCases/SetOverlayColorUndoRedo.js +37 -0
  65. package/lib/Components/Landmarks/UseCases/TryAddNewLandmarkUC.d.ts +9 -0
  66. package/lib/Components/Landmarks/UseCases/TryAddNewLandmarkUC.js +59 -0
  67. package/lib/Components/Landmarks/UseCases/TryPreviewLandmarkUC.d.ts +15 -0
  68. package/lib/Components/Landmarks/UseCases/TryPreviewLandmarkUC.js +63 -0
  69. package/lib/Components/Landmarks/UseCases/index.d.ts +11 -0
  70. package/lib/Components/Landmarks/UseCases/index.js +23 -0
  71. package/lib/Components/Landmarks/index.d.ts +4 -0
  72. package/lib/{AppObjectComponents/Hideable → Components/Landmarks}/index.js +4 -2
  73. package/lib/Components/OverlayColor/Entities/OverlayColor.d.ts +5 -5
  74. package/lib/Components/OverlayColor/Entities/OverlayColor.js +24 -24
  75. package/lib/Components/OverlayColor/PM/OverlayColorPM.d.ts +3 -3
  76. package/lib/Components/Question/Entities/QuestionAnswerEntity.d.ts +2 -1
  77. package/lib/Components/Question/Entities/QuestionAnswerEntity.js +9 -5
  78. package/lib/Components/Question/Entities/QuestionEntity.d.ts +1 -1
  79. package/lib/Components/Question/Entities/QuestionEntity.js +2 -9
  80. package/lib/Components/Question/PM/QuestionChallengePM.d.ts +2 -0
  81. package/lib/Components/Question/PM/QuestionChallengePM.js +21 -3
  82. package/lib/Components/Question/UC/ValidateQuestionChallengeStateUC.d.ts +19 -0
  83. package/lib/Components/Question/UC/ValidateQuestionChallengeStateUC.js +83 -0
  84. package/lib/Components/Question/UC/index.d.ts +1 -0
  85. package/lib/Components/Question/UC/index.js +1 -0
  86. package/lib/Components/Tools/Factory/index.d.ts +2 -0
  87. package/lib/{PresentationManagers/SceneModel → Components/Tools/Factory}/index.js +2 -1
  88. package/lib/Components/Tools/Factory/setupTool.d.ts +3 -0
  89. package/lib/Components/Tools/Factory/setupTool.js +12 -0
  90. package/lib/Components/Tools/Factory/setupToolRepo.d.ts +4 -0
  91. package/lib/Components/Tools/Factory/setupToolRepo.js +13 -0
  92. package/package.json +1 -1
  93. package/lib/AppObjectComponents/ChannelModel/Entities/ChannelModel.d.ts +0 -42
  94. package/lib/AppObjectComponents/ChannelModel/Entities/ChannelModel.js +0 -99
  95. package/lib/AppObjectComponents/ChannelModel/Entities/ChannelModelRepo.d.ts +0 -12
  96. package/lib/AppObjectComponents/ChannelModel/Entities/ChannelModelRepo.js +0 -45
  97. package/lib/AppObjectComponents/ChannelModel/index.d.ts +0 -2
  98. package/lib/AppObjectComponents/Dispatcher/Entities/AppDispatcher.d.ts +0 -16
  99. package/lib/AppObjectComponents/Dispatcher/Entities/AppDispatcher.js +0 -40
  100. package/lib/AppObjectComponents/Dispatcher/Factories/makeBasicDispatcher.d.ts +0 -5
  101. package/lib/AppObjectComponents/Dispatcher/Factories/makeBasicDispatcher.js +0 -25
  102. package/lib/AppObjectComponents/Dispatcher/UC/DispatchStartZSpaceUC.d.ts +0 -10
  103. package/lib/AppObjectComponents/Dispatcher/UC/DispatchStartZSpaceUC.js +0 -44
  104. package/lib/AppObjectComponents/Dispatcher/UC/DispatchStopZSpaceUC.d.ts +0 -10
  105. package/lib/AppObjectComponents/Dispatcher/UC/DispatchStopZSpaceUC.js +0 -44
  106. package/lib/AppObjectComponents/Dispatcher/UC/GoToNextStateUC.d.ts +0 -10
  107. package/lib/AppObjectComponents/Dispatcher/UC/GoToNextStateUC.js +0 -44
  108. package/lib/AppObjectComponents/Dispatcher/UC/GoToPreviousStateUC.d.ts +0 -10
  109. package/lib/AppObjectComponents/Dispatcher/UC/GoToPreviousStateUC.js +0 -44
  110. package/lib/AppObjectComponents/Dispatcher/UC/HasNextStateUC.d.ts +0 -10
  111. package/lib/AppObjectComponents/Dispatcher/UC/HasNextStateUC.js +0 -54
  112. package/lib/AppObjectComponents/Dispatcher/UC/HasPreviousStateUC.d.ts +0 -10
  113. package/lib/AppObjectComponents/Dispatcher/UC/HasPreviousStateUC.js +0 -54
  114. package/lib/AppObjectComponents/Dispatcher/UC/IsZSpaceAvailableUC.d.ts +0 -10
  115. package/lib/AppObjectComponents/Dispatcher/UC/IsZSpaceAvailableUC.js +0 -54
  116. package/lib/AppObjectComponents/Dispatcher/index.d.ts +0 -9
  117. package/lib/AppObjectComponents/Dispatcher/index.js +0 -21
  118. package/lib/AppObjectComponents/Enablement/Entities/EnablablementEntity.d.ts +0 -16
  119. package/lib/AppObjectComponents/Enablement/Entities/EnablablementEntity.js +0 -28
  120. package/lib/AppObjectComponents/Enablement/PM/EnablableStatePM.d.ts +0 -14
  121. package/lib/AppObjectComponents/Enablement/PM/EnablableStatePM.js +0 -41
  122. package/lib/AppObjectComponents/Enablement/index.d.ts +0 -2
  123. package/lib/AppObjectComponents/Hideable/Entities/Hideable.d.ts +0 -10
  124. package/lib/AppObjectComponents/Hideable/Entities/Hideable.js +0 -31
  125. package/lib/AppObjectComponents/Hideable/PresentationManagers/IsHiddenPM.d.ts +0 -12
  126. package/lib/AppObjectComponents/Hideable/PresentationManagers/IsHiddenPM.js +0 -43
  127. package/lib/AppObjectComponents/Hideable/index.d.ts +0 -2
  128. package/lib/AppObjectComponents/Label/Entities/Label.d.ts +0 -17
  129. package/lib/AppObjectComponents/Label/Entities/Label.js +0 -58
  130. package/lib/AppObjectComponents/Label/PresentationManagers/LabelPM.d.ts +0 -19
  131. package/lib/AppObjectComponents/Label/PresentationManagers/LabelPM.js +0 -62
  132. package/lib/AppObjectComponents/Label/index.d.ts +0 -2
  133. package/lib/AppObjectComponents/Label/index.js +0 -14
  134. package/lib/AppObjectComponents/Mesh/Entities/Mesh.d.ts +0 -21
  135. package/lib/AppObjectComponents/Mesh/Entities/Mesh.js +0 -45
  136. package/lib/AppObjectComponents/Mesh/index.d.ts +0 -1
  137. package/lib/AppObjectComponents/Mesh/index.js +0 -13
  138. package/lib/AppObjectComponents/OverlayColor/Entities/OverlayColor.d.ts +0 -25
  139. package/lib/AppObjectComponents/OverlayColor/Entities/OverlayColor.js +0 -59
  140. package/lib/AppObjectComponents/OverlayColor/PresentationManagers/OverlayColorPM.d.ts +0 -13
  141. package/lib/AppObjectComponents/OverlayColor/PresentationManagers/OverlayColorPM.js +0 -43
  142. package/lib/AppObjectComponents/OverlayColor/index.d.ts +0 -2
  143. package/lib/AppObjectComponents/OverlayColor/index.js +0 -14
  144. package/lib/AppObjectComponents/SceneRoot/Entities/SceneRoot.d.ts +0 -31
  145. package/lib/AppObjectComponents/SceneRoot/Entities/SceneRoot.js +0 -106
  146. package/lib/AppObjectComponents/SceneRoot/UC/SerializeSceneRoot.d.ts +0 -31
  147. package/lib/AppObjectComponents/SceneRoot/UC/SerializeSceneRoot.js +0 -109
  148. package/lib/AppObjectComponents/SceneRoot/index.d.ts +0 -2
  149. package/lib/AppObjectComponents/SceneRoot/index.js +0 -14
  150. package/lib/AppObjectComponents/StoredView/Entities/StoredView.d.ts +0 -13
  151. package/lib/AppObjectComponents/StoredView/Entities/StoredView.js +0 -64
  152. package/lib/AppObjectComponents/StoredView/UC/SerializeStoredView.d.ts +0 -27
  153. package/lib/AppObjectComponents/StoredView/UC/SerializeStoredView.js +0 -82
  154. package/lib/AppObjectComponents/StoredView/index.d.ts +0 -2
  155. package/lib/AppObjectComponents/StoredView/index.js +0 -14
  156. package/lib/AppObjectComponents/Transform3D/Entities/Transform3D.d.ts +0 -45
  157. package/lib/AppObjectComponents/Transform3D/Entities/Transform3D.js +0 -226
  158. package/lib/AppObjectComponents/Transform3D/PresentationManagers/CanBeStuckPM.d.ts +0 -12
  159. package/lib/AppObjectComponents/Transform3D/PresentationManagers/CanBeStuckPM.js +0 -46
  160. package/lib/AppObjectComponents/Transform3D/PresentationManagers/Transform3DPM.d.ts +0 -19
  161. package/lib/AppObjectComponents/Transform3D/PresentationManagers/Transform3DPM.js +0 -60
  162. package/lib/AppObjectComponents/Transform3D/UseCases/PeelTransform3D.d.ts +0 -20
  163. package/lib/AppObjectComponents/Transform3D/UseCases/PeelTransform3D.js +0 -67
  164. package/lib/AppObjectComponents/Transform3D/UseCases/StickTransform3D.d.ts +0 -14
  165. package/lib/AppObjectComponents/Transform3D/UseCases/StickTransform3D.js +0 -53
  166. package/lib/AppObjectComponents/Transform3D/index.d.ts +0 -5
  167. package/lib/AppObjectComponents/Transform3D/index.js +0 -17
  168. package/lib/AppObjectComponents/index.d.ts +0 -10
  169. package/lib/AppObjectComponents/index.js +0 -22
  170. package/lib/Controllers/HoverLabelMouse.d.ts +0 -10
  171. package/lib/Controllers/HoverLabelMouse.js +0 -23
  172. package/lib/Controllers/HoverLabelTouch.d.ts +0 -14
  173. package/lib/Controllers/HoverLabelTouch.js +0 -41
  174. package/lib/Controllers/ToolHotkeys.d.ts +0 -6
  175. package/lib/Controllers/ToolHotkeys.js +0 -25
  176. package/lib/Controllers/index.d.ts +0 -3
  177. package/lib/Controllers/index.js +0 -15
  178. package/lib/Entities/AppBoundary.d.ts +0 -6
  179. package/lib/Entities/AppBoundary.js +0 -2
  180. package/lib/Entities/AppDispatcher.d.ts +0 -63
  181. package/lib/Entities/AppDispatcher.js +0 -336
  182. package/lib/Entities/AppHandler.d.ts +0 -20
  183. package/lib/Entities/AppHandler.js +0 -94
  184. package/lib/Entities/Babylon.d.ts +0 -48
  185. package/lib/Entities/Babylon.js +0 -146
  186. package/lib/Entities/BaseApp.d.ts +0 -9
  187. package/lib/Entities/BaseApp.js +0 -30
  188. package/lib/Entities/DevicePreview.d.ts +0 -11
  189. package/lib/Entities/DevicePreview.js +0 -49
  190. package/lib/Entities/FocusCamera.d.ts +0 -70
  191. package/lib/Entities/FocusCamera.js +0 -272
  192. package/lib/Entities/FramedScreen.d.ts +0 -15
  193. package/lib/Entities/FramedScreen.js +0 -58
  194. package/lib/Entities/FramedScreenContainer.d.ts +0 -12
  195. package/lib/Entities/FramedScreenContainer.js +0 -41
  196. package/lib/Entities/HoverLabels.d.ts +0 -42
  197. package/lib/Entities/HoverLabels.js +0 -82
  198. package/lib/Entities/KeyboardInput.d.ts +0 -13
  199. package/lib/Entities/KeyboardInput.js +0 -68
  200. package/lib/Entities/Memoized/MemoizedAngle.d.ts +0 -9
  201. package/lib/Entities/Memoized/MemoizedAngle.js +0 -22
  202. package/lib/Entities/Memoized/MemoizedBoolean.d.ts +0 -8
  203. package/lib/Entities/Memoized/MemoizedBoolean.js +0 -22
  204. package/lib/Entities/Memoized/MemoizedColor.d.ts +0 -9
  205. package/lib/Entities/Memoized/MemoizedColor.js +0 -23
  206. package/lib/Entities/Memoized/MemoizedNumber.d.ts +0 -8
  207. package/lib/Entities/Memoized/MemoizedNumber.js +0 -22
  208. package/lib/Entities/Memoized/MemoizedQuaternion.d.ts +0 -9
  209. package/lib/Entities/Memoized/MemoizedQuaternion.js +0 -23
  210. package/lib/Entities/Memoized/MemoizedString.d.ts +0 -8
  211. package/lib/Entities/Memoized/MemoizedString.js +0 -22
  212. package/lib/Entities/Memoized/MemoizedVector2.d.ts +0 -9
  213. package/lib/Entities/Memoized/MemoizedVector2.js +0 -23
  214. package/lib/Entities/Memoized/MemoizedVector3.d.ts +0 -9
  215. package/lib/Entities/Memoized/MemoizedVector3.js +0 -23
  216. package/lib/Entities/MeshModel.d.ts +0 -68
  217. package/lib/Entities/MeshModel.js +0 -174
  218. package/lib/Entities/ModelObject.d.ts +0 -10
  219. package/lib/Entities/ModelObject.js +0 -42
  220. package/lib/Entities/MouseInput.d.ts +0 -21
  221. package/lib/Entities/MouseInput.js +0 -127
  222. package/lib/Entities/ObservableEntityRepo.d.ts +0 -20
  223. package/lib/Entities/ObservableEntityRepo.js +0 -80
  224. package/lib/Entities/QuestionChallenge.d.ts +0 -21
  225. package/lib/Entities/QuestionChallenge.js +0 -103
  226. package/lib/Entities/QuestionChallengeAnswer.d.ts +0 -32
  227. package/lib/Entities/QuestionChallengeAnswer.js +0 -51
  228. package/lib/Entities/SceneModel.d.ts +0 -85
  229. package/lib/Entities/SceneModel.js +0 -202
  230. package/lib/Entities/SceneModelMesh.d.ts +0 -40
  231. package/lib/Entities/SceneModelMesh.js +0 -75
  232. package/lib/Entities/SceneModelRepo.d.ts +0 -11
  233. package/lib/Entities/SceneModelRepo.js +0 -48
  234. package/lib/Entities/SceneObject.d.ts +0 -23
  235. package/lib/Entities/SceneObject.js +0 -79
  236. package/lib/Entities/SceneObjectsRepo.d.ts +0 -12
  237. package/lib/Entities/SceneObjectsRepo.js +0 -58
  238. package/lib/Entities/SceneRoot.d.ts +0 -29
  239. package/lib/Entities/SceneRoot.js +0 -145
  240. package/lib/Entities/StateMachine.d.ts +0 -29
  241. package/lib/Entities/StateMachine.js +0 -98
  242. package/lib/Entities/Tool.d.ts +0 -81
  243. package/lib/Entities/Tool.js +0 -94
  244. package/lib/Entities/ToolRepository.d.ts +0 -46
  245. package/lib/Entities/ToolRepository.js +0 -118
  246. package/lib/Entities/TouchInput.d.ts +0 -28
  247. package/lib/Entities/TouchInput.js +0 -144
  248. package/lib/Entities/UndoRedo.d.ts +0 -22
  249. package/lib/Entities/UndoRedo.js +0 -61
  250. package/lib/PresentationManagers/DevicePreviewPM.d.ts +0 -14
  251. package/lib/PresentationManagers/DevicePreviewPM.js +0 -30
  252. package/lib/PresentationManagers/FocusCameraPM.d.ts +0 -15
  253. package/lib/PresentationManagers/FocusCameraPM.js +0 -31
  254. package/lib/PresentationManagers/FocusCameraPosRotPM.d.ts +0 -13
  255. package/lib/PresentationManagers/FocusCameraPosRotPM.js +0 -28
  256. package/lib/PresentationManagers/FramedScreenContainerPM.d.ts +0 -18
  257. package/lib/PresentationManagers/FramedScreenContainerPM.js +0 -55
  258. package/lib/PresentationManagers/HasRedoPM.d.ts +0 -9
  259. package/lib/PresentationManagers/HasRedoPM.js +0 -22
  260. package/lib/PresentationManagers/HasUndoPM.d.ts +0 -9
  261. package/lib/PresentationManagers/HasUndoPM.js +0 -22
  262. package/lib/PresentationManagers/HoverLabels/AllowHoverLabelPM.d.ts +0 -9
  263. package/lib/PresentationManagers/HoverLabels/AllowHoverLabelPM.js +0 -19
  264. package/lib/PresentationManagers/HoverLabels/HoverLabelPM.d.ts +0 -17
  265. package/lib/PresentationManagers/HoverLabels/HoverLabelPM.js +0 -32
  266. package/lib/PresentationManagers/HoverLabels/index.d.ts +0 -2
  267. package/lib/PresentationManagers/HoverLabels/index.js +0 -14
  268. package/lib/PresentationManagers/IsAuthoringPM.d.ts +0 -9
  269. package/lib/PresentationManagers/IsAuthoringPM.js +0 -20
  270. package/lib/PresentationManagers/PresentationManager.d.ts +0 -8
  271. package/lib/PresentationManagers/PresentationManager.js +0 -16
  272. package/lib/PresentationManagers/QuestionChallenge/AuthorQuestionChallengeAnswerPM.d.ts +0 -24
  273. package/lib/PresentationManagers/QuestionChallenge/AuthorQuestionChallengeAnswerPM.js +0 -65
  274. package/lib/PresentationManagers/QuestionChallenge/AuthorQuestionChallengePM.d.ts +0 -17
  275. package/lib/PresentationManagers/QuestionChallenge/AuthorQuestionChallengePM.js +0 -46
  276. package/lib/PresentationManagers/QuestionChallenge/QuestionChallengeAnswerPM.d.ts +0 -17
  277. package/lib/PresentationManagers/QuestionChallenge/QuestionChallengeAnswerPM.js +0 -51
  278. package/lib/PresentationManagers/QuestionChallenge/QuestionChallengePM.d.ts +0 -15
  279. package/lib/PresentationManagers/QuestionChallenge/QuestionChallengePM.js +0 -34
  280. package/lib/PresentationManagers/QuestionChallenge/index.d.ts +0 -4
  281. package/lib/PresentationManagers/QuestionChallenge/index.js +0 -16
  282. package/lib/PresentationManagers/SceneModel/SceneMeshOverlayPM.d.ts +0 -15
  283. package/lib/PresentationManagers/SceneModel/SceneMeshOverlayPM.js +0 -34
  284. package/lib/PresentationManagers/SceneModel/SceneModelPM.d.ts +0 -15
  285. package/lib/PresentationManagers/SceneModel/SceneModelPM.js +0 -36
  286. package/lib/PresentationManagers/SceneModel/index.d.ts +0 -1
  287. package/lib/PresentationManagers/SceneObject/SceneObjectPM.d.ts +0 -22
  288. package/lib/PresentationManagers/SceneObject/SceneObjectPM.js +0 -57
  289. package/lib/PresentationManagers/SceneObject/index.d.ts +0 -1
  290. package/lib/PresentationManagers/SceneObject/index.js +0 -13
  291. package/lib/PresentationManagers/ShowBabylonInspectorPM.d.ts +0 -9
  292. package/lib/PresentationManagers/ShowBabylonInspectorPM.js +0 -24
  293. package/lib/PresentationManagers/ToolPM.d.ts +0 -17
  294. package/lib/PresentationManagers/ToolPM.js +0 -35
  295. package/lib/PresentationManagers/TransformNodePM.d.ts +0 -14
  296. package/lib/PresentationManagers/TransformNodePM.js +0 -23
  297. package/lib/PresentationManagers/index.d.ts +0 -13
  298. package/lib/PresentationManagers/index.js +0 -25
  299. package/lib/UseCases/FocusCamera/BumpDollyFocusCamera.d.ts +0 -17
  300. package/lib/UseCases/FocusCamera/BumpDollyFocusCamera.js +0 -64
  301. package/lib/UseCases/FocusCamera/LerpFocusCamera.d.ts +0 -36
  302. package/lib/UseCases/FocusCamera/LerpFocusCamera.js +0 -71
  303. package/lib/UseCases/FocusCamera/PinchDollyFocusCamera.d.ts +0 -11
  304. package/lib/UseCases/FocusCamera/PinchDollyFocusCamera.js +0 -36
  305. package/lib/UseCases/FocusCamera/PixelDollyFocusCamera.d.ts +0 -11
  306. package/lib/UseCases/FocusCamera/PixelDollyFocusCamera.js +0 -36
  307. package/lib/UseCases/FocusCamera/PixelOrbitFocusCamera.d.ts +0 -11
  308. package/lib/UseCases/FocusCamera/PixelOrbitFocusCamera.js +0 -26
  309. package/lib/UseCases/FocusCamera/PixelPlanePanFocusCamera.d.ts +0 -11
  310. package/lib/UseCases/FocusCamera/PixelPlanePanFocusCamera.js +0 -33
  311. package/lib/UseCases/FocusCamera/SerializeFocusCamera.d.ts +0 -22
  312. package/lib/UseCases/FocusCamera/SerializeFocusCamera.js +0 -81
  313. package/lib/UseCases/FocusCamera/index.d.ts +0 -7
  314. package/lib/UseCases/FocusCamera/index.js +0 -19
  315. package/lib/UseCases/Handlers/DisposeAppBase.d.ts +0 -8
  316. package/lib/UseCases/Handlers/DisposeAppBase.js +0 -24
  317. package/lib/UseCases/Handlers/SetAppStateBase.d.ts +0 -10
  318. package/lib/UseCases/Handlers/SetAppStateBase.js +0 -32
  319. package/lib/UseCases/Handlers/SetDevicePreviewBase.d.ts +0 -10
  320. package/lib/UseCases/Handlers/SetDevicePreviewBase.js +0 -32
  321. package/lib/UseCases/Handlers/SetIsAuthoringBase.d.ts +0 -10
  322. package/lib/UseCases/Handlers/SetIsAuthoringBase.js +0 -32
  323. package/lib/UseCases/Handlers/ShowBabylonInspectorBase.d.ts +0 -10
  324. package/lib/UseCases/Handlers/ShowBabylonInspectorBase.js +0 -32
  325. package/lib/UseCases/Handlers/StartAppBase.d.ts +0 -10
  326. package/lib/UseCases/Handlers/StartAppBase.js +0 -32
  327. package/lib/UseCases/Handlers/StartZSpaceBase.d.ts +0 -10
  328. package/lib/UseCases/Handlers/StartZSpaceBase.js +0 -35
  329. package/lib/UseCases/Handlers/StopAppBase.d.ts +0 -8
  330. package/lib/UseCases/Handlers/StopAppBase.js +0 -24
  331. package/lib/UseCases/Handlers/StopZSpaceBase.d.ts +0 -8
  332. package/lib/UseCases/Handlers/StopZSpaceBase.js +0 -24
  333. package/lib/UseCases/Handlers/index.d.ts +0 -9
  334. package/lib/UseCases/Handlers/index.js +0 -21
  335. package/lib/UseCases/HoverLabels/SerializeAllowHoverLabel.d.ts +0 -14
  336. package/lib/UseCases/HoverLabels/SerializeAllowHoverLabel.js +0 -35
  337. package/lib/UseCases/HoverLabels/trySetHoverLabel.d.ts +0 -3
  338. package/lib/UseCases/HoverLabels/trySetHoverLabel.js +0 -12
  339. package/lib/UseCases/LerpVector3.d.ts +0 -26
  340. package/lib/UseCases/LerpVector3.js +0 -66
  341. package/lib/UseCases/QuestionChallenge/SerializeQuestionChallenge.d.ts +0 -25
  342. package/lib/UseCases/QuestionChallenge/SerializeQuestionChallenge.js +0 -70
  343. package/lib/UseCases/QuestionChallenge/index.d.ts +0 -4
  344. package/lib/UseCases/QuestionChallenge/index.js +0 -16
  345. package/lib/UseCases/QuestionChallenge/setQuesionChallengeAnswerFeedback.d.ts +0 -2
  346. package/lib/UseCases/QuestionChallenge/setQuesionChallengeAnswerFeedback.js +0 -16
  347. package/lib/UseCases/QuestionChallenge/setQuesionChallengeAnswerText.d.ts +0 -2
  348. package/lib/UseCases/QuestionChallenge/setQuesionChallengeAnswerText.js +0 -16
  349. package/lib/UseCases/QuestionChallenge/toggleQuesionChallengeAnswerIsCorrect.d.ts +0 -2
  350. package/lib/UseCases/QuestionChallenge/toggleQuesionChallengeAnswerIsCorrect.js +0 -16
  351. package/lib/UseCases/SceneModel/SerializeActiveModel.d.ts +0 -18
  352. package/lib/UseCases/SceneModel/SerializeActiveModel.js +0 -74
  353. package/lib/UseCases/SceneModel/SetMeshesEnabledHook.d.ts +0 -7
  354. package/lib/UseCases/SceneModel/SetMeshesEnabledHook.js +0 -22
  355. package/lib/UseCases/SceneModel/SetSceneModelMeshOverlayColor.d.ts +0 -2
  356. package/lib/UseCases/SceneModel/SetSceneModelMeshOverlayColor.js +0 -13
  357. package/lib/UseCases/SceneModel/index.d.ts +0 -5
  358. package/lib/UseCases/SceneModel/index.js +0 -17
  359. package/lib/UseCases/SceneModel/loadNewModel.d.ts +0 -2
  360. package/lib/UseCases/SceneModel/loadNewModel.js +0 -84
  361. package/lib/UseCases/SceneModel/modelDataLoader.d.ts +0 -3
  362. package/lib/UseCases/SceneModel/modelDataLoader.js +0 -33
  363. package/lib/UseCases/SceneObjects/PeelSceneObject.d.ts +0 -18
  364. package/lib/UseCases/SceneObjects/PeelSceneObject.js +0 -61
  365. package/lib/UseCases/SceneObjects/index.d.ts +0 -1
  366. package/lib/UseCases/SceneRoot/SerializeSceneRoot.d.ts +0 -33
  367. package/lib/UseCases/SceneRoot/SerializeSceneRoot.js +0 -67
  368. package/lib/UseCases/SceneRoot/index.d.ts +0 -2
  369. package/lib/UseCases/SceneRoot/index.js +0 -14
  370. package/lib/UseCases/SceneRoot/setupSceneRoot.d.ts +0 -2
  371. package/lib/UseCases/SceneRoot/setupSceneRoot.js +0 -11
  372. package/lib/UseCases/index.d.ts +0 -7
  373. package/lib/UseCases/index.js +0 -19
  374. package/lib/UseCases/setDevicePreview.d.ts +0 -2
  375. package/lib/UseCases/setDevicePreview.js +0 -14
  376. package/lib/UseCases/setupStandardAppObjects.d.ts +0 -2
  377. package/lib/UseCases/setupStandardAppObjects.js +0 -10
@@ -0,0 +1,2 @@
1
+ import { AppObjectRepo } from "../../../AppObject/AppObjectRepo";
2
+ export declare function submitError(sender: string, message: string, appObjects: AppObjectRepo, showAlert?: boolean): void;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.submitError = void 0;
4
+ const Dispatcher_1 = require("../../Dispatcher");
5
+ const LogUC_1 = require("../../Dispatcher/UC/LogUC");
6
+ function submitError(sender, message, appObjects, showAlert = true) {
7
+ const logUC = LogUC_1.LogUC.get(appObjects);
8
+ if (logUC) {
9
+ logUC.error(sender, message);
10
+ }
11
+ else {
12
+ console.error(`[${sender}]: ${message}`);
13
+ }
14
+ if (!showAlert)
15
+ return;
16
+ const alert = Dispatcher_1.ShowAlertUC.get(appObjects);
17
+ if (!alert)
18
+ return;
19
+ alert.showAlert({
20
+ title: "Error",
21
+ closeButtonLabel: "Close",
22
+ closeCallback: () => {
23
+ // done
24
+ },
25
+ message: `[${sender}]: ${message}`
26
+ });
27
+ }
28
+ exports.submitError = submitError;
@@ -0,0 +1,2 @@
1
+ import { AppObjectRepo } from "../../../AppObject/AppObjectRepo";
2
+ export declare function submitFatal(sender: string, message: string, appObjects: AppObjectRepo, showAlert?: boolean): void;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.submitFatal = void 0;
4
+ const Dispatcher_1 = require("../../Dispatcher");
5
+ const LogUC_1 = require("../../Dispatcher/UC/LogUC");
6
+ function submitFatal(sender, message, appObjects, showAlert = true) {
7
+ const logUC = LogUC_1.LogUC.get(appObjects);
8
+ if (logUC) {
9
+ logUC.fatal(sender, message);
10
+ }
11
+ else {
12
+ console.error(`[${sender}]: ${message}`);
13
+ }
14
+ if (!showAlert)
15
+ return;
16
+ const alert = Dispatcher_1.ShowAlertUC.get(appObjects);
17
+ if (!alert)
18
+ return;
19
+ alert.showAlert({
20
+ title: "Fatal Error",
21
+ closeButtonLabel: "Close",
22
+ closeCallback: () => {
23
+ // done
24
+ },
25
+ message: `[${sender}]: ${message}`
26
+ });
27
+ }
28
+ exports.submitFatal = submitFatal;
@@ -0,0 +1,2 @@
1
+ import { AppObjectRepo } from "../../../AppObject/AppObjectRepo";
2
+ export declare function submitLog(sender: string, message: string, appObjects: AppObjectRepo, showAlert?: boolean): void;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.submitLog = void 0;
4
+ const Dispatcher_1 = require("../../Dispatcher");
5
+ const LogUC_1 = require("../../Dispatcher/UC/LogUC");
6
+ function submitLog(sender, message, appObjects, showAlert = false) {
7
+ const logUC = LogUC_1.LogUC.get(appObjects);
8
+ if (logUC) {
9
+ logUC.log(sender, message);
10
+ }
11
+ else {
12
+ console.log(`[${sender}]: ${message}`);
13
+ }
14
+ if (!showAlert)
15
+ return;
16
+ const alert = Dispatcher_1.ShowAlertUC.get(appObjects);
17
+ if (!alert)
18
+ return;
19
+ alert.showAlert({
20
+ title: "Log",
21
+ closeButtonLabel: "Close",
22
+ closeCallback: () => {
23
+ // done
24
+ },
25
+ message: `[${sender}]: ${message}`
26
+ });
27
+ }
28
+ exports.submitLog = submitLog;
@@ -0,0 +1,2 @@
1
+ import { AppObjectRepo } from "../../../AppObject/AppObjectRepo";
2
+ export declare function submitWarning(sender: string, message: string, appObjects: AppObjectRepo, showAlert?: boolean): void;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.submitWarning = void 0;
4
+ const Dispatcher_1 = require("../../Dispatcher");
5
+ const LogUC_1 = require("../../Dispatcher/UC/LogUC");
6
+ function submitWarning(sender, message, appObjects, showAlert = false) {
7
+ const logUC = LogUC_1.LogUC.get(appObjects);
8
+ if (logUC) {
9
+ logUC.warn(sender, message);
10
+ }
11
+ else {
12
+ console.warn(`[${sender}]: ${message}`);
13
+ }
14
+ if (!showAlert)
15
+ return;
16
+ const alert = Dispatcher_1.ShowAlertUC.get(appObjects);
17
+ if (!alert)
18
+ return;
19
+ alert.showAlert({
20
+ title: "Warning",
21
+ closeButtonLabel: "Close",
22
+ closeCallback: () => {
23
+ // done
24
+ },
25
+ message: `[${sender}]: ${message}`
26
+ });
27
+ }
28
+ exports.submitWarning = submitWarning;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="jest" />
2
+ import { AppObject } from "../../../AppObject";
2
3
  import { SceneRayPickUC } from "../UC/SceneRayPickUC";
3
4
  export declare class MockSceneRayPickUC extends SceneRayPickUC {
4
5
  sceneRayPick: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
5
7
  }
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MockSceneRayPickUC = void 0;
4
4
  const SceneRayPickUC_1 = require("../UC/SceneRayPickUC");
5
5
  class MockSceneRayPickUC extends SceneRayPickUC_1.SceneRayPickUC {
6
- constructor() {
7
- super(...arguments);
6
+ constructor(appObject) {
7
+ super(appObject, SceneRayPickUC_1.SceneRayPickUC.type);
8
8
  this.sceneRayPick = jest.fn();
9
9
  }
10
10
  }
@@ -0,0 +1,4 @@
1
+ import { AppObject } from "@vived/app";
2
+ import { EntityContext } from "Entities/EntityContext";
3
+ import { CameraFactory } from "../Entities/CameraFactory";
4
+ export declare function makeCameraFactory(appObject: AppObject, entities: EntityContext): CameraFactory;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeCameraFactory = void 0;
4
+ const AppObjectComponents_1 = require("@vived/app/lib/AppObjectComponents");
5
+ const CameraEntity_1 = require("../Entities/CameraEntity");
6
+ const CameraFactory_1 = require("../Entities/CameraFactory");
7
+ const CameraPM_1 = require("../PM/CameraPM");
8
+ function makeCameraFactory(appObject, entities) {
9
+ return new CameraFactoryImp(appObject, entities);
10
+ }
11
+ exports.makeCameraFactory = makeCameraFactory;
12
+ class CameraFactoryImp extends CameraFactory_1.CameraFactory {
13
+ constructor(appObject, entities) {
14
+ super(appObject, CameraFactory_1.CameraFactory.type);
15
+ this.entities = entities;
16
+ this.setupCamera = () => {
17
+ const appObjects = this.entities.appObjects;
18
+ const cameraEntityAo = appObjects.getOrCreate(CameraFactory_1.CameraFactory.entityAppObjectId);
19
+ new AppObjectComponents_1.Transform3D(cameraEntityAo);
20
+ const cameraEntity = CameraEntity_1.makeCameraEntity(cameraEntityAo);
21
+ CameraPM_1.makeCameraPM(cameraEntityAo);
22
+ return cameraEntity;
23
+ };
24
+ }
25
+ }
@@ -0,0 +1,10 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject } from "../../../AppObject/AppObject";
3
+ import { LogUC } from "../UC/LogUC";
4
+ export declare class MockLogUC extends LogUC {
5
+ log: jest.Mock<any, any>;
6
+ warn: jest.Mock<any, any>;
7
+ error: jest.Mock<any, any>;
8
+ fatal: jest.Mock<any, any>;
9
+ constructor(appObject: AppObject);
10
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MockLogUC = void 0;
4
+ const LogUC_1 = require("../UC/LogUC");
5
+ class MockLogUC extends LogUC_1.LogUC {
6
+ constructor(appObject) {
7
+ super(appObject, LogUC_1.LogUC.type);
8
+ this.log = jest.fn();
9
+ this.warn = jest.fn();
10
+ this.error = jest.fn();
11
+ this.fatal = jest.fn();
12
+ }
13
+ }
14
+ exports.MockLogUC = MockLogUC;
@@ -0,0 +1,22 @@
1
+ import { AppObject, AppObjectController } from "../../../../AppObject";
2
+ import { MouseController, MouseInputEvent } from "../../../MouseInput";
3
+ export declare abstract class MouseLandmark extends AppObjectController implements MouseController {
4
+ static type: string;
5
+ addingLandmark: boolean;
6
+ pressed: boolean;
7
+ abstract onMove: (e: MouseInputEvent) => void;
8
+ abstract onDown: (e: MouseInputEvent) => void;
9
+ }
10
+ export declare function makeMouseLandmark(appObject: AppObject): MouseLandmarkImp;
11
+ declare class MouseLandmarkImp extends MouseLandmark {
12
+ addingLandmark: boolean;
13
+ pressed: boolean;
14
+ private tryPreviewLandmarkUc?;
15
+ private tryAddLandmarkUc?;
16
+ allow: (e: MouseInputEvent) => boolean;
17
+ onMove: (e: MouseInputEvent) => void;
18
+ onDown: (e: MouseInputEvent) => void;
19
+ onUp: (e: MouseInputEvent) => void;
20
+ constructor(appObject: AppObject);
21
+ }
22
+ export {};
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeMouseLandmark = exports.MouseLandmark = void 0;
4
+ const AppObject_1 = require("../../../../AppObject");
5
+ const Babylon_1 = require("../../../Babylon");
6
+ const MouseInput_1 = require("../../../MouseInput");
7
+ const LandmarkGlobals_1 = require("../../Entities/LandmarkGlobals");
8
+ const TryAddNewLandmarkUC_1 = require("../../UseCases/TryAddNewLandmarkUC");
9
+ const TryPreviewLandmarkUC_1 = require("../../UseCases/TryPreviewLandmarkUC");
10
+ class MouseLandmark extends AppObject_1.AppObjectController {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.addingLandmark = false;
14
+ this.pressed = false;
15
+ }
16
+ }
17
+ exports.MouseLandmark = MouseLandmark;
18
+ MouseLandmark.type = "Mouse_Landmark_Controller";
19
+ function makeMouseLandmark(appObject) {
20
+ return new MouseLandmarkImp(appObject);
21
+ }
22
+ exports.makeMouseLandmark = makeMouseLandmark;
23
+ class MouseLandmarkImp extends MouseLandmark {
24
+ constructor(appObject) {
25
+ super(appObject, MouseLandmark.type);
26
+ this.addingLandmark = false;
27
+ this.pressed = false;
28
+ this.allow = (e) => {
29
+ return true;
30
+ };
31
+ this.onMove = (e) => {
32
+ if (!this.allow(e))
33
+ return;
34
+ if (!this.tryPreviewLandmarkUc) {
35
+ return;
36
+ }
37
+ const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
38
+ this.tryPreviewLandmarkUc.tryPreviewLandmark(ray, this.pressed);
39
+ };
40
+ this.onDown = (e) => {
41
+ this.addingLandmark = false;
42
+ if (e.button !== 0)
43
+ return;
44
+ if (!this.allow(e))
45
+ return;
46
+ if (!this.tryPreviewLandmarkUc) {
47
+ return;
48
+ }
49
+ const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
50
+ const pressed = true;
51
+ this.tryPreviewLandmarkUc.tryPreviewLandmark(ray, pressed);
52
+ this.addingLandmark = true;
53
+ this.pressed = true;
54
+ };
55
+ this.onUp = (e) => {
56
+ var _a;
57
+ if (!this.allow(e))
58
+ return;
59
+ if (!this.addingLandmark)
60
+ return;
61
+ if (!this.tryAddLandmarkUc)
62
+ return;
63
+ const landmarkPreview = (_a = this.appObject.getComponent(LandmarkGlobals_1.LandmarkGlobals.type)) === null || _a === void 0 ? void 0 : _a.previewLandmark;
64
+ if (!landmarkPreview) {
65
+ return;
66
+ }
67
+ const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
68
+ this.tryAddLandmarkUc.addFromRay(ray);
69
+ landmarkPreview.hideable.isHidden = true;
70
+ this.addingLandmark = false;
71
+ this.pressed = false;
72
+ };
73
+ this.tryPreviewLandmarkUc = TryPreviewLandmarkUC_1.TryPreviewLandmarkUC.get(appObject);
74
+ if (!this.tryPreviewLandmarkUc) {
75
+ this.warn("Unable to find TryPreviewLandmarkUC");
76
+ return;
77
+ }
78
+ this.tryAddLandmarkUc = TryAddNewLandmarkUC_1.TryAddNewLandmarkUC.get(appObject);
79
+ if (!this.tryAddLandmarkUc) {
80
+ this.warn("Unable to find TryAddNewLandmarkUC");
81
+ return;
82
+ }
83
+ const mouseInput = MouseInput_1.MouseInputEntity.get(this.appObjects);
84
+ if (mouseInput) {
85
+ mouseInput.registerController(this);
86
+ }
87
+ else {
88
+ this.warn("Unable to find MouseInputEntity");
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,22 @@
1
+ import { AppObject, AppObjectController } from "../../../AppObject";
2
+ import { MouseController, MouseInputEvent } from "../../MouseInput";
3
+ export declare abstract class MouseLandmark extends AppObjectController implements MouseController {
4
+ static type: string;
5
+ addingLandmark: boolean;
6
+ pressed: boolean;
7
+ abstract onMove: (e: MouseInputEvent) => void;
8
+ abstract onDown: (e: MouseInputEvent) => void;
9
+ }
10
+ export declare function makeMouseLandmark(appObject: AppObject): MouseLandmarkImp;
11
+ declare class MouseLandmarkImp extends MouseLandmark {
12
+ addingLandmark: boolean;
13
+ pressed: boolean;
14
+ private tryPreviewLandmarkUc?;
15
+ private tryAddLandmarkUc?;
16
+ allow: (e: MouseInputEvent) => boolean;
17
+ onMove: (e: MouseInputEvent) => void;
18
+ onDown: (e: MouseInputEvent) => void;
19
+ onUp: (e: MouseInputEvent) => void;
20
+ constructor(appObject: AppObject);
21
+ }
22
+ export {};
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeMouseLandmark = exports.MouseLandmark = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const Babylon_1 = require("../../Babylon");
6
+ const MouseInput_1 = require("../../MouseInput");
7
+ const LandmarkGlobals_1 = require("../Entities/LandmarkGlobals");
8
+ const TryAddNewLandmarkUC_1 = require("../UseCases/TryAddNewLandmarkUC");
9
+ const TryPreviewLandmarkUC_1 = require("../UseCases/TryPreviewLandmarkUC");
10
+ class MouseLandmark extends AppObject_1.AppObjectController {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.addingLandmark = false;
14
+ this.pressed = false;
15
+ }
16
+ }
17
+ exports.MouseLandmark = MouseLandmark;
18
+ MouseLandmark.type = "Mouse_Landmark_Controller";
19
+ function makeMouseLandmark(appObject) {
20
+ return new MouseLandmarkImp(appObject);
21
+ }
22
+ exports.makeMouseLandmark = makeMouseLandmark;
23
+ class MouseLandmarkImp extends MouseLandmark {
24
+ constructor(appObject) {
25
+ super(appObject, MouseLandmark.type);
26
+ this.addingLandmark = false;
27
+ this.pressed = false;
28
+ this.allow = (e) => {
29
+ return true;
30
+ };
31
+ this.onMove = (e) => {
32
+ if (!this.allow(e))
33
+ return;
34
+ if (!this.tryPreviewLandmarkUc) {
35
+ return;
36
+ }
37
+ const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
38
+ this.tryPreviewLandmarkUc.tryPreviewLandmark(ray, this.pressed);
39
+ };
40
+ this.onDown = (e) => {
41
+ this.addingLandmark = false;
42
+ if (e.button !== 0)
43
+ return;
44
+ if (!this.allow(e))
45
+ return;
46
+ if (!this.tryPreviewLandmarkUc) {
47
+ return;
48
+ }
49
+ const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
50
+ const pressed = true;
51
+ this.tryPreviewLandmarkUc.tryPreviewLandmark(ray, pressed);
52
+ this.addingLandmark = true;
53
+ this.pressed = true;
54
+ };
55
+ this.onUp = (e) => {
56
+ var _a;
57
+ if (!this.allow(e))
58
+ return;
59
+ if (!this.addingLandmark)
60
+ return;
61
+ if (!this.tryAddLandmarkUc)
62
+ return;
63
+ const landmarkPreview = (_a = this.appObject.getComponent(LandmarkGlobals_1.LandmarkGlobals.type)) === null || _a === void 0 ? void 0 : _a.previewLandmark;
64
+ if (!landmarkPreview) {
65
+ return;
66
+ }
67
+ const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
68
+ this.tryAddLandmarkUc.addFromRay(ray);
69
+ landmarkPreview.hideable.isHidden = true;
70
+ this.addingLandmark = false;
71
+ this.pressed = false;
72
+ };
73
+ this.tryPreviewLandmarkUc = TryPreviewLandmarkUC_1.TryPreviewLandmarkUC.get(appObject);
74
+ if (!this.tryPreviewLandmarkUc) {
75
+ this.warn("Unable to find TryPreviewLandmarkUC");
76
+ return;
77
+ }
78
+ this.tryAddLandmarkUc = TryAddNewLandmarkUC_1.TryAddNewLandmarkUC.get(appObject);
79
+ if (!this.tryAddLandmarkUc) {
80
+ this.warn("Unable to find TryAddNewLandmarkUC");
81
+ return;
82
+ }
83
+ const mouseInput = MouseInput_1.MouseInputEntity.get(this.appObjects);
84
+ if (mouseInput) {
85
+ mouseInput.registerController(this);
86
+ }
87
+ else {
88
+ this.warn("Unable to find MouseInputEntity");
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,3 @@
1
+ import { AppObjectRepo } from "../../../AppObject";
2
+ import { OverlayColorEnums } from "../../OverlayColor";
3
+ export declare function setSelectedLandmarkColor(color: OverlayColorEnums, appObjects: AppObjectRepo): void;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setSelectedLandmarkColor = void 0;
4
+ const Selection_1 = require("../../Selection");
5
+ const SetOverlayColorUC_1 = require("../UseCases/SetOverlayColorUC");
6
+ function setSelectedLandmarkColor(color, appObjects) {
7
+ const selection = appObjects.getSingleton(Selection_1.Selection.type);
8
+ if (!selection) {
9
+ appObjects.submitWarning("SetSelectedLandmarkColorController", "Selection App Object was not added.");
10
+ return;
11
+ }
12
+ const selectedObjectID = selection.selectedObjectId;
13
+ if (!selectedObjectID) {
14
+ appObjects.submitWarning("SetSelectedLandmarkColorController", "There is no selected object.");
15
+ return;
16
+ }
17
+ const setOverlayColorUC = appObjects.getAppObjectComponent(selectedObjectID, SetOverlayColorUC_1.SetOverlayColorUC.type);
18
+ if (!setOverlayColorUC) {
19
+ appObjects.submitWarning("SetSelectedLandmarkColorController", "SetOverlayColorUC App Object was not added.");
20
+ return;
21
+ }
22
+ setOverlayColorUC.setOverlayColor(color);
23
+ }
24
+ exports.setSelectedLandmarkColor = setSelectedLandmarkColor;
@@ -0,0 +1,2 @@
1
+ import { AppObjectRepo } from "../../../AppObject";
2
+ export declare function submitLandmarkSize(size: number, appObjectId: string, appObjects: AppObjectRepo): void;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.submitLandmarkSize = void 0;
4
+ const LandmarkEntity_1 = require("../Entities/LandmarkEntity");
5
+ const SetLandmarkSizeUC_1 = require("../UseCases/SetLandmarkSizeUC");
6
+ function submitLandmarkSize(size, appObjectId, appObjects) {
7
+ const landmarkEntity = appObjects.getAppObjectComponent(appObjectId, LandmarkEntity_1.LandmarkEntity.type);
8
+ if (!landmarkEntity) {
9
+ appObjects.submitWarning("SubmitLandmarkSizeController", "LandmarkEntity App Object was not added.");
10
+ return;
11
+ }
12
+ const setLandmarkSizeUC = appObjects.getAppObjectComponent(appObjectId, SetLandmarkSizeUC_1.SetLandmarkSizeUC.type);
13
+ if (!setLandmarkSizeUC) {
14
+ appObjects.submitWarning("SubmitLandmarkSizeController", "SetLandmarkSizeUC App Object was not added.");
15
+ return;
16
+ }
17
+ setLandmarkSizeUC.submitSize(size);
18
+ }
19
+ exports.submitLandmarkSize = submitLandmarkSize;
@@ -0,0 +1,20 @@
1
+ import { AppObject, AppObjectController } from "../../../../AppObject";
2
+ import { TouchController, TouchInputEvent } from "../../../TouchController";
3
+ export declare abstract class TouchLandmark extends AppObjectController implements TouchController {
4
+ static type: string;
5
+ abstract onTouchStart(e: TouchInputEvent): void;
6
+ abstract onTouchMove(e: TouchInputEvent): void;
7
+ abstract onTouchEnd(e: TouchInputEvent): void;
8
+ }
9
+ export declare function makeTouchLandmark(appObject: AppObject): TouchLandmarkImp;
10
+ declare class TouchLandmarkImp extends TouchLandmark {
11
+ private lastTouch;
12
+ private tryPreviewLandmarkUc?;
13
+ private tryAddLandmarkUc?;
14
+ allow: (e: TouchInputEvent) => boolean;
15
+ onTouchStart: (e: TouchInputEvent) => void;
16
+ onTouchMove: (e: TouchInputEvent) => void;
17
+ onTouchEnd: (e: TouchInputEvent) => void;
18
+ constructor(appObject: AppObject);
19
+ }
20
+ export {};
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeTouchLandmark = exports.TouchLandmark = void 0;
4
+ const AppObject_1 = require("../../../../AppObject");
5
+ const ValueObjects_1 = require("../../../../ValueObjects");
6
+ const Babylon_1 = require("../../../Babylon");
7
+ const TouchController_1 = require("../../../TouchController");
8
+ const LandmarkGlobals_1 = require("../../Entities/LandmarkGlobals");
9
+ const TryAddNewLandmarkUC_1 = require("../../UseCases/TryAddNewLandmarkUC");
10
+ const TryPreviewLandmarkUC_1 = require("../../UseCases/TryPreviewLandmarkUC");
11
+ class TouchLandmark extends AppObject_1.AppObjectController {
12
+ }
13
+ exports.TouchLandmark = TouchLandmark;
14
+ TouchLandmark.type = "TOUCH_LANDMARK_CONTROLLER";
15
+ function makeTouchLandmark(appObject) {
16
+ return new TouchLandmarkImp(appObject);
17
+ }
18
+ exports.makeTouchLandmark = makeTouchLandmark;
19
+ class TouchLandmarkImp extends TouchLandmark {
20
+ constructor(appObject) {
21
+ super(appObject, TouchLandmark.type);
22
+ this.lastTouch = ValueObjects_1.Vector2.Zero();
23
+ this.allow = (e) => {
24
+ return true;
25
+ };
26
+ this.onTouchStart = (e) => {
27
+ if (!this.allow(e))
28
+ return;
29
+ if (e.touchCount > 1)
30
+ return;
31
+ if (!this.tryPreviewLandmarkUc)
32
+ return;
33
+ const position = e.touches[0].position;
34
+ this.lastTouch = position;
35
+ const ray = Babylon_1.pixelToSceneRay(position, this.appObjects);
36
+ this.tryPreviewLandmarkUc.tryPreviewLandmark(ray, true);
37
+ };
38
+ this.onTouchMove = (e) => {
39
+ if (!this.allow(e))
40
+ return;
41
+ if (e.touchCount > 1)
42
+ return;
43
+ if (!this.tryPreviewLandmarkUc)
44
+ return;
45
+ const position = e.touches[0].position;
46
+ this.lastTouch = position;
47
+ const ray = Babylon_1.pixelToSceneRay(position, this.appObjects);
48
+ this.tryPreviewLandmarkUc.tryPreviewLandmark(ray, true);
49
+ };
50
+ this.onTouchEnd = (e) => {
51
+ var _a;
52
+ if (!this.allow(e))
53
+ return;
54
+ if (e.touchCount > 1)
55
+ return;
56
+ if (!this.tryAddLandmarkUc)
57
+ return;
58
+ const landmarkPreview = (_a = this.appObject.getComponent(LandmarkGlobals_1.LandmarkGlobals.type)) === null || _a === void 0 ? void 0 : _a.previewLandmark;
59
+ if (!landmarkPreview) {
60
+ return;
61
+ }
62
+ const ray = Babylon_1.pixelToSceneRay(this.lastTouch, this.appObjects);
63
+ this.tryAddLandmarkUc.addFromRay(ray);
64
+ landmarkPreview.hideable.isHidden = true;
65
+ };
66
+ this.tryPreviewLandmarkUc = TryPreviewLandmarkUC_1.TryPreviewLandmarkUC.get(appObject);
67
+ if (!this.tryPreviewLandmarkUc) {
68
+ this.warn("Unable to find TryPreviewLandmarkUC");
69
+ return;
70
+ }
71
+ this.tryAddLandmarkUc = TryAddNewLandmarkUC_1.TryAddNewLandmarkUC.get(appObject);
72
+ if (!this.tryAddLandmarkUc) {
73
+ this.warn("Unable to find TryAddNewLandmarkUC");
74
+ return;
75
+ }
76
+ const touchInput = TouchController_1.TouchInputEntity.get(this.appObjects);
77
+ if (touchInput) {
78
+ touchInput.registerController(this);
79
+ }
80
+ else {
81
+ this.warn("Unable to find TouchInputEntity");
82
+ }
83
+ }
84
+ }
@@ -0,0 +1,20 @@
1
+ import { AppObject, AppObjectController } from "../../../AppObject";
2
+ import { TouchController, TouchInputEvent } from "../../TouchController";
3
+ export declare abstract class TouchLandmark extends AppObjectController implements TouchController {
4
+ static type: string;
5
+ abstract onTouchStart(e: TouchInputEvent): void;
6
+ abstract onTouchMove(e: TouchInputEvent): void;
7
+ abstract onTouchEnd(e: TouchInputEvent): void;
8
+ }
9
+ export declare function makeTouchLandmark(appObject: AppObject): TouchLandmarkImp;
10
+ declare class TouchLandmarkImp extends TouchLandmark {
11
+ private lastTouch;
12
+ private tryPreviewLandmarkUc?;
13
+ private tryAddLandmarkUc?;
14
+ allow: (e: TouchInputEvent) => boolean;
15
+ onTouchStart: (e: TouchInputEvent) => void;
16
+ onTouchMove: (e: TouchInputEvent) => void;
17
+ onTouchEnd: (e: TouchInputEvent) => void;
18
+ constructor(appObject: AppObject);
19
+ }
20
+ export {};