CameraComponent constructor

CameraComponent({
  1. CameraProjection? projection,
  2. bool activateOnMount = false,
})

Creates a camera component with the given projection (a PerspectiveProjection by default). With activateOnMount, the camera becomes the scene's primary when its node mounts (the serialized form of makeActive).

Implementation

CameraComponent({CameraProjection? projection, bool activateOnMount = false})
  : _projection = projection ?? PerspectiveProjection(),
    _activateOnMount = activateOnMount;