defaultComponentRegistry function
The process-wide component registry, preloaded with the built-in codecs.
This is the registry every load and realize call uses when none is passed
explicitly, so a package registrar called once in main() (for example
registerFmodComponentCodecs()) makes its component types loadable
everywhere, with no per-call plumbing. Tests wanting isolation construct
their own FsceneComponentRegistry and pass it explicitly.
Implementation
FsceneComponentRegistry defaultComponentRegistry() {
final existing = _defaultRegistry;
if (existing != null) return existing;
final registry = FsceneComponentRegistry();
registerBuiltinComponentCodecs(registry);
return _defaultRegistry = registry;
}