code: function () {
      // Movement
      this.velocity = new THREE.Vector3(0, 0, 0);
      this.direction = new THREE.Vector3(0, 0, 0);
  
      // Rotation
      this.pitch = new THREE.Object3D();
      this.yaw = new THREE.Object3D();
      this.yaw.position.y = 10;
      this.yaw.add(this.pitch);
  
      // Button state
      this.buttons = {};
  
      if (!this.getGamepad()) {
        console.warn(
          'Gamepad #%d not found. Connect controller and press any button to continue.',
          this.data.controller
        );
      }
    }
docs: *****************************************************************
  Core
   
  Called once when component is attached. Generally for initial setup.