• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

excaliburjs / Excalibur / 5657268389
89%

Build:
DEFAULT BRANCH: main
Ran 25 Jul 2023 01:20PM UTC
Jobs 1
Files 193
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Jul 2023 01:20PM UTC coverage: 91.74% (+0.007%) from 91.733%
5657268389

push

github

web-flow
feat: Implement InputMapper (#2705)

This PR implements a new input mapper for excalibur which is useful for mapping multiple input sources into specific commands. This can be used to enable accessibility for your users adding ways for them to provide different inputs!

This examples shows how to map multiple types of input for the same action!
```typescript
const moveRight = (amount: number) => { actor.vel.x = 100 * amount }
const moveLeft = (amount: number) => { actor.vel.x = -100 * amount }
const moveUp = (amount: number) => { actor.vel.y = -100 * amount }
const moveDown = (amount: number) => { actor.vel.y = 100 * amount }
engine.inputMapper.on(({keyboard}) => keyboard.isHeld(ex.Keys.ArrowRight) ? 1 : 0, moveRight);
engine.inputMapper.on(({gamepads}) => gamepads.at(0).isButtonPressed(ex.Buttons.DpadRight) ? 1 : 0, moveRight);
engine.inputMapper.on(({gamepads}) => gamepads.at(0).getAxes(ex.Axes.LeftStickX) > 0 ? gamepads.at(0).getAxes(ex.Axes.LeftStickX) : 0, moveRight);

```

4510 of 5663 branches covered (79.64%)

10 of 10 new or added lines in 2 files covered. (100.0%)

10485 of 11429 relevant lines covered (91.74%)

26435.85 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5657268389.1 25 Jul 2023 01:20PM UTC 0
91.74
GitHub Action Run
Source Files on build 5657268389
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #5657268389
  • 331b6587 on github
  • Prev Build on main (#5656750902)
  • Next Build on main (#5669567314)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc