decodeModel function
- ModelLoadRequest request
Decodes a model on the calling isolate.
Exposed for tests and for callers that already run off the UI thread; an
application drawing a frame should prefer decodeModelInIsolate, which is
flutter3d's and takes the read off the UI thread as well.
Implementation
Future<ModelDocument> decodeModel(ModelLoadRequest request) async {
final bytes = await request.source.read();
return decodeModelBytes(request, bytes, request.source.resolveUri);
}