SceneModule Overview
SceneModule Overview
BlockInstanceOutputs

BlockInstanceOutputs

The BlockInstanceOutputs class encapsulates methods for getting outputs of the block instance.

Properties

This module exposes no properties.

Methods

MethodDescription
getBoolean
getBoolean(name: string): Promise<BoolSignal>


Returns a promise that is resolved with a BoolSignal from the Block output with the given name. Fails the promise if no
output with that name is present in the Block or if the output with that name is not of type BoolSignal.
getBooleanOrFallback
getBooleanOrFallback(name: string, fallback: BoolSignal): BoolSignal


Returns a BoolSignal from the Block output with the given name.
Returns the fallback if any error happens, such as if no output with that name is present in the Block,
or if the output with that name is not of type BoolSignal.
getColor
getColor(name: string): Promise<ColorSignal>


Returns a promise that is resolved with a ColorSignal from the Block output with the given name. Fails the promise if no
output with that name is present in the Block or if the output with that name is not of Color or Vec4 type.
getColorOrFallback
getColorOrFallback(name: string, fallback: ColorSignal): ColorSignal


Returns a ColorSignal from the Block output with the given name.
Returns the fallback if any error happens, such as if no output with that name is present in the Block, or if the
output with that name is not of Color or Vec4 type.
getPoint
getPoint(name: string): Promise<PointSignal>


Returns a promise that is resolved with a PointSignal from the Block output with the given name. Fails the promise if no
output with that name is present in the Block or if the output with that name is not of type PointSignal.
getPoint2D
getPoint2D(name: string): Promise<Vec2Signal>


Returns a promise that is resolved with a Vec2Signal from the Block output with the given name. Fails the promise if no
output with that name is present in the Block or if the output with that name is not of type Vec2Signal.
getPoint2DOrFallback
getPoint2DOrFallback(name: string, fallback: Vec2Signal): Vec2Signal


Returns a Vec2Signal from the Block output with the given name.
Returns the fallback if any error happens, such as if no output with that name is present in the Block, or if the
output with that name is not of type `Vec2Signal'.
getPointOrFallback
getPointOrFallback(name: string, fallback: PointSignal): PointSignal


Returns a PointSignal from the Block output with the given name.
Returns the fallback if any error happens, such as if no output with that name is present in the Block, or if the
output with that name is not of type `PointSignal'.
getPulse
getPulse(name: string): Promise<EventSource<any>>


Returns a promise that is resolved with a EventSource from the Block output with the given name. Fails the promise if no
output with that name is present in the Block or if the output with that name is not of type EventSource.
getPulseOrFallback
getPulseOrFallback(name: string, fallback: EventSource<any>): EventSource<any>


Returns an EventSource from the Block output with the given name.
Returns the fallback if any error happens, such as if no output with that name is present in the Block, or if the
output with that name is not of type `EventSource'.
getScalar
getScalar(name: string): Promise<ScalarSignal>


Returns a promise that is resolved with a ScalarSignal from the Block output with the given name. Fails the promise if no
output with that name is present in the Block or if the output with that name is not of type ScalarSignal.
getScalarOrFallback
getScalarOrFallback(name: string, fallback: ScalarSignal): ScalarSignal


Returns a ScalarSignal from the Block output with the given name.
Returns the fallback if any error happens, such as if no output with that name is present in the Block, or if the
output with that name is not of type `ScalarSignal'.
getShader
getShader(name: string): Promise<ShaderSignal>


Returns a promise that is resolved with a ShaderSignal from the Block output with the given name. Fails the promise if no
output with that name is present in the Block or if the output with that name is not of type ShaderSignal.
getShaderOrFallback
getShaderOrFallback(name: string, fallback: ShaderSignal): ShaderSignal


Returns a ShaderSignal from the Block output with the given name.
Returns the fallback if any error happens, such as if no output with that name is present in the Block, or if the
output with that name is not of type `ShaderSignal'.
getString
getString(name: string): Promise<StringSignal>


Returns a promise that is resolved with a StringSignal from the Block output with the given name. Fails the promise if no
output with that name is present in the Block or if the output with that name is not of type StringSignal.
getStringOrFallback
getStringOrFallback(name: string, fallback: StringSignal): StringSignal


Returns a StringSignal from the Block output with the given name.
Returns the fallback if any error happens, such as if no output with that name is present in the Block, or if the
output with that name is not of type `StringSignal'.
getVec4
getVec4(name: string): Promise<Vec4Signal>


