of static method
Finds the first variants component for a loaded model.
The runtime importer attaches one component to the model's root; the
.fscene realizer attaches one per document root (below the
synthesized scene root). This searches root and then its subtree
breadth-first, so callers work with either import path. A multi-root
document can carry several components; use allOf to reach every one.
Implementation
static MaterialsVariantsComponent? of(Node root) {
final all = allOf(root);
return all.isEmpty ? null : all.first;
}