fromGlbAsset static method
Convenience wrapper for fromGlbBytes that loads from the asset bundle.
Implementation
static Future<Node> fromGlbAsset(
String assetPath, {
GltfWarningCallback? onWarning,
}) async {
final byteData = await rootBundle.load(assetPath);
return importGlb(
byteData.buffer.asUint8List(
byteData.offsetInBytes,
byteData.lengthInBytes,
),
onWarning: onWarning,
);
}