b0.6.3 : Gamepad


gamepad support

  • love.joystiks_getJoysticks() -> array of object : Joystick class
  • love.joystick_getJoystickCount() -> number of gamepad connected

Joystick class = gamepad

  • Joystick.getButtonCount() -> number // get number of button
  • Joystick.getAxisCount() -> number // get number of axis and analog button
  • Joystick.getId() -> number
  • Joystick.getName() -> string
  • Joystick.isDown(id:number) -> bool // return true if button id is down
  • Joystick.getAxis(id:number) -> number -1.0 -> 1.0 // axis or analog button

Get love2d.js

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.