bard-legends-framework 0.12.1 → 1.0.0-rc1
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,112 +0,0 @@
|
|
|
1
|
-
var __decorate =
|
|
2
|
-
(this && this.__decorate) ||
|
|
3
|
-
((decorators, target, key, desc) => {
|
|
4
|
-
var c = arguments.length,
|
|
5
|
-
r = c < 3 ? target : desc === null ? (desc = Object.getOwnPropertyDescriptor(target, key)) : desc,
|
|
6
|
-
d;
|
|
7
|
-
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function')
|
|
8
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
-
else
|
|
10
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
11
|
-
if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
13
|
-
});
|
|
14
|
-
var __metadata =
|
|
15
|
-
(this && this.__metadata) ||
|
|
16
|
-
((k, v) => {
|
|
17
|
-
if (typeof Reflect === 'object' && typeof Reflect.metadata === 'function') return Reflect.metadata(k, v);
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
20
|
-
exports.ExplosionService = void 0;
|
|
21
|
-
const helpers_lib_1 = require('helpers-lib');
|
|
22
|
-
const game_entities_1 = require('../../../../game-entities');
|
|
23
|
-
const physics_world_entity_1 = require('../../\uD83E\uDDCAentities/physics-world.entity');
|
|
24
|
-
const p2js_helper_1 = require('../../../libs/p2js.helper');
|
|
25
|
-
const ray_cast_hit_converter_1 = require('./helpers/ray-cast-hit-converter');
|
|
26
|
-
const test_visuals_service_1 = require('../test-visuals/test-visuals.service');
|
|
27
|
-
const ray_casting_service_1 = require('../ray-casting/ray-casting.service');
|
|
28
|
-
let ExplosionService = class ExplosionService {
|
|
29
|
-
constructor(rayCastingService, testVisualsService) {
|
|
30
|
-
this.rayCastingService = rayCastingService;
|
|
31
|
-
this.testVisualsService = testVisualsService;
|
|
32
|
-
}
|
|
33
|
-
createExplosion(physicsWorldId, explosionCenter, radius, physicsBodyGroup, severity, options) {
|
|
34
|
-
const physicsWorld = physics_world_entity_1.PhysicsWorldEntity.getInstanceByIdOrFail(physicsWorldId);
|
|
35
|
-
const totalCountOfRays = this.getTotalCountOfRays(radius);
|
|
36
|
-
const rayCasts = this.createRays(
|
|
37
|
-
explosionCenter,
|
|
38
|
-
radius,
|
|
39
|
-
physicsBodyGroup,
|
|
40
|
-
totalCountOfRays,
|
|
41
|
-
options?.hitOnlyClosest === true,
|
|
42
|
-
physicsWorld
|
|
43
|
-
);
|
|
44
|
-
const explosionHits = ray_cast_hit_converter_1.RayCastHitConverter.toExplosionHits(rayCasts);
|
|
45
|
-
this.applyForcesToBodies(explosionCenter, radius, severity, totalCountOfRays, explosionHits);
|
|
46
|
-
if (options?.testLayerId) {
|
|
47
|
-
this.testVisualsService.createExplosionDebugVisual(
|
|
48
|
-
physicsWorld,
|
|
49
|
-
options.testLayerId,
|
|
50
|
-
rayCasts,
|
|
51
|
-
explosionCenter,
|
|
52
|
-
radius,
|
|
53
|
-
options.debugRayDuration
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
return explosionHits;
|
|
57
|
-
}
|
|
58
|
-
createRays(explosionCenter, radius, physicsBodyGroup, totalCountOfRays, hitOnlyClosest, physicsWorld) {
|
|
59
|
-
const radianPerLine = new helpers_lib_1.Radian(helpers_lib_1.PI_360 / totalCountOfRays);
|
|
60
|
-
let directionVector = new helpers_lib_1.Vector(0, -radius);
|
|
61
|
-
const rotationVector = radianPerLine.toVector();
|
|
62
|
-
return helpers_lib_1.ArrayHelper.createEmptyArray(totalCountOfRays)
|
|
63
|
-
.map(() => {
|
|
64
|
-
const to = explosionCenter.add(directionVector);
|
|
65
|
-
directionVector = directionVector.rotate(rotationVector);
|
|
66
|
-
return new helpers_lib_1.Line(explosionCenter, to);
|
|
67
|
-
})
|
|
68
|
-
.map(line => {
|
|
69
|
-
if (hitOnlyClosest) {
|
|
70
|
-
const hit = this.rayCastingService.castClosest(physicsWorld, line, physicsBodyGroup);
|
|
71
|
-
return { line, hits: hit ? [hit] : [] };
|
|
72
|
-
} else {
|
|
73
|
-
const hits = this.rayCastingService.castAllFirstContacts(physicsWorld, line, physicsBodyGroup);
|
|
74
|
-
return { line, hits };
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
applyForcesToBodies(explosionCenter, radius, severity, totalCountOfRays, explosionHits) {
|
|
79
|
-
explosionHits.forEach(explosionHit => {
|
|
80
|
-
if (explosionHit.isExternal) {
|
|
81
|
-
explosionHit.raycastResults.forEach(rayCastResult => {
|
|
82
|
-
const force = severity * (1 - rayCastResult.fraction);
|
|
83
|
-
p2js_helper_1.P2JSHelper.pushBody(rayCastResult.body, rayCastResult.hitPosition(), rayCastResult.line.fromTo, force);
|
|
84
|
-
});
|
|
85
|
-
} else {
|
|
86
|
-
const vectorToCenter = helpers_lib_1.Vector.fromTo(
|
|
87
|
-
explosionCenter,
|
|
88
|
-
p2js_helper_1.P2JSHelper.arrayToVector(explosionHit.p2Body.position)
|
|
89
|
-
);
|
|
90
|
-
const fractionToCenter = vectorToCenter.length / radius;
|
|
91
|
-
const force = (severity * totalCountOfRays * fractionToCenter) / 2;
|
|
92
|
-
p2js_helper_1.P2JSHelper.pushBody(explosionHit.p2Body, explosionHit.getHitPosition(), vectorToCenter, force);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
getTotalCountOfRays(radius) {
|
|
97
|
-
if (radius > 100) {
|
|
98
|
-
return Math.floor(radius * 0.3);
|
|
99
|
-
} else {
|
|
100
|
-
return Math.floor(radius * 0.26 + 4);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
exports.ExplosionService = ExplosionService;
|
|
105
|
-
exports.ExplosionService = ExplosionService = __decorate(
|
|
106
|
-
[
|
|
107
|
-
(0, game_entities_1.ServiceDecorator)(),
|
|
108
|
-
__metadata('design:paramtypes', [ray_casting_service_1.RayCastingService, test_visuals_service_1.TestVisualsService])
|
|
109
|
-
],
|
|
110
|
-
ExplosionService
|
|
111
|
-
);
|
|
112
|
-
//# sourceMappingURL=explosion.service.js.map
|
package/dist/physics/module//360/237/223/220services/explosions/helpers/ray-cast-hit-converter.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="p2" />
|
|
2
|
-
import { ExplosionHit, RayCast } from '../../../⚜️gateways';
|
|
3
|
-
export interface ExplosionHitWithP2Body extends ExplosionHit {
|
|
4
|
-
p2Body: p2.Body;
|
|
5
|
-
}
|
|
6
|
-
export declare class RayCastHitConverter {
|
|
7
|
-
static toExplosionHits(rayCasts: RayCast[], allRaysStartingFromSamePosition?: boolean): ExplosionHitWithP2Body[];
|
|
8
|
-
private static convertRayResultGroupToExplosionHit;
|
|
9
|
-
}
|
package/dist/physics/module//360/237/223/220services/explosions/helpers/ray-cast-hit-converter.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
exports.RayCastHitConverter = void 0;
|
|
3
|
-
const helpers_lib_1 = require('helpers-lib');
|
|
4
|
-
const physics_entity_1 = require('../../../../entity-types/physics-entity');
|
|
5
|
-
const p2js_helper_1 = require('../../../../libs/p2js.helper');
|
|
6
|
-
class RayCastHitConverter {
|
|
7
|
-
static toExplosionHits(rayCasts, allRaysStartingFromSamePosition = true) {
|
|
8
|
-
const bodyToHitResults = new Map();
|
|
9
|
-
rayCasts.forEach(rayCast => {
|
|
10
|
-
rayCast.hits.forEach(rayCastHit => {
|
|
11
|
-
const previousRecord = bodyToHitResults.get(rayCastHit.body);
|
|
12
|
-
if (previousRecord) {
|
|
13
|
-
const closestRaycastResult =
|
|
14
|
-
rayCastHit.fraction < previousRecord.closestRaycastHit.fraction ? rayCastHit : previousRecord.closestRaycastHit;
|
|
15
|
-
previousRecord.rayCastHits.push(rayCastHit);
|
|
16
|
-
bodyToHitResults.set(rayCastHit.body, {
|
|
17
|
-
hitCount: previousRecord.hitCount + 1,
|
|
18
|
-
closestRaycastHit: closestRaycastResult,
|
|
19
|
-
rayCastHits: previousRecord.rayCastHits,
|
|
20
|
-
isExternal: allRaysStartingFromSamePosition
|
|
21
|
-
? previousRecord.isExternal
|
|
22
|
-
: previousRecord.isExternal && rayCastHit.isExternal(),
|
|
23
|
-
explosionCenter: rayCastHit.line.from
|
|
24
|
-
});
|
|
25
|
-
} else {
|
|
26
|
-
const isExternal = rayCastHit.isExternal();
|
|
27
|
-
bodyToHitResults.set(rayCastHit.body, {
|
|
28
|
-
hitCount: 1,
|
|
29
|
-
closestRaycastHit: rayCastHit,
|
|
30
|
-
rayCastHits: [rayCastHit],
|
|
31
|
-
isExternal,
|
|
32
|
-
explosionCenter: rayCastHit.line.from
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
return [...bodyToHitResults.values()].map(rayResultGroupOfABody =>
|
|
38
|
-
RayCastHitConverter.convertRayResultGroupToExplosionHit(rayResultGroupOfABody, rayCasts.length)
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
static convertRayResultGroupToExplosionHit(rayResultGroupOfABody, totalCountOfRays) {
|
|
42
|
-
const ratioOfHits = rayResultGroupOfABody.hitCount / totalCountOfRays;
|
|
43
|
-
const raycastResults = rayResultGroupOfABody.rayCastHits;
|
|
44
|
-
if (rayResultGroupOfABody.isExternal) {
|
|
45
|
-
return {
|
|
46
|
-
body: physics_entity_1.PhysicsEntity.getFromP2BodyIdOrFail(
|
|
47
|
-
rayResultGroupOfABody.closestRaycastHit.body.id
|
|
48
|
-
).convertToDTO(),
|
|
49
|
-
p2Body: rayResultGroupOfABody.closestRaycastHit.body,
|
|
50
|
-
isExternal: true,
|
|
51
|
-
normal: rayResultGroupOfABody.closestRaycastHit.normal,
|
|
52
|
-
fraction: rayResultGroupOfABody.closestRaycastHit.fraction,
|
|
53
|
-
ratioOfHits,
|
|
54
|
-
raycastResults,
|
|
55
|
-
getHitPosition: rayResultGroupOfABody.closestRaycastHit.hitPosition,
|
|
56
|
-
getHitDistance: rayResultGroupOfABody.closestRaycastHit.hitDistance
|
|
57
|
-
};
|
|
58
|
-
} else {
|
|
59
|
-
const bodyPosition = p2js_helper_1.P2JSHelper.arrayToVector(rayResultGroupOfABody.closestRaycastHit.body.position);
|
|
60
|
-
return {
|
|
61
|
-
body: physics_entity_1.PhysicsEntity.getFromP2BodyIdOrFail(
|
|
62
|
-
rayResultGroupOfABody.closestRaycastHit.body.id
|
|
63
|
-
).convertToDTO(),
|
|
64
|
-
p2Body: rayResultGroupOfABody.closestRaycastHit.body,
|
|
65
|
-
isExternal: false,
|
|
66
|
-
normal: helpers_lib_1.Vector.fromTo(bodyPosition, rayResultGroupOfABody.explosionCenter).normalize(),
|
|
67
|
-
fraction: 0,
|
|
68
|
-
ratioOfHits,
|
|
69
|
-
raycastResults,
|
|
70
|
-
getHitPosition: () => rayResultGroupOfABody.explosionCenter,
|
|
71
|
-
getHitDistance: () => 0
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.RayCastHitConverter = RayCastHitConverter;
|
|
77
|
-
//# sourceMappingURL=ray-cast-hit-converter.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="p2" />
|
|
2
|
-
import { ExplosionHit, RayCast } from '../../⚜️gateways';
|
|
3
|
-
export interface ExplosionHitWithP2Body extends ExplosionHit {
|
|
4
|
-
p2Body: p2.Body;
|
|
5
|
-
}
|
|
6
|
-
export declare class RayCastHitConverter {
|
|
7
|
-
static toExplosionHits(rayCasts: RayCast[], allRaysStartingFromSamePosition?: boolean): ExplosionHitWithP2Body[];
|
|
8
|
-
private static convertRayResultGroupToExplosionHit;
|
|
9
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
exports.RayCastHitConverter = void 0;
|
|
3
|
-
const helpers_lib_1 = require('helpers-lib');
|
|
4
|
-
const physics_entity_1 = require('../../../entity-types/physics-entity');
|
|
5
|
-
const p2js_helper_1 = require('../../../libs/p2js.helper');
|
|
6
|
-
class RayCastHitConverter {
|
|
7
|
-
static toExplosionHits(rayCasts, allRaysStartingFromSamePosition = true) {
|
|
8
|
-
const bodyToHitResults = new Map();
|
|
9
|
-
rayCasts.forEach(rayCast => {
|
|
10
|
-
rayCast.hits.forEach(rayCastHit => {
|
|
11
|
-
const previousRecord = bodyToHitResults.get(rayCastHit.body);
|
|
12
|
-
if (previousRecord) {
|
|
13
|
-
const closestRaycastResult =
|
|
14
|
-
rayCastHit.fraction < previousRecord.closestRaycastHit.fraction ? rayCastHit : previousRecord.closestRaycastHit;
|
|
15
|
-
previousRecord.rayCastHits.push(rayCastHit);
|
|
16
|
-
bodyToHitResults.set(rayCastHit.body, {
|
|
17
|
-
hitCount: previousRecord.hitCount + 1,
|
|
18
|
-
closestRaycastHit: closestRaycastResult,
|
|
19
|
-
rayCastHits: previousRecord.rayCastHits,
|
|
20
|
-
isExternal: allRaysStartingFromSamePosition
|
|
21
|
-
? previousRecord.isExternal
|
|
22
|
-
: previousRecord.isExternal && rayCastHit.isExternal(),
|
|
23
|
-
explosionCenter: rayCastHit.line.from
|
|
24
|
-
});
|
|
25
|
-
} else {
|
|
26
|
-
const isExternal = rayCastHit.isExternal();
|
|
27
|
-
bodyToHitResults.set(rayCastHit.body, {
|
|
28
|
-
hitCount: 1,
|
|
29
|
-
closestRaycastHit: rayCastHit,
|
|
30
|
-
rayCastHits: [rayCastHit],
|
|
31
|
-
isExternal,
|
|
32
|
-
explosionCenter: rayCastHit.line.from
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
return [...bodyToHitResults.values()].map(rayResultGroupOfABody =>
|
|
38
|
-
RayCastHitConverter.convertRayResultGroupToExplosionHit(rayResultGroupOfABody, rayCasts.length)
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
static convertRayResultGroupToExplosionHit(rayResultGroupOfABody, totalCountOfRays) {
|
|
42
|
-
const ratioOfHits = rayResultGroupOfABody.hitCount / totalCountOfRays;
|
|
43
|
-
const raycastResults = rayResultGroupOfABody.rayCastHits;
|
|
44
|
-
if (rayResultGroupOfABody.isExternal) {
|
|
45
|
-
return {
|
|
46
|
-
body: physics_entity_1.PhysicsEntity.getFromP2BodyIdOrFail(
|
|
47
|
-
rayResultGroupOfABody.closestRaycastHit.body.id
|
|
48
|
-
).convertToDTO(),
|
|
49
|
-
p2Body: rayResultGroupOfABody.closestRaycastHit.body,
|
|
50
|
-
isExternal: true,
|
|
51
|
-
normal: rayResultGroupOfABody.closestRaycastHit.normal,
|
|
52
|
-
fraction: rayResultGroupOfABody.closestRaycastHit.fraction,
|
|
53
|
-
ratioOfHits,
|
|
54
|
-
raycastResults,
|
|
55
|
-
getHitPosition: rayResultGroupOfABody.closestRaycastHit.hitPosition,
|
|
56
|
-
getHitDistance: rayResultGroupOfABody.closestRaycastHit.hitDistance
|
|
57
|
-
};
|
|
58
|
-
} else {
|
|
59
|
-
const bodyPosition = p2js_helper_1.P2JSHelper.arrayToVector(rayResultGroupOfABody.closestRaycastHit.body.position);
|
|
60
|
-
return {
|
|
61
|
-
body: physics_entity_1.PhysicsEntity.getFromP2BodyIdOrFail(
|
|
62
|
-
rayResultGroupOfABody.closestRaycastHit.body.id
|
|
63
|
-
).convertToDTO(),
|
|
64
|
-
p2Body: rayResultGroupOfABody.closestRaycastHit.body,
|
|
65
|
-
isExternal: false,
|
|
66
|
-
normal: helpers_lib_1.Vector.fromTo(bodyPosition, rayResultGroupOfABody.explosionCenter).normalize(),
|
|
67
|
-
fraction: 0,
|
|
68
|
-
ratioOfHits,
|
|
69
|
-
raycastResults,
|
|
70
|
-
getHitPosition: () => rayResultGroupOfABody.explosionCenter,
|
|
71
|
-
getHitDistance: () => 0
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.RayCastHitConverter = RayCastHitConverter;
|
|
77
|
-
//# sourceMappingURL=ray-cast-hit-converter.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Radian, Vector } from 'helpers-lib';
|
|
2
|
-
import { PhysicsBodyGroup } from '../../../libs/physics-body-groups';
|
|
3
|
-
import { ExplosionHit, PhysicsExplosionOptions } from '../../⚜️gateways';
|
|
4
|
-
import { RayCastingService } from '../ray-casting/ray-casting.service';
|
|
5
|
-
import { TestVisualsService } from '../test-visuals/test-visuals.service';
|
|
6
|
-
import { ImpactService } from './impact.service';
|
|
7
|
-
import { RayCastHitConverterService } from './ray-cast-hit-converter';
|
|
8
|
-
export declare class ElipticExplosionService {
|
|
9
|
-
private _rayCastingService;
|
|
10
|
-
private _testVisualsService;
|
|
11
|
-
private _rayCastHitConverterService;
|
|
12
|
-
private _impactService;
|
|
13
|
-
constructor(_rayCastingService: RayCastingService, _testVisualsService: TestVisualsService, _rayCastHitConverterService: RayCastHitConverterService, _impactService: ImpactService);
|
|
14
|
-
createElipticExplosion(physicsWorldID: number, explosionCenter: Vector, rotation: Radian, size: Vector, physicsBodyGroup: PhysicsBodyGroup, severity: number, options?: PhysicsExplosionOptions): ExplosionHit[];
|
|
15
|
-
private _createRays;
|
|
16
|
-
private _getWidthOfLine;
|
|
17
|
-
private _applyForcesToBodies;
|
|
18
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ElipticExplosionService = void 0;
|
|
13
|
-
const helpers_lib_1 = require("helpers-lib");
|
|
14
|
-
const game_entities_1 = require("../../../../game-entities");
|
|
15
|
-
const physics_world_entity_1 = require("../../\uD83E\uDDCAentities/physics-world.entity");
|
|
16
|
-
const ray_casting_service_1 = require("../ray-casting/ray-casting.service");
|
|
17
|
-
const test_visuals_service_1 = require("../test-visuals/test-visuals.service");
|
|
18
|
-
const impact_service_1 = require("./impact.service");
|
|
19
|
-
const ray_cast_hit_converter_1 = require("./ray-cast-hit-converter");
|
|
20
|
-
const MIN_GAP_BETWEEN_LINES = 15;
|
|
21
|
-
let ElipticExplosionService = class ElipticExplosionService {
|
|
22
|
-
constructor(_rayCastingService, _testVisualsService, _rayCastHitConverterService, _impactService) {
|
|
23
|
-
this._rayCastingService = _rayCastingService;
|
|
24
|
-
this._testVisualsService = _testVisualsService;
|
|
25
|
-
this._rayCastHitConverterService = _rayCastHitConverterService;
|
|
26
|
-
this._impactService = _impactService;
|
|
27
|
-
}
|
|
28
|
-
createElipticExplosion(physicsWorldID, explosionCenter, rotation, size, physicsBodyGroup, severity, options) {
|
|
29
|
-
let physicsWorld = physics_world_entity_1.PhysicsWorldEntity.getInstanceByIDOrFail(physicsWorldID);
|
|
30
|
-
let rayCasts = this._createRays(explosionCenter, rotation, size, physicsBodyGroup, options?.hitOnlyClosest === true, physicsWorld);
|
|
31
|
-
let explosionHitWithP2Bodies = this._rayCastHitConverterService.toExplosionHits(rayCasts, false);
|
|
32
|
-
this._applyForcesToBodies(explosionHitWithP2Bodies, severity);
|
|
33
|
-
if (options?.testLayerID) {
|
|
34
|
-
this._testVisualsService.createElipticExplosionDebugVisual(physicsWorld, options.testLayerID, rayCasts, explosionCenter, rotation, size, options.debugRayDuration);
|
|
35
|
-
}
|
|
36
|
-
return explosionHitWithP2Bodies.map(explosionHitWithP2Body => {
|
|
37
|
-
let { p2Body: _p2Body, ...explosionHit } = explosionHitWithP2Body;
|
|
38
|
-
return explosionHit;
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
_createRays(explosionCenter, rotation, size, physicsBodyGroup, hitOnlyClosest, physicsWorld) {
|
|
42
|
-
let lines = [];
|
|
43
|
-
let centerDirection = rotation.vector;
|
|
44
|
-
let lineDirection = rotation.add(helpers_lib_1.Radian.get90).vector;
|
|
45
|
-
let horizontalVector = lineDirection.normalize(size.x);
|
|
46
|
-
lines.push(new helpers_lib_1.Line(explosionCenter, explosionCenter.add(horizontalVector)));
|
|
47
|
-
lines.push(new helpers_lib_1.Line(explosionCenter, explosionCenter.add(horizontalVector.multiplyNumber(-1))));
|
|
48
|
-
let verticalVector = centerDirection.normalize(size.y);
|
|
49
|
-
lines.push(new helpers_lib_1.Line(explosionCenter, explosionCenter.add(verticalVector)));
|
|
50
|
-
lines.push(new helpers_lib_1.Line(explosionCenter, explosionCenter.add(verticalVector.multiplyNumber(-1))));
|
|
51
|
-
let lineCount = Math.round(size.y / MIN_GAP_BETWEEN_LINES);
|
|
52
|
-
let gap = (size.y / (lineCount * 2 + 1)) * 2;
|
|
53
|
-
let gapVector = centerDirection.normalize(gap);
|
|
54
|
-
let width = size.x;
|
|
55
|
-
let heightSquared = Math.pow(size.y, 2);
|
|
56
|
-
helpers_lib_1.ArrayHelper.createIntegerArray(lineCount).forEach(index => {
|
|
57
|
-
let distanceFromCenter = gap * (index + 1);
|
|
58
|
-
let distanceFromCenterVector = gapVector.multiplyNumber(index + 1);
|
|
59
|
-
let vector = lineDirection.normalize(this._getWidthOfLine(width, heightSquared, distanceFromCenter));
|
|
60
|
-
let center1 = explosionCenter.add(distanceFromCenterVector);
|
|
61
|
-
lines.push(new helpers_lib_1.Line(center1, center1.add(vector)));
|
|
62
|
-
lines.push(new helpers_lib_1.Line(center1, center1.add(vector.multiplyNumber(-1))));
|
|
63
|
-
let center2 = explosionCenter.add(distanceFromCenterVector.multiplyNumber(-1));
|
|
64
|
-
lines.push(new helpers_lib_1.Line(center2, center2.add(vector)));
|
|
65
|
-
lines.push(new helpers_lib_1.Line(center2, center2.add(vector.multiplyNumber(-1))));
|
|
66
|
-
});
|
|
67
|
-
return lines.map(line => {
|
|
68
|
-
if (hitOnlyClosest) {
|
|
69
|
-
let hit = this._rayCastingService.castClosest(physicsWorld, line, physicsBodyGroup);
|
|
70
|
-
return { line, hits: hit ? [hit] : [] };
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
let hits = this._rayCastingService.castAllFirstContacts(physicsWorld, line, physicsBodyGroup);
|
|
74
|
-
return { line, hits };
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
_getWidthOfLine(width, heightSquared, distanceFromCenter) {
|
|
79
|
-
return Math.sqrt(1 - Math.pow(distanceFromCenter, 2) / heightSquared) * width;
|
|
80
|
-
}
|
|
81
|
-
_applyForcesToBodies(explosionHits, severity) {
|
|
82
|
-
explosionHits.forEach(explosionHit => {
|
|
83
|
-
explosionHit.raycastResults.forEach(rayCastResult => {
|
|
84
|
-
let hitDirection;
|
|
85
|
-
let force;
|
|
86
|
-
if (rayCastResult.isExternal()) {
|
|
87
|
-
hitDirection = rayCastResult.line.fromTo;
|
|
88
|
-
force = severity * 2;
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
hitDirection = rayCastResult.line.fromTo.multiplyNumber(-1);
|
|
92
|
-
force = severity * (1 - rayCastResult.fraction) * 8;
|
|
93
|
-
}
|
|
94
|
-
this._impactService.applyImpulse(rayCastResult.body, rayCastResult.hitPosition(), hitDirection, force);
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
exports.ElipticExplosionService = ElipticExplosionService;
|
|
100
|
-
exports.ElipticExplosionService = ElipticExplosionService = __decorate([
|
|
101
|
-
(0, game_entities_1.ServiceDecorator)(),
|
|
102
|
-
__metadata("design:paramtypes", [ray_casting_service_1.RayCastingService,
|
|
103
|
-
test_visuals_service_1.TestVisualsService,
|
|
104
|
-
ray_cast_hit_converter_1.RayCastHitConverterService,
|
|
105
|
-
impact_service_1.ImpactService])
|
|
106
|
-
], ElipticExplosionService);
|
|
107
|
-
//# sourceMappingURL=eliptic-explosion.service.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Vector } from 'helpers-lib';
|
|
2
|
-
import { PhysicsBodyGroup } from '../../../libs/physics-body-groups';
|
|
3
|
-
import { ExplosionHit, PhysicsExplosionOptions } from '../../⚜️gateways';
|
|
4
|
-
import { RayCastingService } from '../ray-casting/ray-casting.service';
|
|
5
|
-
import { TestVisualsService } from '../test-visuals/test-visuals.service';
|
|
6
|
-
import { ImpactService } from './impact.service';
|
|
7
|
-
import { RayCastHitConverterService } from './ray-cast-hit-converter';
|
|
8
|
-
export declare class ExplosionService {
|
|
9
|
-
private _rayCastingService;
|
|
10
|
-
private _testVisualsService;
|
|
11
|
-
private _rayCastHitConverterService;
|
|
12
|
-
private _impactService;
|
|
13
|
-
constructor(_rayCastingService: RayCastingService, _testVisualsService: TestVisualsService, _rayCastHitConverterService: RayCastHitConverterService, _impactService: ImpactService);
|
|
14
|
-
createExplosion(physicsWorldID: number, explosionCenter: Vector, radius: number, physicsBodyGroup: PhysicsBodyGroup, severity: number, options?: PhysicsExplosionOptions): ExplosionHit[];
|
|
15
|
-
private _createRays;
|
|
16
|
-
private _applyForcesToBodies;
|
|
17
|
-
private _getTotalCountOfRays;
|
|
18
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ExplosionService = void 0;
|
|
13
|
-
const helpers_lib_1 = require("helpers-lib");
|
|
14
|
-
const game_entities_1 = require("../../../../game-entities");
|
|
15
|
-
const p2js_helper_1 = require("../../../libs/p2js.helper");
|
|
16
|
-
const physics_world_entity_1 = require("../../\uD83E\uDDCAentities/physics-world.entity");
|
|
17
|
-
const ray_casting_service_1 = require("../ray-casting/ray-casting.service");
|
|
18
|
-
const test_visuals_service_1 = require("../test-visuals/test-visuals.service");
|
|
19
|
-
const impact_service_1 = require("./impact.service");
|
|
20
|
-
const ray_cast_hit_converter_1 = require("./ray-cast-hit-converter");
|
|
21
|
-
let ExplosionService = class ExplosionService {
|
|
22
|
-
constructor(_rayCastingService, _testVisualsService, _rayCastHitConverterService, _impactService) {
|
|
23
|
-
this._rayCastingService = _rayCastingService;
|
|
24
|
-
this._testVisualsService = _testVisualsService;
|
|
25
|
-
this._rayCastHitConverterService = _rayCastHitConverterService;
|
|
26
|
-
this._impactService = _impactService;
|
|
27
|
-
}
|
|
28
|
-
createExplosion(physicsWorldID, explosionCenter, radius, physicsBodyGroup, severity, options) {
|
|
29
|
-
let physicsWorld = physics_world_entity_1.PhysicsWorldEntity.getInstanceByIDOrFail(physicsWorldID);
|
|
30
|
-
let totalCountOfRays = this._getTotalCountOfRays(radius);
|
|
31
|
-
let rayCasts = this._createRays(explosionCenter, radius, physicsBodyGroup, totalCountOfRays, options?.hitOnlyClosest === true, physicsWorld);
|
|
32
|
-
let explosionHits = this._rayCastHitConverterService.toExplosionHits(rayCasts);
|
|
33
|
-
this._applyForcesToBodies(explosionCenter, radius, severity, totalCountOfRays, explosionHits);
|
|
34
|
-
if (options?.testLayerID) {
|
|
35
|
-
this._testVisualsService.createExplosionDebugVisual(physicsWorld, options.testLayerID, rayCasts, explosionCenter, radius, options.debugRayDuration);
|
|
36
|
-
}
|
|
37
|
-
return explosionHits;
|
|
38
|
-
}
|
|
39
|
-
_createRays(explosionCenter, radius, physicsBodyGroup, totalCountOfRays, hitOnlyClosest, physicsWorld) {
|
|
40
|
-
let radianPerLine = new helpers_lib_1.Radian(helpers_lib_1.PI_360 / totalCountOfRays);
|
|
41
|
-
let directionVector = new helpers_lib_1.Vector(0, -radius);
|
|
42
|
-
let rotationVector = radianPerLine.vector;
|
|
43
|
-
return helpers_lib_1.ArrayHelper.createEmptyArray(totalCountOfRays)
|
|
44
|
-
.map(() => {
|
|
45
|
-
let to = explosionCenter.add(directionVector);
|
|
46
|
-
directionVector = directionVector.rotate(rotationVector);
|
|
47
|
-
return new helpers_lib_1.Line(explosionCenter, to);
|
|
48
|
-
})
|
|
49
|
-
.map(line => {
|
|
50
|
-
if (hitOnlyClosest) {
|
|
51
|
-
let hit = this._rayCastingService.castClosest(physicsWorld, line, physicsBodyGroup);
|
|
52
|
-
return { line, hits: hit ? [hit] : [] };
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
let hits = this._rayCastingService.castAllFirstContacts(physicsWorld, line, physicsBodyGroup);
|
|
56
|
-
return { line, hits };
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
_applyForcesToBodies(explosionCenter, radius, severity, totalCountOfRays, explosionHits) {
|
|
61
|
-
explosionHits.forEach(explosionHit => {
|
|
62
|
-
if (explosionHit.isExternal) {
|
|
63
|
-
explosionHit.raycastResults.forEach(rayCastResult => {
|
|
64
|
-
let force = severity * (1 - rayCastResult.fraction);
|
|
65
|
-
this._impactService.applyImpulse(rayCastResult.body, rayCastResult.hitPosition(), rayCastResult.line.fromTo, force);
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
let vectorToCenter = helpers_lib_1.Vector.fromTo(explosionCenter, p2js_helper_1.P2JSHelper.arrayToVector(explosionHit.p2Body.position));
|
|
70
|
-
let fractionToCenter = vectorToCenter.length / radius;
|
|
71
|
-
let force = (severity * totalCountOfRays * fractionToCenter) / 2;
|
|
72
|
-
this._impactService.applyImpulse(explosionHit.p2Body, explosionHit.getHitPosition(), vectorToCenter, force);
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
_getTotalCountOfRays(radius) {
|
|
77
|
-
if (radius > 100) {
|
|
78
|
-
return Math.floor(radius * 0.3);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
return Math.floor(radius * 0.26 + 4);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
exports.ExplosionService = ExplosionService;
|
|
86
|
-
exports.ExplosionService = ExplosionService = __decorate([
|
|
87
|
-
(0, game_entities_1.ServiceDecorator)(),
|
|
88
|
-
__metadata("design:paramtypes", [ray_casting_service_1.RayCastingService,
|
|
89
|
-
test_visuals_service_1.TestVisualsService,
|
|
90
|
-
ray_cast_hit_converter_1.RayCastHitConverterService,
|
|
91
|
-
impact_service_1.ImpactService])
|
|
92
|
-
], ExplosionService);
|
|
93
|
-
//# sourceMappingURL=explosion.service.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.ImpactService = void 0;
|
|
10
|
-
const game_entities_1 = require("../../../../game-entities");
|
|
11
|
-
const p2js_helper_1 = require("../../../libs/p2js.helper");
|
|
12
|
-
let ImpactService = class ImpactService {
|
|
13
|
-
applyImpulse(body, hitPosition, hitDirection, severity) {
|
|
14
|
-
let impulse = hitDirection.normalize(severity);
|
|
15
|
-
let relativePoint = [hitPosition.x - body.position[0], hitPosition.y - body.position[1]];
|
|
16
|
-
body.applyImpulse(p2js_helper_1.P2JSHelper.vectorToArray(impulse), relativePoint);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
exports.ImpactService = ImpactService;
|
|
20
|
-
exports.ImpactService = ImpactService = __decorate([
|
|
21
|
-
(0, game_entities_1.ServiceDecorator)()
|
|
22
|
-
], ImpactService);
|
|
23
|
-
//# sourceMappingURL=impact.service.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="p2" />
|
|
2
|
-
import { ExplosionHit, RayCast } from '../../⚜️gateways';
|
|
3
|
-
export interface ExplosionHitWithP2Body extends ExplosionHit {
|
|
4
|
-
p2Body: p2.Body;
|
|
5
|
-
}
|
|
6
|
-
export declare class RayCastHitConverterService {
|
|
7
|
-
toExplosionHits(rayCasts: RayCast[], allRaysStartingFromSamePosition?: boolean): ExplosionHitWithP2Body[];
|
|
8
|
-
private _convertRayResultGroupToExplosionHit;
|
|
9
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.RayCastHitConverterService = void 0;
|
|
10
|
-
const helpers_lib_1 = require("helpers-lib");
|
|
11
|
-
const game_entities_1 = require("../../../../game-entities");
|
|
12
|
-
const physics_entity_1 = require("../../../entity-types/physics-entity");
|
|
13
|
-
const p2js_helper_1 = require("../../../libs/p2js.helper");
|
|
14
|
-
let RayCastHitConverterService = class RayCastHitConverterService {
|
|
15
|
-
toExplosionHits(rayCasts, allRaysStartingFromSamePosition = true) {
|
|
16
|
-
let bodyToHitResults = new Map();
|
|
17
|
-
rayCasts.forEach(rayCast => {
|
|
18
|
-
rayCast.hits.forEach(rayCastHit => {
|
|
19
|
-
let previousRecord = bodyToHitResults.get(rayCastHit.body);
|
|
20
|
-
if (previousRecord) {
|
|
21
|
-
let closestRaycastResult = rayCastHit.fraction < previousRecord.closestRaycastHit.fraction ? rayCastHit : previousRecord.closestRaycastHit;
|
|
22
|
-
previousRecord.rayCastHits.push(rayCastHit);
|
|
23
|
-
bodyToHitResults.set(rayCastHit.body, {
|
|
24
|
-
hitCount: previousRecord.hitCount + 1,
|
|
25
|
-
closestRaycastHit: closestRaycastResult,
|
|
26
|
-
rayCastHits: previousRecord.rayCastHits,
|
|
27
|
-
isExternal: allRaysStartingFromSamePosition
|
|
28
|
-
? previousRecord.isExternal
|
|
29
|
-
: previousRecord.isExternal && rayCastHit.isExternal(),
|
|
30
|
-
explosionCenter: rayCastHit.line.from
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
let isExternal = rayCastHit.isExternal();
|
|
35
|
-
bodyToHitResults.set(rayCastHit.body, {
|
|
36
|
-
hitCount: 1,
|
|
37
|
-
closestRaycastHit: rayCastHit,
|
|
38
|
-
rayCastHits: [rayCastHit],
|
|
39
|
-
isExternal,
|
|
40
|
-
explosionCenter: rayCastHit.line.from
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
return [...bodyToHitResults.values()].map(rayResultGroupOfABody => this._convertRayResultGroupToExplosionHit(rayResultGroupOfABody, rayCasts.length));
|
|
46
|
-
}
|
|
47
|
-
_convertRayResultGroupToExplosionHit(rayResultGroupOfABody, totalCountOfRays) {
|
|
48
|
-
let ratioOfHits = rayResultGroupOfABody.hitCount / totalCountOfRays;
|
|
49
|
-
let raycastResults = rayResultGroupOfABody.rayCastHits;
|
|
50
|
-
if (rayResultGroupOfABody.isExternal) {
|
|
51
|
-
return {
|
|
52
|
-
body: physics_entity_1.PhysicsEntity.getFromP2BodyIDOrFail(rayResultGroupOfABody.closestRaycastHit.body.id).convertToDTO(),
|
|
53
|
-
p2Body: rayResultGroupOfABody.closestRaycastHit.body,
|
|
54
|
-
isExternal: true,
|
|
55
|
-
normal: rayResultGroupOfABody.closestRaycastHit.normal,
|
|
56
|
-
fraction: rayResultGroupOfABody.closestRaycastHit.fraction,
|
|
57
|
-
ratioOfHits,
|
|
58
|
-
raycastResults,
|
|
59
|
-
getHitPosition: rayResultGroupOfABody.closestRaycastHit.hitPosition,
|
|
60
|
-
getHitDistance: rayResultGroupOfABody.closestRaycastHit.hitDistance
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
let bodyPosition = p2js_helper_1.P2JSHelper.arrayToVector(rayResultGroupOfABody.closestRaycastHit.body.position);
|
|
65
|
-
return {
|
|
66
|
-
body: physics_entity_1.PhysicsEntity.getFromP2BodyIDOrFail(rayResultGroupOfABody.closestRaycastHit.body.id).convertToDTO(),
|
|
67
|
-
p2Body: rayResultGroupOfABody.closestRaycastHit.body,
|
|
68
|
-
isExternal: false,
|
|
69
|
-
normal: helpers_lib_1.Vector.fromTo(bodyPosition, rayResultGroupOfABody.explosionCenter).normalize(),
|
|
70
|
-
fraction: 0,
|
|
71
|
-
ratioOfHits,
|
|
72
|
-
raycastResults,
|
|
73
|
-
getHitPosition: () => rayResultGroupOfABody.explosionCenter,
|
|
74
|
-
getHitDistance: () => 0
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
exports.RayCastHitConverterService = RayCastHitConverterService;
|
|
80
|
-
exports.RayCastHitConverterService = RayCastHitConverterService = __decorate([
|
|
81
|
-
(0, game_entities_1.ServiceDecorator)()
|
|
82
|
-
], RayCastHitConverterService);
|
|
83
|
-
//# sourceMappingURL=ray-cast-hit-converter.js.map
|