aframe-input-mapping-component
aframe-input-mapping-component copied to clipboard
Consistent naming
In every issue or conversation we use completely different naming for each item so it could be nice to have a consistent naming across all the code and conversations so we really understand that we are talking about the same things :D I'm totally open here, if you have suggestion or if you prefer to go for a similar naming as the one used on Steam Controller API, I'm ok with that.
Looking at the current implementation:
var inputActions = {
task1: {
changeTask: { label: 'Change task' },
logdefault: { label: 'Test Log' },
logtask1: { label: 'Test Log Task 1' },
lefthand: { label: 'Left hand' },
righthand: { label: 'Right hand' },
},
task2: {
changeTask: { label: 'Change task' },
logtask2: { label: 'Test Log Task 2' }
}
}
AFRAME.registerInputActions(inputActions, 'task1');
- inputActions
rename toinputActionSet. SocurrentInputMappingshould be renamed tocurrentInputSet`. task1,task2:actions- Each action has a
type: digital, analog1d, analog2d, analog3d, pose,...
var mappings = {
task1: {
common: {
triggerdown: {left: 'lefthand', right: 'righthand'}
},
'vive-controls': {
gripdown: 'changeTask',
trackpaddownlongpress: 'logdefault'
},
},
bindings:triggerdownis binded tolefthand.activators: Modifiers of an specific input event: longpress, doubletouch, doublepress.
behaviours: {
default: {
'vive-controls': {
trackpad: 'dpad'
}
}
},
behaviours: Add a custom behaviour to a input element, likedpadto athumbpad.- The mapping from
trackpadtodpadis what steam callsmode.