Merge pull request #6048 from samcake/controllers

Controllers Branch: adding example mapping files
This commit is contained in:
Brad Davis 2015-10-09 17:48:35 -07:00
commit a801aeea50
4 changed files with 63 additions and 5 deletions

View file

@ -0,0 +1,24 @@
{
"name": "Full Mapping config including the standard hydra and gamepad and one more thing",
"mappings": [
{ "src": "./mapping-hydra.json" },
{ "src": "./mapping-xbox.json" },
{
"name": "example mapping for standard to js function",
"channels": [ {
"from": "Standard.B",
"to": {
"type":"js",
"function": "function(value){ print(\"Standard.B = \" + value );}"
}
}, {
"from": "Standard.B",
"to": {
"type":"js",
"src": "http://www.theNextBigThing.com/hifiInputSignalHandler.js"
}
}
]
}
]
}

View file

@ -0,0 +1,36 @@
{
"name": "example mapping from Standard to actions",
"channels": [ {
"from": "Standard.LY",
"filters": [ {
"type": "clamp",
"min": 0,
"max": 1,
}
],
"to": "Actions.Forward",
}, {
"from": "Standard.LY",
"filters": [ {
"type": "clamp",
"min": -1,
"max": 0,
}, {
"type": "invert"
}
],
"to": "Actions.Backward",
}, {
"from": "Standard.LX",
"filters": [ {
"type": "scale",
"scale": 2.0,
}
],
"to": "Actions.Yaw",
}, {
"from": "Standard.A",
"to": "Actions.Action0"
}
]
}

View file

@ -339,8 +339,6 @@ GLBackend::GLTexture* GLBackend::syncGPUObject(const Texture& texture) {
GLTexelFormat texelFormat = GLTexelFormat::evalGLTexelFormat(texture.getTexelFormat(), srcFormat);
auto semantic = texture.getTexelFormat().getSemantic();
glTexImage2D(GL_TEXTURE_2D, 0,
texelFormat.internalFormat, texture.getWidth(), texture.getHeight(), 0,
texelFormat.format, texelFormat.type, bytes);

View file

@ -68,10 +68,10 @@ const float DEFAULT_REACH_LENGTH = 1.5f;
SixenseManager::SixenseManager() :
InputDevice("Hydra"),
#ifdef __APPLE__
_sixenseLibrary(NULL),
#endif
_reachLength(DEFAULT_REACH_LENGTH),
#ifdef __APPLE__
_sixenseLibrary(nullptr),
#endif
_hydrasConnected(false)
{
}