cameraOf method
Implementation
Flix3DCamera cameraOf(int entity) {
_ensureNotDisposed();
final output = calloc<Float>(3);
try {
if (_api.getCamera(_handle, entity, output, 3) == 0) {
throw StateError('Native scene has no camera on entity $entity.');
}
final values = output.asTypedList(3);
return Flix3DCamera(
verticalFieldOfView: values[0],
nearClip: values[1],
farClip: values[2],
);
} finally {
calloc.free(output);
}
}