readChunk method

Future<Uint8List> readChunk(
  1. GltfRef<Buffer> ref
)

Implementation

Future<Uint8List> readChunk(GltfRef<Buffer> ref) async {
  if (chunks.isNotEmpty) {
    final chunk = chunks[ref.index];
    return chunk.data;
  }
  final buffer = ref.get();
  return readChunkFrom(buffer.uri!);
}