BonfireCamera constructor

BonfireCamera({
  1. CameraConfig? config,
  2. World? world,
  3. List<Component>? hudComponents,
  4. Viewport? viewport,
  5. Component? backdrop,
})

Implementation

BonfireCamera({
  CameraConfig? config,
  super.world,
  super.hudComponents,
  super.viewport,
  super.backdrop,
}) : config = config ?? CameraConfig() {
  if (this.config.initPosition != null) {
    position = this.config.initPosition!;
  }
  viewfinder.zoom = this.config.zoom;
  viewfinder.angle = this.config.angle;
  if (this.config.target != null) {
    follow(this.config.target!, snap: true);
  }
}