@vived/app 4.26.2 → 4.27.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 (275) hide show
  1. package/lib/Components/BaseApp/Adapters/index.d.ts +4 -0
  2. package/lib/Components/BaseApp/Adapters/index.js +16 -0
  3. package/lib/Components/BaseApp/Adapters/isAuthoringAdapter.d.ts +2 -0
  4. package/lib/Components/BaseApp/Adapters/isAuthoringAdapter.js +23 -0
  5. package/lib/Components/BaseApp/Adapters/isReviewingAdapter.d.ts +2 -0
  6. package/lib/Components/BaseApp/Adapters/isReviewingAdapter.js +23 -0
  7. package/lib/Components/BaseApp/Adapters/slideNavigationAdapter.d.ts +3 -0
  8. package/lib/Components/BaseApp/Adapters/slideNavigationAdapter.js +23 -0
  9. package/lib/Components/BaseApp/Adapters/slideTextAdapter.d.ts +2 -0
  10. package/lib/Components/BaseApp/Adapters/slideTextAdapter.js +23 -0
  11. package/lib/Components/BaseApp/Controller/clickContinue.d.ts +2 -0
  12. package/lib/Components/BaseApp/Controller/clickContinue.js +13 -0
  13. package/lib/Components/BaseApp/Controller/clickEditSlideText.d.ts +2 -0
  14. package/lib/Components/BaseApp/Controller/clickEditSlideText.js +13 -0
  15. package/lib/Components/BaseApp/Controller/index.d.ts +5 -0
  16. package/lib/Components/BaseApp/Controller/index.js +17 -0
  17. package/lib/Components/BaseApp/Controller/removeRenderCanvas.d.ts +2 -0
  18. package/lib/Components/BaseApp/Controller/removeRenderCanvas.js +13 -0
  19. package/lib/Components/BaseApp/Controller/submitRenderCanvas.d.ts +2 -0
  20. package/lib/Components/BaseApp/Controller/submitRenderCanvas.js +13 -0
  21. package/lib/Components/BaseApp/Controller/updateContentSize.d.ts +2 -0
  22. package/lib/Components/BaseApp/Controller/updateContentSize.js +13 -0
  23. package/lib/Components/BaseApp/Entity/BaseAppState.d.ts +20 -0
  24. package/lib/Components/BaseApp/Entity/BaseAppState.js +68 -0
  25. package/lib/Components/BaseApp/Entity/index.d.ts +1 -0
  26. package/lib/Components/BaseApp/Entity/index.js +13 -0
  27. package/lib/Components/BaseApp/Mocks/IsAuthoringMock.d.ts +8 -0
  28. package/lib/Components/BaseApp/Mocks/IsAuthoringMock.js +15 -0
  29. package/lib/Components/BaseApp/Mocks/IsReviewingMock.d.ts +8 -0
  30. package/lib/Components/BaseApp/Mocks/IsReviewingMock.js +15 -0
  31. package/lib/Components/BaseApp/Mocks/MockAppRenderingUC.d.ts +10 -0
  32. package/lib/Components/BaseApp/Mocks/MockAppRenderingUC.js +16 -0
  33. package/lib/Components/BaseApp/Mocks/MockRenderCanvasUC.d.ts +10 -0
  34. package/lib/Components/BaseApp/Mocks/MockRenderCanvasUC.js +16 -0
  35. package/lib/Components/BaseApp/Mocks/MockUpdateContentSizeUC.d.ts +9 -0
  36. package/lib/Components/BaseApp/Mocks/MockUpdateContentSizeUC.js +15 -0
  37. package/lib/Components/BaseApp/Mocks/SlideNavigationMock.d.ts +8 -0
  38. package/lib/Components/BaseApp/Mocks/SlideNavigationMock.js +15 -0
  39. package/lib/Components/BaseApp/Mocks/SlideTextMock.d.ts +8 -0
  40. package/lib/Components/BaseApp/Mocks/SlideTextMock.js +15 -0
  41. package/lib/Components/BaseApp/Mocks/index.d.ts +7 -0
  42. package/lib/Components/BaseApp/Mocks/index.js +19 -0
  43. package/lib/Components/BaseApp/PM/IsAuthoringPM.d.ts +6 -0
  44. package/lib/Components/BaseApp/PM/IsAuthoringPM.js +39 -0
  45. package/lib/Components/BaseApp/PM/IsReviewingPM.d.ts +6 -0
  46. package/lib/Components/BaseApp/PM/IsReviewingPM.js +39 -0
  47. package/lib/Components/BaseApp/PM/SlideNavigationPM.d.ts +12 -0
  48. package/lib/Components/BaseApp/PM/SlideNavigationPM.js +49 -0
  49. package/lib/Components/BaseApp/PM/SlideTextPM.d.ts +6 -0
  50. package/lib/Components/BaseApp/PM/SlideTextPM.js +34 -0
  51. package/lib/Components/BaseApp/PM/index.d.ts +4 -0
  52. package/lib/Components/BaseApp/PM/index.js +16 -0
  53. package/lib/Components/BaseApp/UC/AppRenderingUC.d.ts +7 -0
  54. package/lib/Components/BaseApp/UC/AppRenderingUC.js +9 -0
  55. package/lib/Components/BaseApp/UC/EditSlideTextUC.d.ts +10 -0
  56. package/lib/Components/BaseApp/UC/EditSlideTextUC.js +57 -0
  57. package/lib/Components/BaseApp/UC/RenderCanvasUC.d.ts +10 -0
  58. package/lib/Components/BaseApp/UC/RenderCanvasUC.js +88 -0
  59. package/lib/Components/BaseApp/UC/SerializeBaseAppState.d.ts +17 -0
  60. package/lib/Components/BaseApp/UC/SerializeBaseAppState.js +59 -0
  61. package/lib/Components/BaseApp/UC/UndoRedoEditSlideText.d.ts +11 -0
  62. package/lib/Components/BaseApp/UC/UndoRedoEditSlideText.js +43 -0
  63. package/lib/Components/BaseApp/UC/UpdateContentSizeUC.d.ts +7 -0
  64. package/lib/Components/BaseApp/UC/UpdateContentSizeUC.js +33 -0
  65. package/lib/Components/BaseApp/UC/index.d.ts +7 -0
  66. package/lib/Components/BaseApp/UC/index.js +19 -0
  67. package/lib/Components/BaseApp/index.d.ts +6 -0
  68. package/lib/Components/BaseApp/index.js +18 -0
  69. package/lib/Components/Callouts/Adapters/calloutLinePointsAdapter.d.ts +3 -0
  70. package/lib/Components/Callouts/Adapters/calloutLinePointsAdapter.js +23 -0
  71. package/lib/Components/Callouts/Adapters/calloutListAdapter.d.ts +2 -0
  72. package/lib/Components/Callouts/Adapters/calloutListAdapter.js +23 -0
  73. package/lib/Components/Callouts/Adapters/calloutOffsetAdapter.d.ts +3 -0
  74. package/lib/Components/Callouts/Adapters/calloutOffsetAdapter.js +23 -0
  75. package/lib/Components/Callouts/Adapters/calloutSizeAdapter.d.ts +2 -0
  76. package/lib/Components/Callouts/Adapters/calloutSizeAdapter.js +23 -0
  77. package/lib/Components/Callouts/Adapters/index.d.ts +4 -0
  78. package/lib/Components/Callouts/Adapters/index.js +16 -0
  79. package/lib/Components/Callouts/Controller/MouseAddCalloutMC.d.ts +13 -0
  80. package/lib/Components/Callouts/Controller/MouseAddCalloutMC.js +43 -0
  81. package/lib/Components/Callouts/Controller/MouseCalloutRoll.d.ts +9 -0
  82. package/lib/Components/Callouts/Controller/MouseCalloutRoll.js +27 -0
  83. package/lib/Components/Callouts/Controller/TouchAddCalloutTC.d.ts +13 -0
  84. package/lib/Components/Callouts/Controller/TouchAddCalloutTC.js +47 -0
  85. package/lib/Components/Callouts/Controller/deleteAllCallouts.d.ts +2 -0
  86. package/lib/Components/Callouts/Controller/deleteAllCallouts.js +13 -0
  87. package/lib/Components/Callouts/Controller/deleteCallout.d.ts +2 -0
  88. package/lib/Components/Callouts/Controller/deleteCallout.js +13 -0
  89. package/lib/Components/Callouts/Controller/index.d.ts +6 -0
  90. package/lib/Components/Callouts/Controller/index.js +18 -0
  91. package/lib/Components/Callouts/Controller/submitCalloutSize.d.ts +2 -0
  92. package/lib/Components/Callouts/Controller/submitCalloutSize.js +13 -0
  93. package/lib/Components/Callouts/Controller/updateCalloutSize.d.ts +2 -0
  94. package/lib/Components/Callouts/Controller/updateCalloutSize.js +13 -0
  95. package/lib/Components/Callouts/Entities/CalloutEntity.d.ts +51 -0
  96. package/lib/Components/Callouts/Entities/CalloutEntity.js +141 -0
  97. package/lib/Components/Callouts/Entities/CalloutGlobals.d.ts +11 -0
  98. package/lib/Components/Callouts/Entities/CalloutGlobals.js +29 -0
  99. package/lib/Components/Callouts/Entities/CalloutRepo.d.ts +15 -0
  100. package/lib/Components/Callouts/Entities/CalloutRepo.js +57 -0
  101. package/lib/Components/Callouts/Entities/index.d.ts +3 -0
  102. package/lib/Components/Callouts/Entities/index.js +15 -0
  103. package/lib/Components/Callouts/Mocks/CalloutLinePointsPmMock.d.ts +7 -0
  104. package/lib/Components/Callouts/Mocks/CalloutLinePointsPmMock.js +11 -0
  105. package/lib/Components/Callouts/Mocks/CalloutListPmMock.d.ts +7 -0
  106. package/lib/Components/Callouts/Mocks/CalloutListPmMock.js +11 -0
  107. package/lib/Components/Callouts/Mocks/CalloutOffsetPmMock.d.ts +7 -0
  108. package/lib/Components/Callouts/Mocks/CalloutOffsetPmMock.js +11 -0
  109. package/lib/Components/Callouts/Mocks/CalloutSizePmMock.d.ts +7 -0
  110. package/lib/Components/Callouts/Mocks/CalloutSizePmMock.js +11 -0
  111. package/lib/Components/Callouts/Mocks/CreateCalloutUcMock.d.ts +8 -0
  112. package/lib/Components/Callouts/Mocks/CreateCalloutUcMock.js +12 -0
  113. package/lib/Components/Callouts/Mocks/DeleteCalloutUcMock.d.ts +7 -0
  114. package/lib/Components/Callouts/Mocks/DeleteCalloutUcMock.js +11 -0
  115. package/lib/Components/Callouts/Mocks/MoveCalloutToCamUcMock.d.ts +7 -0
  116. package/lib/Components/Callouts/Mocks/MoveCalloutToCamUcMock.js +11 -0
  117. package/lib/Components/Callouts/Mocks/SetCalloutSizeUcMock.d.ts +8 -0
  118. package/lib/Components/Callouts/Mocks/SetCalloutSizeUcMock.js +12 -0
  119. package/lib/Components/Callouts/Mocks/TryAddCalloutMock.d.ts +14 -0
  120. package/lib/Components/Callouts/Mocks/TryAddCalloutMock.js +21 -0
  121. package/lib/Components/Callouts/Mocks/TryBumpLabelUcMock.d.ts +9 -0
  122. package/lib/Components/Callouts/Mocks/TryBumpLabelUcMock.js +13 -0
  123. package/lib/Components/Callouts/Mocks/index.d.ts +8 -0
  124. package/lib/Components/Callouts/Mocks/index.js +20 -0
  125. package/lib/Components/Callouts/PM/CalloutLinePointsPM.d.ts +7 -0
  126. package/lib/Components/Callouts/PM/CalloutLinePointsPM.js +97 -0
  127. package/lib/Components/Callouts/PM/CalloutListPM.d.ts +6 -0
  128. package/lib/Components/Callouts/PM/CalloutListPM.js +49 -0
  129. package/lib/Components/Callouts/PM/CalloutOffsetPM.d.ts +7 -0
  130. package/lib/Components/Callouts/PM/CalloutOffsetPM.js +37 -0
  131. package/lib/Components/Callouts/PM/CalloutSizePM.d.ts +6 -0
  132. package/lib/Components/Callouts/PM/CalloutSizePM.js +41 -0
  133. package/lib/Components/Callouts/PM/index.d.ts +4 -0
  134. package/lib/Components/Callouts/PM/index.js +16 -0
  135. package/lib/Components/Callouts/UC/CalloutScaleHook.d.ts +11 -0
  136. package/lib/Components/Callouts/UC/CalloutScaleHook.js +48 -0
  137. package/lib/Components/Callouts/UC/CreateCalloutUC.d.ts +11 -0
  138. package/lib/Components/Callouts/UC/CreateCalloutUC.js +64 -0
  139. package/lib/Components/Callouts/UC/CreateCalloutUndoRedo.d.ts +10 -0
  140. package/lib/Components/Callouts/UC/CreateCalloutUndoRedo.js +36 -0
  141. package/lib/Components/Callouts/UC/DeleteAllCalloutsUC.d.ts +8 -0
  142. package/lib/Components/Callouts/UC/DeleteAllCalloutsUC.js +43 -0
  143. package/lib/Components/Callouts/UC/DeleteAllCalloutsUndoRedo.d.ts +10 -0
  144. package/lib/Components/Callouts/UC/DeleteAllCalloutsUndoRedo.js +40 -0
  145. package/lib/Components/Callouts/UC/DeleteCallout.d.ts +8 -0
  146. package/lib/Components/Callouts/UC/DeleteCallout.js +38 -0
  147. package/lib/Components/Callouts/UC/DeleteCalloutUndoRedo.d.ts +10 -0
  148. package/lib/Components/Callouts/UC/DeleteCalloutUndoRedo.js +36 -0
  149. package/lib/Components/Callouts/UC/LookAtCameraUC.d.ts +7 -0
  150. package/lib/Components/Callouts/UC/LookAtCameraUC.js +104 -0
  151. package/lib/Components/Callouts/UC/MoveCalloutToCamUC.d.ts +14 -0
  152. package/lib/Components/Callouts/UC/MoveCalloutToCamUC.js +35 -0
  153. package/lib/Components/Callouts/UC/SerializeCallouts.d.ts +17 -0
  154. package/lib/Components/Callouts/UC/SerializeCallouts.js +94 -0
  155. package/lib/Components/Callouts/UC/SetCalloutSizeUC.d.ts +9 -0
  156. package/lib/Components/Callouts/UC/SetCalloutSizeUC.js +63 -0
  157. package/lib/Components/Callouts/UC/SetCalloutSizeUndoRedo.d.ts +15 -0
  158. package/lib/Components/Callouts/UC/SetCalloutSizeUndoRedo.js +28 -0
  159. package/lib/Components/Callouts/UC/TryAddCallout.d.ts +14 -0
  160. package/lib/Components/Callouts/UC/TryAddCallout.js +111 -0
  161. package/lib/Components/Callouts/UC/TryBumpLabelUC.d.ts +9 -0
  162. package/lib/Components/Callouts/UC/TryBumpLabelUC.js +61 -0
  163. package/lib/Components/Callouts/UC/TryPanLabelUC.d.ts +3 -0
  164. package/lib/Components/Callouts/UC/TryPanLabelUC.js +38 -0
  165. package/lib/Components/Callouts/UC/index.d.ts +13 -0
  166. package/lib/Components/Callouts/UC/index.js +25 -0
  167. package/lib/Components/Callouts/index.d.ts +6 -0
  168. package/lib/Components/Callouts/index.js +18 -0
  169. package/lib/Components/Camera/Adapters/cameraAdapter.d.ts +3 -0
  170. package/lib/Components/Camera/Adapters/cameraAdapter.js +19 -0
  171. package/lib/Components/Camera/Adapters/index.d.ts +1 -0
  172. package/lib/Components/Camera/Adapters/index.js +13 -0
  173. package/lib/Components/Camera/Mocks/CameraPmMock.d.ts +8 -0
  174. package/lib/Components/Camera/Mocks/CameraPmMock.js +15 -0
  175. package/lib/Components/Camera/Mocks/index.d.ts +1 -0
  176. package/lib/Components/Camera/Mocks/index.js +13 -0
  177. package/lib/Components/Challenge/Mocks/ChallengeEntityMock.d.ts +17 -0
  178. package/lib/Components/Challenge/Mocks/ChallengeEntityMock.js +38 -0
  179. package/lib/Components/Challenge/Mocks/ChallengeMock.d.ts +11 -0
  180. package/lib/Components/Challenge/Mocks/ChallengeMock.js +13 -0
  181. package/lib/Components/ChannelModel/Adapters/modelHasCalloutsAdapter.d.ts +2 -0
  182. package/lib/Components/ChannelModel/Adapters/modelHasCalloutsAdapter.js +27 -0
  183. package/lib/Components/ChannelModel/Adapters/modelObjectsHaveOverlayAdapter.d.ts +2 -0
  184. package/lib/Components/ChannelModel/Adapters/modelObjectsHaveOverlayAdapter.js +27 -0
  185. package/lib/Components/ChannelModel/Controllers/clearActiveObjectsOverlays.d.ts +2 -0
  186. package/lib/Components/ChannelModel/Controllers/clearActiveObjectsOverlays.js +23 -0
  187. package/lib/Components/ChannelModel/Mocks/ClearModelObjectOverlaysUCMock.d.ts +7 -0
  188. package/lib/Components/ChannelModel/Mocks/ClearModelObjectOverlaysUCMock.js +11 -0
  189. package/lib/Components/ChannelModel/Mocks/ModelHasCalloutsPmMock.d.ts +7 -0
  190. package/lib/Components/ChannelModel/Mocks/ModelHasCalloutsPmMock.js +11 -0
  191. package/lib/Components/ChannelModel/Mocks/ModelObjectsHaveOverlayPMMock.d.ts +7 -0
  192. package/lib/Components/ChannelModel/Mocks/ModelObjectsHaveOverlayPMMock.js +11 -0
  193. package/lib/Components/ChannelModel/PMs/ModelHasCalloutsPM.d.ts +6 -0
  194. package/lib/Components/ChannelModel/PMs/ModelHasCalloutsPM.js +47 -0
  195. package/lib/Components/ChannelModel/PMs/ModelObjectsHaveOverlayPM.d.ts +6 -0
  196. package/lib/Components/ChannelModel/PMs/ModelObjectsHaveOverlayPM.js +58 -0
  197. package/lib/Components/ChannelModel/UC/ClearAllColorOverlayUndoRedo.d.ts +13 -0
  198. package/lib/Components/ChannelModel/UC/ClearAllColorOverlayUndoRedo.js +37 -0
  199. package/lib/Components/ChannelModel/UC/ClearModelObjectOverlaysUC.d.ts +7 -0
  200. package/lib/Components/ChannelModel/UC/ClearModelObjectOverlaysUC.js +53 -0
  201. package/lib/Components/Hideable/UCs/SerializeHideableObjects.d.ts +23 -0
  202. package/lib/Components/Hideable/UCs/SerializeHideableObjects.js +90 -0
  203. package/lib/Components/ObjectPick/Adapters/index.d.ts +1 -0
  204. package/lib/Components/ObjectPick/Adapters/index.js +13 -0
  205. package/lib/Components/ObjectPick/Adapters/objectPickAdapter.d.ts +3 -0
  206. package/lib/Components/ObjectPick/Adapters/objectPickAdapter.js +19 -0
  207. package/lib/Components/ObjectPick/Controllers/MouseObjectPickMC.d.ts +11 -0
  208. package/lib/Components/ObjectPick/Controllers/MouseObjectPickMC.js +45 -0
  209. package/lib/Components/ObjectPick/Controllers/StylusObjectPickSC.d.ts +9 -0
  210. package/lib/Components/ObjectPick/Controllers/StylusObjectPickSC.js +30 -0
  211. package/lib/Components/ObjectPick/Controllers/TouchObjectPickTC.d.ts +11 -0
  212. package/lib/Components/ObjectPick/Controllers/TouchObjectPickTC.js +42 -0
  213. package/lib/Components/ObjectPick/Controllers/addCorrectObjectPickID.d.ts +2 -0
  214. package/lib/Components/ObjectPick/Controllers/addCorrectObjectPickID.js +13 -0
  215. package/lib/Components/ObjectPick/Controllers/clearCorrectObjectPickIDs.d.ts +2 -0
  216. package/lib/Components/ObjectPick/Controllers/clearCorrectObjectPickIDs.js +13 -0
  217. package/lib/Components/ObjectPick/Controllers/index.d.ts +7 -0
  218. package/lib/Components/ObjectPick/Controllers/index.js +19 -0
  219. package/lib/Components/ObjectPick/Controllers/removeCorrectObjectPickID.d.ts +2 -0
  220. package/lib/Components/ObjectPick/Controllers/removeCorrectObjectPickID.js +13 -0
  221. package/lib/Components/ObjectPick/Controllers/toggleIsSelectingCorrectObjectPicks.d.ts +2 -0
  222. package/lib/Components/ObjectPick/Controllers/toggleIsSelectingCorrectObjectPicks.js +14 -0
  223. package/lib/Components/ObjectPick/Entities/ObjectPickEntity.d.ts +22 -0
  224. package/lib/Components/ObjectPick/Entities/ObjectPickEntity.js +82 -0
  225. package/lib/Components/ObjectPick/Entities/index.d.ts +1 -0
  226. package/lib/Components/ObjectPick/Entities/index.js +13 -0
  227. package/lib/Components/ObjectPick/Mocks/AddCorrectObjectIdUcMock.d.ts +8 -0
  228. package/lib/Components/ObjectPick/Mocks/AddCorrectObjectIdUcMock.js +15 -0
  229. package/lib/Components/ObjectPick/Mocks/ClearCorrectObjectIdsUCMock.d.ts +8 -0
  230. package/lib/Components/ObjectPick/Mocks/ClearCorrectObjectIdsUCMock.js +15 -0
  231. package/lib/Components/ObjectPick/Mocks/ObjectPickPmMock.d.ts +8 -0
  232. package/lib/Components/ObjectPick/Mocks/ObjectPickPmMock.js +15 -0
  233. package/lib/Components/ObjectPick/Mocks/RemoveCorrectObjectIdUcMock.d.ts +8 -0
  234. package/lib/Components/ObjectPick/Mocks/RemoveCorrectObjectIdUcMock.js +15 -0
  235. package/lib/Components/ObjectPick/Mocks/TrySelectObjectPickUCMock.d.ts +9 -0
  236. package/lib/Components/ObjectPick/Mocks/TrySelectObjectPickUCMock.js +16 -0
  237. package/lib/Components/ObjectPick/Mocks/TrySubmitObjectPickUCMock.d.ts +9 -0
  238. package/lib/Components/ObjectPick/Mocks/TrySubmitObjectPickUCMock.js +16 -0
  239. package/lib/Components/ObjectPick/Mocks/ValidateObjectPickUcMock.d.ts +8 -0
  240. package/lib/Components/ObjectPick/Mocks/ValidateObjectPickUcMock.js +15 -0
  241. package/lib/Components/ObjectPick/Mocks/index.d.ts +7 -0
  242. package/lib/Components/ObjectPick/Mocks/index.js +19 -0
  243. package/lib/Components/ObjectPick/PM/ObjectPickPM.d.ts +14 -0
  244. package/lib/Components/ObjectPick/PM/ObjectPickPM.js +72 -0
  245. package/lib/Components/ObjectPick/PM/index.d.ts +1 -0
  246. package/lib/Components/ObjectPick/PM/index.js +13 -0
  247. package/lib/Components/ObjectPick/UseCases/AddCorrectObjectIdUC.d.ts +7 -0
  248. package/lib/Components/ObjectPick/UseCases/AddCorrectObjectIdUC.js +48 -0
  249. package/lib/Components/ObjectPick/UseCases/ClearCorrectObjectIdsUC.d.ts +7 -0
  250. package/lib/Components/ObjectPick/UseCases/ClearCorrectObjectIdsUC.js +55 -0
  251. package/lib/Components/ObjectPick/UseCases/RemoveCorrectObjectIdUC.d.ts +7 -0
  252. package/lib/Components/ObjectPick/UseCases/RemoveCorrectObjectIdUC.js +48 -0
  253. package/lib/Components/ObjectPick/UseCases/SerializeObjectPick.d.ts +16 -0
  254. package/lib/Components/ObjectPick/UseCases/SerializeObjectPick.js +54 -0
  255. package/lib/Components/ObjectPick/UseCases/TrySelectObjectPickUC.d.ts +9 -0
  256. package/lib/Components/ObjectPick/UseCases/TrySelectObjectPickUC.js +83 -0
  257. package/lib/Components/ObjectPick/UseCases/TrySubmitObjectPickUC.d.ts +9 -0
  258. package/lib/Components/ObjectPick/UseCases/TrySubmitObjectPickUC.js +69 -0
  259. package/lib/Components/ObjectPick/UseCases/ValidateObjectPickUC.d.ts +10 -0
  260. package/lib/Components/ObjectPick/UseCases/ValidateObjectPickUC.js +62 -0
  261. package/lib/Components/ObjectPick/UseCases/index.d.ts +7 -0
  262. package/lib/Components/ObjectPick/UseCases/index.js +19 -0
  263. package/lib/Components/ObjectPick/index.d.ts +6 -0
  264. package/lib/Components/ObjectPick/index.js +18 -0
  265. package/lib/Components/Question/UC/registerQuestionChallenge.d.ts +2 -0
  266. package/lib/Components/Question/UC/registerQuestionChallenge.js +20 -0
  267. package/lib/Components/Transform3D/Controllers/Mouse/TryMousePanTransformMC.d.ts +13 -0
  268. package/lib/Components/Transform3D/Controllers/Mouse/TryMousePanTransformMC.js +51 -0
  269. package/lib/Components/Transform3D/Controllers/Touch/TryTouchPanTransformTC.d.ts +12 -0
  270. package/lib/Components/Transform3D/Controllers/Touch/TryTouchPanTransformTC.js +53 -0
  271. package/lib/Components/Transform3D/Mocks/TryPanTransformUcMock.d.ts +13 -0
  272. package/lib/Components/Transform3D/Mocks/TryPanTransformUcMock.js +17 -0
  273. package/lib/Components/Transform3D/UC/TryPanTransformUC.d.ts +27 -0
  274. package/lib/Components/Transform3D/UC/TryPanTransformUC.js +79 -0
  275. package/package.json +1 -1
