src/components/avatar-recorder.js
function () {
    var self = this;
    var trackedControllerEls = this.el.querySelectorAll('[tracked-controls]');
    this.trackedControllerEls = {};
    trackedControllerEls.forEach(function setupController (trackedControllerEl) {
      if (!trackedControllerEl.id) {
        warn('Found a tracked controller entity without an ID. ' +
             'Provide an ID or this controller will not be recorded');
        return;
      }
      trackedControllerEl.setAttribute('motion-capture-recorder', {
        autoRecord: false,
        visibleStroke: false
      });
      self.trackedControllerEls[trackedControllerEl.id] = trackedControllerEl;
      if (self.isRecording) {
        trackedControllerEl.components['motion-capture-recorder'].startRecording();
      }
    });
  }
function () {
    var self = this;
    var trackedControllerEls = this.el.querySelectorAll('[tracked-controls]');
    this.trackedControllerEls = {};
    trackedControllerEls.forEach(function setupController (trackedControllerEl) {
      if (!trackedControllerEl.id) {
        warn('Found a tracked controller entity without an ID. ' +
             'Provide an ID or this controller will not be recorded');
        return;
      }
      trackedControllerEl.setAttribute('motion-capture-recorder', {
        autoRecord: false,
        visibleStroke: false
      });
      self.trackedControllerEls[trackedControllerEl.id] = trackedControllerEl;
      if (self.isRecording) {
        trackedControllerEl.components['motion-capture-recorder'].startRecording();
      }
    });
  }
function ( ) { var self = this ; var trackedControllerEls = this . el . querySelectorAll ( '[tracked-controls]' ) ; this . trackedControllerEls = { } ; trackedControllerEls . forEach ( function setupController ( trackedControllerEl ) { if ( ! trackedControllerEl . id ) { warn ( 'Found a tracked controller entity without an ID. ' + 'Provide an ID or this controller will not be recorded' ) ; return ; } trackedControllerEl . setAttribute ( 'motion-capture-recorder' , { autoRecord : false , visibleStroke : false } ) ; self . trackedControllerEls [ trackedControllerEl . id ] = trackedControllerEl ; if ( self . isRecording ) { trackedControllerEl . components [ 'motion-capture-recorder' ] . startRecording ( ) ; } } ) ; }
Poll for tracked controllers.
Poll for tracked controllers .