Called to turn the robot / move the camera.
775572
public void updateYawAndPitch()
    {
    	// Work out the time that has elapsed since we last updated the values.
    	// (We need to do this because we can't guarantee that this method will be
    	// called at a constant frequency.)
    	long timeNow = System.currentTimeMillis();
    	long deltaTime = timeNow - this.lastAngularUpdateTime;
    	this.lastAngularUpdateTime = timeNow;
    	
    	// Work out how much the yaw and pitch should have changed in that time:
    	double overclockScale = 50.0 / (double)TimeHelper.serverTickLength;
    	double deltaYaw = this.yawScale * overclockScale * this.maxAngularVelocityDegreesPerSecond * (deltaTime / 1000.0);
    	double deltaPitch = this.pitchScale * overclockScale * this.maxAngularVelocityDegreesPerSecond * (deltaTime / 1000.0);

    	// And update them:
        mYaw += deltaYaw;
        mCameraPitch += deltaPitch;
        mCameraPitch = (mCameraPitch < -90) ? -90 : (mCameraPitch > 90 ? 90 : mCameraPitch);    // Clamp to [-90, 90]

        // And update the player:
        EntityPlayerSP player = Minecraft.getMinecraft().player;
        if (player != null)
        {
            player.rotationPitch = this.mCameraPitch;
            player.rotationYaw = this.mYaw;
        }

    }
395204
@Override
    public void turn(boolean right) {
	int penalty = Timing.getInstance().TURN;
	log.trace("[turn] Waiting {} cycles", penalty);
	turnsControl.waitTurns(penalty, "Turn");
	robot.turn(right);
    }
566620
public void stop()
    {
        if (mCamera != null)
        {
            mCamera.startPreview();
            mCamera.release();
            mCamera = null;
            mTryOpenCamera = false;
            onStop();
        }
    }
149890
function (camera) {
        var idx = this._cameraList.indexOf(camera);
        if (idx >= 0) {
            this._cameraList.splice(idx, 1);
        }
        this._cameraList.unshift(camera);
    }
664796
public void handleCameraPreviewTouchEvent(MotionEvent ev) {
        if (mFullScreen != null) mFullScreen.handleTouchEvent(ev);
        if (mDisplayRenderer != null) mDisplayRenderer.handleTouchEvent(ev);
    }
1219584
def on_motion(self, event):
        ''
        if self.press is None:
            return

        if event.inaxes != self.ax:
            return
        # print(event.inaxes)

        x0, y0, btn = self.press
        x0.append(event.xdata)
        y0.append(event.ydata)
688498
async def move_camera(self, position: Union[Unit, Point2, Point3]):
        
        assert isinstance(position, (Unit, Point2, Point3))
        if isinstance(position, Unit):
            position = position.position
        await self._execute(
            action=sc_pb.RequestAction(
                actions=[
                    sc_pb.Action(
                        action_raw=raw_pb.ActionRaw(
                            camera_move=raw_pb.ActionRawCameraMove(
                                center_world_space=common_pb.Point(x=position.x, y=position.y)
                            )
                        )
                    )
                ]
            )
        )
327464
function (doneCb) {
    var el = this.el;
    var self = this;

    if (this.data.cameraOverride) {
      prepareCamera(this.data.cameraOverride);
      return;
    }

    // Grab camera.
    if (el.camera && el.camera.el) {
      prepareCamera(el.camera.el);
      return;
    }

    el.addEventListener('camera-set-active', function setup (evt) {
      prepareCamera(evt.detail.cameraEl);
      el.removeEventListener('camera-set-active', setup);
    });

    function prepareCamera (cameraEl) {
      if (self.cameraEl) {
        self.cameraEl.removeAttribute('motion-capture-recorder');
      }
      self.cameraEl = cameraEl;
      cameraEl.setAttribute('motion-capture-recorder', {
        autoRecord: false,
        visibleStroke: false
      });
      doneCb(cameraEl)
    }
  }
340329
function (cb) {
            if (!this._robot) {
                this._robot = Aria.$frameworkWindow.top.SeleniumJavaRobot;
                this._robot.getOffset({
                    fn : this._offsetReceived,
                    scope : this
                });
            }
            if (cb) {
                if (this._robotInitialized) {
                    this.$callback(cb);
                } else {
                    this.$onOnce({
                        "robotInitialized" : cb
                    });
                }
            }
        }