@@ -0,0 +1,11 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "../../../AppObject";
2
+ import { Vector3 } from "../../../ValueObjects";
3
+ import { CalloutEntity } from "../Entities/CalloutEntity";
4
+ export declare abstract class CreateCalloutUC extends AppObjectUC {
5
+ static readonly type = "CreateCalloutUC";
6
+ readonly newLabelBumpAmount = 0.01;
7
+ abstract fromPick(pickHit: Vector3, pickHitNormal: Vector3, undoRedo?: boolean): CalloutEntity | undefined;
8
+ static get(appObj: AppObject): CreateCalloutUC | undefined;
9
+ static getById(id: string, appObjects: AppObjectRepo): CreateCalloutUC | undefined;
10
+ }
11
+ export declare function makeCreateCalloutUC(appObject: AppObject): CreateCalloutUC;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeCreateCalloutUC = exports.CreateCalloutUC = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const ValueObjects_1 = require("../../../ValueObjects");
6
+ const LabelEntity_1 = require("../../Label/Entities/LabelEntity");
7
+ const CalloutGlobals_1 = require("../Entities/CalloutGlobals");
8
+ const CalloutRepo_1 = require("../Entities/CalloutRepo");
9
+ const CreateCalloutUndoRedo_1 = require("./CreateCalloutUndoRedo");
10
+ class CreateCalloutUC extends AppObject_1.AppObjectUC {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.newLabelBumpAmount = 0.01;
14
+ }
15
+ static get(appObj) {
16
+ return appObj.getComponent(this.type);
17
+ }
18
+ static getById(id, appObjects) {
19
+ var _a;
20
+ return (_a = appObjects.get(id)) === null || _a === void 0 ? void 0 : _a.getComponent(this.type);
21
+ }
22
+ }
23
+ exports.CreateCalloutUC = CreateCalloutUC;
24
+ CreateCalloutUC.type = "CreateCalloutUC";
25
+ function makeCreateCalloutUC(appObject) {
26
+ return new CreateCalloutUCImp(appObject);
27
+ }
28
+ exports.makeCreateCalloutUC = makeCreateCalloutUC;
29
+ class CreateCalloutUCImp extends CreateCalloutUC {
30
+ get repo() {
31
+ return this.getCachedLocalComponent(CalloutRepo_1.CalloutRepo.type);
32
+ }
33
+ get calloutGlobals() {
34
+ return this.getCachedSingleton(CalloutGlobals_1.CalloutGlobals.type);
35
+ }
36
+ get repoLabel() {
37
+ return this.getCachedLocalComponent(LabelEntity_1.LabelEntity.type);
38
+ }
39
+ fromPick(pickHit, pickHitNormal, undoRedo = true) {
40
+ if (!this.repo) {
41
+ throw new Error("No Callout Repo");
42
+ }
43
+ const callout = this.repo.makeCallout();
44
+ callout.rootTransform.worldPosition = pickHit;
45
+ callout.rootTransform.worldRotation = ValueObjects_1.Quaternion.FromDirectionVector(pickHitNormal);
46
+ const labelBump = ValueObjects_1.Vector3.NewVectorOfLength(pickHitNormal, this.newLabelBumpAmount);
47
+ callout.labelTransform.worldPosition = ValueObjects_1.Vector3.Add(labelBump, pickHit);
48
+ callout.labelTransform.worldRotation = ValueObjects_1.Quaternion.FromYawPitchRoll(ValueObjects_1.Angle.FromDegrees(180), ValueObjects_1.Angle.FromDegrees(0), ValueObjects_1.Angle.FromDegrees(0));
49
+ if (this.repoLabel) {
50
+ callout.label.default = this.repoLabel.default;
51
+ }
52
+ if (this.calloutGlobals) {
53
+ callout.size = this.calloutGlobals.lastSize;
54
+ callout.overlayColor.overlayColor = this.calloutGlobals.lastColor;
55
+ }
56
+ if (undoRedo) {
57
+ new CreateCalloutUndoRedo_1.CreateCalloutUndoRedo(callout.data, this.appObjects);
58
+ }
59
+ return callout;
60
+ }
61
+ constructor(appObject) {
62
+ super(appObject, CreateCalloutUC.type);
63
+ }
64
+ }
@@ -0,0 +1,10 @@
1
+ import { AppObjectRepo } from "../../../AppObject";
2
+ import { UndoRedoAction } from "../../UndoRedo/Entities/UndoRedoEntity";
3
+ import { CalloutDTO } from "../Entities/CalloutEntity";
4
+ export declare class CreateCalloutUndoRedo implements UndoRedoAction {
5
+ private createdCalloutData;
6
+ private appObjects;
7
+ redoAction: () => void;
8
+ undoAction: () => void;
9
+ constructor(createdCalloutData: CalloutDTO, appObjects: AppObjectRepo);
10
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateCalloutUndoRedo = void 0;
4
+ const DispatchStateChangeUC_1 = require("../../Dispatcher/UC/DispatchStateChangeUC");
5
+ const UndoRedoEntity_1 = require("../../UndoRedo/Entities/UndoRedoEntity");
6
+ const CalloutRepo_1 = require("../Entities/CalloutRepo");
7
+ class CreateCalloutUndoRedo {
8
+ constructor(createdCalloutData, appObjects) {
9
+ this.createdCalloutData = createdCalloutData;
10
+ this.appObjects = appObjects;
11
+ this.redoAction = () => {
12
+ const repo = CalloutRepo_1.CalloutRepo.getById(this.createdCalloutData.parentID, this.appObjects);
13
+ if (!repo) {
14
+ return;
15
+ }
16
+ const callout = repo.makeCallout(this.createdCalloutData.id);
17
+ callout.data = this.createdCalloutData;
18
+ DispatchStateChangeUC_1.dispatchStateChange(this.appObjects);
19
+ };
20
+ this.undoAction = () => {
21
+ const repo = CalloutRepo_1.CalloutRepo.getById(this.createdCalloutData.parentID, this.appObjects);
22
+ if (!repo) {
23
+ return;
24
+ }
25
+ repo.deleteCallout(this.createdCalloutData.id);
26
+ DispatchStateChangeUC_1.dispatchStateChange(this.appObjects);
27
+ };
28
+ const undoRedo = UndoRedoEntity_1.UndoRedoEntity.get(this.appObjects);
29
+ if (!undoRedo) {
30
+ this.appObjects.submitError("CreateCalloutAction", "Unable to find UndoRedoEntity");
31
+ return;
32
+ }
33
+ undoRedo.submitAction(this);
34
+ }
35
+ }
36
+ exports.CreateCalloutUndoRedo = CreateCalloutUndoRedo;
@@ -0,0 +1,8 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "../../../AppObject";
2
+ export declare abstract class DeleteAllCalloutsUC extends AppObjectUC {
3
+ static readonly type = "DeleteAllCalloutsUC";
4
+ abstract deleteAllCallouts(): void;
5
+ static get: (appObjects: AppObjectRepo) => DeleteAllCalloutsUC | undefined;
6
+ static addIfMissing(appObj: AppObject): DeleteAllCalloutsUC;
7
+ }
8
+ export declare function makeDeleteAllCalloutsUC(appObject: AppObject): DeleteAllCalloutsUC;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeDeleteAllCalloutsUC = exports.DeleteAllCalloutsUC = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const DispatchStateChangeUC_1 = require("../../Dispatcher/UC/DispatchStateChangeUC");
6
+ const CalloutRepo_1 = require("../Entities/CalloutRepo");
7
+ const DeleteAllCalloutsUndoRedo_1 = require("./DeleteAllCalloutsUndoRedo");
8
+ class DeleteAllCalloutsUC extends AppObject_1.AppObjectUC {
9
+ static addIfMissing(appObj) {
10
+ const existing = appObj.getComponent(this.type);
11
+ if (existing)
12
+ return existing;
13
+ else {
14
+ return makeDeleteAllCalloutsUC(appObj);
15
+ }
16
+ }
17
+ }
18
+ exports.DeleteAllCalloutsUC = DeleteAllCalloutsUC;
19
+ DeleteAllCalloutsUC.type = "DeleteAllCalloutsUC";
20
+ DeleteAllCalloutsUC.get = (appObjects) => AppObject_1.getSingletonComponent(DeleteAllCalloutsUC.type, appObjects);
21
+ function makeDeleteAllCalloutsUC(appObject) {
22
+ return new DeleteAllCalloutsUCImp(appObject);
23
+ }
24
+ exports.makeDeleteAllCalloutsUC = makeDeleteAllCalloutsUC;
25
+ class DeleteAllCalloutsUCImp extends DeleteAllCalloutsUC {
26
+ deleteAllCallouts() {
27
+ const deletedCallouts = [];
28
+ const calloutRepos = this.appObjects.getAllComponents(CalloutRepo_1.CalloutRepo.type);
29
+ calloutRepos.forEach((repo) => {
30
+ const callouts = repo.getAll();
31
+ callouts.forEach((callout) => {
32
+ deletedCallouts.push(callout.data);
33
+ repo.removeForAppObject(callout.appObject.id);
34
+ callout.appObject.dispose();
35
+ });
36
+ });
37
+ DispatchStateChangeUC_1.dispatchStateChange(this.appObjects);
38
+ new DeleteAllCalloutsUndoRedo_1.DeleteAllCalloutsUndoRedo(deletedCallouts, this.appObjects);
39
+ }
40
+ constructor(appObject) {
41
+ super(appObject, DeleteAllCalloutsUC.type);
42
+ }
43
+ }
@@ -0,0 +1,10 @@
1
+ import { AppObjectRepo } from "../../../AppObject";
2
+ import { UndoRedoAction } from "../../UndoRedo/Entities/UndoRedoEntity";
3
+ import { CalloutDTO } from "../Entities/CalloutEntity";
4
+ export declare class DeleteAllCalloutsUndoRedo implements UndoRedoAction {
5
+ private deletedCallouts;
6
+ private appObjects;
7
+ undoAction: () => void;
8
+ redoAction: () => void;
9
+ constructor(deletedCallouts: CalloutDTO[], appObjects: AppObjectRepo);
10
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteAllCalloutsUndoRedo = void 0;
4
+ const DispatchStateChangeUC_1 = require("../../Dispatcher/UC/DispatchStateChangeUC");
5
+ const UndoRedoEntity_1 = require("../../UndoRedo/Entities/UndoRedoEntity");
6
+ const CalloutRepo_1 = require("../Entities/CalloutRepo");
7
+ class DeleteAllCalloutsUndoRedo {
8
+ constructor(deletedCallouts, appObjects) {
9
+ this.deletedCallouts = deletedCallouts;
10
+ this.appObjects = appObjects;
11
+ this.undoAction = () => {
12
+ this.deletedCallouts.forEach((deletedCallout) => {
13
+ const repo = CalloutRepo_1.CalloutRepo.getById(deletedCallout.parentID, this.appObjects);
14
+ if (!repo) {
15
+ return;
16
+ }
17
+ const callout = repo.makeCallout(deletedCallout.id);
18
+ callout.data = deletedCallout;
19
+ });
20
+ DispatchStateChangeUC_1.dispatchStateChange(this.appObjects);
21
+ };
22
+ this.redoAction = () => {
23
+ this.deletedCallouts.forEach((deletedCallout) => {
24
+ const repo = CalloutRepo_1.CalloutRepo.getById(deletedCallout.parentID, this.appObjects);
25
+ if (!repo) {
26
+ return;
27
+ }
28
+ repo.deleteCallout(deletedCallout.id);
29
+ });
30
+ DispatchStateChangeUC_1.dispatchStateChange(this.appObjects);
31
+ };
32
+ const undoRedo = UndoRedoEntity_1.UndoRedoEntity.get(this.appObjects);
33
+ if (!undoRedo) {
34
+ appObjects.submitWarning("DeleteAllCalloutsUndoRedo", "Unable to find UndoRedoEntity");
35
+ return;
36
+ }
37
+ undoRedo.submitAction(this);
38
+ }
39
+ }
40
+ exports.DeleteAllCalloutsUndoRedo = DeleteAllCalloutsUndoRedo;
@@ -0,0 +1,8 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "../../../AppObject";
2
+ export declare abstract class DeleteCalloutUC extends AppObjectUC {
3
+ static readonly type = "DeleteCalloutUC";
4
+ abstract delete(): void;
5
+ static get(appObj: AppObject): DeleteCalloutUC | undefined;
6
+ static getById(id: string, appObjects: AppObjectRepo): DeleteCalloutUC | undefined;
7
+ }
8
+ export declare function makeDeleteCalloutUC(appObject: AppObject): DeleteCalloutUC;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeDeleteCalloutUC = exports.DeleteCalloutUC = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const DispatchStateChangeUC_1 = require("../../Dispatcher/UC/DispatchStateChangeUC");
6
+ const CalloutEntity_1 = require("../Entities/CalloutEntity");
7
+ const DeleteCalloutUndoRedo_1 = require("./DeleteCalloutUndoRedo");
8
+ class DeleteCalloutUC extends AppObject_1.AppObjectUC {
9
+ static get(appObj) {
10
+ return appObj.getComponent(this.type);
11
+ }
12
+ static getById(id, appObjects) {
13
+ var _a;
14
+ return (_a = appObjects.get(id)) === null || _a === void 0 ? void 0 : _a.getComponent(this.type);
15
+ }
16
+ }
17
+ exports.DeleteCalloutUC = DeleteCalloutUC;
18
+ DeleteCalloutUC.type = "DeleteCalloutUC";
19
+ function makeDeleteCalloutUC(appObject) {
20
+ return new DeleteCalloutUCImp(appObject);
21
+ }
22
+ exports.makeDeleteCalloutUC = makeDeleteCalloutUC;
23
+ class DeleteCalloutUCImp extends DeleteCalloutUC {
24
+ constructor(appObject) {
25
+ super(appObject, DeleteCalloutUC.type);
26
+ this.delete = () => {
27
+ var _a;
28
+ if (!this.callout)
29
+ return;
30
+ new DeleteCalloutUndoRedo_1.DeleteCalloutUndoRedo(this.callout.data, this.appObjects);
31
+ (_a = this.callout.inRepo) === null || _a === void 0 ? void 0 : _a.deleteCallout(this.callout.id);
32
+ DispatchStateChangeUC_1.dispatchStateChange(this.appObjects);
33
+ };
34
+ }
35
+ get callout() {
36
+ return this.getCachedLocalComponent(CalloutEntity_1.CalloutEntity.type);
37
+ }
38
+ }
@@ -0,0 +1,10 @@
1
+ import { AppObjectRepo } from "../../../AppObject";
2
+ import { UndoRedoAction } from "../../UndoRedo/Entities/UndoRedoEntity";
3
+ import { CalloutDTO } from "../Entities/CalloutEntity";
4
+ export declare class DeleteCalloutUndoRedo implements UndoRedoAction {
5
+ private deletedCallout;
6
+ private appObjects;
7
+ undoAction: () => void;
8
+ redoAction: () => void;
9
+ constructor(deletedCallout: CalloutDTO, appObjects: AppObjectRepo);
10
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteCalloutUndoRedo = void 0;
4
+ const DispatchStateChangeUC_1 = require("../../Dispatcher/UC/DispatchStateChangeUC");
5
+ const UndoRedoEntity_1 = require("../../UndoRedo/Entities/UndoRedoEntity");
6
+ const CalloutRepo_1 = require("../Entities/CalloutRepo");
7
+ class DeleteCalloutUndoRedo {
8
+ constructor(deletedCallout, appObjects) {
9
+ this.deletedCallout = deletedCallout;
10
+ this.appObjects = appObjects;
11
+ this.undoAction = () => {
12
+ const repo = CalloutRepo_1.CalloutRepo.getById(this.deletedCallout.parentID, this.appObjects);
13
+ if (!repo) {
14
+ return;
15
+ }
16
+ const callout = repo.makeCallout(this.deletedCallout.id);
17
+ callout.data = this.deletedCallout;
18
+ DispatchStateChangeUC_1.dispatchStateChange(this.appObjects);
19
+ };
20
+ this.redoAction = () => {
21
+ const repo = CalloutRepo_1.CalloutRepo.getById(this.deletedCallout.parentID, this.appObjects);
22
+ if (!repo) {
23
+ return;
24
+ }
25
+ repo.deleteCallout(this.deletedCallout.id);
26
+ DispatchStateChangeUC_1.dispatchStateChange(this.appObjects);
27
+ };
28
+ const undoRedo = UndoRedoEntity_1.UndoRedoEntity.get(this.appObjects);
29
+ if (!undoRedo) {
30
+ this.appObjects.submitWarning("DeleteCalloutUndoRedo", "Unable to find UndoRedoEntity");
31
+ return;
32
+ }
33
+ undoRedo.submitAction(this);
34
+ }
35
+ }
36
+ exports.DeleteCalloutUndoRedo = DeleteCalloutUndoRedo;
@@ -0,0 +1,7 @@
1
+ import { AppObject, AppObjectUC } from "../../../AppObject";
2
+ export declare abstract class LookAtCameraUC extends AppObjectUC {
3
+ static readonly type = "LookAtCameraUC";
4
+ static get(appObj: AppObject): LookAtCameraUC | undefined;
5
+ abstract onChange(): void;
6
+ }
7
+ export declare function makeLookAtCameraUC(appObject: AppObject): LookAtCameraUC;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeLookAtCameraUC = exports.LookAtCameraUC = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const ValueObjects_1 = require("../../../ValueObjects");
6
+ const SceneRootEntity_1 = require("../../SceneRoot/Entities/SceneRootEntity");
7
+ const CalloutEntity_1 = require("../Entities/CalloutEntity");
8
+ class LookAtCameraUC extends AppObject_1.AppObjectUC {
9
+ static get(appObj) {
10
+ return appObj.getComponent(this.type);
11
+ }
12
+ }
13
+ exports.LookAtCameraUC = LookAtCameraUC;
14
+ LookAtCameraUC.type = "LookAtCameraUC";
15
+ function makeLookAtCameraUC(appObject) {
16
+ return new LookAtCameraUCIMP(appObject);
17
+ }
18
+ exports.makeLookAtCameraUC = makeLookAtCameraUC;
19
+ class LookAtCameraUCIMP extends LookAtCameraUC {
20
+ constructor(appObject) {
21
+ var _a, _b;
22
+ super(appObject, LookAtCameraUC.type);
23
+ this.cameraPos = new ValueObjects_1.Vector3(0, 0, -0.6);
24
+ this.targetQ = ValueObjects_1.Quaternion.Identity();
25
+ this.isSlerping = false;
26
+ this.onChange = () => {
27
+ if (!this.callout)
28
+ return;
29
+ const parent = this.callout.labelTransform.parent;
30
+ if (!parent) {
31
+ return;
32
+ }
33
+ const worldDir = ValueObjects_1.Vector3.Subtract(this.cameraPos, this.callout.labelTransform.worldPosition);
34
+ const localDir = parent.worldDirectionToLocal(worldDir);
35
+ const desiredQ = ValueObjects_1.Quaternion.FromDirectionVector(localDir);
36
+ if (ValueObjects_1.Quaternion.Close(this.targetQ, desiredQ)) {
37
+ return;
38
+ }
39
+ this.targetQ = desiredQ;
40
+ if (!this.isSlerping) {
41
+ this.kickOffSlerping();
42
+ }
43
+ };
44
+ this.stopSlerping = () => {
45
+ if (this.callout) {
46
+ this.callout.labelTransform.localRotation = this.targetQ;
47
+ }
48
+ if (this.slerpInterval) {
49
+ clearInterval(this.slerpInterval);
50
+ this.slerpInterval = undefined;
51
+ }
52
+ this.isSlerping = false;
53
+ };
54
+ this.dispose = () => {
55
+ var _a;
56
+ super.dispose();
57
+ (_a = this.sceneRootEntity) === null || _a === void 0 ? void 0 : _a.removeChangeObserver(this.onChange);
58
+ };
59
+ (_a = this.sceneRootEntity) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onChange);
60
+ (_b = this.callout) === null || _b === void 0 ? void 0 : _b.addChangeObserver(this.onChange);
61
+ this.onChange();
62
+ }
63
+ get sceneRootEntity() {
64
+ return this.getCachedSingleton(SceneRootEntity_1.SceneRootEntity.type);
65
+ }
66
+ get callout() {
67
+ return this.getCachedLocalComponent(CalloutEntity_1.CalloutEntity.type);
68
+ }
69
+ kickOffSlerping() {
70
+ var _a;
71
+ if (this.slerpInterval) {
72
+ this.stopSlerping();
73
+ }
74
+ this.isSlerping = true;
75
+ const transform = (_a = this.callout) === null || _a === void 0 ? void 0 : _a.labelTransform;
76
+ if (!transform)
77
+ return;
78
+ let previousError = ValueObjects_1.Quaternion.AngleBetween(transform.localRotation, this.targetQ).degrees;
79
+ this.slerpInterval = setInterval(() => {
80
+ const error = ValueObjects_1.Quaternion.AngleBetween(transform.localRotation, this.targetQ).degrees;
81
+ if (error < 0.15) {
82
+ this.stopSlerping();
83
+ return;
84
+ }
85
+ const deltaError = error - previousError;
86
+ if (deltaError === 0) {
87
+ this.stopSlerping();
88
+ return;
89
+ }
90
+ const kp = 0.05;
91
+ const kd = 5;
92
+ const pEffect = kp * error;
93
+ const dEffect = kd * (deltaError / 10);
94
+ let deltaAng = pEffect + dEffect;
95
+ let slerpPercent = deltaAng / error;
96
+ if (slerpPercent > 1) {
97
+ slerpPercent = 1;
98
+ }
99
+ const slerpedQ = ValueObjects_1.Quaternion.Slerp(transform.localRotation, this.targetQ, slerpPercent);
100
+ transform.localRotation = slerpedQ;
101
+ previousError = error;
102
+ }, 10);
103
+ }
104
+ }
@@ -0,0 +1,14 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "../../../AppObject";
2
+ export declare function makeMoveCalloutToCamUC(appObject: AppObject): MoveCalloutToCamUCImp;
3
+ export declare abstract class MoveCalloutToCamUC extends AppObjectUC {
4
+ static readonly type = "MoveCalloutToCamUC";
5
+ abstract moveCalloutToCam(delta: number): void;
6
+ static get(appObject: AppObject): MoveCalloutToCamUC | undefined;
7
+ static getById(id: string, appObjects: AppObjectRepo): MoveCalloutToCamUC | undefined;
8
+ }
9
+ declare class MoveCalloutToCamUCImp extends MoveCalloutToCamUC {
10
+ private get callout();
11
+ moveCalloutToCam: (delta: number) => void;
12
+ constructor(appObject: AppObject);
13
+ }
14
+ export {};
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MoveCalloutToCamUC = exports.makeMoveCalloutToCamUC = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const ValueObjects_1 = require("../../../ValueObjects");
6
+ const CalloutEntity_1 = require("../Entities/CalloutEntity");
7
+ function makeMoveCalloutToCamUC(appObject) {
8
+ return new MoveCalloutToCamUCImp(appObject);
9
+ }
10
+ exports.makeMoveCalloutToCamUC = makeMoveCalloutToCamUC;
11
+ class MoveCalloutToCamUC extends AppObject_1.AppObjectUC {
12
+ static get(appObject) {
13
+ return appObject.getComponent(this.type);
14
+ }
15
+ static getById(id, appObjects) {
16
+ var _a;
17
+ return (_a = appObjects.get(id)) === null || _a === void 0 ? void 0 : _a.getComponent(this.type);
18
+ }
19
+ }
20
+ exports.MoveCalloutToCamUC = MoveCalloutToCamUC;
21
+ MoveCalloutToCamUC.type = "MoveCalloutToCamUC";
22
+ class MoveCalloutToCamUCImp extends MoveCalloutToCamUC {
23
+ constructor(appObject) {
24
+ super(appObject, MoveCalloutToCamUC.type);
25
+ this.moveCalloutToCam = (delta) => {
26
+ if (!this.callout) {
27
+ return;
28
+ }
29
+ this.callout.labelTransform.worldPosition = this.callout.labelTransform.localPointToWorld(new ValueObjects_1.Vector3(0, 0, this.callout.labelTransform.localScale.x * delta));
30
+ };
31
+ }
32
+ get callout() {
33
+ return this.getCachedLocalComponent(CalloutEntity_1.CalloutEntity.type);
34
+ }
35
+ }
@@ -0,0 +1,17 @@
1
+ import { AppObject, AppObjectUC } from "../../../AppObject";
2
+ import { SerializedSystem } from "../../StateMachine/Entities/StateMachineEntity";
3
+ import { CalloutDTO } from "../Entities/CalloutEntity";
4
+ export declare class SerializeCallouts extends AppObjectUC implements SerializedSystem {
5
+ static readonly type = "SerializeCallouts";
6
+ name: string;
7
+ seriliziationVersion: number;
8
+ private get calloutGlobal();
9
+ getSystemState(): object;
10
+ applySystemState(state: object, version: number): void;
11
+ private handleStateVersion1;
12
+ applyDefaultState(): void;
13
+ constructor(appObj: AppObject);
14
+ }
15
+ export interface SerilizedCalloutsV1 {
16
+ callouts: CalloutDTO[];
17
+ }
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SerializeCallouts = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const StateMachineEntity_1 = require("../../StateMachine/Entities/StateMachineEntity");
6
+ const CalloutEntity_1 = require("../Entities/CalloutEntity");
7
+ const CalloutGlobals_1 = require("../Entities/CalloutGlobals");
8
+ const CalloutRepo_1 = require("../Entities/CalloutRepo");
9
+ class SerializeCallouts extends AppObject_1.AppObjectUC {
10
+ constructor(appObj) {
11
+ super(appObj, SerializeCallouts.type);
12
+ this.name = "callouts";
13
+ this.seriliziationVersion = 1;
14
+ const stateMachine = this.appObjects.getSingleton(StateMachineEntity_1.StateMachineEntity.type);
15
+ if (stateMachine) {
16
+ stateMachine.registerSerializedSystem(this);
17
+ }
18
+ else {
19
+ this.warn("Unable to find StateMachineEntity");
20
+ }
21
+ }
22
+ get calloutGlobal() {
23
+ return this.getCachedSingleton(CalloutGlobals_1.CalloutGlobals.type);
24
+ }
25
+ getSystemState() {
26
+ const repos = this.appObjects.getAllComponents(CalloutRepo_1.CalloutRepo.type);
27
+ const callouts = [];
28
+ repos.forEach((repo) => {
29
+ repo.getAll().forEach((callout) => {
30
+ callouts.push(callout.data);
31
+ });
32
+ });
33
+ return {
34
+ callouts,
35
+ };
36
+ }
37
+ applySystemState(state, version) {
38
+ if (version === 1) {
39
+ this.handleStateVersion1(state);
40
+ }
41
+ else {
42
+ this.warn("Unsupported state version. Reverting to default");
43
+ this.applyDefaultState();
44
+ }
45
+ }
46
+ handleStateVersion1(state) {
47
+ const { callouts } = state;
48
+ if (!callouts) {
49
+ this.warn("Unable to parse state. Reverting to default");
50
+ this.applyDefaultState();
51
+ return;
52
+ }
53
+ const previousCalloutLookup = new Map();
54
+ const allCallouts = this.appObjects.getAllComponents(CalloutEntity_1.CalloutEntity.type);
55
+ allCallouts.forEach((callout) => {
56
+ previousCalloutLookup.set(callout.appObject.id, callout);
57
+ });
58
+ callouts.forEach((calloutData) => {
59
+ var _a;
60
+ let callout = previousCalloutLookup.get(calloutData.id);
61
+ if (callout) {
62
+ previousCalloutLookup.delete(calloutData.id);
63
+ }
64
+ else {
65
+ let repo = CalloutRepo_1.CalloutRepo.getById(calloutData.parentID, this.appObjects);
66
+ if (!repo) {
67
+ repo = (_a = this.calloutGlobal) === null || _a === void 0 ? void 0 : _a.calloutRepoFactory(calloutData.parentID);
68
+ }
69
+ callout = repo === null || repo === void 0 ? void 0 : repo.makeCallout(calloutData.id);
70
+ }
71
+ if (!callout) {
72
+ this.warn("Unable to create or find callout");
73
+ return;
74
+ }
75
+ callout.data = calloutData;
76
+ });
77
+ previousCalloutLookup.forEach((callout) => {
78
+ var _a;
79
+ (_a = callout.inRepo) === null || _a === void 0 ? void 0 : _a.deleteCallout(callout.appObject.id);
80
+ });
81
+ }
82
+ applyDefaultState() {
83
+ const repos = this.appObjects.getAllComponents(CalloutRepo_1.CalloutRepo.type);
84
+ repos.forEach((repo) => {
85
+ const callouts = repo.getAll();
86
+ callouts.forEach((callout) => {
87
+ var _a;
88
+ (_a = callout.inRepo) === null || _a === void 0 ? void 0 : _a.deleteCallout(callout.appObject.id);
89
+ });
90
+ });
91
+ }
92
+ }
93
+ exports.SerializeCallouts = SerializeCallouts;
94
+ SerializeCallouts.type = "SerializeCallouts";
@@ -0,0 +1,9 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "../../../AppObject";
2
+ export declare abstract class SetCalloutSizeUC extends AppObjectUC {
3
+ static readonly type = "SetCalloutSizeUC";
4
+ abstract updateSize(size: number): void;
5
+ abstract submitSize(size: number): void;
6
+ static get(appObj: AppObject): SetCalloutSizeUC | undefined;
7
+ static getById(id: string, appObjects: AppObjectRepo): SetCalloutSizeUC | undefined;
8
+ }
9
+ export declare function makeSetCalloutSizeUC(appObject: AppObject): SetCalloutSizeUC;