WorldObjectDependencyResolver
world/dependencies.types.ts:109Dependency resolver passed to WorldObjectComponent.resolveDependencies. Exposes both sibling lookups (other components on the same WorldObject) and cross-tier lookups against the parent World's components.
The cross-tier methods are the canonical way for object-scoped components to declare a dependency on world-scoped infrastructure — a graphics component reaching for the renderer, a physics body reaching for the simulation, an audio source reaching for the mixer.
Properties
Methods
optionalFromWorld(type: DependencyComponentConstructor<T>): null | T Same as WorldObjectDependencyResolver.requireFromWorld but
returns null on miss or ambiguity.
Parameters
-
typeDependencyComponentConstructor<T>
Returns
null | T optionalSibling(type: DependencyComponentConstructor<T>): null | T Same as WorldObjectDependencyResolver.requireSibling but
returns null on miss or ambiguity instead of throwing.
Parameters
-
typeDependencyComponentConstructor<T>
Returns
null | T requireFromWorld(type: DependencyComponentConstructor<T>): T Resolves a component on the parent World by type. This is the mechanism for object-scoped components that need to talk to world-scoped infrastructure.
Parameters
-
typeDependencyComponentConstructor<T>
Returns
T requireSibling(type: DependencyComponentConstructor<T>): T Resolves a sibling component on the same host by type.
Parameters
-
typeDependencyComponentConstructor<T>
Returns
T