realizeScene function

Node realizeScene(
  1. SceneDocument document, {
  2. FsceneComponentRegistry? registry,
})

Realizes document into a live Node graph.

Returns a synthesized root node that carries the handedness convention from the document's stage (a scale(1, 1, -1) mirror with winding parity excluded for a right-handed document, matching the model importers); the document's own root nodes are its children. Components are built through registry (the built-ins by default); a component whose type has no codec is skipped with a debug warning.

Mesh components are realized from procedural or payload-backed geometry and parameter materials; embedded rgba8 textures realize here too. External image assets, encoded image payloads, and fmat materials need realizeSceneAsync (which preloads them); the synchronous path falls back to placeholders. See ResourceRealizer.

Implementation

Node realizeScene(SceneDocument document, {FsceneComponentRegistry? registry}) {
  return _realizeWith(
    document,
    registry ?? defaultComponentRegistry(),
    ResourceRealizer(document),
  );
}