资源说明:Input handling for HTML5 games done right.
#About decoupled-input is a flexible and lightweight input controller for games that allows to separate input listeners for different devices from the actual input computing logic. This allows to change input bindings and devices without having to change the program logic; e.g. if the "fire" action was bound to the space key and it should later be bound to a mouse button, the change is only being made in the bindings configuration, and the game logic remains entirely unaffected. Other benefits are: * Code gets more readable * Interpretation of input happens in the render loop * Boolean (button/key) and analog axis input can be handled by the same code * Easy setup of multiple bindings for one action * Gamepad support! decoupled-input comes with handlers for mouse, keyboard, gamepad and speech. #How It Works _(For full example code and bindings please see the [Examples](#examples) section.)_ The decoupled-input modules come in AMD format. There two types of modules: a controller and device handlers. To work, there is also a binding configuration needed. For your convenience, the controller and device handlers are already built and bundled into one file, `dibox.js`. In this file, all device handlers are already registered and ready to go. You can find it in the `build` folder. You can require this file with an AMD or CommonJS compatible loader, or include it via `
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。