bard-legends-framework 0.12.1 → 1.0.0-rc0

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 (653) hide show
  1. package/dist/index.d.mts +976 -0
  2. package/dist/index.d.ts +976 -4
  3. package/dist/index.js +67 -21
  4. package/dist/index.mjs +67 -0
  5. package/package.json +26 -11
  6. package/dist/_interfaces/index.d.ts +0 -6
  7. package/dist/_interfaces/index.js +0 -2
  8. package/dist/actions-performance.test.d.ts +0 -1
  9. package/dist/actions-performance.test.js +0 -83
  10. package/dist/game-entities/_base/attachable.d.ts +0 -10
  11. package/dist/game-entities/_base/attachable.js +0 -47
  12. package/dist/game-entities/_base/attachable.store.d.ts +0 -8
  13. package/dist/game-entities/_base/attachable.store.js +0 -43
  14. package/dist/game-entities/_base/attachment-target.d.ts +0 -16
  15. package/dist/game-entities/_base/attachment-target.js +0 -53
  16. package/dist/game-entities/_base/destroyable.d.ts +0 -3
  17. package/dist/game-entities/_base/destroyable.js +0 -10
  18. package/dist/game-entities/_base/interfaces.d.ts +0 -3
  19. package/dist/game-entities/_base/interfaces.js +0 -3
  20. package/dist/game-entities/_base/mixins.d.ts +0 -22
  21. package/dist/game-entities/_base/mixins.js +0 -60
  22. package/dist/game-entities/attachable/attachable.d.ts +0 -10
  23. package/dist/game-entities/attachable/attachable.js +0 -34
  24. package/dist/game-entities/attachable/attachable.spec.d.ts +0 -1
  25. package/dist/game-entities/attachable/attachable.spec.js +0 -137
  26. package/dist/game-entities/attachable/attachable.store.d.ts +0 -8
  27. package/dist/game-entities/attachable/attachable.store.js +0 -41
  28. package/dist/game-entities/attachable/attachable.test.d.ts +0 -1
  29. package/dist/game-entities/attachable/attachable.test.js +0 -140
  30. package/dist/game-entities/attachable/destroyable.d.ts +0 -17
  31. package/dist/game-entities/attachable/destroyable.js +0 -71
  32. package/dist/game-entities/attachable/helpers/decorate-actions-lib.d.ts +0 -20
  33. package/dist/game-entities/attachable/helpers/decorate-actions-lib.js +0 -134
  34. package/dist/game-entities/attachable/helpers/referance-variable.d.ts +0 -19
  35. package/dist/game-entities/attachable/helpers/referance-variable.js +0 -51
  36. package/dist/game-entities/attachable/interfaces.d.ts +0 -14
  37. package/dist/game-entities/attachable/interfaces.js +0 -2
  38. package/dist/game-entities/base/attachable.d.ts +0 -18
  39. package/dist/game-entities/base/attachable.js +0 -94
  40. package/dist/game-entities/base/attachable.test.d.ts +0 -1
  41. package/dist/game-entities/base/attachable.test.js +0 -125
  42. package/dist/game-entities/base/attachment-target.d.ts +0 -9
  43. package/dist/game-entities/base/attachment-target.js +0 -53
  44. package/dist/game-entities/base/attachment-target.test.d.ts +0 -1
  45. package/dist/game-entities/base/attachment-target.test.js +0 -131
  46. package/dist/game-entities/base/destroyable.d.ts +0 -16
  47. package/dist/game-entities/base/destroyable.js +0 -61
  48. package/dist/game-entities/base/helpers/attachable.store.d.ts +0 -2
  49. package/dist/game-entities/base/helpers/attachable.store.js +0 -68
  50. package/dist/game-entities/base/helpers/attachable.store.test.d.ts +0 -1
  51. package/dist/game-entities/base/helpers/attachable.store.test.js +0 -234
  52. package/dist/game-entities/base/helpers/attachment-target.store.d.ts +0 -1
  53. package/dist/game-entities/base/helpers/attachment-target.store.js +0 -40
  54. package/dist/game-entities/base/helpers/decorate-actions-lib.d.ts +0 -20
  55. package/dist/game-entities/base/helpers/decorate-actions-lib.js +0 -124
  56. package/dist/game-entities/base/helpers/referance-variable.d.ts +0 -19
  57. package/dist/game-entities/base/helpers/referance-variable.js +0 -52
  58. package/dist/game-entities/base/interfaces.d.ts +0 -14
  59. package/dist/game-entities/base/interfaces.js +0 -3
  60. package/dist/game-entities/controller/controller.d.ts +0 -9
  61. package/dist/game-entities/controller/controller.js +0 -53
  62. package/dist/game-entities/controller/controller.spec.d.ts +0 -1
  63. package/dist/game-entities/controller/controller.spec.js +0 -131
  64. package/dist/game-entities/controller/controller.test.d.ts +0 -1
  65. package/dist/game-entities/controller/controller.test.js +0 -128
  66. package/dist/game-entities/entity/entity.d.ts +0 -15
  67. package/dist/game-entities/entity/entity.js +0 -73
  68. package/dist/game-entities/entity/entity.spec.d.ts +0 -1
  69. package/dist/game-entities/entity/entity.spec.js +0 -271
  70. package/dist/game-entities/entity/entity.test.d.ts +0 -1
  71. package/dist/game-entities/entity/entity.test.js +0 -253
  72. package/dist/game-entities/entity/helpers/entity-store.helper.d.ts +0 -11
  73. package/dist/game-entities/entity/helpers/entity-store.helper.js +0 -46
  74. package/dist/game-entities/entity/helpers/entity-store.helper.test.d.ts +0 -1
  75. package/dist/game-entities/entity/helpers/entity-store.helper.test.js +0 -136
  76. package/dist/game-entities/entity/helpers/entity-views.helper.d.ts +0 -14
  77. package/dist/game-entities/entity/helpers/entity-views.helper.js +0 -71
  78. package/dist/game-entities/entity/helpers/view-creation.helper.d.ts +0 -11
  79. package/dist/game-entities/entity/helpers/view-creation.helper.js +0 -57
  80. package/dist/game-entities/entity/singleton-entity.d.ts +0 -6
  81. package/dist/game-entities/entity/singleton-entity.js +0 -23
  82. package/dist/game-entities/entity/singleton-entity.test.d.ts +0 -1
  83. package/dist/game-entities/entity/singleton-entity.test.js +0 -66
  84. package/dist/game-entities/hard-reset.d.ts +0 -5
  85. package/dist/game-entities/hard-reset.js +0 -14
  86. package/dist/game-entities/index.d.ts +0 -8
  87. package/dist/game-entities/index.js +0 -25
  88. package/dist/game-entities/scene/scene.d.ts +0 -27
  89. package/dist/game-entities/scene/scene.js +0 -106
  90. package/dist/game-entities/scene/scene.spec.d.ts +0 -1
  91. package/dist/game-entities/scene/scene.spec.js +0 -227
  92. package/dist/game-entities/scene/scene.test.d.ts +0 -1
  93. package/dist/game-entities/scene/scene.test.js +0 -275
  94. package/dist/game-entities/service/service.d.ts +0 -6
  95. package/dist/game-entities/service/service.js +0 -59
  96. package/dist/game-entities/service/service.spec.d.ts +0 -1
  97. package/dist/game-entities/service/service.spec.js +0 -273
  98. package/dist/game-entities/service/service.test.d.ts +0 -1
  99. package/dist/game-entities/service/service.test.js +0 -273
  100. package/dist/game-entities/unit-test.helper.d.ts +0 -5
  101. package/dist/game-entities/unit-test.helper.js +0 -14
  102. package/dist/game-entities/update-cycle.d.ts +0 -25
  103. package/dist/game-entities/update-cycle.js +0 -67
  104. package/dist/game-entities/update-loop.d.ts +0 -21
  105. package/dist/game-entities/update-loop.js +0 -53
  106. package/dist/game-entities/view/view.d.ts +0 -16
  107. package/dist/game-entities/view/view.js +0 -56
  108. package/dist/game-entities/view/view.spec.d.ts +0 -1
  109. package/dist/game-entities/view/view.spec.js +0 -498
  110. package/dist/game-entities/view/view.test.d.ts +0 -1
  111. package/dist/game-entities/view/view.test.js +0 -348
  112. package/dist/lib/animator/animations.d.ts +0 -25
  113. package/dist/lib/animator/animations.js +0 -61
  114. package/dist/lib/animator/animator.d.ts +0 -52
  115. package/dist/lib/animator/animator.js +0 -219
  116. package/dist/lib/animator/animator.spec.d.ts +0 -1
  117. package/dist/lib/animator/animator.spec.js +0 -702
  118. package/dist/lib/animator/index.d.ts +0 -2
  119. package/dist/lib/animator/index.js +0 -24
  120. package/dist/lib/libraries/animator/animations.d.ts +0 -25
  121. package/dist/lib/libraries/animator/animations.js +0 -61
  122. package/dist/lib/libraries/animator/animator.d.ts +0 -52
  123. package/dist/lib/libraries/animator/animator.js +0 -219
  124. package/dist/lib/libraries/animator/animator.spec.d.ts +0 -1
  125. package/dist/lib/libraries/animator/animator.spec.js +0 -702
  126. package/dist/lib/libraries/animator/index.d.ts +0 -2
  127. package/dist/lib/libraries/animator/index.js +0 -24
  128. package/dist/lib/libraries/path-finder/path-finder.d.ts +0 -5
  129. package/dist/lib/libraries/path-finder/path-finder.js +0 -23
  130. package/dist/lib/path-finder/path-finder.d.ts +0 -5
  131. package/dist/lib/path-finder/path-finder.js +0 -23
  132. package/dist/lib/services/keyboard/keyboard.d.ts +0 -7
  133. package/dist/lib/services/keyboard/keyboard.js +0 -44
  134. package/dist/lib/services/mouse/mouse.service.d.ts +0 -12
  135. package/dist/lib/services/mouse/mouse.service.js +0 -70
  136. package/dist/lib/services/mouse/mouser-target-focus.service.d.ts +0 -16
  137. package/dist/lib/services/mouse/mouser-target-focus.service.js +0 -93
  138. package/dist/lib/update-loop.d.ts +0 -13
  139. package/dist/lib/update-loop.js +0 -44
  140. package/dist/physics/entitity-types/immovable-physics-entity.d.ts +0 -13
  141. package/dist/physics/entitity-types/immovable-physics-entity.js +0 -27
  142. package/dist/physics/entitity-types/movable-entity.d.ts +0 -11
  143. package/dist/physics/entitity-types/movable-entity.js +0 -25
  144. package/dist/physics/entitity-types/movable-physics-entity.d.ts +0 -21
  145. package/dist/physics/entitity-types/movable-physics-entity.js +0 -87
  146. package/dist/physics/entitity-types/physics-entity.d.ts +0 -31
  147. package/dist/physics/entitity-types/physics-entity.js +0 -106
  148. package/dist/physics/entity-types/immovable-physics-entity.d.ts +0 -9
  149. package/dist/physics/entity-types/immovable-physics-entity.js +0 -25
  150. package/dist/physics/entity-types/movable-entity.d.ts +0 -11
  151. package/dist/physics/entity-types/movable-entity.js +0 -26
  152. package/dist/physics/entity-types/movable-physics-entity.d.ts +0 -19
  153. package/dist/physics/entity-types/movable-physics-entity.js +0 -94
  154. package/dist/physics/entity-types/physics-entity.d.ts +0 -30
  155. package/dist/physics/entity-types/physics-entity.js +0 -90
  156. package/dist/physics/helpers/closest-available-space.helper.d.ts +0 -19
  157. package/dist/physics/helpers/closest-available-space.helper.js +0 -109
  158. package/dist/physics/helpers/closest-available-space.helper.spec.d.ts +0 -1
  159. package/dist/physics/helpers/closest-available-space.helper.spec.js +0 -118
  160. package/dist/physics/helpers/p2js.helper.d.ts +0 -7
  161. package/dist/physics/helpers/p2js.helper.js +0 -25
  162. package/dist/physics/helpers/shape-factory.d.ts +0 -13
  163. package/dist/physics/helpers/shape-factory.js +0 -109
  164. package/dist/physics/index.d.ts +0 -6
  165. package/dist/physics/index.js +0 -28
  166. package/dist/physics/interfaces.d.ts +0 -48
  167. package/dist/physics/interfaces.js +0 -13
  168. package/dist/physics/libs/p2js.helper.d.ts +0 -10
  169. package/dist/physics/libs/p2js.helper.js +0 -46
  170. package/dist/physics/libs/physics-body-groups.d.ts +0 -1
  171. package/dist/physics/libs/physics-body-groups.js +0 -3
  172. package/dist/physics/libs/position-to-grid-position-converter.d.ts +0 -6
  173. package/dist/physics/libs/position-to-grid-position-converter.js +0 -19
  174. package/dist/physics/module//342/232/234/357/270/217gateways/controllers/physics-internal.controller.d.ts +0 -29
  175. package/dist/physics/module//342/232/234/357/270/217gateways/controllers/physics-internal.controller.js +0 -62
  176. package/dist/physics/module//342/232/234/357/270/217gateways/controllers/physics.controller.d.ts +0 -34
  177. package/dist/physics/module//342/232/234/357/270/217gateways/controllers/physics.controller.js +0 -80
  178. package/dist/physics/module//342/232/234/357/270/217gateways/dtos/requests.dto.d.ts +0 -24
  179. package/dist/physics/module//342/232/234/357/270/217gateways/dtos/requests.dto.js +0 -3
  180. package/dist/physics/module//342/232/234/357/270/217gateways/dtos/responses.dto.d.ts +0 -30
  181. package/dist/physics/module//342/232/234/357/270/217gateways/dtos/responses.dto.js +0 -3
  182. package/dist/physics/module//342/232/234/357/270/217gateways/dtos/shared-interfaces.dto.d.ts +0 -21
  183. package/dist/physics/module//342/232/234/357/270/217gateways/dtos/shared-interfaces.dto.js +0 -5
  184. package/dist/physics/module//342/232/234/357/270/217gateways/index.d.ts +0 -4
  185. package/dist/physics/module//342/232/234/357/270/217gateways/index.js +0 -26
  186. package/dist/physics/module//342/232/234/357/270/217gateways/physics-internal.gateway.d.ts +0 -20
  187. package/dist/physics/module//342/232/234/357/270/217gateways/physics-internal.gateway.js +0 -42
  188. package/dist/physics/module//342/232/234/357/270/217gateways/physics.gateway.d.ts +0 -19
  189. package/dist/physics/module//342/232/234/357/270/217gateways/physics.gateway.js +0 -49
  190. package/dist/physics/module//360/237/223/220services/availability-grid.service.d.ts +0 -17
  191. package/dist/physics/module//360/237/223/220services/availability-grid.service.js +0 -83
  192. package/dist/physics/module//360/237/223/220services/border.service.d.ts +0 -5
  193. package/dist/physics/module//360/237/223/220services/border.service.js +0 -62
  194. package/dist/physics/module//360/237/223/220services/collision/collisions.service.d.ts +0 -10
  195. package/dist/physics/module//360/237/223/220services/collision/collisions.service.js +0 -113
  196. package/dist/physics/module//360/237/223/220services/collision/hit-test.service.d.ts +0 -10
  197. package/dist/physics/module//360/237/223/220services/collision/hit-test.service.js +0 -75
  198. package/dist/physics/module//360/237/223/220services/collision/physics-body-group.service.d.ts +0 -12
  199. package/dist/physics/module//360/237/223/220services/collision/physics-body-group.service.js +0 -61
  200. package/dist/physics/module//360/237/223/220services/collisions.service.d.ts +0 -10
  201. package/dist/physics/module//360/237/223/220services/collisions.service.js +0 -118
  202. package/dist/physics/module//360/237/223/220services/creation/border.service.d.ts +0 -6
  203. package/dist/physics/module//360/237/223/220services/creation/border.service.js +0 -42
  204. package/dist/physics/module//360/237/223/220services/creation/materials.service.d.ts +0 -15
  205. package/dist/physics/module//360/237/223/220services/creation/materials.service.js +0 -120
  206. package/dist/physics/module//360/237/223/220services/creation/physics-world.service.d.ts +0 -21
  207. package/dist/physics/module//360/237/223/220services/creation/physics-world.service.js +0 -116
  208. package/dist/physics/module//360/237/223/220services/creation/shape-creation.service.d.ts +0 -9
  209. package/dist/physics/module//360/237/223/220services/creation/shape-creation.service.js +0 -98
  210. package/dist/physics/module//360/237/223/220services/debug-visuals.service.d.ts +0 -36
  211. package/dist/physics/module//360/237/223/220services/debug-visuals.service.js +0 -127
  212. package/dist/physics/module//360/237/223/220services/eliptic-explosion.service.d.ts +0 -22
  213. package/dist/physics/module//360/237/223/220services/eliptic-explosion.service.js +0 -126
  214. package/dist/physics/module//360/237/223/220services/explosion.service.d.ts +0 -21
  215. package/dist/physics/module//360/237/223/220services/explosion.service.js +0 -112
  216. package/dist/physics/module//360/237/223/220services/explosions/eliptic-explosion.service.d.ts +0 -22
  217. package/dist/physics/module//360/237/223/220services/explosions/eliptic-explosion.service.js +0 -126
  218. package/dist/physics/module//360/237/223/220services/explosions/explosion.service.d.ts +0 -21
  219. package/dist/physics/module//360/237/223/220services/explosions/explosion.service.js +0 -112
  220. package/dist/physics/module//360/237/223/220services/explosions/helpers/ray-cast-hit-converter.d.ts +0 -9
  221. package/dist/physics/module//360/237/223/220services/explosions/helpers/ray-cast-hit-converter.js +0 -77
  222. package/dist/physics/module//360/237/223/220services/helpers/ray-cast-hit-converter.d.ts +0 -9
  223. package/dist/physics/module//360/237/223/220services/helpers/ray-cast-hit-converter.js +0 -77
  224. package/dist/physics/module//360/237/223/220services/impact/eliptic-explosion.service.d.ts +0 -18
  225. package/dist/physics/module//360/237/223/220services/impact/eliptic-explosion.service.js +0 -107
  226. package/dist/physics/module//360/237/223/220services/impact/explosion.service.d.ts +0 -18
  227. package/dist/physics/module//360/237/223/220services/impact/explosion.service.js +0 -93
  228. package/dist/physics/module//360/237/223/220services/impact/impact.service.d.ts +0 -5
  229. package/dist/physics/module//360/237/223/220services/impact/impact.service.js +0 -23
  230. package/dist/physics/module//360/237/223/220services/impact/ray-cast-hit-converter.d.ts +0 -9
  231. package/dist/physics/module//360/237/223/220services/impact/ray-cast-hit-converter.js +0 -83
  232. package/dist/physics/module//360/237/223/220services/materials.service.d.ts +0 -20
  233. package/dist/physics/module//360/237/223/220services/materials.service.js +0 -130
  234. package/dist/physics/module//360/237/223/220services/path-finder.service.d.ts +0 -26
  235. package/dist/physics/module//360/237/223/220services/path-finder.service.js +0 -131
  236. package/dist/physics/module//360/237/223/220services/path-finding/availability-grid-cache.service.d.ts +0 -15
  237. package/dist/physics/module//360/237/223/220services/path-finding/availability-grid-cache.service.js +0 -51
  238. package/dist/physics/module//360/237/223/220services/path-finding/availability-grid.service.d.ts +0 -16
  239. package/dist/physics/module//360/237/223/220services/path-finding/availability-grid.service.js +0 -76
  240. package/dist/physics/module//360/237/223/220services/path-finding/path-finder.service.d.ts +0 -14
  241. package/dist/physics/module//360/237/223/220services/path-finding/path-finder.service.js +0 -86
  242. package/dist/physics/module//360/237/223/220services/physics-world.service.d.ts +0 -41
  243. package/dist/physics/module//360/237/223/220services/physics-world.service.js +0 -134
  244. package/dist/physics/module//360/237/223/220services/query/physics-query.service.d.ts +0 -9
  245. package/dist/physics/module//360/237/223/220services/query/physics-query.service.js +0 -25
  246. package/dist/physics/module//360/237/223/220services/ray-casting/ray-casting.service.d.ts +0 -9
  247. package/dist/physics/module//360/237/223/220services/ray-casting/ray-casting.service.js +0 -91
  248. package/dist/physics/module//360/237/223/220services/ray-casting.service.d.ts +0 -9
  249. package/dist/physics/module//360/237/223/220services/ray-casting.service.js +0 -93
  250. package/dist/physics/module//360/237/223/220services/shape-creation.service.d.ts +0 -14
  251. package/dist/physics/module//360/237/223/220services/shape-creation.service.js +0 -124
  252. package/dist/physics/module//360/237/223/220services/test-visuals/test-visuals.service.d.ts +0 -22
  253. package/dist/physics/module//360/237/223/220services/test-visuals/test-visuals.service.js +0 -157
  254. package/dist/physics/module//360/237/247/212entities/border.entity.d.ts +0 -5
  255. package/dist/physics/module//360/237/247/212entities/border.entity.js +0 -25
  256. package/dist/physics/module//360/237/247/212entities/data-structures/availability-grid-cache.d.ts +0 -12
  257. package/dist/physics/module//360/237/247/212entities/data-structures/availability-grid-cache.js +0 -39
  258. package/dist/physics/module//360/237/247/212entities/physics-world.entity.d.ts +0 -33
  259. package/dist/physics/module//360/237/247/212entities/physics-world.entity.js +0 -51
  260. package/dist/physics/physics-world.d.ts +0 -62
  261. package/dist/physics/physics-world.js +0 -153
  262. package/dist/physics/sub-elements/available-spaces/helpers/availability-grid.helper.d.ts +0 -6
  263. package/dist/physics/sub-elements/available-spaces/helpers/availability-grid.helper.js +0 -19
  264. package/dist/physics/sub-elements/available-spaces/physics-availability-grid.d.ts +0 -15
  265. package/dist/physics/sub-elements/available-spaces/physics-availability-grid.js +0 -92
  266. package/dist/physics/sub-elements/available-spaces/physics-available-spaces.d.ts +0 -26
  267. package/dist/physics/sub-elements/available-spaces/physics-available-spaces.js +0 -102
  268. package/dist/physics/sub-elements/collisions/contact-equation-orginiser.d.ts +0 -18
  269. package/dist/physics/sub-elements/collisions/contact-equation-orginiser.js +0 -90
  270. package/dist/physics/sub-elements/collisions/physics-collision.d.ts +0 -12
  271. package/dist/physics/sub-elements/collisions/physics-collision.js +0 -50
  272. package/dist/physics/sub-elements/elements/physics-body-groups.d.ts +0 -15
  273. package/dist/physics/sub-elements/elements/physics-body-groups.js +0 -76
  274. package/dist/physics/sub-elements/elements/physics-materials.d.ts +0 -19
  275. package/dist/physics/sub-elements/elements/physics-materials.js +0 -108
  276. package/dist/physics/sub-elements/elements/physics-world-borders.d.ts +0 -11
  277. package/dist/physics/sub-elements/elements/physics-world-borders.js +0 -77
  278. package/dist/physics/sub-elements/physics-body-groups.d.ts +0 -12
  279. package/dist/physics/sub-elements/physics-body-groups.js +0 -54
  280. package/dist/physics/sub-elements/physics-collision.d.ts +0 -22
  281. package/dist/physics/sub-elements/physics-collision.js +0 -155
  282. package/dist/physics/sub-elements/physics-materials.d.ts +0 -19
  283. package/dist/physics/sub-elements/physics-materials.js +0 -108
  284. package/dist/physics/sub-elements/physics-world-borders.d.ts +0 -6
  285. package/dist/physics/sub-elements/physics-world-borders.js +0 -29
  286. package/dist/physics/sub-elements/raycasting/physics-body-explosion-hit.d.ts +0 -20
  287. package/dist/physics/sub-elements/raycasting/physics-body-explosion-hit.js +0 -65
  288. package/dist/physics/sub-elements/raycasting/physics-explosion.d.ts +0 -20
  289. package/dist/physics/sub-elements/raycasting/physics-explosion.js +0 -115
  290. package/dist/physics/sub-elements/raycasting/ray-cast.d.ts +0 -27
  291. package/dist/physics/sub-elements/raycasting/ray-cast.js +0 -101
  292. package/dist/pixi/components/display-object-array.d.ts +0 -28
  293. package/dist/pixi/components/display-object-array.js +0 -62
  294. package/dist/pixi/components/helpers/smooth-scroller.d.ts +0 -25
  295. package/dist/pixi/components/helpers/smooth-scroller.js +0 -63
  296. package/dist/pixi/components/helpers/smooth-scroller.test.d.ts +0 -1
  297. package/dist/pixi/components/helpers/smooth-scroller.test.js +0 -137
  298. package/dist/pixi/components/menu/menu-entity.d.ts +0 -14
  299. package/dist/pixi/components/menu/menu-entity.js +0 -48
  300. package/dist/pixi/components/menu/menu.ui.d.ts +0 -23
  301. package/dist/pixi/components/menu/menu.ui.js +0 -97
  302. package/dist/pixi/components/mouse-wheel-listener.ui.d.ts +0 -11
  303. package/dist/pixi/components/mouse-wheel-listener.ui.js +0 -63
  304. package/dist/pixi/components/scroll-area.ui.d.ts +0 -18
  305. package/dist/pixi/components/scroll-area.ui.js +0 -56
  306. package/dist/pixi/components/scroll-mask.ui.d.ts +0 -17
  307. package/dist/pixi/components/scroll-mask.ui.js +0 -132
  308. package/dist/pixi/display-object/components/filters.d.ts +0 -21
  309. package/dist/pixi/display-object/components/filters.js +0 -116
  310. package/dist/pixi/display-object/components/glow-effect.d.ts +0 -12
  311. package/dist/pixi/display-object/components/glow-effect.js +0 -40
  312. package/dist/pixi/display-object/components/glow-filter.d.ts +0 -12
  313. package/dist/pixi/display-object/components/glow-filter.js +0 -40
  314. package/dist/pixi/display-object/container-attributes.d.ts +0 -99
  315. package/dist/pixi/display-object/container-attributes.js +0 -313
  316. package/dist/pixi/display-object/container.d.ts +0 -22
  317. package/dist/pixi/display-object/container.js +0 -72
  318. package/dist/pixi/display-object/display-object-attributes.d.ts +0 -45
  319. package/dist/pixi/display-object/display-object-attributes.js +0 -152
  320. package/dist/pixi/display-object/display-object.d.ts +0 -25
  321. package/dist/pixi/display-object/display-object.js +0 -87
  322. package/dist/pixi/display-object/filters/base-filters/alpha-primer-color.filter.d.ts +0 -13
  323. package/dist/pixi/display-object/filters/base-filters/alpha-primer-color.filter.js +0 -103
  324. package/dist/pixi/display-object/filters/base-filters/blur.filter.d.ts +0 -11
  325. package/dist/pixi/display-object/filters/base-filters/blur.filter.js +0 -115
  326. package/dist/pixi/display-object/filters/base-filters/contrast-filter.d.ts +0 -12
  327. package/dist/pixi/display-object/filters/base-filters/contrast-filter.js +0 -72
  328. package/dist/pixi/display-object/filters/base-filters/expand-with-alpha-color.d.ts +0 -14
  329. package/dist/pixi/display-object/filters/base-filters/expand-with-alpha-color.js +0 -107
  330. package/dist/pixi/display-object/filters/base-filters/expand-with-color-gradient.d.ts +0 -16
  331. package/dist/pixi/display-object/filters/base-filters/expand-with-color-gradient.js +0 -133
  332. package/dist/pixi/display-object/filters/base-filters/expand-with-color.d.ts +0 -14
  333. package/dist/pixi/display-object/filters/base-filters/expand-with-color.filter.d.ts +0 -9
  334. package/dist/pixi/display-object/filters/base-filters/expand-with-color.filter.js +0 -103
  335. package/dist/pixi/display-object/filters/base-filters/expand-with-color.js +0 -107
  336. package/dist/pixi/display-object/filters/composite-filters/glow-filter.d.ts +0 -8
  337. package/dist/pixi/display-object/filters/composite-filters/glow-filter.js +0 -59
  338. package/dist/pixi/display-object/filters/helpers/gaussian-values.helper.d.ts +0 -10
  339. package/dist/pixi/display-object/filters/helpers/gaussian-values.helper.js +0 -64
  340. package/dist/pixi/display-object/filters/helpers/gaussian-values.helper.test.d.ts +0 -1
  341. package/dist/pixi/display-object/filters/helpers/gaussian-values.helper.test.js +0 -31
  342. package/dist/pixi/display-object/filters/templates/checking-neighbors.template.d.ts +0 -7
  343. package/dist/pixi/display-object/filters/templates/checking-neighbors.template.js +0 -74
  344. package/dist/pixi/display-object/filters/templates/plane.template.d.ts +0 -7
  345. package/dist/pixi/display-object/filters/templates/plane.template.js +0 -65
  346. package/dist/pixi/display-object/filters.d.ts +0 -29
  347. package/dist/pixi/display-object/filters.js +0 -151
  348. package/dist/pixi/display-object/index.d.ts +0 -9
  349. package/dist/pixi/display-object/index.js +0 -19
  350. package/dist/pixi/display-object/objects/components/filters.d.ts +0 -21
  351. package/dist/pixi/display-object/objects/components/filters.js +0 -116
  352. package/dist/pixi/display-object/objects/container.d.ts +0 -6
  353. package/dist/pixi/display-object/objects/container.js +0 -47
  354. package/dist/pixi/display-object/objects/graphics/graphics.d.ts +0 -34
  355. package/dist/pixi/display-object/objects/graphics/graphics.js +0 -201
  356. package/dist/pixi/display-object/objects/graphics/helpers/dashed-line.helper.d.ts +0 -16
  357. package/dist/pixi/display-object/objects/graphics/helpers/dashed-line.helper.js +0 -45
  358. package/dist/pixi/display-object/objects/graphics.d.ts +0 -40
  359. package/dist/pixi/display-object/objects/graphics.js +0 -229
  360. package/dist/pixi/display-object/objects/helpers/filters.d.ts +0 -29
  361. package/dist/pixi/display-object/objects/helpers/filters.js +0 -161
  362. package/dist/pixi/display-object/objects/helpers/glow-sprite-generator.d.ts +0 -11
  363. package/dist/pixi/display-object/objects/helpers/glow-sprite-generator.js +0 -129
  364. package/dist/pixi/display-object/objects/placeholder.d.ts +0 -7
  365. package/dist/pixi/display-object/objects/placeholder.js +0 -46
  366. package/dist/pixi/display-object/objects/premade-objects/sprite-with-glowing-shapes.d.ts +0 -9
  367. package/dist/pixi/display-object/objects/premade-objects/sprite-with-glowing-shapes.js +0 -89
  368. package/dist/pixi/display-object/objects/sprite/glow-sprite-generator.d.ts +0 -11
  369. package/dist/pixi/display-object/objects/sprite/glow-sprite-generator.js +0 -113
  370. package/dist/pixi/display-object/objects/sprite/sprite.d.ts +0 -52
  371. package/dist/pixi/display-object/objects/sprite/sprite.js +0 -269
  372. package/dist/pixi/display-object/objects/sprite.d.ts +0 -51
  373. package/dist/pixi/display-object/objects/sprite.js +0 -273
  374. package/dist/pixi/display-object/objects/text/helpers/index.d.ts +0 -8
  375. package/dist/pixi/display-object/objects/text/helpers/index.js +0 -6
  376. package/dist/pixi/display-object/objects/text/helpers/process-steps/1-data-in-converter/pixi-text-style-converter.d.ts +0 -30
  377. package/dist/pixi/display-object/objects/text/helpers/process-steps/1-data-in-converter/pixi-text-style-converter.js +0 -53
  378. package/dist/pixi/display-object/objects/text/helpers/process-steps/1-data-in-converter/rich-text-data-in-converter.d.ts +0 -19
  379. package/dist/pixi/display-object/objects/text/helpers/process-steps/1-data-in-converter/rich-text-data-in-converter.js +0 -162
  380. package/dist/pixi/display-object/objects/text/helpers/process-steps/1-data-in-converter/rich-text-data-in-converter.test.d.ts +0 -1
  381. package/dist/pixi/display-object/objects/text/helpers/process-steps/1-data-in-converter/rich-text-data-in-converter.test.js +0 -371
  382. package/dist/pixi/display-object/objects/text/helpers/process-steps/2-wrapping-text/consistent-space-text-wrapper.d.ts +0 -6
  383. package/dist/pixi/display-object/objects/text/helpers/process-steps/2-wrapping-text/consistent-space-text-wrapper.js +0 -70
  384. package/dist/pixi/display-object/objects/text/helpers/process-steps/2-wrapping-text/consistent-space-text-wrapper.test.d.ts +0 -1
  385. package/dist/pixi/display-object/objects/text/helpers/process-steps/2-wrapping-text/consistent-space-text-wrapper.test.js +0 -136
  386. package/dist/pixi/display-object/objects/text/helpers/process-steps/2-wrapping-text/rich-text-typewriter.d.ts +0 -37
  387. package/dist/pixi/display-object/objects/text/helpers/process-steps/2-wrapping-text/rich-text-typewriter.js +0 -169
  388. package/dist/pixi/display-object/objects/text/helpers/process-steps/2-wrapping-text/rich-text-typewriter.test.d.ts +0 -1
  389. package/dist/pixi/display-object/objects/text/helpers/process-steps/2-wrapping-text/rich-text-typewriter.test.js +0 -283
  390. package/dist/pixi/display-object/objects/text/helpers/process-steps/3-data-out-converter/rich-text-data-out-converter.d.ts +0 -8
  391. package/dist/pixi/display-object/objects/text/helpers/process-steps/3-data-out-converter/rich-text-data-out-converter.js +0 -88
  392. package/dist/pixi/display-object/objects/text/helpers/process-steps/3-data-out-converter/rich-text-data-out-converter.test.d.ts +0 -1
  393. package/dist/pixi/display-object/objects/text/helpers/process-steps/3-data-out-converter/rich-text-data-out-converter.test.js +0 -152
  394. package/dist/pixi/display-object/objects/text/helpers/rich-text-to-plane-text.d.ts +0 -28
  395. package/dist/pixi/display-object/objects/text/helpers/rich-text-to-plane-text.js +0 -37
  396. package/dist/pixi/display-object/objects/text/helpers/rich-text-to-plane-text.test.d.ts +0 -5
  397. package/dist/pixi/display-object/objects/text/helpers/rich-text-to-plane-text.test.js +0 -669
  398. package/dist/pixi/display-object/objects/text/rich-text.d.ts +0 -19
  399. package/dist/pixi/display-object/objects/text/rich-text.js +0 -15
  400. package/dist/pixi/display-object/objects/text/text.d.ts +0 -25
  401. package/dist/pixi/display-object/objects/text/text.js +0 -132
  402. package/dist/pixi/display-object/objects/text.d.ts +0 -35
  403. package/dist/pixi/display-object/objects/text.js +0 -124
  404. package/dist/pixi/display-object/premade-objects/sprite-with-glowing-shapes.d.ts +0 -22
  405. package/dist/pixi/display-object/premade-objects/sprite-with-glowing-shapes.js +0 -107
  406. package/dist/pixi/game.d.ts +0 -47
  407. package/dist/pixi/game.js +0 -137
  408. package/dist/pixi/helpers/game-assets.d.ts +0 -15
  409. package/dist/pixi/helpers/game-assets.js +0 -103
  410. package/dist/pixi/helpers/glow-sprite-generator.d.ts +0 -10
  411. package/dist/pixi/helpers/glow-sprite-generator.js +0 -113
  412. package/dist/pixi/helpers/pixi-container.helper.d.ts +0 -5
  413. package/dist/pixi/helpers/pixi-container.helper.js +0 -14
  414. package/dist/pixi/helpers/position-conversion.helper.d.ts +0 -12
  415. package/dist/pixi/helpers/position-conversion.helper.js +0 -54
  416. package/dist/pixi/helpers/position-conversion.helper.test.d.ts +0 -1
  417. package/dist/pixi/helpers/position-conversion.helper.test.js +0 -83
  418. package/dist/pixi/helpers/screen-position-to-stage.helper.d.ts +0 -4
  419. package/dist/pixi/helpers/screen-position-to-stage.helper.js +0 -17
  420. package/dist/pixi/helpers/screen-position-to-stage.helper.test.d.ts +0 -1
  421. package/dist/pixi/helpers/screen-position-to-stage.helper.test.js +0 -178
  422. package/dist/pixi/index.d.ts +0 -14
  423. package/dist/pixi/index.js +0 -44
  424. package/dist/pixi/modules/CAMERA/camera.d.ts +0 -13
  425. package/dist/pixi/modules/CAMERA/camera.js +0 -27
  426. package/dist/pixi/modules/CAMERA/index.d.ts +0 -2
  427. package/dist/pixi/modules/CAMERA/index.js +0 -9
  428. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/camera-view.gateway.d.ts +0 -8
  429. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/camera-view.gateway.js +0 -24
  430. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/camera.gateway.d.ts +0 -11
  431. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/camera.gateway.js +0 -33
  432. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/controllers/camera-view.controller.d.ts +0 -6
  433. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/controllers/camera-view.controller.js +0 -30
  434. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/controllers/camera.controller.d.ts +0 -12
  435. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/controllers/camera.controller.js +0 -41
  436. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/dtos/requests.dto.d.ts +0 -19
  437. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/dtos/requests.dto.js +0 -18
  438. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/index.d.ts +0 -3
  439. package/dist/pixi/modules/CAMERA//342/232/234/357/270/217gateways/index.js +0 -27
  440. package/dist/pixi/modules/CAMERA//360/237/223/220services/camera.service.d.ts +0 -12
  441. package/dist/pixi/modules/CAMERA//360/237/223/220services/camera.service.js +0 -96
  442. package/dist/pixi/modules/CAMERA//360/237/247/212entities/camera.entity.d.ts +0 -18
  443. package/dist/pixi/modules/CAMERA//360/237/247/212entities/camera.entity.js +0 -26
  444. package/dist/pixi/modules/CAMERA//360/237/247/251views/camera.view.d.ts +0 -23
  445. package/dist/pixi/modules/CAMERA//360/237/247/251views/camera.view.js +0 -115
  446. package/dist/pixi/pixi-definitions.d.ts +0 -38
  447. package/dist/pixi/pixi-definitions.js +0 -37
  448. package/dist/pixi/services/keyboard/keyboard.d.ts +0 -12
  449. package/dist/pixi/services/keyboard/keyboard.js +0 -54
  450. package/dist/pixi/services/mouse/mouse-target-focus.service.d.ts +0 -21
  451. package/dist/pixi/services/mouse/mouse-target-focus.service.js +0 -86
  452. package/dist/pixi/services/mouse/mouse.service.d.ts +0 -21
  453. package/dist/pixi/services/mouse/mouse.service.js +0 -101
  454. package/dist/services/keyboard/keyboard.d.ts +0 -7
  455. package/dist/services/keyboard/keyboard.js +0 -44
  456. package/dist/services/mouse/mouse.service.d.ts +0 -12
  457. package/dist/services/mouse/mouse.service.js +0 -70
  458. package/dist/services/mouse/mouser-target-focus.service.d.ts +0 -16
  459. package/dist/services/mouse/mouser-target-focus.service.js +0 -93
  460. package/dist/utilities/animator/animating-content/fade-in-content.d.ts +0 -18
  461. package/dist/utilities/animator/animating-content/fade-in-content.js +0 -37
  462. package/dist/utilities/animator/animating-content/fade-in-content.test.d.ts +0 -1
  463. package/dist/utilities/animator/animating-content/fade-in-content.test.js +0 -10
  464. package/dist/utilities/animator/animating-content/slide-in-content.d.ts +0 -37
  465. package/dist/utilities/animator/animating-content/slide-in-content.js +0 -99
  466. package/dist/utilities/animator/animating-content/slide-in-content.test.d.ts +0 -1
  467. package/dist/utilities/animator/animating-content/slide-in-content.test.js +0 -10
  468. package/dist/utilities/animator/animations.d.ts +0 -45
  469. package/dist/utilities/animator/animations.js +0 -92
  470. package/dist/utilities/animator/animator/animator.d.ts +0 -44
  471. package/dist/utilities/animator/animator/animator.js +0 -234
  472. package/dist/utilities/animator/animator/animator.memory-leak.test.d.ts +0 -1
  473. package/dist/utilities/animator/animator/animator.memory-leak.test.js +0 -73
  474. package/dist/utilities/animator/animator/animator.performance.test.d.ts +0 -1
  475. package/dist/utilities/animator/animator/animator.performance.test.js +0 -116
  476. package/dist/utilities/animator/animator/animator.test.d.ts +0 -1
  477. package/dist/utilities/animator/animator/animator.test.js +0 -1046
  478. package/dist/utilities/animator/animator.d.ts +0 -60
  479. package/dist/utilities/animator/animator.js +0 -322
  480. package/dist/utilities/animator/animator.performance.test.d.ts +0 -1
  481. package/dist/utilities/animator/animator.performance.test.js +0 -46
  482. package/dist/utilities/animator/animator.test.d.ts +0 -1
  483. package/dist/utilities/animator/animator.test.js +0 -928
  484. package/dist/utilities/animator/animator2/animator.d.ts +0 -42
  485. package/dist/utilities/animator/animator2/animator.js +0 -222
  486. package/dist/utilities/animator/animator2/animator.memory-leak.test.d.ts +0 -1
  487. package/dist/utilities/animator/animator2/animator.memory-leak.test.js +0 -73
  488. package/dist/utilities/animator/animator2/animator.performance.test.d.ts +0 -1
  489. package/dist/utilities/animator/animator2/animator.performance.test.js +0 -65
  490. package/dist/utilities/animator/animator2/animator.test.d.ts +0 -1
  491. package/dist/utilities/animator/animator2/animator.test.js +0 -1007
  492. package/dist/utilities/animator/animator_old/animator.d.ts +0 -60
  493. package/dist/utilities/animator/animator_old/animator.js +0 -337
  494. package/dist/utilities/animator/animator_old/animator.performance.test.d.ts +0 -1
  495. package/dist/utilities/animator/animator_old/animator.performance.test.js +0 -121
  496. package/dist/utilities/animator/animator_old/animator.test.d.ts +0 -1
  497. package/dist/utilities/animator/animator_old/animator.test.js +0 -996
  498. package/dist/utilities/animator/content-animations/fade-in/fade-in-content.d.ts +0 -18
  499. package/dist/utilities/animator/content-animations/fade-in/fade-in-content.js +0 -37
  500. package/dist/utilities/animator/content-animations/fade-in/fade-in-content.test.d.ts +0 -1
  501. package/dist/utilities/animator/content-animations/fade-in/fade-in-content.test.js +0 -10
  502. package/dist/utilities/animator/content-animations/fade-in/fade-in-state-animation.d.ts +0 -38
  503. package/dist/utilities/animator/content-animations/fade-in/fade-in-state-animation.js +0 -208
  504. package/dist/utilities/animator/content-animations/fade-in/fade-in-state-animation.test.d.ts +0 -1
  505. package/dist/utilities/animator/content-animations/fade-in/fade-in-state-animation.test.js +0 -439
  506. package/dist/utilities/animator/content-animations/slide/slide-in-content.d.ts +0 -41
  507. package/dist/utilities/animator/content-animations/slide/slide-in-content.js +0 -107
  508. package/dist/utilities/animator/content-animations/slide/slide-in-content.test.d.ts +0 -1
  509. package/dist/utilities/animator/content-animations/slide/slide-in-content.test.js +0 -10
  510. package/dist/utilities/animator/content-animations/slide/slide-state-animation.d.ts +0 -24
  511. package/dist/utilities/animator/content-animations/slide/slide-state-animation.js +0 -138
  512. package/dist/utilities/animator/content-animations/slide/slide-state-animation.test.d.ts +0 -1
  513. package/dist/utilities/animator/content-animations/slide/slide-state-animation.test.js +0 -307
  514. package/dist/utilities/animator/content-animations/slide/state-animation.d.ts +0 -37
  515. package/dist/utilities/animator/content-animations/slide/state-animation.js +0 -170
  516. package/dist/utilities/animator/content-animations/slide/state-animation.test.d.ts +0 -1
  517. package/dist/utilities/animator/content-animations/slide/state-animation.test.js +0 -340
  518. package/dist/utilities/animator/index.d.ts +0 -7
  519. package/dist/utilities/animator/index.js +0 -24
  520. package/dist/utilities/animator/state-animation/fade-in/fade-in-content.d.ts +0 -18
  521. package/dist/utilities/animator/state-animation/fade-in/fade-in-content.js +0 -37
  522. package/dist/utilities/animator/state-animation/fade-in/fade-in-content.test.d.ts +0 -1
  523. package/dist/utilities/animator/state-animation/fade-in/fade-in-content.test.js +0 -10
  524. package/dist/utilities/animator/state-animation/fade-in/fade-in-state-animation.d.ts +0 -32
  525. package/dist/utilities/animator/state-animation/fade-in/fade-in-state-animation.js +0 -168
  526. package/dist/utilities/animator/state-animation/fade-in/fade-in-state-animation.test.d.ts +0 -1
  527. package/dist/utilities/animator/state-animation/fade-in/fade-in-state-animation.test.js +0 -431
  528. package/dist/utilities/animator/state-animation/slide/slide-in-content.d.ts +0 -37
  529. package/dist/utilities/animator/state-animation/slide/slide-in-content.js +0 -100
  530. package/dist/utilities/animator/state-animation/slide/slide-in-content.test.d.ts +0 -1
  531. package/dist/utilities/animator/state-animation/slide/slide-in-content.test.js +0 -10
  532. package/dist/utilities/animator/state-animation/slide/slide-state-animation.d.ts +0 -24
  533. package/dist/utilities/animator/state-animation/slide/slide-state-animation.js +0 -130
  534. package/dist/utilities/animator/state-animation/slide/slide-state-animation.test.d.ts +0 -1
  535. package/dist/utilities/animator/state-animation/slide/slide-state-animation.test.js +0 -301
  536. package/dist/utilities/animator/state-animation/slide-state-animation.d.ts +0 -24
  537. package/dist/utilities/animator/state-animation/slide-state-animation.js +0 -130
  538. package/dist/utilities/animator/state-animation/slide-state-animation.test.d.ts +0 -1
  539. package/dist/utilities/animator/state-animation/slide-state-animation.test.js +0 -301
  540. package/dist/utilities/animator/state-animation/state-animation.d.ts +0 -33
  541. package/dist/utilities/animator/state-animation/state-animation.js +0 -146
  542. package/dist/utilities/animator/state-animation/state-animation.test.d.ts +0 -1
  543. package/dist/utilities/animator/state-animation/state-animation.test.js +0 -335
  544. package/dist/utilities/animator/state-animation/visit-disappear-state-animation.d.ts +0 -32
  545. package/dist/utilities/animator/state-animation/visit-disappear-state-animation.js +0 -168
  546. package/dist/utilities/animator/state-animation/visit-disappear-state-animation.test.d.ts +0 -1
  547. package/dist/utilities/animator/state-animation/visit-disappear-state-animation.test.js +0 -431
  548. package/dist/utilities/data-structures/vector-set/vector-set.d.ts +0 -7
  549. package/dist/utilities/data-structures/vector-set/vector-set.js +0 -26
  550. package/dist/utilities/delta-time/delta-time.d.ts +0 -3
  551. package/dist/utilities/delta-time/delta-time.js +0 -10
  552. package/dist/utilities/grid-algorithms/closest-available-space/closest-available-space.helper.d.ts +0 -6
  553. package/dist/utilities/grid-algorithms/closest-available-space/closest-available-space.helper.js +0 -55
  554. package/dist/utilities/grid-algorithms/closest-available-space/closest-available-space.helper.test.d.ts +0 -1
  555. package/dist/utilities/grid-algorithms/closest-available-space/closest-available-space.helper.test.js +0 -100
  556. package/dist/utilities/grid-algorithms/path-finder/path-finder.d.ts +0 -8
  557. package/dist/utilities/grid-algorithms/path-finder/path-finder.js +0 -98
  558. package/dist/utilities/grid-algorithms/path-finder/path-finder.test.d.ts +0 -1
  559. package/dist/utilities/grid-algorithms/path-finder/path-finder.test.js +0 -155
  560. package/dist/utilities/grid-algorithms/position-to-grid-position-converter.d.ts +0 -6
  561. package/dist/utilities/grid-algorithms/position-to-grid-position-converter.js +0 -17
  562. package/dist/utilities/grid-algorithms/vector-field-path-finder/vector-field-path-finder.d.ts +0 -18
  563. package/dist/utilities/grid-algorithms/vector-field-path-finder/vector-field-path-finder.js +0 -129
  564. package/dist/utilities/grid-algorithms/vector-field-path-finder/vector-field-path-finder.test.d.ts +0 -1
  565. package/dist/utilities/grid-algorithms/vector-field-path-finder/vector-field-path-finder.test.js +0 -254
  566. package/dist/utilities/index.d.ts +0 -6
  567. package/dist/utilities/index.js +0 -29
  568. package/dist/utilities/libraries/animator/animating-content/fade-in-content.d.ts +0 -18
  569. package/dist/utilities/libraries/animator/animating-content/fade-in-content.js +0 -37
  570. package/dist/utilities/libraries/animator/animating-content/slide-in-content.d.ts +0 -37
  571. package/dist/utilities/libraries/animator/animating-content/slide-in-content.js +0 -99
  572. package/dist/utilities/libraries/animator/animating-content/state-animation.d.ts +0 -36
  573. package/dist/utilities/libraries/animator/animating-content/state-animation.js +0 -174
  574. package/dist/utilities/libraries/animator/animating-content/state-animation.test.d.ts +0 -1
  575. package/dist/utilities/libraries/animator/animating-content/state-animation.test.js +0 -399
  576. package/dist/utilities/libraries/animator/animations.d.ts +0 -37
  577. package/dist/utilities/libraries/animator/animations.js +0 -88
  578. package/dist/utilities/libraries/animator/animator.d.ts +0 -63
  579. package/dist/utilities/libraries/animator/animator.js +0 -325
  580. package/dist/utilities/libraries/animator/animator.spec.d.ts +0 -1
  581. package/dist/utilities/libraries/animator/animator.spec.js +0 -779
  582. package/dist/utilities/libraries/animator/animator.test.d.ts +0 -1
  583. package/dist/utilities/libraries/animator/animator.test.js +0 -893
  584. package/dist/utilities/libraries/animator/index.d.ts +0 -7
  585. package/dist/utilities/libraries/animator/index.js +0 -24
  586. package/dist/utilities/libraries/animator/state-animation/slide-state-animation.d.ts +0 -24
  587. package/dist/utilities/libraries/animator/state-animation/slide-state-animation.js +0 -131
  588. package/dist/utilities/libraries/animator/state-animation/slide-state-animation.test.d.ts +0 -1
  589. package/dist/utilities/libraries/animator/state-animation/slide-state-animation.test.js +0 -326
  590. package/dist/utilities/libraries/animator/state-animation/state-animation.d.ts +0 -33
  591. package/dist/utilities/libraries/animator/state-animation/state-animation.js +0 -147
  592. package/dist/utilities/libraries/animator/state-animation/state-animation.test.d.ts +0 -1
  593. package/dist/utilities/libraries/animator/state-animation/state-animation.test.js +0 -360
  594. package/dist/utilities/libraries/animator/state-animation/visit-disappear-state-animation.d.ts +0 -32
  595. package/dist/utilities/libraries/animator/state-animation/visit-disappear-state-animation.js +0 -169
  596. package/dist/utilities/libraries/animator/state-animation/visit-disappear-state-animation.test.d.ts +0 -1
  597. package/dist/utilities/libraries/animator/state-animation/visit-disappear-state-animation.test.js +0 -456
  598. package/dist/utilities/libraries/binary-heap/binary-heap.d.ts +0 -13
  599. package/dist/utilities/libraries/binary-heap/binary-heap.js +0 -110
  600. package/dist/utilities/libraries/data-structures/binary-heap/binary-heap.d.ts +0 -13
  601. package/dist/utilities/libraries/data-structures/binary-heap/binary-heap.js +0 -110
  602. package/dist/utilities/libraries/data-structures/grid/grid.d.ts +0 -38
  603. package/dist/utilities/libraries/data-structures/grid/grid.js +0 -133
  604. package/dist/utilities/libraries/data-structures/grid/grid.spec.d.ts +0 -1
  605. package/dist/utilities/libraries/data-structures/grid/grid.spec.js +0 -178
  606. package/dist/utilities/libraries/data-structures/grid/grid.test.d.ts +0 -1
  607. package/dist/utilities/libraries/data-structures/grid/grid.test.js +0 -220
  608. package/dist/utilities/libraries/data-structures/grid/position-to-grid-position-converter.d.ts +0 -6
  609. package/dist/utilities/libraries/data-structures/grid/position-to-grid-position-converter.js +0 -19
  610. package/dist/utilities/libraries/data-structures/queue/queue.d.ts +0 -23
  611. package/dist/utilities/libraries/data-structures/queue/queue.js +0 -72
  612. package/dist/utilities/libraries/data-structures/queue/queue.test.d.ts +0 -1
  613. package/dist/utilities/libraries/data-structures/queue/queue.test.js +0 -57
  614. package/dist/utilities/libraries/data-structures/vector-set/vector-set.d.ts +0 -7
  615. package/dist/utilities/libraries/data-structures/vector-set/vector-set.js +0 -26
  616. package/dist/utilities/libraries/delta-time/delta-time.d.ts +0 -3
  617. package/dist/utilities/libraries/delta-time/delta-time.js +0 -10
  618. package/dist/utilities/libraries/grid-algorithms/closest-available-space/closest-available-space.helper.d.ts +0 -6
  619. package/dist/utilities/libraries/grid-algorithms/closest-available-space/closest-available-space.helper.js +0 -55
  620. package/dist/utilities/libraries/grid-algorithms/closest-available-space/closest-available-space.helper.spec.d.ts +0 -1
  621. package/dist/utilities/libraries/grid-algorithms/closest-available-space/closest-available-space.helper.spec.js +0 -124
  622. package/dist/utilities/libraries/grid-algorithms/closest-available-space/closest-available-space.helper.test.d.ts +0 -1
  623. package/dist/utilities/libraries/grid-algorithms/closest-available-space/closest-available-space.helper.test.js +0 -100
  624. package/dist/utilities/libraries/grid-algorithms/path-finder/path-finder.d.ts +0 -8
  625. package/dist/utilities/libraries/grid-algorithms/path-finder/path-finder.js +0 -98
  626. package/dist/utilities/libraries/grid-algorithms/path-finder/path-finder.spec.d.ts +0 -1
  627. package/dist/utilities/libraries/grid-algorithms/path-finder/path-finder.spec.js +0 -169
  628. package/dist/utilities/libraries/grid-algorithms/path-finder/path-finder.test.d.ts +0 -1
  629. package/dist/utilities/libraries/grid-algorithms/path-finder/path-finder.test.js +0 -155
  630. package/dist/utilities/libraries/grid-algorithms/position-to-grid-position-converter.d.ts +0 -6
  631. package/dist/utilities/libraries/grid-algorithms/position-to-grid-position-converter.js +0 -17
  632. package/dist/utilities/libraries/grid-algorithms/vector-field-path-finder/vector-field-path-finder.d.ts +0 -18
  633. package/dist/utilities/libraries/grid-algorithms/vector-field-path-finder/vector-field-path-finder.js +0 -129
  634. package/dist/utilities/libraries/grid-algorithms/vector-field-path-finder/vector-field-path-finder.spec.d.ts +0 -1
  635. package/dist/utilities/libraries/grid-algorithms/vector-field-path-finder/vector-field-path-finder.spec.js +0 -296
  636. package/dist/utilities/libraries/grid-algorithms/vector-field-path-finder/vector-field-path-finder.test.d.ts +0 -1
  637. package/dist/utilities/libraries/grid-algorithms/vector-field-path-finder/vector-field-path-finder.test.js +0 -254
  638. package/dist/utilities/libraries/path-finder/path-finder.d.ts +0 -12
  639. package/dist/utilities/libraries/path-finder/path-finder.js +0 -127
  640. package/dist/utilities/libraries/path-finder/path-finder.spec.d.ts +0 -1
  641. package/dist/utilities/libraries/path-finder/path-finder.spec.js +0 -158
  642. package/dist/utilities/services/keyboard/keyboard.d.ts +0 -7
  643. package/dist/utilities/services/keyboard/keyboard.js +0 -47
  644. package/dist/utilities/services/mouse/helpers/mouse-position.helper.d.ts +0 -4
  645. package/dist/utilities/services/mouse/helpers/mouse-position.helper.js +0 -17
  646. package/dist/utilities/services/mouse/helpers/mouse-position.helper.test.d.ts +0 -1
  647. package/dist/utilities/services/mouse/helpers/mouse-position.helper.test.js +0 -172
  648. package/dist/utilities/services/mouse/mouse-target-focus.service.d.ts +0 -20
  649. package/dist/utilities/services/mouse/mouse-target-focus.service.js +0 -88
  650. package/dist/utilities/services/mouse/mouse.service.d.ts +0 -13
  651. package/dist/utilities/services/mouse/mouse.service.js +0 -91
  652. package/dist/utilities/services/mouse/mouser-target-focus.service.d.ts +0 -16
  653. package/dist/utilities/services/mouse/mouser-target-focus.service.js +0 -93
@@ -1,928 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const helpers_lib_1 = require("helpers-lib");
4
- const vitest_1 = require("vitest");
5
- const game_entities_1 = require("../../game-entities");
6
- const animations_1 = require("./animations");
7
- const animator_1 = require("./animator");
8
- (0, vitest_1.describe)('ANIMATOR', () => {
9
- (0, vitest_1.describe)('Setup', () => {
10
- (0, vitest_1.test)('constructor should throw error if target is not an object', () => {
11
- let obj = 'string';
12
- (0, vitest_1.expect)(() => {
13
- new animator_1.Animator(obj, 'x').attachToRoot();
14
- }).toThrow('Animator: target is not an object! Target: "string"');
15
- });
16
- (0, vitest_1.test)('constructor should throw error if target does not have all target properties', () => {
17
- let obj = { x: 1, y: 2, z: 3 };
18
- (0, vitest_1.expect)(() => {
19
- new animator_1.Animator(obj, ['x', 't']).attachToRoot();
20
- }).toThrow('Animator: target does not have property. Target property: "t"');
21
- });
22
- (0, vitest_1.test)('constructor should throw error if target property is not a number', () => {
23
- let obj = { x: 'fail' };
24
- (0, vitest_1.expect)(() => {
25
- new animator_1.Animator(obj, ['x']).attachToRoot();
26
- }).toThrow('Animator: target property is not a number. Target property: "x"');
27
- });
28
- (0, vitest_1.test)('animate should throw error if non effected property tried to animate', () => {
29
- (0, vitest_1.expect)(() => {
30
- let obj = { x: 0, y: 0 };
31
- let animator = new animator_1.Animator(obj, ['x', 't']).attachToRoot();
32
- animator.animate({ x: 5, y: 5 });
33
- }).toThrow('Animator: target does not have property. Target property: "t"');
34
- });
35
- (0, vitest_1.test)('should throw error if multiple animators decorate the same property', () => {
36
- (0, vitest_1.expect)(() => {
37
- let obj = { x: 0 };
38
- new animator_1.Animator(obj, 'x').attachToRoot();
39
- new animator_1.Animator(obj, 'x').attachToRoot();
40
- }).toThrow(`Animator: target property is already animated! Target: "{\n "x": 0\n}", Property: "x"`);
41
- });
42
- (0, vitest_1.test)('setting multiple update callbacks should throw error', () => {
43
- (0, vitest_1.expect)(() => {
44
- let obj = { x: 0 };
45
- new animator_1.Animator(obj, 'x')
46
- .onChange(() => { })
47
- .onChange(() => { })
48
- .attachToRoot();
49
- }).toThrow('Animator: onChangeCallback is already set!');
50
- });
51
- });
52
- (0, vitest_1.describe)('Animate', () => {
53
- (0, vitest_1.test)('animate should not change the value before the update ticks', () => {
54
- let obj = { x: 0 };
55
- let animator = new animator_1.Animator(obj, 'x').attachToRoot();
56
- animator.animate({ x: 5 });
57
- (0, vitest_1.expect)(obj.x).toEqual(0);
58
- });
59
- (0, vitest_1.test)('animate should not take action if the target value is the same', () => {
60
- let obj = { x: 0 };
61
- let animator = new animator_1.Animator(obj, 'x', { duration: 4 }).attachToRoot();
62
- animator.animate({ x: 0 });
63
- animator['update'](1);
64
- (0, vitest_1.expect)(obj.x).toEqual(0);
65
- (0, vitest_1.expect)(animator.isAnimating).toEqual(false);
66
- });
67
- (0, vitest_1.test)('animate should take action if the target value is the same and the animation is loop', () => {
68
- let obj = { x: 0 };
69
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, loop: true }).attachToRoot();
70
- animator.animate({ x: 0 });
71
- animator['update'](1);
72
- (0, vitest_1.expect)(obj.x).toEqual(0);
73
- (0, vitest_1.expect)(animator.isAnimating).toEqual(true);
74
- });
75
- (0, vitest_1.test)('animate to target in lineer', () => {
76
- let obj = { x: 0 };
77
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, animation: new animations_1.AnimationLineer() }).attachToRoot();
78
- animator.animate({ x: 4 });
79
- animator['update'](1);
80
- (0, vitest_1.expect)(obj.x).toEqual(1);
81
- animator['update'](1);
82
- (0, vitest_1.expect)(obj.x).toEqual(2);
83
- animator['update'](1);
84
- (0, vitest_1.expect)(obj.x).toEqual(3);
85
- animator['update'](1);
86
- (0, vitest_1.expect)(obj.x).toEqual(4);
87
- });
88
- (0, vitest_1.test)('animate to target with overriden duration', () => {
89
- let obj = { x: 0 };
90
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, animation: new animations_1.AnimationLineer() }).attachToRoot();
91
- animator.animate({ x: 4 }, { duration: 2 });
92
- animator['update'](1);
93
- (0, vitest_1.expect)(obj.x).toEqual(2);
94
- });
95
- (0, vitest_1.test)('animate to target with overriden instant duration', () => {
96
- let obj = { x: 0 };
97
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, animation: new animations_1.AnimationLineer() }).attachToRoot();
98
- animator.animate({ x: 4 }, { duration: 0 });
99
- animator['update'](1);
100
- (0, vitest_1.expect)(obj.x).toEqual(4);
101
- });
102
- (0, vitest_1.test)('animate only one property should not effect the other', () => {
103
- let obj = { x: 0, y: 0 };
104
- let animator = new animator_1.Animator(obj, ['x', 'y'], { duration: 4, animation: new animations_1.AnimationLineer() }).attachToRoot();
105
- animator.animate({ x: 4 });
106
- animator['update'](1);
107
- (0, vitest_1.expect)(obj).toEqual({ x: 1, y: 0 });
108
- animator['update'](1);
109
- (0, vitest_1.expect)(obj).toEqual({ x: 2, y: 0 });
110
- animator['update'](1);
111
- (0, vitest_1.expect)(obj).toEqual({ x: 3, y: 0 });
112
- animator['update'](1);
113
- (0, vitest_1.expect)(obj).toEqual({ x: 4, y: 0 });
114
- });
115
- (0, vitest_1.test)('animate with custom values should override the default settings', () => {
116
- let obj = { x: 0 };
117
- let animator = new animator_1.Animator(obj, 'x', { duration: 10, animation: new animations_1.AnimationLineer() }).attachToRoot();
118
- animator.animate({ x: 10 }, { duration: 4, animation: new animations_1.AnimationEaseInOut() });
119
- animator['update'](1);
120
- (0, vitest_1.expect)(obj).toEqual({ x: 1.25 });
121
- animator['update'](1);
122
- (0, vitest_1.expect)(obj).toEqual({ x: 5 });
123
- animator['update'](1);
124
- (0, vitest_1.expect)(obj).toEqual({ x: 8.75 });
125
- animator['update'](1);
126
- (0, vitest_1.expect)(obj).toEqual({ x: 10 });
127
- });
128
- (0, vitest_1.test)('animate to target in easeInOut starting from zero', () => {
129
- let obj = { x: 0 };
130
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, animation: new animations_1.AnimationEaseInOut() }).attachToRoot();
131
- animator.animate({ x: 10 });
132
- animator['update'](1);
133
- (0, vitest_1.expect)(obj.x).toEqual(1.25);
134
- animator['update'](1);
135
- (0, vitest_1.expect)(obj.x).toEqual(5);
136
- animator['update'](1);
137
- (0, vitest_1.expect)(obj.x).toEqual(8.75);
138
- animator['update'](1);
139
- (0, vitest_1.expect)(obj.x).toEqual(10);
140
- });
141
- (0, vitest_1.test)('animate to target in easeInOut starting from different value than zero', () => {
142
- let obj = { x: 10 };
143
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, animation: new animations_1.AnimationEaseInOut() }).attachToRoot();
144
- animator.animate({ x: 20 });
145
- animator['update'](1);
146
- (0, vitest_1.expect)(obj.x).toEqual(11.25);
147
- animator['update'](1);
148
- (0, vitest_1.expect)(obj.x).toEqual(15);
149
- animator['update'](1);
150
- (0, vitest_1.expect)(obj.x).toEqual(18.75);
151
- animator['update'](1);
152
- (0, vitest_1.expect)(obj.x).toEqual(20);
153
- });
154
- (0, vitest_1.test)('animate to target and return back', () => {
155
- let obj = { x: 0 };
156
- let animator = new animator_1.Animator(obj, 'x', { duration: 1, animation: new animations_1.AnimationLineer() }).attachToRoot();
157
- animator.animate({ x: 4 });
158
- animator['update'](1);
159
- animator.animate({ x: 0 });
160
- animator['update'](1);
161
- (0, vitest_1.expect)(obj.x).toEqual(0);
162
- });
163
- (0, vitest_1.test)('animate onChange callbacks', () => {
164
- let obj = { x: 0 };
165
- let valueFromOnStep = 0;
166
- let onStepCallCount = 0;
167
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, animation: new animations_1.AnimationEaseInOut() })
168
- .onChange(item => {
169
- valueFromOnStep = item.x;
170
- onStepCallCount++;
171
- })
172
- .attachToRoot();
173
- animator.animate({ x: 10 });
174
- (0, vitest_1.expect)(valueFromOnStep).toEqual(0);
175
- (0, vitest_1.expect)(onStepCallCount).toEqual(0);
176
- animator['update'](1);
177
- (0, vitest_1.expect)(onStepCallCount).toEqual(1);
178
- (0, vitest_1.expect)(valueFromOnStep).toEqual(1.25);
179
- animator['update'](1);
180
- (0, vitest_1.expect)(onStepCallCount).toEqual(2);
181
- (0, vitest_1.expect)(valueFromOnStep).toEqual(5);
182
- animator['update'](1);
183
- (0, vitest_1.expect)(onStepCallCount).toEqual(3);
184
- (0, vitest_1.expect)(valueFromOnStep).toEqual(8.75);
185
- animator['update'](1);
186
- (0, vitest_1.expect)(onStepCallCount).toEqual(4);
187
- (0, vitest_1.expect)(valueFromOnStep).toEqual(10);
188
- animator['update'](1);
189
- animator['update'](1);
190
- animator['update'](1);
191
- (0, vitest_1.expect)(onStepCallCount).toEqual(4);
192
- });
193
- (0, vitest_1.test)('animate onChange should not be triggered before starting the animation', () => {
194
- let onStepCallCount = 0;
195
- let animator = new animator_1.Animator({ x: 0 }, 'x', { duration: 4, animation: new animations_1.AnimationEaseInOut() })
196
- .onChange(() => {
197
- onStepCallCount++;
198
- })
199
- .attachToRoot();
200
- animator['update'](1);
201
- (0, vitest_1.expect)(onStepCallCount).toEqual(0);
202
- });
203
- (0, vitest_1.test)('animation complete promise', async () => {
204
- let obj = { x: 0 };
205
- let completed = false;
206
- let animator = new animator_1.Animator(obj, 'x').attachToRoot();
207
- animator
208
- .animate({ x: 1 }, { duration: 2 })
209
- .tap(() => {
210
- completed = true;
211
- })
212
- .attachToRoot();
213
- (0, vitest_1.expect)(completed).toBeFalsy();
214
- animator['update'](1);
215
- (0, vitest_1.expect)(completed).toBeFalsy();
216
- animator['update'](1);
217
- await (0, helpers_lib_1.Wait)();
218
- (0, vitest_1.expect)(completed).toBeTruthy();
219
- });
220
- (0, vitest_1.test)('animate getter/setter property', () => {
221
- class Foo {
222
- constructor() {
223
- this._x = 10;
224
- }
225
- get x() {
226
- return this._x;
227
- }
228
- set x(value) {
229
- this._x = value;
230
- }
231
- }
232
- let obj = new Foo();
233
- let animator = new animator_1.Animator(obj, ['x'], { duration: 4, animation: new animations_1.AnimationEaseInOut() }).attachToRoot();
234
- animator.animate({ x: 20 });
235
- animator['update'](1);
236
- (0, vitest_1.expect)(obj.x).toEqual(11.25);
237
- animator['update'](1);
238
- (0, vitest_1.expect)(obj.x).toEqual(15);
239
- animator['update'](1);
240
- (0, vitest_1.expect)(obj.x).toEqual(18.75);
241
- animator['update'](1);
242
- (0, vitest_1.expect)(obj.x).toEqual(20);
243
- });
244
- (0, vitest_1.test)('is animating should return true if it is animating', () => {
245
- let animator = new animator_1.Animator({ x: 0 }, 'x', { duration: 1, animation: new animations_1.AnimationLineer() }).attachToRoot();
246
- animator.animate({ x: 1 });
247
- (0, vitest_1.expect)(animator.isAnimating).toBeTruthy();
248
- });
249
- (0, vitest_1.test)('is animating should return false if it is not animating', () => {
250
- let obj = { x: 0 };
251
- let animator = new animator_1.Animator(obj, 'x', { duration: 1, animation: new animations_1.AnimationLineer() }).attachToRoot();
252
- (0, vitest_1.expect)(animator.isAnimating).toBeFalsy();
253
- animator.animate({ x: 1 });
254
- animator['update'](1);
255
- (0, vitest_1.expect)(animator.isAnimating).toBeFalsy();
256
- });
257
- });
258
- (0, vitest_1.describe)('Animation Cycle Changes', () => {
259
- (0, vitest_1.test)('pause animations should halt the progress', async () => {
260
- let obj = { x: 0 };
261
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, animation: new animations_1.AnimationLineer() }).attachToRoot();
262
- animator.animate({ x: 4 });
263
- animator['update'](1);
264
- (0, vitest_1.expect)(obj).toEqual({ x: 1 });
265
- animator['update'](1);
266
- (0, vitest_1.expect)(obj).toEqual({ x: 2 });
267
- animator.pauseAnimations();
268
- animator['update'](1);
269
- (0, vitest_1.expect)(obj).toEqual({ x: 2 });
270
- animator['update'](1);
271
- (0, vitest_1.expect)(obj).toEqual({ x: 2 });
272
- animator.resumeAnimations();
273
- animator['update'](1);
274
- (0, vitest_1.expect)(obj).toEqual({ x: 3 });
275
- animator['update'](1);
276
- (0, vitest_1.expect)(obj).toEqual({ x: 4 });
277
- });
278
- (0, vitest_1.test)('new animations should not proceed while the animations are paused', async () => {
279
- let obj = { x: 0 };
280
- let animator = new animator_1.Animator(obj, 'x', { duration: 2, animation: new animations_1.AnimationLineer() }).attachToRoot();
281
- animator.pauseAnimations();
282
- animator.animate({ x: 2 });
283
- animator['update'](1);
284
- (0, vitest_1.expect)(obj).toEqual({ x: 0 });
285
- animator['update'](1);
286
- (0, vitest_1.expect)(obj).toEqual({ x: 0 });
287
- animator.resumeAnimations();
288
- animator['update'](1);
289
- (0, vitest_1.expect)(obj).toEqual({ x: 1 });
290
- animator['update'](1);
291
- (0, vitest_1.expect)(obj).toEqual({ x: 2 });
292
- });
293
- (0, vitest_1.test)('animation loop', async () => {
294
- let obj = { x: 0 };
295
- let animator = new animator_1.Animator(obj, 'x', { duration: 2, animation: new animations_1.AnimationLineer(), loop: true }).attachToRoot();
296
- animator.animate({ x: 2 }, { duration: 2 });
297
- animator['update'](1);
298
- (0, vitest_1.expect)(obj.x).toEqual(1);
299
- animator['update'](1);
300
- (0, vitest_1.expect)(obj.x).toEqual(0);
301
- animator['update'](1);
302
- (0, vitest_1.expect)(obj.x).toEqual(1);
303
- animator['update'](0.8);
304
- (0, vitest_1.expect)(obj.x).toEqual(1.8);
305
- animator['update'](0.7);
306
- (0, vitest_1.expect)(obj.x).toEqual(0.5);
307
- });
308
- });
309
- (0, vitest_1.describe)('Animation Type Switch', () => {
310
- (0, vitest_1.test)('re-animation handling option throw error should throw error', async () => {
311
- let obj = { x: 0 };
312
- let animator = new animator_1.Animator(obj, 'x', {
313
- duration: 4,
314
- reAnimateHandling: animator_1.ReAnimateHandlingType.throwError
315
- }).attachToRoot();
316
- animator.animate({ x: 1 });
317
- (0, vitest_1.expect)(() => animator.animate({ x: 0 })).toThrow('Animator: property is already being animated. Property: "x"');
318
- animator['update'](1);
319
- (0, vitest_1.expect)(() => animator.animate({ x: 0 })).toThrow('Animator: property is already being animated. Property: "x"');
320
- animator['update'](3);
321
- (0, vitest_1.expect)(() => animator.animate({ x: 0 })).not.toThrow('Animator: property is already being animated. Property: "x"');
322
- });
323
- (0, vitest_1.test)('re-animation handling option ignore should ignore new animation', () => {
324
- let obj = { x: 0 };
325
- let animator = new animator_1.Animator(obj, 'x', {
326
- duration: 1,
327
- reAnimateHandling: animator_1.ReAnimateHandlingType.ignoreNewAnimation
328
- }).attachToRoot();
329
- animator.animate({ x: 1 });
330
- animator.animate({ x: 2 });
331
- animator['update'](1);
332
- (0, vitest_1.expect)(obj.x).toEqual(1);
333
- });
334
- (0, vitest_1.test)('re-animation handling option ignore should ignore multiple property animation', () => {
335
- let obj = { x: 0, y: 0 };
336
- let animator = new animator_1.Animator(obj, ['x', 'y'], {
337
- duration: 1,
338
- reAnimateHandling: animator_1.ReAnimateHandlingType.ignoreNewAnimation
339
- }).attachToRoot();
340
- animator.animate({ x: 1 });
341
- animator.animate({ x: 2, y: 1 });
342
- animator['update'](1);
343
- (0, vitest_1.expect)(obj).toEqual({ x: 1, y: 1 });
344
- });
345
- (0, vitest_1.test)('animate switch after finishes to a different animation type should not throw error', () => {
346
- let obj = { x: 1 };
347
- let animator = new animator_1.Animator(obj, 'x', { duration: 1 }).attachToRoot();
348
- animator.animate({ x: 0 }, { animation: new animations_1.AnimationLineer() });
349
- animator['update'](1);
350
- (0, vitest_1.expect)(obj.x).toEqual(0);
351
- animator.animate({ x: 10 }, { duration: 4, animation: new animations_1.AnimationEaseInOut() });
352
- animator['update'](1);
353
- (0, vitest_1.expect)(obj.x).toEqual(1.25);
354
- animator['update'](1);
355
- (0, vitest_1.expect)(obj.x).toEqual(5);
356
- animator['update'](1);
357
- (0, vitest_1.expect)(obj.x).toEqual(8.75);
358
- animator['update'](1);
359
- (0, vitest_1.expect)(obj.x).toEqual(10);
360
- });
361
- (0, vitest_1.test)('re-animation handling option canceling should cancel the ongoing animation', () => {
362
- let obj = { x: 0 };
363
- let animator = new animator_1.Animator(obj, 'x', {
364
- duration: 1,
365
- reAnimateHandling: animator_1.ReAnimateHandlingType.completePrevious
366
- }).attachToRoot();
367
- animator.animate({ x: 1 });
368
- animator.animate({ x: 2 });
369
- animator['update'](1);
370
- (0, vitest_1.expect)(obj.x).toEqual(2);
371
- });
372
- (0, vitest_1.test)('re-animation handling option canceling should cancel the ongoing multiple property animation', () => {
373
- let obj = { x: 0, y: 0 };
374
- let animator = new animator_1.Animator(obj, ['x', 'y'], {
375
- duration: 1,
376
- reAnimateHandling: animator_1.ReAnimateHandlingType.completePrevious
377
- }).attachToRoot();
378
- animator.animate({ x: 1 });
379
- animator.animate({ x: 2, y: 1 });
380
- animator['update'](1);
381
- (0, vitest_1.expect)(obj).toEqual({ x: 2, y: 1 });
382
- });
383
- (0, vitest_1.test)('re-animation handling option canceling should cancel the animation with keeping the current value', () => {
384
- let obj = { x: 0 };
385
- let animator = new animator_1.Animator(obj, 'x', {
386
- duration: 2,
387
- reAnimateHandling: animator_1.ReAnimateHandlingType.completePrevious
388
- }).attachToRoot();
389
- animator.animate({ x: 2 });
390
- animator['update'](1);
391
- animator.animate({ x: 3 });
392
- (0, vitest_1.expect)(obj.x).toEqual(1);
393
- animator['update'](1);
394
- (0, vitest_1.expect)(obj.x).toEqual(2);
395
- animator['update'](1);
396
- (0, vitest_1.expect)(obj.x).toEqual(3);
397
- });
398
- });
399
- (0, vitest_1.describe)('Set', () => {
400
- (0, vitest_1.test)('it should throw error if it is animating', () => {
401
- let animator = new animator_1.Animator({ x: 0 }, 'x', { duration: 1 }).attachToRoot();
402
- animator.animate({ x: 1 });
403
- (0, vitest_1.expect)(() => {
404
- animator.set({ x: 0 });
405
- }).toThrow();
406
- });
407
- (0, vitest_1.test)('it should throw error if the property is not valid', () => {
408
- let animator = new animator_1.Animator({ x: 0 }, 'x').attachToRoot();
409
- (0, vitest_1.expect)(() => {
410
- animator.set({ t: 0 });
411
- }).toThrow();
412
- });
413
- (0, vitest_1.test)('it should change the original value', () => {
414
- let obj = { x: 0, y: 1, z: 2 };
415
- let animator = new animator_1.Animator(obj, ['x', 'y', 'z']).attachToRoot();
416
- animator.set({ x: 3, y: 4 });
417
- (0, vitest_1.expect)(obj).toEqual({ x: 3, y: 4, z: 2 });
418
- });
419
- (0, vitest_1.test)('it should trigger onChange', () => {
420
- let obj = { x: 0 };
421
- let valueFromOnStep = 0;
422
- let onStepCallCount = 0;
423
- let animator = new animator_1.Animator(obj, 'x')
424
- .onChange(item => {
425
- valueFromOnStep = item.x;
426
- onStepCallCount++;
427
- })
428
- .attachToRoot();
429
- animator.set({ x: 1 });
430
- (0, vitest_1.expect)(valueFromOnStep).toEqual(1);
431
- (0, vitest_1.expect)(onStepCallCount).toEqual(1);
432
- });
433
- (0, vitest_1.test)('it should not trigger onChange if the value is the same', () => {
434
- let obj = { x: 0 };
435
- let onStepCallCount = 0;
436
- let animator = new animator_1.Animator(obj, 'x')
437
- .onChange(() => {
438
- onStepCallCount++;
439
- })
440
- .attachToRoot();
441
- animator.set({ x: 0 });
442
- (0, vitest_1.expect)(onStepCallCount).toEqual(0);
443
- });
444
- });
445
- (0, vitest_1.describe)('Reanimate', () => {
446
- (0, vitest_1.test)('reanimate ignore new animation', () => {
447
- let obj = { x: 0 };
448
- let animator = new animator_1.Animator(obj, 'x', {
449
- duration: 4,
450
- animation: new animations_1.AnimationLineer(),
451
- reAnimateHandling: animator_1.ReAnimateHandlingType.ignoreNewAnimation
452
- }).attachToRoot();
453
- animator.animate({ x: 1 });
454
- animator['update'](1);
455
- (0, vitest_1.expect)(obj.x).toEqual(0.25);
456
- animator.animate({ x: 0 });
457
- animator['update'](1);
458
- (0, vitest_1.expect)(obj.x).toEqual(0.5);
459
- });
460
- (0, vitest_1.test)('reanimate start new animation', () => {
461
- let obj = { x: 0 };
462
- let animator = new animator_1.Animator(obj, 'x', {
463
- duration: 4,
464
- animation: new animations_1.AnimationLineer(),
465
- reAnimateHandling: animator_1.ReAnimateHandlingType.completePrevious,
466
- completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.stayInCurrentState
467
- }).attachToRoot();
468
- animator.animate({ x: 1 });
469
- animator['update'](1);
470
- (0, vitest_1.expect)(obj.x).toEqual(0.25);
471
- animator.animate({ x: 0 });
472
- animator['update'](1);
473
- (0, vitest_1.expect)(obj.x).toEqual(0.1875);
474
- });
475
- });
476
- (0, vitest_1.describe)('Complete Animations', () => {
477
- (0, vitest_1.test)('when animation is done it should respect the complete animaitons option', () => {
478
- let obj = { x: 0 };
479
- let animator = new animator_1.Animator(obj, 'x', {
480
- duration: 1,
481
- animation: new animations_1.AnimationLineer(),
482
- completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.returnToOriginal
483
- }).attachToRoot();
484
- animator.animate({ x: 1 });
485
- animator['update'](1);
486
- (0, vitest_1.expect)(obj.x).toEqual(0);
487
- });
488
- (0, vitest_1.test)('complete animations should finalize the ongoing animation', async () => {
489
- let obj = { x: 0 };
490
- let completed = false;
491
- let animator = new animator_1.Animator(obj, 'x').attachToRoot();
492
- animator
493
- .animate({ x: 1 }, { duration: 4 })
494
- .tap(() => {
495
- completed = true;
496
- })
497
- .attachToRoot();
498
- animator['update'](1);
499
- await (0, helpers_lib_1.Wait)();
500
- (0, vitest_1.expect)(completed).toBeFalsy();
501
- animator.completeAnimations();
502
- await (0, helpers_lib_1.Wait)();
503
- (0, vitest_1.expect)(completed).toBeTruthy();
504
- });
505
- (0, vitest_1.test)('complete animations should finalize the all ongoing animations', async () => {
506
- let completed1 = false;
507
- let completed2 = false;
508
- let obj = { x: 0, y: 0 };
509
- let animator = new animator_1.Animator(obj, ['x', 'y'], { duration: 4, animation: new animations_1.AnimationEaseInOut() }).attachToRoot();
510
- animator
511
- .animate({ y: 10 }, { loop: true })
512
- .tap(() => {
513
- completed1 = true;
514
- })
515
- .attachToRoot();
516
- animator['update'](1);
517
- animator
518
- .animate({ x: 10 })
519
- .tap(() => {
520
- completed2 = true;
521
- })
522
- .attachToRoot();
523
- animator['update'](1);
524
- await (0, helpers_lib_1.Wait)();
525
- (0, vitest_1.expect)(completed1).toBeFalsy();
526
- (0, vitest_1.expect)(completed2).toBeFalsy();
527
- animator.completeAnimations();
528
- await (0, helpers_lib_1.Wait)();
529
- (0, vitest_1.expect)(completed1).toBeTruthy();
530
- (0, vitest_1.expect)(completed2).toBeTruthy();
531
- });
532
- (0, vitest_1.test)('complete animations stay in current state', async () => {
533
- let obj = { x: 0 };
534
- let animator = new animator_1.Animator(obj, 'x').attachToRoot();
535
- animator.animate({ x: 4 }, {
536
- duration: 4,
537
- animation: new animations_1.AnimationLineer(),
538
- completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.stayInCurrentState
539
- });
540
- animator['update'](1);
541
- await (0, helpers_lib_1.Wait)();
542
- (0, vitest_1.expect)(obj.x).toEqual(1);
543
- animator.completeAnimations();
544
- animator['update'](1);
545
- await (0, helpers_lib_1.Wait)();
546
- (0, vitest_1.expect)(obj.x).toEqual(1);
547
- });
548
- (0, vitest_1.test)('complete animations jump to end', async () => {
549
- let obj = { x: 0 };
550
- let animator = new animator_1.Animator(obj, 'x').attachToRoot();
551
- animator.animate({ x: 4 }, {
552
- duration: 4,
553
- animation: new animations_1.AnimationLineer(),
554
- completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.jumpToEnd
555
- });
556
- animator['update'](1);
557
- await (0, helpers_lib_1.Wait)();
558
- (0, vitest_1.expect)(obj.x).toEqual(1);
559
- animator.completeAnimations();
560
- animator['update'](1);
561
- await (0, helpers_lib_1.Wait)();
562
- (0, vitest_1.expect)(obj.x).toEqual(4);
563
- });
564
- (0, vitest_1.test)('complete animations return to original', async () => {
565
- let obj = { x: 0 };
566
- let animator = new animator_1.Animator(obj, 'x').attachToRoot();
567
- animator.animate({ x: 4 }, {
568
- duration: 4,
569
- animation: new animations_1.AnimationLineer(),
570
- completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.returnToOriginal
571
- });
572
- animator['update'](1);
573
- await (0, helpers_lib_1.Wait)();
574
- (0, vitest_1.expect)(obj.x).toEqual(1);
575
- animator.completeAnimations();
576
- animator['update'](1);
577
- await (0, helpers_lib_1.Wait)();
578
- (0, vitest_1.expect)(obj.x).toEqual(0);
579
- });
580
- (0, vitest_1.test)('complete animations options overriden in animate', async () => {
581
- let obj = { x: 0 };
582
- let animator = new animator_1.Animator(obj, 'x', {
583
- completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.returnToOriginal
584
- }).attachToRoot();
585
- animator.animate({ x: 4 }, {
586
- duration: 4,
587
- animation: new animations_1.AnimationLineer(),
588
- completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.jumpToEnd
589
- });
590
- animator['update'](1);
591
- await (0, helpers_lib_1.Wait)();
592
- (0, vitest_1.expect)(obj.x).toEqual(1);
593
- animator.completeAnimations();
594
- animator['update'](1);
595
- await (0, helpers_lib_1.Wait)();
596
- (0, vitest_1.expect)(obj.x).toEqual(4);
597
- });
598
- (0, vitest_1.test)('complete animations options overriden in complete animations funciton', async () => {
599
- let obj = { x: 0 };
600
- let animator = new animator_1.Animator(obj, 'x', {
601
- completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.returnToOriginal
602
- }).attachToRoot();
603
- animator.animate({ x: 4 }, {
604
- duration: 4,
605
- animation: new animations_1.AnimationLineer(),
606
- completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.jumpToEnd
607
- });
608
- animator['update'](1);
609
- await (0, helpers_lib_1.Wait)();
610
- (0, vitest_1.expect)(obj.x).toEqual(1);
611
- animator.completeAnimations(animator_1.CompleteAnimationsHandlingType.stayInCurrentState);
612
- animator['update'](1);
613
- await (0, helpers_lib_1.Wait)();
614
- (0, vitest_1.expect)(obj.x).toEqual(1);
615
- });
616
- (0, vitest_1.test)('complete animations should not trigger onChange at stay in current state', async () => {
617
- let obj = { x: 0 };
618
- let heap = [];
619
- let animator = new animator_1.Animator(obj, 'x', {
620
- duration: 4,
621
- completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.stayInCurrentState
622
- })
623
- .onChange(value => heap.push(value.x))
624
- .attachToRoot();
625
- animator.animate({ x: 1 });
626
- animator['update'](1);
627
- await (0, helpers_lib_1.Wait)();
628
- heap = [];
629
- animator.completeAnimations();
630
- await (0, helpers_lib_1.Wait)();
631
- (0, vitest_1.expect)(heap).toEqual([]);
632
- });
633
- (0, vitest_1.test)('complete animations should trigger onChange jump to end', async () => {
634
- let obj = { x: 0 };
635
- let heap = [];
636
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.jumpToEnd })
637
- .onChange(value => heap.push(value.x))
638
- .attachToRoot();
639
- animator.animate({ x: 1 });
640
- animator['update'](1);
641
- await (0, helpers_lib_1.Wait)();
642
- heap = [];
643
- animator.completeAnimations();
644
- await (0, helpers_lib_1.Wait)();
645
- (0, vitest_1.expect)(heap).toEqual([1]);
646
- });
647
- (0, vitest_1.test)('complete animations should trigger onChange return to original', async () => {
648
- let obj = { x: 0 };
649
- let heap = [];
650
- let animator = new animator_1.Animator(obj, 'x', {
651
- duration: 4,
652
- completeAnimationsHandling: animator_1.CompleteAnimationsHandlingType.returnToOriginal
653
- })
654
- .onChange(value => heap.push(value.x))
655
- .attachToRoot();
656
- animator.animate({ x: 1 });
657
- animator['update'](1);
658
- await (0, helpers_lib_1.Wait)();
659
- heap = [];
660
- animator.completeAnimations();
661
- await (0, helpers_lib_1.Wait)();
662
- (0, vitest_1.expect)(heap).toEqual([0]);
663
- });
664
- (0, vitest_1.test)('complete animations should not trigger on change if it is not animating', async () => {
665
- let completed = false;
666
- let animator = new animator_1.Animator({ x: 0 }, 'x')
667
- .onChange(() => {
668
- completed = true;
669
- })
670
- .attachToRoot();
671
- animator.completeAnimations();
672
- await (0, helpers_lib_1.Wait)();
673
- (0, vitest_1.expect)(completed).toBeFalsy();
674
- });
675
- (0, vitest_1.test)('complete animations should not trigger on change if the value change is already triggered', async () => {
676
- let obj = { x: 0 };
677
- let heap = [];
678
- let animator = new animator_1.Animator(obj, 'x', { duration: 2 }).onChange(value => heap.push(value.x)).attachToRoot();
679
- animator.animate({ x: 1 });
680
- animator['update'](1);
681
- await (0, helpers_lib_1.Wait)();
682
- animator.completeAnimations();
683
- await (0, helpers_lib_1.Wait)();
684
- (0, vitest_1.expect)(heap).toEqual([0.5]);
685
- });
686
- (0, vitest_1.test)('complete animations options should take effect with set', async () => {
687
- let obj = { x: 0 };
688
- let animator = new animator_1.Animator(obj, 'x', {
689
- duration: 4,
690
- animation: new animations_1.AnimationLineer(),
691
- reAnimateHandling: animator_1.ReAnimateHandlingType.completePrevious
692
- }).attachToRoot();
693
- animator.animate({ x: 4 });
694
- animator['update'](1);
695
- await (0, helpers_lib_1.Wait)();
696
- (0, vitest_1.expect)(obj.x).toEqual(1);
697
- animator.set({ x: 1 });
698
- animator['update'](1);
699
- await (0, helpers_lib_1.Wait)();
700
- (0, vitest_1.expect)(obj.x).toEqual(1);
701
- });
702
- });
703
- (0, vitest_1.describe)('Compete Callback', () => {
704
- (0, vitest_1.test)('complete callback should trigger when the animation is done', async () => {
705
- let obj = { x: 0 };
706
- let completed = false;
707
- let animator = new animator_1.Animator(obj, 'x', { duration: 1 }).onComplete(() => (completed = true)).attachToRoot();
708
- animator.animate({ x: 1 });
709
- animator['update'](1);
710
- await (0, helpers_lib_1.Wait)();
711
- (0, vitest_1.expect)(completed).toBeTruthy();
712
- });
713
- (0, vitest_1.test)('complete callback should not trigger when the animation is not done', async () => {
714
- let completed = false;
715
- let animator = new animator_1.Animator({ x: 0 }, 'x', { duration: 1 }).onComplete(() => (completed = true)).attachToRoot();
716
- animator.animate({ x: 1 });
717
- (0, vitest_1.expect)(completed).toBeFalsy();
718
- });
719
- (0, vitest_1.test)('re-animate should take action in complete callback', async () => {
720
- let obj = { x: 0 };
721
- let animator = new animator_1.Animator(obj, 'x', { duration: 2 }).attachToRoot();
722
- animator.onComplete(() => {
723
- animator.animate({ x: 0 });
724
- });
725
- animator.animate({ x: 1 });
726
- animator['update'](2);
727
- await (0, helpers_lib_1.Wait)();
728
- (0, vitest_1.expect)(obj.x).toEqual(1);
729
- animator['update'](1);
730
- await (0, helpers_lib_1.Wait)();
731
- (0, vitest_1.expect)(obj.x).toEqual(0.5);
732
- });
733
- });
734
- (0, vitest_1.describe)('Mixing Different Configurations', () => {
735
- (0, vitest_1.test)('animate multiple properties without mixing animation type', () => {
736
- let obj = { x: 0, y: 10 };
737
- let animator = new animator_1.Animator(obj, ['x', 'y'], { duration: 4, animation: new animations_1.AnimationEaseInOut() }).attachToRoot();
738
- animator.animate({ x: 10, y: 0 });
739
- animator['update'](1);
740
- (0, vitest_1.expect)(obj).toEqual({ x: 1.25, y: 8.75 });
741
- animator['update'](1);
742
- (0, vitest_1.expect)(obj).toEqual({ x: 5, y: 5 });
743
- animator['update'](1);
744
- (0, vitest_1.expect)(obj).toEqual({ x: 8.75, y: 1.25 });
745
- animator['update'](1);
746
- (0, vitest_1.expect)(obj).toEqual({ x: 10, y: 0 });
747
- });
748
- (0, vitest_1.test)('animate multiple properties with mixing animation type', () => {
749
- let obj = { x: 0, y: 4 };
750
- let animator = new animator_1.Animator(obj, ['x', 'y'], { duration: 4 }).attachToRoot();
751
- animator.animate({ x: 10 }, { animation: new animations_1.AnimationEaseInOut() });
752
- animator.animate({ y: 0 }, { animation: new animations_1.AnimationLineer() });
753
- animator['update'](1);
754
- (0, vitest_1.expect)(obj).toEqual({ x: 1.25, y: 3 });
755
- animator['update'](1);
756
- (0, vitest_1.expect)(obj).toEqual({ x: 5, y: 2 });
757
- animator['update'](1);
758
- (0, vitest_1.expect)(obj).toEqual({ x: 8.75, y: 1 });
759
- animator['update'](1);
760
- (0, vitest_1.expect)(obj).toEqual({ x: 10, y: 0 });
761
- });
762
- (0, vitest_1.test)('animate multiple properties async', () => {
763
- let obj = { x: 0, y: 0 };
764
- let animator = new animator_1.Animator(obj, ['x', 'y'], { duration: 4, animation: new animations_1.AnimationEaseInOut() }).attachToRoot();
765
- animator.animate({ y: 10 });
766
- animator['update'](1);
767
- (0, vitest_1.expect)(obj).toEqual({ x: 0, y: 1.25 });
768
- animator.animate({ x: 10 });
769
- animator['update'](1);
770
- (0, vitest_1.expect)(obj).toEqual({ x: 1.25, y: 5 });
771
- animator['update'](1);
772
- (0, vitest_1.expect)(obj).toEqual({ x: 5, y: 8.75 });
773
- animator['update'](1);
774
- (0, vitest_1.expect)(obj).toEqual({ x: 8.75, y: 10 });
775
- animator['update'](1);
776
- (0, vitest_1.expect)(obj).toEqual({ x: 10, y: 10 });
777
- });
778
- (0, vitest_1.test)('animate multiple properties mixed with loop', () => {
779
- let obj = { x: 0, y: 0 };
780
- let animator = new animator_1.Animator(obj, ['x', 'y'], { duration: 4, animation: new animations_1.AnimationEaseInOut() }).attachToRoot();
781
- animator.animate({ y: 10 }, { loop: true });
782
- animator['update'](1);
783
- (0, vitest_1.expect)(obj).toEqual({ x: 0, y: 1.25 });
784
- animator.animate({ x: 10 });
785
- animator['update'](1);
786
- (0, vitest_1.expect)(obj).toEqual({ x: 1.25, y: 5 });
787
- animator['update'](1);
788
- (0, vitest_1.expect)(obj).toEqual({ x: 5, y: 8.75 });
789
- animator['update'](1);
790
- (0, vitest_1.expect)(obj).toEqual({ x: 8.75, y: 0 });
791
- animator['update'](1);
792
- (0, vitest_1.expect)(obj).toEqual({ x: 10, y: 1.25 });
793
- animator['update'](1);
794
- (0, vitest_1.expect)(obj).toEqual({ x: 10, y: 5 });
795
- });
796
- (0, vitest_1.test)('animate multiple properties complete promise', async () => {
797
- let completed1 = false;
798
- let completed2 = false;
799
- let obj = { x: 0, y: 0 };
800
- let animator = new animator_1.Animator(obj, ['x', 'y'], { duration: 4 }).attachToRoot();
801
- animator
802
- .animate({ y: 10 })
803
- .tap(() => {
804
- completed1 = true;
805
- })
806
- .attachToRoot();
807
- animator['update'](1);
808
- animator
809
- .animate({ x: 10 })
810
- .tap(() => {
811
- completed2 = true;
812
- })
813
- .attachToRoot();
814
- animator['update'](2);
815
- await (0, helpers_lib_1.Wait)();
816
- (0, vitest_1.expect)(completed1).toBeFalsy();
817
- (0, vitest_1.expect)(completed2).toBeFalsy();
818
- animator['update'](1);
819
- await (0, helpers_lib_1.Wait)();
820
- (0, vitest_1.expect)(completed1).toBeTruthy();
821
- (0, vitest_1.expect)(completed2).toBeFalsy();
822
- animator['update'](1);
823
- await (0, helpers_lib_1.Wait)();
824
- (0, vitest_1.expect)(completed1).toBeTruthy();
825
- (0, vitest_1.expect)(completed2).toBeTruthy();
826
- });
827
- (0, vitest_1.test)('pause animations with mixed commands', async () => {
828
- let obj = { x: 0, y: 0 };
829
- let animator = new animator_1.Animator(obj, ['x', 'y'], { duration: 4, animation: new animations_1.AnimationLineer() }).attachToRoot();
830
- animator.resumeAnimations();
831
- animator.animate({ x: 4 });
832
- animator['update'](1);
833
- (0, vitest_1.expect)(obj).toEqual({ x: 1, y: 0 });
834
- animator['update'](1);
835
- (0, vitest_1.expect)(obj).toEqual({ x: 2, y: 0 });
836
- animator.pauseAnimations();
837
- animator['update'](1);
838
- (0, vitest_1.expect)(obj).toEqual({ x: 2, y: 0 });
839
- animator.pauseAnimations();
840
- animator.animate({ y: 4 });
841
- animator['update'](1);
842
- (0, vitest_1.expect)(obj).toEqual({ x: 2, y: 0 });
843
- animator.resumeAnimations();
844
- animator['update'](1);
845
- (0, vitest_1.expect)(obj).toEqual({ x: 3, y: 1 });
846
- animator.resumeAnimations();
847
- animator['update'](1);
848
- (0, vitest_1.expect)(obj).toEqual({ x: 4, y: 2 });
849
- });
850
- });
851
- (0, vitest_1.describe)('Update Cycle', () => {
852
- (0, vitest_1.test)('testing with update cycle', async () => {
853
- let obj = { x: 0 };
854
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, animation: new animations_1.AnimationLineer() }).attachToRoot();
855
- animator.animate({ x: 4 });
856
- game_entities_1.UpdateCycle.triggerUpdateTick(1);
857
- (0, vitest_1.expect)(obj.x).toEqual(1);
858
- game_entities_1.UpdateCycle.triggerUpdateTick(1);
859
- (0, vitest_1.expect)(obj.x).toEqual(2);
860
- game_entities_1.UpdateCycle.triggerUpdateTick(1);
861
- (0, vitest_1.expect)(obj.x).toEqual(3);
862
- game_entities_1.UpdateCycle.triggerUpdateTick(1);
863
- (0, vitest_1.expect)(obj.x).toEqual(4);
864
- });
865
- });
866
- (0, vitest_1.describe)('Destroyed Animator', () => {
867
- (0, vitest_1.test)('destroyed animator should not animate', async () => {
868
- let obj = { x: 0 };
869
- let animator = new animator_1.Animator(obj, 'x', { duration: 1, animation: new animations_1.AnimationLineer() }).attachToRoot();
870
- animator.destroy();
871
- game_entities_1.UpdateCycle.triggerUpdateTick(1);
872
- animator.animate({ x: 1 });
873
- game_entities_1.UpdateCycle.triggerUpdateTick(1);
874
- (0, vitest_1.expect)(obj.x).toEqual(0);
875
- });
876
- (0, vitest_1.test)('after destroy animation should not trigger complete', async () => {
877
- let obj = { x: 0 };
878
- let animator = new animator_1.Animator(obj, 'x', { duration: 1, animation: new animations_1.AnimationLineer() }).attachToRoot();
879
- let animation = animator.animate({ x: 1 });
880
- animator.destroy();
881
- let triggered = false;
882
- animation
883
- .tap(() => {
884
- triggered = true;
885
- })
886
- .attachToRoot();
887
- game_entities_1.UpdateCycle.triggerUpdateTick(1);
888
- (0, vitest_1.expect)(triggered).toBeFalsy();
889
- });
890
- (0, vitest_1.test)('destroying animator should destroy the animation that attached to that animator', () => {
891
- let obj = { x: 0 };
892
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, animation: new animations_1.AnimationLineer() }).attachToRoot();
893
- animator.animate({ x: 4 }).attach(animator);
894
- animator['update'](1);
895
- (0, vitest_1.expect)(obj.x).toEqual(1);
896
- animator['update'](1);
897
- (0, vitest_1.expect)(obj.x).toEqual(2);
898
- animator['update'](1);
899
- (0, vitest_1.expect)(obj.x).toEqual(3);
900
- animator.destroy();
901
- animator['update'](1);
902
- animator['update'](1);
903
- animator['update'](1);
904
- (0, vitest_1.expect)(obj.x).toEqual(3);
905
- });
906
- (0, vitest_1.test)('animation sequence destroys the animator that it is being attached to', () => {
907
- let obj = { x: 0 };
908
- let animator = new animator_1.Animator(obj, 'x', { duration: 4, animation: new animations_1.AnimationLineer() }).attachToRoot();
909
- animator
910
- .animate({ x: 4 })
911
- .tap(() => animator.destroy())
912
- .attach(animator);
913
- animator['update'](1);
914
- (0, vitest_1.expect)(obj.x).toEqual(1);
915
- (0, vitest_1.expect)(animator.destroyed).toBeFalsy();
916
- animator['update'](1);
917
- (0, vitest_1.expect)(obj.x).toEqual(2);
918
- (0, vitest_1.expect)(animator.destroyed).toBeFalsy();
919
- animator['update'](1);
920
- (0, vitest_1.expect)(obj.x).toEqual(3);
921
- (0, vitest_1.expect)(animator.destroyed).toBeFalsy();
922
- animator['update'](1);
923
- (0, vitest_1.expect)(obj.x).toEqual(4);
924
- (0, vitest_1.expect)(animator.destroyed).toBeTruthy();
925
- });
926
- });
927
- });
928
- //# sourceMappingURL=animator.test.js.map