decode method

  1. @override
Future<ModelDocument> decode(
  1. Uint8List bytes,
  2. ModelLoadRequest request,
  3. AssetUriResolver resolveUri
)
override

Reads bytes into a document.

resolveUri fetches a sibling file — a .gltf's buffer, an .obj's material library — and is the only way to reach the file system from here: this runs on a background isolate that has none.

Implementation

@override
Future<ModelDocument> decode(
  Uint8List bytes,
  ModelLoadRequest request,
  AssetUriResolver resolveUri,
) => load(bytes, resolveUri: resolveUri);