jbuck/input.js — Issue #3: When a Dpad is an axis, it isn't mapped properly
Author: jbuck
Created: 2011-10-19 17:53:27+00:00
State: open

When a Dpad is an axis, say Up/Down and Left/Right, it doesn't get mapped to PAD_UP and PAD_DOWN, which are buttons in input.js.

As first attempt at doing this, we can add an attribute to the map for each axis-as-a-button that clamps a value (from [-1,0] or [0,1]), possibly inverts it (1 or -1). Then the mapButtonToAxis() function has to take this parameter into account.