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