955561
function () {
    var spectatorCameraEl = this.spectatorCameraEl;

    if (!spectatorCameraEl) {
      this.el.addEventListener('spectatorcameracreated',
                               bind(this.activateSpectatorCamera, this));
      return;
    }

    if (!spectatorCameraEl.hasLoaded) {
      spectatorCameraEl.addEventListener('loaded', bind(this.activateSpectatorCamera, this));
      return;
    }

    log('Activating spectator camera');
    spectatorCameraEl.setAttribute('camera', 'active', true);
    this.cameraEl.getObject3D('replayerMesh').visible = true;
  }
637083
def _update_camera(self, camera_center):
    """"""
    self._world_tl_to_world_camera_rel.offset = (
        -self._world_to_world_tl.fwd_pt(camera_center) *
        self._world_tl_to_world_camera_rel.scale)
1266796
def teleport_camera(self, location, rotation):
        
        self._should_write_to_command_buffer = True
        command_to_send = TeleportCameraCommand(location, rotation)
        self._commands.add_command(command_to_send)
756570
def link(self, camera):
        
        cam1, cam2 = self, camera
        # Remove if already linked
        while cam1 in cam2._linked_cameras:
            cam2._linked_cameras.remove(cam1)
        while cam2 in cam1._linked_cameras:
            cam1._linked_cameras.remove(cam2)
        # Link both ways
        cam1._linked_cameras.append(cam2)
        cam2._linked_cameras.append(cam1)
1307794
function(time) {
    var ms = time - this.lastTime;
    this.lastTime = time;

    // Update the different components of the scene.
    this.map.update(ms / 1000);
    this.player.update(ms / 1000);
    this.camera.render(this.player, this.map);

    // Continue the game loop.
    requestAnimationFrame(this.tick.bind(this));
  }
1153693
public synchronized void startPreview() {
    OpenCamera theCamera = camera;
    if (theCamera != null && !previewing) {
      theCamera.getCamera().startPreview();
      previewing = true;
      autoFocusManager = new AutoFocusManager(context, theCamera.getCamera());
    }
  }
746610
function _handleStart(e) {
      if (_settings('touchEnabled')) {
        var x0,
            x1,
            y0,
            y1,
            pos0,
            pos1;

        _downTouches = e.touches;

        switch (_downTouches.length) {
          case 1:
            _camera.isMoving = true;
            _touchMode = 1;

            _startCameraX = _camera.x;
            _startCameraY = _camera.y;

            _lastCameraX = _camera.x;
            _lastCameraY = _camera.y;

            pos0 = position(_downTouches[0]);
            _startTouchX0 = pos0.x;
            _startTouchY0 = pos0.y;

            break;
          case 2:
            _camera.isMoving = true;
            _touchMode = 2;

            pos0 = position(_downTouches[0]);
            pos1 = position(_downTouches[1]);
            x0 = pos0.x;
            y0 = pos0.y;
            x1 = pos1.x;
            y1 = pos1.y;

            _lastCameraX = _camera.x;
            _lastCameraY = _camera.y;

            _startCameraAngle = _camera.angle;
            _startCameraRatio = _camera.ratio;

            _startCameraX = _camera.x;
            _startCameraY = _camera.y;

            _startTouchX0 = x0;
            _startTouchY0 = y0;
            _startTouchX1 = x1;
            _startTouchY1 = y1;

            _startTouchAngle = Math.atan2(
              _startTouchY1 - _startTouchY0,
              _startTouchX1 - _startTouchX0
            );
            _startTouchDistance = Math.sqrt(
              (_startTouchY1 - _startTouchY0) *
                (_startTouchY1 - _startTouchY0) +
              (_startTouchX1 - _startTouchX0) *
                (_startTouchX1 - _startTouchX0)
            );

            e.preventDefault();
            return false;
        }
      }
    }
535905
def on_mouse_drag(self, x, y, dx, dy, buttons, modifiers):
        
        self.view['ball'].drag(np.array([x, y]))
        self.scene.camera.transform = self.view['ball'].pose