@zylem/game-lib 0.4.1 → 0.5.1
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/README.md +23 -41
- package/dist/actions.d.ts +25 -0
- package/dist/actions.js +287 -8
- package/dist/actions.js.map +1 -0
- package/dist/behaviors.d.ts +108 -0
- package/dist/behaviors.js +396 -6
- package/dist/behaviors.js.map +1 -0
- package/dist/{lib/camera/zylem-camera.d.ts → camera-Dk-fOVZE.d.ts} +55 -8
- package/dist/camera.d.ts +5 -0
- package/dist/camera.js +504 -4
- package/dist/camera.js.map +1 -0
- package/dist/core-C2mjetAd.d.ts +431 -0
- package/dist/core.d.ts +9 -0
- package/dist/core.js +4780 -9
- package/dist/core.js.map +1 -0
- package/dist/entities.d.ts +269 -0
- package/dist/entities.js +2161 -17
- package/dist/entities.js.map +1 -0
- package/dist/entity-bQElAdpo.d.ts +347 -0
- package/dist/entity-spawner-DNnLYnZq.d.ts +11 -0
- package/dist/main.d.ts +135 -0
- package/dist/main.js +6599 -56
- package/dist/main.js.map +1 -0
- package/dist/moveable-B_vyA6cw.d.ts +67 -0
- package/dist/stage-CrmY7V0i.d.ts +287 -0
- package/dist/stage.d.ts +26 -0
- package/dist/stage.js +2229 -15
- package/dist/stage.js.map +1 -0
- package/dist/transformable-CUhvyuYO.d.ts +67 -0
- package/package.json +12 -42
- package/LICENSE +0 -21
- package/dist/.vite/manifest.json +0 -676
- package/dist/api/actions.d.ts +0 -5
- package/dist/api/actions.d.ts.map +0 -1
- package/dist/api/behaviors.d.ts +0 -4
- package/dist/api/behaviors.d.ts.map +0 -1
- package/dist/api/camera.d.ts +0 -4
- package/dist/api/camera.d.ts.map +0 -1
- package/dist/api/core.d.ts +0 -6
- package/dist/api/core.d.ts.map +0 -1
- package/dist/api/entities.d.ts +0 -9
- package/dist/api/entities.d.ts.map +0 -1
- package/dist/api/main.d.ts +0 -32
- package/dist/api/main.d.ts.map +0 -1
- package/dist/api/stage.d.ts +0 -6
- package/dist/api/stage.d.ts.map +0 -1
- package/dist/assets/zylem-logo.png +0 -0
- package/dist/lib/actions/behaviors/actions.d.ts +0 -11
- package/dist/lib/actions/behaviors/actions.d.ts.map +0 -1
- package/dist/lib/actions/behaviors/actions.js +0 -35
- package/dist/lib/actions/behaviors/behavior.d.ts +0 -6
- package/dist/lib/actions/behaviors/behavior.d.ts.map +0 -1
- package/dist/lib/actions/behaviors/boundaries/boundary.d.ts +0 -37
- package/dist/lib/actions/behaviors/boundaries/boundary.d.ts.map +0 -1
- package/dist/lib/actions/behaviors/boundaries/boundary.js +0 -40
- package/dist/lib/actions/behaviors/character-controller.d.ts +0 -6
- package/dist/lib/actions/behaviors/character-controller.d.ts.map +0 -1
- package/dist/lib/actions/behaviors/debug/debug-collision.d.ts +0 -6
- package/dist/lib/actions/behaviors/debug/debug-collision.d.ts.map +0 -1
- package/dist/lib/actions/behaviors/debug/debug-update.d.ts +0 -5
- package/dist/lib/actions/behaviors/debug/debug-update.d.ts.map +0 -1
- package/dist/lib/actions/behaviors/debug/debug.d.ts +0 -10
- package/dist/lib/actions/behaviors/debug/debug.d.ts.map +0 -1
- package/dist/lib/actions/behaviors/movement/movement-sequence-2d.d.ts +0 -24
- package/dist/lib/actions/behaviors/movement/movement-sequence-2d.d.ts.map +0 -1
- package/dist/lib/actions/behaviors/ricochet/ricochet-2d-collision.d.ts +0 -11
- package/dist/lib/actions/behaviors/ricochet/ricochet-2d-collision.d.ts.map +0 -1
- package/dist/lib/actions/behaviors/ricochet/ricochet-2d-collision.js +0 -100
- package/dist/lib/actions/behaviors/ricochet/ricochet-2d-in-bounds.d.ts +0 -12
- package/dist/lib/actions/behaviors/ricochet/ricochet-2d-in-bounds.d.ts.map +0 -1
- package/dist/lib/actions/behaviors/ricochet/ricochet-2d-in-bounds.js +0 -37
- package/dist/lib/actions/behaviors/ricochet/ricochet.d.ts +0 -44
- package/dist/lib/actions/behaviors/ricochet/ricochet.d.ts.map +0 -1
- package/dist/lib/actions/behaviors/ricochet/ricochet.js +0 -6
- package/dist/lib/actions/behaviors/zylem-behavior.d.ts +0 -2
- package/dist/lib/actions/behaviors/zylem-behavior.d.ts.map +0 -1
- package/dist/lib/actions/capabilities/moveable.d.ts +0 -125
- package/dist/lib/actions/capabilities/moveable.d.ts.map +0 -1
- package/dist/lib/actions/capabilities/moveable.js +0 -108
- package/dist/lib/actions/capabilities/rotatable.d.ts +0 -111
- package/dist/lib/actions/capabilities/rotatable.d.ts.map +0 -1
- package/dist/lib/actions/capabilities/rotatable.js +0 -82
- package/dist/lib/actions/capabilities/transformable.d.ts +0 -7
- package/dist/lib/actions/capabilities/transformable.d.ts.map +0 -1
- package/dist/lib/actions/capabilities/transformable.js +0 -9
- package/dist/lib/actions/global-change.d.ts +0 -23
- package/dist/lib/actions/global-change.d.ts.map +0 -1
- package/dist/lib/actions/global-change.js +0 -40
- package/dist/lib/camera/camera.d.ts +0 -16
- package/dist/lib/camera/camera.d.ts.map +0 -1
- package/dist/lib/camera/camera.js +0 -19
- package/dist/lib/camera/fixed-2d.d.ts +0 -32
- package/dist/lib/camera/fixed-2d.d.ts.map +0 -1
- package/dist/lib/camera/fixed-2d.js +0 -30
- package/dist/lib/camera/perspective.d.ts +0 -9
- package/dist/lib/camera/perspective.d.ts.map +0 -1
- package/dist/lib/camera/perspective.js +0 -10
- package/dist/lib/camera/third-person.d.ts +0 -32
- package/dist/lib/camera/third-person.d.ts.map +0 -1
- package/dist/lib/camera/third-person.js +0 -42
- package/dist/lib/camera/zylem-camera.d.ts.map +0 -1
- package/dist/lib/camera/zylem-camera.js +0 -208
- package/dist/lib/collision/collision-builder.d.ts +0 -17
- package/dist/lib/collision/collision-builder.d.ts.map +0 -1
- package/dist/lib/collision/collision-builder.js +0 -46
- package/dist/lib/collision/collision-delegate.d.ts +0 -6
- package/dist/lib/collision/collision-delegate.d.ts.map +0 -1
- package/dist/lib/collision/collision-delegate.js +0 -6
- package/dist/lib/collision/collision-group.d.ts +0 -11
- package/dist/lib/collision/collision-group.d.ts.map +0 -1
- package/dist/lib/collision/collision-mask.d.ts +0 -18
- package/dist/lib/collision/collision-mask.d.ts.map +0 -1
- package/dist/lib/collision/collision.d.ts +0 -19
- package/dist/lib/collision/collision.d.ts.map +0 -1
- package/dist/lib/collision/utils.d.ts +0 -15
- package/dist/lib/collision/utils.d.ts.map +0 -1
- package/dist/lib/collision/utils.js +0 -24
- package/dist/lib/collision/world.d.ts +0 -23
- package/dist/lib/collision/world.d.ts.map +0 -1
- package/dist/lib/collision/world.js +0 -77
- package/dist/lib/core/asset-manager.d.ts +0 -2
- package/dist/lib/core/asset-manager.d.ts.map +0 -1
- package/dist/lib/core/base-node-life-cycle.d.ts +0 -68
- package/dist/lib/core/base-node-life-cycle.d.ts.map +0 -1
- package/dist/lib/core/base-node.d.ts +0 -37
- package/dist/lib/core/base-node.d.ts.map +0 -1
- package/dist/lib/core/base-node.js +0 -62
- package/dist/lib/core/entity-asset-loader.d.ts +0 -16
- package/dist/lib/core/entity-asset-loader.d.ts.map +0 -1
- package/dist/lib/core/entity-asset-loader.js +0 -54
- package/dist/lib/core/errors.d.ts +0 -5
- package/dist/lib/core/errors.d.ts.map +0 -1
- package/dist/lib/core/flags.d.ts +0 -3
- package/dist/lib/core/flags.d.ts.map +0 -1
- package/dist/lib/core/index.d.ts +0 -5
- package/dist/lib/core/index.d.ts.map +0 -1
- package/dist/lib/core/lazy-loader.d.ts +0 -80
- package/dist/lib/core/lazy-loader.d.ts.map +0 -1
- package/dist/lib/core/lifecycle-base.d.ts +0 -17
- package/dist/lib/core/lifecycle-base.d.ts.map +0 -1
- package/dist/lib/core/lifecycle-base.js +0 -20
- package/dist/lib/core/preset-shader.d.ts +0 -8
- package/dist/lib/core/preset-shader.d.ts.map +0 -1
- package/dist/lib/core/preset-shader.js +0 -26
- package/dist/lib/core/three-addons/Timer.d.ts +0 -92
- package/dist/lib/core/three-addons/Timer.d.ts.map +0 -1
- package/dist/lib/core/three-addons/Timer.js +0 -103
- package/dist/lib/core/utility/nodes.d.ts +0 -13
- package/dist/lib/core/utility/nodes.d.ts.map +0 -1
- package/dist/lib/core/utility/nodes.js +0 -31
- package/dist/lib/core/utility/strings.d.ts +0 -3
- package/dist/lib/core/utility/strings.d.ts.map +0 -1
- package/dist/lib/core/utility/strings.js +0 -14
- package/dist/lib/core/utility/vector.d.ts +0 -8
- package/dist/lib/core/utility/vector.d.ts.map +0 -1
- package/dist/lib/core/utility/vector.js +0 -8
- package/dist/lib/core/vector.d.ts +0 -4
- package/dist/lib/core/vector.d.ts.map +0 -1
- package/dist/lib/core/vessel.d.ts +0 -13
- package/dist/lib/core/vessel.d.ts.map +0 -1
- package/dist/lib/core/vessel.js +0 -26
- package/dist/lib/debug/console/console-state.d.ts +0 -20
- package/dist/lib/debug/console/console-state.d.ts.map +0 -1
- package/dist/lib/debug/console/console-state.js +0 -11
- package/dist/lib/debug/console/console-store.d.ts +0 -6
- package/dist/lib/debug/console/console-store.d.ts.map +0 -1
- package/dist/lib/debug/debug-state.d.ts +0 -38
- package/dist/lib/debug/debug-state.d.ts.map +0 -1
- package/dist/lib/debug/debug-state.js +0 -40
- package/dist/lib/debug/debug-store.d.ts +0 -15
- package/dist/lib/debug/debug-store.d.ts.map +0 -1
- package/dist/lib/debug/state-based-debug-loader.d.ts +0 -8
- package/dist/lib/debug/state-based-debug-loader.d.ts.map +0 -1
- package/dist/lib/device/aspect-ratio.d.ts +0 -38
- package/dist/lib/device/aspect-ratio.d.ts.map +0 -1
- package/dist/lib/device/aspect-ratio.js +0 -44
- package/dist/lib/device/desktop.d.ts +0 -2
- package/dist/lib/device/desktop.d.ts.map +0 -1
- package/dist/lib/device/mobile.d.ts +0 -2
- package/dist/lib/device/mobile.d.ts.map +0 -1
- package/dist/lib/device/tablet.d.ts +0 -2
- package/dist/lib/device/tablet.d.ts.map +0 -1
- package/dist/lib/entities/actor.d.ts +0 -44
- package/dist/lib/entities/actor.d.ts.map +0 -1
- package/dist/lib/entities/actor.js +0 -122
- package/dist/lib/entities/box.d.ts +0 -27
- package/dist/lib/entities/box.d.ts.map +0 -1
- package/dist/lib/entities/box.js +0 -68
- package/dist/lib/entities/builder.d.ts +0 -28
- package/dist/lib/entities/builder.d.ts.map +0 -1
- package/dist/lib/entities/builder.js +0 -79
- package/dist/lib/entities/create.d.ts +0 -15
- package/dist/lib/entities/create.d.ts.map +0 -1
- package/dist/lib/entities/create.js +0 -31
- package/dist/lib/entities/delegates/animation.d.ts +0 -33
- package/dist/lib/entities/delegates/animation.d.ts.map +0 -1
- package/dist/lib/entities/delegates/animation.js +0 -58
- package/dist/lib/entities/delegates/debug.d.ts +0 -29
- package/dist/lib/entities/delegates/debug.d.ts.map +0 -1
- package/dist/lib/entities/delegates/debug.js +0 -71
- package/dist/lib/entities/delegates/loader.d.ts +0 -12
- package/dist/lib/entities/delegates/loader.d.ts.map +0 -1
- package/dist/lib/entities/delegates/loader.js +0 -19
- package/dist/lib/entities/destroy.d.ts +0 -4
- package/dist/lib/entities/destroy.d.ts.map +0 -1
- package/dist/lib/entities/destroy.js +0 -15
- package/dist/lib/entities/entity.d.ts +0 -96
- package/dist/lib/entities/entity.d.ts.map +0 -1
- package/dist/lib/entities/entity.js +0 -120
- package/dist/lib/entities/index.d.ts +0 -12
- package/dist/lib/entities/index.d.ts.map +0 -1
- package/dist/lib/entities/plane.d.ts +0 -36
- package/dist/lib/entities/plane.d.ts.map +0 -1
- package/dist/lib/entities/plane.js +0 -81
- package/dist/lib/entities/rect.d.ts +0 -63
- package/dist/lib/entities/rect.d.ts.map +0 -1
- package/dist/lib/entities/rect.js +0 -160
- package/dist/lib/entities/sphere.d.ts +0 -29
- package/dist/lib/entities/sphere.d.ts.map +0 -1
- package/dist/lib/entities/sphere.js +0 -68
- package/dist/lib/entities/sprite.d.ts +0 -53
- package/dist/lib/entities/sprite.d.ts.map +0 -1
- package/dist/lib/entities/sprite.js +0 -118
- package/dist/lib/entities/text.d.ts +0 -49
- package/dist/lib/entities/text.d.ts.map +0 -1
- package/dist/lib/entities/text.js +0 -140
- package/dist/lib/entities/zone.d.ts +0 -54
- package/dist/lib/entities/zone.d.ts.map +0 -1
- package/dist/lib/entities/zone.js +0 -103
- package/dist/lib/game/game-blueprint.d.ts +0 -38
- package/dist/lib/game/game-blueprint.d.ts.map +0 -1
- package/dist/lib/game/game-canvas.d.ts +0 -35
- package/dist/lib/game/game-canvas.d.ts.map +0 -1
- package/dist/lib/game/game-canvas.js +0 -57
- package/dist/lib/game/game-config.d.ts +0 -59
- package/dist/lib/game/game-config.d.ts.map +0 -1
- package/dist/lib/game/game-config.js +0 -78
- package/dist/lib/game/game-default.d.ts +0 -14
- package/dist/lib/game/game-default.d.ts.map +0 -1
- package/dist/lib/game/game-default.js +0 -23
- package/dist/lib/game/game-interfaces.d.ts +0 -29
- package/dist/lib/game/game-interfaces.d.ts.map +0 -1
- package/dist/lib/game/game-retro-resolutions.d.ts +0 -25
- package/dist/lib/game/game-retro-resolutions.d.ts.map +0 -1
- package/dist/lib/game/game-retro-resolutions.js +0 -80
- package/dist/lib/game/game-state.d.ts +0 -11
- package/dist/lib/game/game-state.d.ts.map +0 -1
- package/dist/lib/game/game-state.js +0 -17
- package/dist/lib/game/game.d.ts +0 -37
- package/dist/lib/game/game.d.ts.map +0 -1
- package/dist/lib/game/game.js +0 -109
- package/dist/lib/game/zylem-game.d.ts +0 -58
- package/dist/lib/game/zylem-game.d.ts.map +0 -1
- package/dist/lib/game/zylem-game.js +0 -140
- package/dist/lib/graphics/geometries/XZPlaneGeometry.d.ts +0 -8
- package/dist/lib/graphics/geometries/XZPlaneGeometry.d.ts.map +0 -1
- package/dist/lib/graphics/geometries/XZPlaneGeometry.js +0 -34
- package/dist/lib/graphics/material.d.ts +0 -29
- package/dist/lib/graphics/material.d.ts.map +0 -1
- package/dist/lib/graphics/material.js +0 -64
- package/dist/lib/graphics/mesh.d.ts +0 -19
- package/dist/lib/graphics/mesh.d.ts.map +0 -1
- package/dist/lib/graphics/mesh.js +0 -14
- package/dist/lib/graphics/render-pass.d.ts +0 -17
- package/dist/lib/graphics/render-pass.d.ts.map +0 -1
- package/dist/lib/graphics/render-pass.js +0 -56
- package/dist/lib/graphics/shaders/fragment/debug.glsl.js +0 -23
- package/dist/lib/graphics/shaders/fragment/fire.glsl.js +0 -52
- package/dist/lib/graphics/shaders/fragment/standard.glsl.js +0 -11
- package/dist/lib/graphics/shaders/fragment/stars.glsl.js +0 -44
- package/dist/lib/graphics/shaders/vertex/debug.glsl.js +0 -15
- package/dist/lib/graphics/shaders/vertex/object-shader.glsl.js +0 -11
- package/dist/lib/graphics/shaders/vertex/standard.glsl.js +0 -9
- package/dist/lib/graphics/zylem-scene.d.ts +0 -50
- package/dist/lib/graphics/zylem-scene.d.ts.map +0 -1
- package/dist/lib/graphics/zylem-scene.js +0 -75
- package/dist/lib/input/gamepad-provider.d.ts +0 -14
- package/dist/lib/input/gamepad-provider.d.ts.map +0 -1
- package/dist/lib/input/gamepad-provider.js +0 -58
- package/dist/lib/input/input-manager.d.ts +0 -15
- package/dist/lib/input/input-manager.d.ts.map +0 -1
- package/dist/lib/input/input-manager.js +0 -70
- package/dist/lib/input/input-provider.d.ts +0 -7
- package/dist/lib/input/input-provider.d.ts.map +0 -1
- package/dist/lib/input/input.d.ts +0 -48
- package/dist/lib/input/input.d.ts.map +0 -1
- package/dist/lib/input/keyboard-provider.d.ts +0 -21
- package/dist/lib/input/keyboard-provider.d.ts.map +0 -1
- package/dist/lib/input/keyboard-provider.js +0 -120
- package/dist/lib/interfaces/entity.d.ts +0 -26
- package/dist/lib/interfaces/entity.d.ts.map +0 -1
- package/dist/lib/sounds/index.d.ts +0 -3
- package/dist/lib/sounds/index.d.ts.map +0 -1
- package/dist/lib/sounds/ping-pong-sound.d.ts +0 -5
- package/dist/lib/sounds/ping-pong-sound.d.ts.map +0 -1
- package/dist/lib/sounds/ricochet-sound.d.ts +0 -5
- package/dist/lib/sounds/ricochet-sound.d.ts.map +0 -1
- package/dist/lib/stage/debug-entity-cursor.d.ts +0 -24
- package/dist/lib/stage/debug-entity-cursor.d.ts.map +0 -1
- package/dist/lib/stage/debug-entity-cursor.js +0 -53
- package/dist/lib/stage/entity-spawner.d.ts +0 -9
- package/dist/lib/stage/entity-spawner.d.ts.map +0 -1
- package/dist/lib/stage/entity-spawner.js +0 -27
- package/dist/lib/stage/stage-blueprint.d.ts +0 -45
- package/dist/lib/stage/stage-blueprint.d.ts.map +0 -1
- package/dist/lib/stage/stage-blueprint.js +0 -56
- package/dist/lib/stage/stage-camera-debug-delegate.d.ts +0 -14
- package/dist/lib/stage/stage-camera-debug-delegate.d.ts.map +0 -1
- package/dist/lib/stage/stage-debug-delegate.d.ts +0 -26
- package/dist/lib/stage/stage-debug-delegate.d.ts.map +0 -1
- package/dist/lib/stage/stage-debug-delegate.js +0 -100
- package/dist/lib/stage/stage-default.d.ts +0 -3
- package/dist/lib/stage/stage-default.d.ts.map +0 -1
- package/dist/lib/stage/stage-default.js +0 -32
- package/dist/lib/stage/stage-state.d.ts +0 -14
- package/dist/lib/stage/stage-state.d.ts.map +0 -1
- package/dist/lib/stage/stage-state.js +0 -36
- package/dist/lib/stage/stage.d.ts +0 -33
- package/dist/lib/stage/stage.d.ts.map +0 -1
- package/dist/lib/stage/stage.js +0 -60
- package/dist/lib/stage/zylem-stage.d.ts +0 -128
- package/dist/lib/stage/zylem-stage.d.ts.map +0 -1
- package/dist/lib/stage/zylem-stage.js +0 -268
- package/dist/lib/systems/test-system.d.ts +0 -2
- package/dist/lib/systems/test-system.d.ts.map +0 -1
- package/dist/lib/systems/transformable.system.d.ts +0 -25
- package/dist/lib/systems/transformable.system.d.ts.map +0 -1
- package/dist/lib/systems/transformable.system.js +0 -43
- package/dist/lib/types/entity-types.d.ts +0 -24
- package/dist/lib/types/entity-types.d.ts.map +0 -1
- package/dist/lib/types/index.d.ts +0 -3
- package/dist/lib/types/index.d.ts.map +0 -1
- package/dist/lib/types/stage-types.d.ts +0 -26
- package/dist/lib/types/stage-types.d.ts.map +0 -1
- package/dist/lib/ui/Debug.d.ts +0 -6
- package/dist/lib/ui/Debug.d.ts.map +0 -1
- package/dist/lib/ui/console/Console.d.ts +0 -7
- package/dist/lib/ui/console/Console.d.ts.map +0 -1
- package/dist/lib/ui/debug-panel/AccordionMenu.d.ts +0 -7
- package/dist/lib/ui/debug-panel/AccordionMenu.d.ts.map +0 -1
- package/dist/lib/ui/debug-panel/Menu.d.ts +0 -6
- package/dist/lib/ui/debug-panel/Menu.d.ts.map +0 -1
- package/dist/lib/ui/debug-panel/sections/EntitiesSection.d.ts +0 -4
- package/dist/lib/ui/debug-panel/sections/EntitiesSection.d.ts.map +0 -1
- package/dist/lib/ui/debug-panel/sections/GameSection.d.ts +0 -3
- package/dist/lib/ui/debug-panel/sections/GameSection.d.ts.map +0 -1
- package/dist/lib/ui/debug-panel/sections/StagesSection.d.ts +0 -3
- package/dist/lib/ui/debug-panel/sections/StagesSection.d.ts.map +0 -1
- package/dist/lib/ui/debug-panel/sections/all.d.ts +0 -4
- package/dist/lib/ui/debug-panel/sections/all.d.ts.map +0 -1
- package/dist/lib/ui/toolbar/Toolbar.d.ts +0 -6
- package/dist/lib/ui/toolbar/Toolbar.d.ts.map +0 -1
- package/dist/tests/integration/debug.sim.spec.d.ts +0 -2
- package/dist/tests/integration/debug.sim.spec.d.ts.map +0 -1
- package/dist/tests/unit/collision/collision.spec.d.ts +0 -2
- package/dist/tests/unit/collision/collision.spec.d.ts.map +0 -1
- package/dist/tests/unit/core/game.spec.d.ts +0 -2
- package/dist/tests/unit/core/game.spec.d.ts.map +0 -1
- package/dist/tests/unit/core/stage.spec.d.ts +0 -2
- package/dist/tests/unit/core/stage.spec.d.ts.map +0 -1
- package/dist/tests/unit/core/vessel.spec.d.ts +0 -2
- package/dist/tests/unit/core/vessel.spec.d.ts.map +0 -1
package/dist/api/actions.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export * as actions from '../lib/actions/behaviors/actions';
|
|
2
|
-
export { makeMoveable } from '../lib/actions/capabilities/moveable';
|
|
3
|
-
export { makeRotatable } from '../lib/actions/capabilities/rotatable';
|
|
4
|
-
export { makeTransformable } from '../lib/actions/capabilities/transformable';
|
|
5
|
-
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/api/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC"}
|
package/dist/api/behaviors.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { boundary2d } from '../lib/actions/behaviors/boundaries/boundary';
|
|
2
|
-
export { ricochet2DInBounds } from '../lib/actions/behaviors/ricochet/ricochet-2d-in-bounds';
|
|
3
|
-
export { ricochet2DCollision } from '../lib/actions/behaviors/ricochet/ricochet-2d-collision';
|
|
4
|
-
//# sourceMappingURL=behaviors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"behaviors.d.ts","sourceRoot":"","sources":["../../src/api/behaviors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC"}
|
package/dist/api/camera.d.ts
DELETED
package/dist/api/camera.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../../src/api/camera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/api/core.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { createGame } from '../lib/game/game';
|
|
2
|
-
export type { ZylemGameConfig } from '../lib/game/game-interfaces';
|
|
3
|
-
export { vessel } from '../lib/core/vessel';
|
|
4
|
-
export type { Vect3 } from '../lib/core/utility/vector';
|
|
5
|
-
export { globalChange, globalChanges, variableChange, variableChanges } from '../lib/actions/global-change';
|
|
6
|
-
//# sourceMappingURL=core.d.ts.map
|
package/dist/api/core.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/api/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,YAAY,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/api/entities.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { box, ZylemBox } from '../lib/entities/box';
|
|
2
|
-
export { sphere } from '../lib/entities/sphere';
|
|
3
|
-
export { sprite } from '../lib/entities/sprite';
|
|
4
|
-
export { plane } from '../lib/entities/plane';
|
|
5
|
-
export { zone } from '../lib/entities/zone';
|
|
6
|
-
export { actor } from '../lib/entities/actor';
|
|
7
|
-
export { text } from '../lib/entities/text';
|
|
8
|
-
export { rect } from '../lib/entities/rect';
|
|
9
|
-
//# sourceMappingURL=entities.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/api/entities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/api/main.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export { createGame } from '../lib/game/game';
|
|
2
|
-
export type { ZylemGameConfig } from '../lib/game/game-interfaces';
|
|
3
|
-
export { gameConfig } from '../lib/game/game-config';
|
|
4
|
-
export { stage } from '../lib/stage/stage';
|
|
5
|
-
export { entitySpawner } from '../lib/stage/entity-spawner';
|
|
6
|
-
export type { StageOptions } from '../lib/stage/zylem-stage';
|
|
7
|
-
export { vessel } from '../lib/core/vessel';
|
|
8
|
-
export { camera } from '../lib/camera/camera';
|
|
9
|
-
export type { PerspectiveType } from '../lib/camera/perspective';
|
|
10
|
-
export { Perspectives } from '../lib/camera/perspective';
|
|
11
|
-
export type { Vect3 } from '../lib/core/utility/vector';
|
|
12
|
-
export { box } from '../lib/entities/box';
|
|
13
|
-
export { sphere } from '../lib/entities/sphere';
|
|
14
|
-
export { sprite } from '../lib/entities/sprite';
|
|
15
|
-
export { plane } from '../lib/entities/plane';
|
|
16
|
-
export { zone } from '../lib/entities/zone';
|
|
17
|
-
export { actor } from '../lib/entities/actor';
|
|
18
|
-
export { text } from '../lib/entities/text';
|
|
19
|
-
export { rect } from '../lib/entities/rect';
|
|
20
|
-
export { ZylemBox } from '../lib/entities/box';
|
|
21
|
-
export { makeMoveable } from '../lib/actions/capabilities/moveable';
|
|
22
|
-
export { makeRotatable } from '../lib/actions/capabilities/rotatable';
|
|
23
|
-
export { makeTransformable } from '../lib/actions/capabilities/transformable';
|
|
24
|
-
export { ricochet2DInBounds } from '../lib/actions/behaviors/ricochet/ricochet-2d-in-bounds';
|
|
25
|
-
export { ricochet2DCollision } from '../lib/actions/behaviors/ricochet/ricochet-2d-collision';
|
|
26
|
-
export { boundary2d } from '../lib/actions/behaviors/boundaries/boundary';
|
|
27
|
-
export { destroy } from '../lib/entities/destroy';
|
|
28
|
-
export { Howl } from 'howler';
|
|
29
|
-
export * as THREE from 'three';
|
|
30
|
-
export * as RAPIER from '@dimforge/rapier3d-compat';
|
|
31
|
-
export { globalChange, globalChanges, variableChange, variableChanges } from '../lib/actions/global-change';
|
|
32
|
-
//# sourceMappingURL=main.d.ts.map
|
package/dist/api/main.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/api/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,YAAY,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGxD,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAG9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAG1E,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGlD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/api/stage.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { stage } from '../lib/stage/stage';
|
|
2
|
-
export { entitySpawner } from '../lib/stage/entity-spawner';
|
|
3
|
-
export type { StageOptions } from '../lib/stage/zylem-stage';
|
|
4
|
-
export { stageBlueprintsState, createStageBlueprint, upsertStageBlueprint, removeStageBlueprint, getStageBlueprint, listStageBlueprints, setCurrentStageBlueprint, getCurrentStageBlueprint, buildStageFromBlueprint, resetStageBlueprints, } from '../lib/stage/stage-blueprint';
|
|
5
|
-
export type { StageBlueprint } from '../lib/stage/stage-blueprint';
|
|
6
|
-
//# sourceMappingURL=stage.d.ts.map
|
package/dist/api/stage.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../src/api/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,GACpB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC"}
|
|
Binary file
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare function wait(delay: number, callback: Function): void;
|
|
2
|
-
export declare const actionOnPress: (isPressed: boolean, callback: Function) => void;
|
|
3
|
-
export declare const actionOnRelease: (isPressed: boolean, callback: Function) => void;
|
|
4
|
-
type CooldownOptions = {
|
|
5
|
-
timer: number;
|
|
6
|
-
immediate?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare const actionWithCooldown: ({ timer, immediate }: CooldownOptions, callback: Function, update: Function) => void;
|
|
9
|
-
export declare const actionWithThrottle: (timer: number, callback: Function) => void;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/behaviors/actions.ts"],"names":[],"mappings":"AAEA,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,QAGrD;AAED,eAAO,MAAM,aAAa,cAGN,OAAO,YAAY,QAAQ,SAQ3C,CAAC;AAEL,eAAO,MAAM,eAAe,cAGR,OAAO,YAAY,QAAQ,SAQ3C,CAAC;AAEL,KAAK,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9D,eAAO,MAAM,kBAAkB,yBAIO,eAAe,YAAY,QAAQ,UAAU,QAAQ,SAgBvF,CAAC;AAEL,eAAO,MAAM,kBAAkB,UAGf,MAAM,YAAY,QAAQ,SAStC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
function s(t, e) {
|
|
2
|
-
setTimeout(e, t);
|
|
3
|
-
}
|
|
4
|
-
const c = /* @__PURE__ */ (() => {
|
|
5
|
-
let t = !1;
|
|
6
|
-
return (e, n) => {
|
|
7
|
-
e && !t ? (t = !0, n()) : e || (t = !1);
|
|
8
|
-
};
|
|
9
|
-
})(), u = /* @__PURE__ */ (() => {
|
|
10
|
-
let t = !1;
|
|
11
|
-
return (e, n) => {
|
|
12
|
-
!e && t ? (t = !1, n()) : e && (t = !0);
|
|
13
|
-
};
|
|
14
|
-
})(), f = /* @__PURE__ */ (() => {
|
|
15
|
-
let t = -1 / 0, e = !1;
|
|
16
|
-
return ({ timer: n, immediate: o = !0 }, l, r) => {
|
|
17
|
-
let i = Date.now();
|
|
18
|
-
!e && !o && (e = !0, t = i);
|
|
19
|
-
const a = i - t;
|
|
20
|
-
a >= n && (t = i, l()), r({ delta: a });
|
|
21
|
-
};
|
|
22
|
-
})(), m = /* @__PURE__ */ (() => {
|
|
23
|
-
let t = 0;
|
|
24
|
-
return (e, n) => {
|
|
25
|
-
const o = Date.now();
|
|
26
|
-
o - t >= e && (t = o, n());
|
|
27
|
-
};
|
|
28
|
-
})();
|
|
29
|
-
export {
|
|
30
|
-
c as actionOnPress,
|
|
31
|
-
u as actionOnRelease,
|
|
32
|
-
f as actionWithCooldown,
|
|
33
|
-
m as actionWithThrottle,
|
|
34
|
-
s as wait
|
|
35
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"behavior.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/behaviors/behavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,WAAW,QAAQ;IACxB,SAAS,EAAE,UAAU,CAAC;IACtB,MAAM,EAAE,GAAG,CAAC;CACZ"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { UpdateContext } from "../../../core/base-node-life-cycle";
|
|
2
|
-
import { MoveableEntity } from "../../capabilities/moveable";
|
|
3
|
-
import { Vector } from "@dimforge/rapier3d-compat";
|
|
4
|
-
import { BehaviorCallbackType } from "../../../entities/entity";
|
|
5
|
-
export interface BoundaryEvent {
|
|
6
|
-
me: MoveableEntity;
|
|
7
|
-
boundary: BoundaryHits;
|
|
8
|
-
position: Vector;
|
|
9
|
-
updateContext: UpdateContext<MoveableEntity>;
|
|
10
|
-
}
|
|
11
|
-
export interface BoundaryOptions {
|
|
12
|
-
boundaries: {
|
|
13
|
-
top: number;
|
|
14
|
-
bottom: number;
|
|
15
|
-
left: number;
|
|
16
|
-
right: number;
|
|
17
|
-
};
|
|
18
|
-
onBoundary?: (event: BoundaryEvent) => void;
|
|
19
|
-
stopMovement?: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Checks if the entity has hit a boundary and stops its movement if it has
|
|
23
|
-
*
|
|
24
|
-
* @param options Configuration options for the boundary behavior
|
|
25
|
-
* @param options.boundaries The boundaries of the stage
|
|
26
|
-
* @param options.onBoundary A callback function that is called when the entity hits a boundary
|
|
27
|
-
* @param options.stopMovement Whether to stop the entity's movement when it hits a boundary
|
|
28
|
-
* @returns A behavior callback with type 'update' and a handler function
|
|
29
|
-
*/
|
|
30
|
-
export declare function boundary2d(options?: Partial<BoundaryOptions>): {
|
|
31
|
-
type: BehaviorCallbackType;
|
|
32
|
-
handler: (ctx: UpdateContext<MoveableEntity>) => void;
|
|
33
|
-
};
|
|
34
|
-
type BoundaryHit = 'top' | 'bottom' | 'left' | 'right';
|
|
35
|
-
type BoundaryHits = Record<BoundaryHit, boolean>;
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=boundary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/behaviors/boundaries/boundary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,cAAc,CAAC;IACnB,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,eAAe;IAC/B,UAAU,EAAE;QACX,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB;AAYD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACzB,OAAO,GAAE,OAAO,CAAC,eAAe,CAAM,GACpC;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,OAAO,EAAE,CAAC,GAAG,EAAE,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAA;CAAE,CAOvF;AAED,KAAK,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAEvD,KAAK,YAAY,GAAG,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const y = {
|
|
2
|
-
boundaries: {
|
|
3
|
-
top: 0,
|
|
4
|
-
bottom: 0,
|
|
5
|
-
left: 0,
|
|
6
|
-
right: 0
|
|
7
|
-
},
|
|
8
|
-
stopMovement: !0
|
|
9
|
-
};
|
|
10
|
-
function d(i = {}) {
|
|
11
|
-
return {
|
|
12
|
-
type: "update",
|
|
13
|
-
handler: (n) => {
|
|
14
|
-
a(n, i);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
function a(i, n) {
|
|
19
|
-
const { me: r } = i, { boundaries: s, onBoundary: u } = {
|
|
20
|
-
...y,
|
|
21
|
-
...n
|
|
22
|
-
}, e = r.getPosition();
|
|
23
|
-
if (!e)
|
|
24
|
-
return;
|
|
25
|
-
let t = { top: !1, bottom: !1, left: !1, right: !1 };
|
|
26
|
-
if (e.x <= s.left ? t.left = !0 : e.x >= s.right && (t.right = !0), e.y <= s.bottom ? t.bottom = !0 : e.y >= s.top && (t.top = !0), (n.stopMovement ?? !0) && t) {
|
|
27
|
-
const o = r.getVelocity() ?? { x: 0, y: 0 };
|
|
28
|
-
let { x: f, y: l } = o;
|
|
29
|
-
(o?.y < 0 && t.bottom || o?.y > 0 && t.top) && (l = 0), (o?.x < 0 && t.left || o?.x > 0 && t.right) && (f = 0), r.moveXY(f, l);
|
|
30
|
-
}
|
|
31
|
-
u && t && u({
|
|
32
|
-
me: r,
|
|
33
|
-
boundary: t,
|
|
34
|
-
position: { x: e.x, y: e.y, z: e.z },
|
|
35
|
-
updateContext: i
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
d as boundary2d
|
|
40
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"character-controller.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/behaviors/character-controller.ts"],"names":[],"mappings":"AACA,qBAAa,wBAAwB;IACpC,MAAM,EAAE,GAAG,CAAC;gBAEA,MAAM,EAAE,GAAG;CAIvB;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,4BAE9C"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DebugBehaviorOptions } from "~/lib/actions/behaviors/debug/debug";
|
|
2
|
-
import { BaseNode } from "~/lib/core/base-node";
|
|
3
|
-
import { CollisionContext } from "~/lib/entities/entity";
|
|
4
|
-
export type DebugBehaviorCollisionCallback = (ctx: CollisionContext<BaseNode, BaseNode<any>>) => void;
|
|
5
|
-
export declare function debugBehaviorCollision(options?: Partial<DebugBehaviorOptions>, ...callbacks: DebugBehaviorCollisionCallback[]): (collisionContext: CollisionContext<any, any>) => void;
|
|
6
|
-
//# sourceMappingURL=debug-collision.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debug-collision.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/behaviors/debug/debug-collision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,MAAM,8BAA8B,GAAG,CAAC,GAAG,EAAE,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC;AAMtG,wBAAgB,sBAAsB,CACrC,OAAO,GAAE,OAAO,CAAC,oBAAoB,CAAM,EAC3C,GAAG,SAAS,EAAE,8BAA8B,EAAE,IAEtC,kBAAkB,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,UAOpD"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { BaseNode } from "~/lib/core/base-node";
|
|
2
|
-
import { UpdateContext } from "~/lib/core/base-node-life-cycle";
|
|
3
|
-
import { DebugBehaviorOptions } from "~/lib/actions/behaviors/debug/debug";
|
|
4
|
-
export declare function debugUpdateBehavior(options?: Partial<DebugBehaviorOptions>): (updateContext: UpdateContext<BaseNode>) => void;
|
|
5
|
-
//# sourceMappingURL=debug-update.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debug-update.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/behaviors/debug/debug-update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAM3E,wBAAgB,mBAAmB,CAClC,OAAO,GAAE,OAAO,CAAC,oBAAoB,CAAM,IAEnC,eAAe,aAAa,CAAC,QAAQ,CAAC,UAG9C"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseNode } from "../../../core/base-node";
|
|
2
|
-
import { BehaviorCallback } from "../../../entities/entity";
|
|
3
|
-
export interface DebugBehaviorOptions {
|
|
4
|
-
message: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function debugBehavior(options?: Partial<DebugBehaviorOptions>): {
|
|
7
|
-
type: 'update';
|
|
8
|
-
handler: BehaviorCallback<BaseNode, any>;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=debug.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/behaviors/debug/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAmB,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE7E,MAAM,WAAW,oBAAoB;IACpC,OAAO,EAAE,MAAM,CAAC;CAChB;AAMD,wBAAgB,aAAa,CAAC,OAAO,GAAE,OAAO,CAAC,oBAAoB,CAAM,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;CAAE,CAOvI"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { UpdateContext } from "../../../core/base-node-life-cycle";
|
|
2
|
-
import { MoveableEntity } from "../../capabilities/moveable";
|
|
3
|
-
import { BehaviorCallbackType } from "../../../entities/entity";
|
|
4
|
-
export interface MovementSequence2DStep {
|
|
5
|
-
name: string;
|
|
6
|
-
moveX?: number;
|
|
7
|
-
moveY?: number;
|
|
8
|
-
timeInSeconds: number;
|
|
9
|
-
}
|
|
10
|
-
export interface MovementSequence2DOptions {
|
|
11
|
-
sequence: MovementSequence2DStep[];
|
|
12
|
-
loop?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type MovementSequence2DCallback = (current: MovementSequence2DStep, index: number, ctx: UpdateContext<MoveableEntity>) => void;
|
|
15
|
-
/**
|
|
16
|
-
* Behavior that sequences 2D movements over time.
|
|
17
|
-
* Each step sets linear velocity via `moveXY` for a duration, then advances.
|
|
18
|
-
* Defaults to looping when the end is reached.
|
|
19
|
-
*/
|
|
20
|
-
export declare function movementSequence2D(opts: MovementSequence2DOptions, onStep?: MovementSequence2DCallback): {
|
|
21
|
-
type: BehaviorCallbackType;
|
|
22
|
-
handler: (ctx: UpdateContext<MoveableEntity>) => void;
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=movement-sequence-2d.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"movement-sequence-2d.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/behaviors/movement/movement-sequence-2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,yBAAyB;IACzC,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,MAAM,0BAA0B,GAAG,CACxC,OAAO,EAAE,sBAAsB,EAC/B,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,aAAa,CAAC,cAAc,CAAC,KAC9B,IAAI,CAAC;AAWV;;;;GAIG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,yBAAyB,EAC/B,MAAM,CAAC,EAAE,0BAA0B,GACjC;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,OAAO,EAAE,CAAC,GAAG,EAAE,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAA;CAAE,CAmDvF"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CollisionContext, GameEntity } from '../../../entities/entity';
|
|
2
|
-
import { MoveableEntity } from '../../capabilities/moveable';
|
|
3
|
-
import { Ricochet2DCollisionOptions, Ricochet2DCollisionCallback } from './ricochet';
|
|
4
|
-
/**
|
|
5
|
-
* Behavior for ricocheting an entity off other objects in 2D
|
|
6
|
-
*/
|
|
7
|
-
export declare function ricochet2DCollision(options?: Partial<Ricochet2DCollisionOptions>, callback?: Ricochet2DCollisionCallback): {
|
|
8
|
-
type: 'collision';
|
|
9
|
-
handler: (ctx: CollisionContext<MoveableEntity, GameEntity<any>>) => void;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=ricochet-2d-collision.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ricochet-2d-collision.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/behaviors/ricochet/ricochet-2d-collision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,0BAA0B,EAAS,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAE5F;;GAEG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,GAAE,OAAO,CAAC,0BAA0B,CAAM,EACjD,QAAQ,CAAC,EAAE,2BAA2B,GACpC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,CAAC,GAAG,EAAE,gBAAgB,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAA;CAAE,CAOlG"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { matchesCollisionSelector as T } from "../../../collision/utils.js";
|
|
2
|
-
import { clamp as E } from "./ricochet.js";
|
|
3
|
-
function tt(O = {}, b) {
|
|
4
|
-
return {
|
|
5
|
-
type: "collision",
|
|
6
|
-
handler: (D) => {
|
|
7
|
-
Z(D, O, b);
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function Z(O, b, D) {
|
|
12
|
-
const { entity: K, other: y } = O, f = K;
|
|
13
|
-
if (y.collider?.isSensor())
|
|
14
|
-
return;
|
|
15
|
-
const { minSpeed: C = 2, maxSpeed: H = 20, separation: U = 0, collisionWith: L = void 0 } = {
|
|
16
|
-
...b
|
|
17
|
-
}, I = b?.reflectionMode ?? "angled", W = b?.maxAngleDeg ?? 60, _ = b?.speedUpFactor ?? 1.05, j = b?.minOffsetForAngle ?? 0.15, G = b?.centerRetentionFactor ?? 0.5;
|
|
18
|
-
if (!T(y, L))
|
|
19
|
-
return;
|
|
20
|
-
const i = f.getPosition(), X = y.body?.translation(), e = f.getVelocity();
|
|
21
|
-
if (!i || !X || !e)
|
|
22
|
-
return;
|
|
23
|
-
let c = e.x, o = e.y, Y = i.x, P = i.y;
|
|
24
|
-
const p = i.x - X.x, m = i.y - X.y;
|
|
25
|
-
let n = null, s = null;
|
|
26
|
-
const u = y.collider?.shape;
|
|
27
|
-
if (u && (u.halfExtents && (n = Math.abs(u.halfExtents.x ?? u.halfExtents[0] ?? null), s = Math.abs(u.halfExtents.y ?? u.halfExtents[1] ?? null)), (n == null || s == null) && typeof u.radius == "number" && (n = n ?? Math.abs(u.radius), s = s ?? Math.abs(u.radius))), (n == null || s == null) && typeof y.collider?.halfExtents == "function") {
|
|
28
|
-
const t = y.collider.halfExtents();
|
|
29
|
-
t && (n = n ?? Math.abs(t.x), s = s ?? Math.abs(t.y));
|
|
30
|
-
}
|
|
31
|
-
if ((n == null || s == null) && typeof y.collider?.radius == "function") {
|
|
32
|
-
const t = y.collider.radius();
|
|
33
|
-
typeof t == "number" && (n = n ?? Math.abs(t), s = s ?? Math.abs(t));
|
|
34
|
-
}
|
|
35
|
-
let q = 0, z = 0;
|
|
36
|
-
n && s ? (q = E(p / n, -1, 1), z = E(m / s, -1, 1)) : (q = Math.sign(p), z = Math.sign(m));
|
|
37
|
-
let J = Math.abs(m) >= Math.abs(p), a = null, l = null;
|
|
38
|
-
const M = f.collider?.shape;
|
|
39
|
-
if (M && (M.halfExtents && (a = Math.abs(M.halfExtents.x ?? M.halfExtents[0] ?? null), l = Math.abs(M.halfExtents.y ?? M.halfExtents[1] ?? null)), (a == null || l == null) && typeof M.radius == "number" && (a = a ?? Math.abs(M.radius), l = l ?? Math.abs(M.radius))), (a == null || l == null) && typeof f.collider?.halfExtents == "function") {
|
|
40
|
-
const t = f.collider.halfExtents();
|
|
41
|
-
t && (a = a ?? Math.abs(t.x), l = l ?? Math.abs(t.y));
|
|
42
|
-
}
|
|
43
|
-
if ((a == null || l == null) && typeof f.collider?.radius == "function") {
|
|
44
|
-
const t = f.collider.radius();
|
|
45
|
-
typeof t == "number" && (a = a ?? Math.abs(t), l = l ?? Math.abs(t));
|
|
46
|
-
}
|
|
47
|
-
if (n != null && s != null && a != null && l != null) {
|
|
48
|
-
const t = a + n - Math.abs(p), r = l + s - Math.abs(m);
|
|
49
|
-
!Number.isNaN(t) && !Number.isNaN(r) && (J = r <= t);
|
|
50
|
-
}
|
|
51
|
-
let F = !1;
|
|
52
|
-
if (J) {
|
|
53
|
-
const t = (s ?? 0) + (l ?? 0) + U;
|
|
54
|
-
if (P = X.y + (m > 0 ? t : -t), Y = i.x, n != null && s != null && n > s && I === "angled") {
|
|
55
|
-
const v = W * Math.PI / 180, g = Math.max(0, Math.min(1, j)), N = E(q, -1, 1), V = Math.abs(N), S = Math.sqrt(e.x * e.x + e.y * e.y), h = E(S * _, C, H);
|
|
56
|
-
if (V > g) {
|
|
57
|
-
const d = (V - g) / (1 - g), x = Math.sign(N) * (d * v), A = Math.cos(x), w = Math.sin(x), B = Math.abs(h * A), Q = h * w;
|
|
58
|
-
o = m > 0 ? B : -B, c = Q;
|
|
59
|
-
} else {
|
|
60
|
-
const d = e.x * G, x = Math.max(0, h * h - d * d), A = Math.sqrt(x);
|
|
61
|
-
o = m > 0 ? A : -A, c = d;
|
|
62
|
-
}
|
|
63
|
-
F = !0;
|
|
64
|
-
} else
|
|
65
|
-
o = m > 0 ? Math.abs(e.y) : -Math.abs(e.y), I === "simple" && (F = !0);
|
|
66
|
-
} else {
|
|
67
|
-
const t = (n ?? 0) + (a ?? 0) + U;
|
|
68
|
-
if (Y = X.x + (p > 0 ? t : -t), P = i.y, I === "angled") {
|
|
69
|
-
const r = W * Math.PI / 180, v = Math.max(0, Math.min(1, j)), g = E(z, -1, 1), N = Math.abs(g), V = Math.sqrt(e.x * e.x + e.y * e.y), S = E(V * _, C, H);
|
|
70
|
-
if (N > v) {
|
|
71
|
-
const h = (N - v) / (1 - v), d = Math.sign(g) * (h * r), x = Math.cos(d), A = Math.sin(d), w = Math.abs(S * x), B = S * A;
|
|
72
|
-
c = p > 0 ? w : -w, o = B;
|
|
73
|
-
} else {
|
|
74
|
-
const h = e.y * G, d = Math.max(0, S * S - h * h), x = Math.sqrt(d);
|
|
75
|
-
c = p > 0 ? x : -x, o = h;
|
|
76
|
-
}
|
|
77
|
-
F = !0;
|
|
78
|
-
} else
|
|
79
|
-
c = p > 0 ? Math.abs(e.x) : -Math.abs(e.x), o = e.y, F = !0;
|
|
80
|
-
}
|
|
81
|
-
if (!F) {
|
|
82
|
-
const t = Math.abs(c), r = Math.abs(o), v = Math.sign(q) * Math.abs(q) * t, g = Math.sign(z) * Math.abs(z) * r;
|
|
83
|
-
c += v, o += g;
|
|
84
|
-
}
|
|
85
|
-
const R = Math.sqrt(c * c + o * o);
|
|
86
|
-
if (R > 0) {
|
|
87
|
-
const t = E(R, C, H);
|
|
88
|
-
if (t !== R) {
|
|
89
|
-
const r = t / R;
|
|
90
|
-
c *= r, o *= r;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
(Y !== i.x || P !== i.y) && (f.setPosition(Y, P, i.z), f.moveXY(c, o), D && f.getVelocity() && D({
|
|
94
|
-
position: { x: Y, y: P, z: i.z },
|
|
95
|
-
...O
|
|
96
|
-
}));
|
|
97
|
-
}
|
|
98
|
-
export {
|
|
99
|
-
tt as ricochet2DCollision
|
|
100
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { UpdateContext } from '../../../core/base-node-life-cycle';
|
|
2
|
-
import { MoveableEntity } from '../../capabilities/moveable';
|
|
3
|
-
import { Ricochet2DInBoundsOptions, Ricochet2DCallback } from './ricochet';
|
|
4
|
-
import { BehaviorCallbackType } from '../../../entities/entity';
|
|
5
|
-
/**
|
|
6
|
-
* Behavior for ricocheting an entity within fixed 2D boundaries
|
|
7
|
-
*/
|
|
8
|
-
export declare function ricochet2DInBounds(options?: Partial<Ricochet2DInBoundsOptions>, callback?: Ricochet2DCallback): {
|
|
9
|
-
type: BehaviorCallbackType;
|
|
10
|
-
handler: (ctx: UpdateContext<MoveableEntity>) => void;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=ricochet-2d-in-bounds.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ricochet-2d-in-bounds.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/behaviors/ricochet/ricochet-2d-in-bounds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAS,MAAM,YAAY,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;GAEG;AACH,wBAAgB,kBAAkB,CACjC,OAAO,GAAE,OAAO,CAAC,yBAAyB,CAAM,EAChD,QAAQ,CAAC,EAAE,kBAAkB,GAC3B;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,OAAO,EAAE,CAAC,GAAG,EAAE,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAA;CAAE,CAOvF"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { clamp as g } from "./ricochet.js";
|
|
2
|
-
function w(a = {}, u) {
|
|
3
|
-
return {
|
|
4
|
-
type: "update",
|
|
5
|
-
handler: (y) => {
|
|
6
|
-
M(y, a, u);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
function M(a, u, y) {
|
|
11
|
-
const { me: r } = a, { restitution: d = 0, minSpeed: b = 2, maxSpeed: x = 20, boundaries: e = { top: 5, bottom: -5, left: -6.5, right: 6.5 }, separation: p = 0 } = { ...u }, t = r.getPosition(), o = r.getVelocity();
|
|
12
|
-
if (!t || !o)
|
|
13
|
-
return;
|
|
14
|
-
let i = o.x, n = o.y, c = t.x, l = t.y, s = null;
|
|
15
|
-
t.x <= e.left ? (i = Math.abs(o.x), c = e.left + p, s = "left") : t.x >= e.right && (i = -Math.abs(o.x), c = e.right - p, s = "right"), t.y <= e.bottom ? (n = Math.abs(o.y), l = e.bottom + p, s = "bottom") : t.y >= e.top && (n = -Math.abs(o.y), l = e.top - p, s = "top");
|
|
16
|
-
const h = Math.sqrt(i * i + n * n);
|
|
17
|
-
if (h > 0) {
|
|
18
|
-
const f = g(h, b, x);
|
|
19
|
-
if (f !== h) {
|
|
20
|
-
const m = f / h;
|
|
21
|
-
i *= m, n *= m;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
if (d && (i *= d, n *= d), (c !== t.x || l !== t.y) && (r.setPosition(c, l, t.z), r.moveXY(i, n), y && s)) {
|
|
25
|
-
const f = r.getVelocity();
|
|
26
|
-
f && y({
|
|
27
|
-
boundary: s,
|
|
28
|
-
position: { x: c, y: l, z: t.z },
|
|
29
|
-
velocityBefore: o,
|
|
30
|
-
velocityAfter: f,
|
|
31
|
-
...a
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
export {
|
|
36
|
-
w as ricochet2DInBounds
|
|
37
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Vector } from '@dimforge/rapier3d-compat';
|
|
2
|
-
import { MoveableEntity } from '../../capabilities/moveable';
|
|
3
|
-
import { CollisionContext, GameEntity } from '../../../entities/entity';
|
|
4
|
-
import { UpdateContext } from '../../../core/base-node-life-cycle';
|
|
5
|
-
import { CollisionSelector } from '../../../collision/utils';
|
|
6
|
-
export interface RicochetEvent extends Partial<UpdateContext<MoveableEntity>> {
|
|
7
|
-
boundary?: 'top' | 'bottom' | 'left' | 'right';
|
|
8
|
-
position: Vector;
|
|
9
|
-
velocityBefore: Vector;
|
|
10
|
-
velocityAfter: Vector;
|
|
11
|
-
}
|
|
12
|
-
export interface RicochetCollisionEvent extends CollisionContext<MoveableEntity, GameEntity<any>> {
|
|
13
|
-
position: Vector;
|
|
14
|
-
}
|
|
15
|
-
export interface Ricochet2DInBoundsOptions {
|
|
16
|
-
restitution?: number;
|
|
17
|
-
minSpeed?: number;
|
|
18
|
-
maxSpeed?: number;
|
|
19
|
-
boundaries: {
|
|
20
|
-
top: number;
|
|
21
|
-
bottom: number;
|
|
22
|
-
left: number;
|
|
23
|
-
right: number;
|
|
24
|
-
};
|
|
25
|
-
separation?: number;
|
|
26
|
-
}
|
|
27
|
-
export interface Ricochet2DCollisionOptions {
|
|
28
|
-
restitution?: number;
|
|
29
|
-
minSpeed?: number;
|
|
30
|
-
maxSpeed?: number;
|
|
31
|
-
separation?: number;
|
|
32
|
-
collisionWith?: CollisionSelector;
|
|
33
|
-
/**
|
|
34
|
-
* Choose between simple axis inversion or angled (paddle-style) reflection.
|
|
35
|
-
* Defaults to 'angled'.
|
|
36
|
-
*/
|
|
37
|
-
reflectionMode?: 'simple' | 'angled';
|
|
38
|
-
}
|
|
39
|
-
export type Ricochet2DCallback = (event: RicochetEvent) => void;
|
|
40
|
-
export type Ricochet2DCollisionCallback = (event: RicochetCollisionEvent) => void;
|
|
41
|
-
export declare function clamp(value: number, min: number, max: number): number;
|
|
42
|
-
export { ricochet2DInBounds } from './ricochet-2d-in-bounds';
|
|
43
|
-
export { ricochet2DCollision } from './ricochet-2d-collision';
|
|
44
|
-
//# sourceMappingURL=ricochet.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ricochet.d.ts","sourceRoot":"","sources":["../../../../../src/lib/actions/behaviors/ricochet/ricochet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,WAAW,aAAc,SAAQ,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAC5E,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;IAChG,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE;QACX,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACrC;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;AAChE,MAAM,MAAM,2BAA2B,GAAG,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;AAElF,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zylem-behavior.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/behaviors/zylem-behavior.ts"],"names":[],"mappings":""}
|