Scene.IComponentRuntimeMembers
Members the SDK attaches to each component instance at
{@link INode.addComponent} time. Authors do not declare these — they
appear on the runtime {@link IComponent} and on this inside lifecycle
methods (see {@link IComponentThis}).
Properties
componentType
The component type. This value is the same string used to identify the component factory.
context
The context provides access to the underlying rendering engine. The sdk framework adds it to the component during construction.
Methods
bind
IObject.bindPath instead.Call this function to bind an input property to an output property on another component.
| Parameter | Type |
|---|---|
| prop | string inputs property name |
| src | Scene.IComponent source component |
| srcProp | string source outputs property name |
bindEvent
IObject.bindPath instead.Notifies this component of an eventType when the src Component calls notify with a srcEventType event
| Parameter | Type |
|---|---|
| eventType | string |
| src | Scene.IComponent |
| srcEventType | string |
notify
Emit an event to other components
| Parameter | Type |
|---|---|
| eventType | string |
| eventData? | unknown |
spyOnEvent
IObject.spyOnEvent instead.Spy on a component's notify from outside of the component system
| Parameter | Type |
|---|---|
| spy | Scene.IComponentEventSpy |
Returns: ISubscription
an object responsible for removing the spy