update method

  1. @override
void update(
  1. double deltaSeconds
)
override

Called once per frame while the component is mounted, enabled, and loaded. deltaSeconds is the elapsed time since the previous tick. A traversal visits each component at most once. Removing this component or an earlier sibling is safe. A component inserted before the current traversal position starts on the next frame. Reordering component or child lists during traversal is unsupported.

Implementation

@override
void update(double deltaSeconds) {
  final r = smoothingResponse(clampDeltaSeconds(deltaSeconds));
  _azimuth += (_azimuthGoal - _azimuth) * r;
  _polar += (_polarGoal - _polar) * r;
  _distance += (_distanceGoal - _distance) * r;
  _target += (_targetGoal - _target) * r;
  node.lookAtFrom(_eyeFor(_target), _target);
}