loadFscenebBytesAsync function

Future<Node> loadFscenebBytesAsync(
  1. Uint8List bytes, {
  2. FsceneComponentRegistry? registry,
  3. AssetBundle? bundle,
})

Parses a .fsceneb container from bytes and realizes it, first loading any external assets, encoded image payloads, and fmat materials it references (from bundle, default rootBundle).

The container is parsed on a background isolate (readFscenebAsync), so a large scene does not stall the caller's frames while it inflates.

Implementation

Future<Node> loadFscenebBytesAsync(
  Uint8List bytes, {
  FsceneComponentRegistry? registry,
  AssetBundle? bundle,
}) async => realizeSceneAsync(
  await readFscenebAsync(bytes),
  registry: registry,
  bundle: bundle,
);