toCamera method

NodeCamera toCamera()

Returns a NodeCamera backed by the owning node.

The returned camera tracks the node: moving or rotating the node moves the view on the next frame, so it is safe to hold in a persistent RenderView. The same instance is returned across calls while the component stays attached.

Implementation

NodeCamera toCamera() => _camera ??= NodeCamera(node, _projection);