Returns a promise that is resolved with a Vec4Signal from the Block output with the given name. Fails the promise if no
output with that name is present in the Block or if the output with that name is not of Color or Vec4 type.
getVec4OrFallback
getVec4OrFallback(name: string, fallback: Vec4Signal): Vec4Signal


Returns a Vec4Signal from the Block output with the given name.
Returns the fallback if any error happens, such as if no output with that name is present in the Block, or if the
output with that name is not of Color or Vec4 type.
getVector
getVector(name: string): Promise<VectorSignal>


Returns a promise that is resolved with a VectorSignal from the Block output with the given name. Fails the promise if no
output with that name is present in the Block or if the output with that name is not of type VectorSignal.
getVectorOrFallback
getVectorOrFallback(name: string, fallback: VectorSignal): VectorSignal


Returns a VectorSignal from the Block output with the given name.
Returns the fallback if any error happens, such as if no output with that name is present in the Block, or if the
output with that name is not of type `VectorSignal'.
setBoolean
setBoolean(name: string, signal: BoolSignal | boolean): Promise<void>


Sends a BoolSignal to the Block's input with the given name. Returns a promise that
is fulfilled if the operation succeeds and is rejected if the operation fails, such
as if no input exists with the given name, or if the input's type is not a BoolSignal
setColor
setColor(name: string, signal: RgbaSignal): Promise<void>


Sends a RgbaSignal to the Block's input with the given name. Returns a promise that
is fulfilled if the operation succeeds and is rejected if the operation fails, such
as if no input exists with the given name, or if the input's type is not of Rgba or Vec4.
setPoint
setPoint(name: string, signal: PointSignal): Promise<void>


Sends a PointSignal to the Block's input with the given name. Returns a promise that
is fulfilled if the operation succeeds and is rejected if the operation fails, such
as if no input exists with the given name, or if the input's type is not a PointSignal
setPoint2D
setPoint2D(name: string, signal: Vec2Signal): Promise<void>


Sends a Vec2Signal to the Block's input with the given name. Returns a promise that
is fulfilled if the operation succeeds and is rejected if the operation fails, such
as if no input exists with the given name, or if the input's type is not a Vec2Signal
setPulse
setPulse(name: string, signal: EventSource<any>): Promise<void>


Sends an EventsSource to the Block's input with the given name. Returns a promise that
is fulfilled if the operation succeeds and is rejected if the operation fails, such
as if no input exists with the given name, or if the input's type is not an EventSource.
setScalar
setScalar(name: string, signal: ScalarSignal | number): Promise<void>


Sends a ScalarSignal to the Block's input with the given name. Returns a promise that
is fulfilled if the operation succeeds and is rejected if the operation fails, such
as if no input exists with the given name, or if the input's type is not a ScalarSignal
setShader
setShader(name: string, signal: ShaderSignal): Promise<void>


Sends a ShaderSignal to the Block's input with the given name. Returns a promise that
is fulfilled if the operation succeeds and is rejected if the operation fails, such
as if no input exists with the given name, or if the input's type is not a ShaderSignal
setString
setString(name: string, signal: StringSignal | string): Promise<void>


Sends a StringSignal to the Block's input with the given name. Returns a promise that
is fulfilled if the operation succeeds and is rejected if the operation fails, such
as if no input exists with the given name, or if the input's type is not a StringSignal
setVec4
setVec4(name: string, signal: Vec4Signal): Promise<void>


Sends a Vec4Signal to the Block's input with the given name. Returns a promise that
is fulfilled if the operation succeeds and is rejected if the operation fails, such
as if no input exists with the given name, or if the input's type is not of Rgba or Vec4.
setVector
setVector(name: string, signal: VectorSignal): Promise<void>


Sends a VectorSignal to the Block's input with the given name. Returns a promise that
is fulfilled if the operation succeeds and is rejected if the operation fails, such
as if no input exists with the given name, or if the input's type is not a VectorSignal

Was this article helpful?