Configuration for mapping keyboard keys to axes input. Defines four directional keys that map to X/Y axis values.
const wasdConfig: KeyboardAxesConfig = { vertical: { up: 'w', down: 's' }, horizontal: { left: 'a', right: 'd' }};// Arrow keys example:const arrowConfig: KeyboardAxesConfig = { vertical: { up: 'arrowup', down: 'arrowdown' }, horizontal: { left: 'arrowleft', right: 'arrowright' }}; Copy
const wasdConfig: KeyboardAxesConfig = { vertical: { up: 'w', down: 's' }, horizontal: { left: 'a', right: 'd' }};// Arrow keys example:const arrowConfig: KeyboardAxesConfig = { vertical: { up: 'arrowup', down: 'arrowdown' }, horizontal: { left: 'arrowleft', right: 'arrowright' }};
Horizontal axis keys
Key that maps to X = -1
Key that maps to X = +1
Vertical axis keys
Key that maps to Y = +1
Key that maps to Y = -1
Configuration for mapping keyboard keys to axes input. Defines four directional keys that map to X/Y axis values.
Example