frontend/main.js
/**
   * Processes incoming event. Returns non-null when event has been handled by
   * this axis
   */
Processes incoming event. Returns non-null when event has been handled by
this axis
Processes incoming event . Returns non - null when event has been handled by this axis
process(event) {
    if (this.keys.includes(event.key)) {
      if (this.state[event.key] == (event.type == 'keydown')) {
        return this.value;
      }
      this.state[event.key] = (event.type == 'keydown');
      let change = 0.0;
      if (this.keys.indexOf(event.key) == (event.type == 'keydown')) {
        change = 1.0;
      } else {
        change = -1.0;
      }
      this.value += change;
      return this.value;
    }
    return null;
  }
process ( event ) { if ( this . keys . includes ( event . key ) ) { if ( this . state [ event . key ] == ( event . type == 'keydown' ) ) { return this . value ; } this . state [ event . key ] = ( event . type == 'keydown' ) ; let change = 0.0 ; if ( this . keys . indexOf ( event . key ) == ( event . type == 'keydown' ) ) { change = 1.0 ; } else { change = - 1.0 ; } this . value += change ; return this . value ; } return null ; }
Processes incoming event.
Processes incoming event .
// event.repeat is broken.