fromGlbAsset static method

Future<Node> fromGlbAsset(
  1. String assetPath
)

Convenience wrapper for fromGlbBytes that loads from the asset bundle.

Implementation

static Future<Node> fromGlbAsset(String assetPath) async {
  final byteData = await rootBundle.load(assetPath);
  return importGlb(
    byteData.buffer.asUint8List(
      byteData.offsetInBytes,
      byteData.lengthInBytes,
    ),
  );
}