fernandojsg / aframe-input-mapping-component

https://fernandojsg.github.io/aframe-input-mapping-component
MIT License
24 stars 7 forks source link

Consistent naming #23

Open fernandojsg opened 6 years ago

fernandojsg commented 6 years ago

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');
  var mappings = {
    task1: {
      common: {
        triggerdown: {left: 'lefthand', right: 'righthand'}
      },
      'vive-controls': {
        gripdown: 'changeTask',
        trackpaddownlongpress: 'logdefault'
      },
    },
    behaviours: {
      default: {
        'vive-controls': {
          trackpad: 'dpad'
        }
      }
    },