Skip to main content

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

componentType: (readonly) string

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

bind(prop: string, src: Scene.IComponent, srcProp: string): void
deprecated Use IObject.bindPath instead.

Call this function to bind an input property to an output property on another component.

ParameterType
propstring
inputs property name
srcScene.IComponent
source component
srcPropstring
source outputs property name

bindEvent

bindEvent(eventType: string, src: Scene.IComponent, srcEventType: string): void
deprecated Use IObject.bindPath instead.

Notifies this component of an eventType when the src Component calls notify with a srcEventType event

ParameterType
eventTypestring
srcScene.IComponent
srcEventTypestring

notify

notify(eventType: string, eventData?: unknown): void

Emit an event to other components

ParameterType
eventTypestring
eventData?unknown

spyOnEvent

deprecated Use IObject.spyOnEvent instead.

Spy on a component's notify from outside of the component system

ParameterType
spyScene.IComponentEventSpy

Returns: ISubscription

an object responsible for removing the spy