Comments (3)
2023 The problem is relevant
from html5-javascript-gamepad-controller-library.
Maybe the problem is here need to fix
updater = function() {
var value = getter();
var lastValue = gamepad.lastState[controlName];
var isDown = value > 0.5;
var wasDown = lastValue > 0.5;
gamepad.state[controlName] = value;
if (isDown && !wasDown) {
that._fire(Gamepad.Event.BUTTON_DOWN, Object.create(buttonEventData));
} else if (!isDown && wasDown) {
that._fire(Gamepad.Event.BUTTON_UP, Object.create(buttonEventData));
}
if ((value !== 0) && (value !== 1) && (value !== lastValue)) {
that._fireAxisChangedEvent(gamepad, controlName, value);
}
gamepad.lastState[controlName] = value;
};
from html5-javascript-gamepad-controller-library.
Autor please fix that
from html5-javascript-gamepad-controller-library.
Related Issues (16)
- Firefox changes event names for gamepad API (no prefix, all lowercase) HOT 2
- Contribution guidelines & scripts? HOT 5
- Standardize button names reported by library HOT 5
- Linux & xbox controller HOT 3
- Use objects instead of arrays for buttons/axes mappings
- Document the button names
- Demo not working in Chrome HOT 1
- Consider firing synthetic events
- Use unprefixed Gamepad API if available for WebKit
- mapping of buttons HOT 1
- Not work in last Chrome (73.0.3683.86) HOT 3
- getGamepad will now require Secure Context HOT 1
- controller connects twice if connected with both bluetooth and wire HOT 10
- Library does not support XBOX 360 Controller Under Linux HOT 7
- Linux, Firefox (Nightly 17.0a1 2012-07-17), (old) Logitech Gamepad: different mapping HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html5-javascript-gamepad-controller-library.