fromGlbBytes static method
Load a glTF binary (GLB) model directly from raw bytes.
No offline conversion is required, useful for runtime use cases such
as user-uploaded models, network-loaded assets, or model editors.
onWarning, when given, receives non-fatal import issues (an
unrecognized extension, an image that fell back to a placeholder);
without it they print instead.
Example:
final bytes = await rootBundle.load('assets/dash.glb');
final node = await Node.fromGlbBytes(bytes.buffer.asUint8List());
Implementation
static Future<Node> fromGlbBytes(
Uint8List bytes, {
GltfWarningCallback? onWarning,
}) {
return importGlb(bytes, onWarning: onWarning);
}