Comments (1)
FWIW
i added;
var ChromeGenericController = function(raw, into, index) {
into.leftStickX = raw.axes[0];
into.leftStickY = raw.axes[1];
into.rightStickX = raw.axes[3];
into.rightStickY = raw.axes[2];
into.faceButton0 = raw.buttons[0];
into.faceButton1 = raw.buttons[1];
into.faceButton2 = raw.buttons[2];
into.faceButton3 = raw.buttons[3];
into.leftShoulder0 = raw.buttons[5];
into.rightShoulder0 = raw.buttons[7];
into.leftShoulder1 = raw.buttons[4];
into.rightShoulder1 = raw.buttons[6];
into.select = raw.buttons[8];
into.start = raw.buttons[9];
into.leftStickButton = raw.buttons[10];
into.rightStickButton = raw.buttons[11];
into.dpadUp = raw.axes[5] < -0.5 ? 1 : 0;
into.dpadDown = raw.axes[5] > 0.5 ? 1 : 0;
into.dpadLeft = raw.axes[4] < -0.5 ? 1 : 0;
into.dpadRight = raw.axes[4] > 0.5 ? 1 : 0;
// From http://msdn.microsoft.com/en-us/library/windows/desktop/ee417001(v=vs.85).aspx
into.deadZoneLeftStick = 7849.0/32767.0;
into.deadZoneRightStick = 8689/32767.0;
into.deadZoneShoulder0 = 0.5;
into.deadZoneShoulder1 = 30.0/255.0;
};
and
} else if (isChrome) {
active.push([ '07b5', '0312', ChromeGenericController, "Generic Controller(PS2 like)", Gamepad_ImageDataUrls_Xbox360 ]);
}
and it now works.
from gamepad.js.
Related Issues (12)
- No image version HOT 1
- Has anyone ported this to HTML5 Device Orientation API with an example? HOT 1
- License Type? HOT 1
- Does not work in Chrome 22 or above [patch provided] HOT 3
- gamepad.js error in the lib
- error on line 253
- Project need to be updated. HOT 1
- Project needs to include licensing information
- Flash Player fallback
- Add OUYA Support. HOT 1
- Outdated, Misleading
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 gamepad.js.