Class FlowGraphSwitchBlock<T>
Type Parameters
- T extends WebXRSpatialLayerType
Hierarchy (View Summary)
- FlowGraphExecutionBlock
- FlowGraphSwitchBlock
Constructors
constructor
-
new FlowGraphSwitchBlock<T extends FlowGraphNumber>(
config: IFlowGraphSwitchBlockConfiguration<T>,
): FlowGraphSwitchBlock<T>Type Parameters
- T extends FlowGraphNumber
Parameters
- config: IFlowGraphSwitchBlockConfiguration<T>
the configuration of the block
Returns FlowGraphSwitchBlock<T>
Properties
Readonlycase
Input connection: The value of the selection.
config
the configuration of the block
data Inputs
The data inputs of the block.
data Outputs
The data outputs of the block.
Readonlydefault
The default case to execute if no other case is found.
Readonlyerror
An output connection that can be used to signal an error, if the block defines it.
Readonlyin
Input connection: The input signal of the block.
metadata
Metadata that can be used by the block.
name
The name of the block.
Readonlypriority
The priority of the block. Higher priority blocks will be executed first. Note that priority cannot be change AFTER the block was added as sorting happens when the block is added to the execution queue.
signal Inputs
Input connections that activate the block.
signal Outputs
Output connections that can activate downstream blocks.
unique Id
A randomly generated GUID for each block.
Methods
add Case
deserialize
-
Deserializes from an object
Parameters
- serializationObject: any
the object to deserialize from
Returns void
- serializationObject: any
get Class Name
-
Returns string
class name of the block.
get Data Input
-
Given the name of a data input, returns the connection if it exists
Parameters
- name: string
the name of the input
Returns FlowGraphDataConnection<any> | undefined
the connection if it exists, undefined otherwise
- name: string
get Data Output
-
Given the name of a data output, returns the connection if it exists
Parameters
- name: string
the name of the output
Returns FlowGraphDataConnection<any> | undefined
the connection if it exists, undefined otherwise
- name: string
get Signal Input
-
Given a name of a signal input, return that input if it exists
Parameters
- name: string
the name of the input
Returns FlowGraphSignalConnection | undefined
if the input exists, the input. Otherwise, undefined.
- name: string
get Signal Output
-
Given a name of a signal output, return that input if it exists
Parameters
- name: string
the name of the input
Returns FlowGraphSignalConnection | undefined
if the input exists, the input. Otherwise, undefined.
- name: string
register Data Input
-
registerDataInput<T>(
name: string,
richType: RichType<T>,
defaultValue?: T,
): FlowGraphDataConnection<T>Registers a data input on the block.
Type Parameters
- T
Parameters
Returns FlowGraphDataConnection<T>
the created connection
register Data Output
-
registerDataOutput<T>(
name: string,
richType: RichType<T>,
defaultValue?: T,
): FlowGraphDataConnection<T>Registers a data output on the block.
Type Parameters
- T
Parameters
Returns FlowGraphDataConnection<T>
the created connection
remove Case
serialize
-
Serialize the block to a JSON representation.
Parameters
OptionalserializationObject: anythe object to serialize to.
Returns void
A block that executes a branch based on a selection.