RealizeContext class
Context handed to a ComponentCodec when realizing a ComponentSpec into a live Component. Carries the source document and a resources realizer so a codec (for example a mesh) can resolve referenced geometry and materials.
Constructors
- RealizeContext(SceneDocument document, {ResourceRealizer? resources})
-
Creates a realize context over
document, optionally with aresourcesrealizer.
Properties
-
afterRealize
→ List<
void Function()> -
Callbacks the realizer runs after every node and component has been
realized. A codec whose spec references other nodes' components (for
example material variants binding into mesh primitives) registers its
resolution here rather than resolving during its own realize call,
when those components may not exist yet.
final
- document → SceneDocument
-
The document being realized.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- resolveNode ↔ Node? Function(LocalId id)?
-
Resolves a document node id to its realized Node. Set by the realizer
once its node map exists; null in contexts without one.
getter/setter pair
- resources → ResourceRealizer?
-
Realizes referenced geometry/material resources, or null when resource
realization is unavailable (a codec needing it should return null).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runAfterRealize(
) → void - Runs and clears afterRealize. The realizer calls this once per pass.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited