src/controls/gamepad-controls.js
function () {
    const scene = this.el.sceneEl;
    this.prevTime = window.performance.now();

    // Button state
    this.buttons = {};

    // Rotation
    const rotation = this.el.object3D.rotation;
    this.pitch = new THREE.Object3D();
    this.pitch.rotation.x = THREE.Math.degToRad(rotation.x);
    this.yaw = new THREE.Object3D();
    this.yaw.position.y = 10;
    this.yaw.rotation.y = THREE.Math.degToRad(rotation.y);
    this.yaw.add(this.pitch);

    scene.addBehavior(this);
  }
function () {
    const scene = this.el.sceneEl;
    this.prevTime = window.performance.now();

    // Button state
    this.buttons = {};

    // Rotation
    const rotation = this.el.object3D.rotation;
    this.pitch = new THREE.Object3D();
    this.pitch.rotation.x = THREE.Math.degToRad(rotation.x);
    this.yaw = new THREE.Object3D();
    this.yaw.position.y = 10;
    this.yaw.rotation.y = THREE.Math.degToRad(rotation.y);
    this.yaw.add(this.pitch);

    scene.addBehavior(this);
  }
function ( ) { const scene = this . el . sceneEl ; this . prevTime = window . performance . now ( ) ; // Button state this . buttons = { } ; // Rotation const rotation = this . el . object3D . rotation ; this . pitch = new THREE . Object3D ( ) ; this . pitch . rotation . x = THREE . Math . degToRad ( rotation . x ) ; this . yaw = new THREE . Object3D ( ) ; this . yaw . position . y = 10 ; this . yaw . rotation . y = THREE . Math . degToRad ( rotation . y ) ; this . yaw . add ( this . pitch ) ; scene . addBehavior ( this ) ; }
*****************************************************************
Core
 
Called once when component is attached. Generally for initial setup.
***************************************************************** Core Called once when component is attached . Generally for initial setup .