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