Class ParticleInputBlock
Hierarchy (View Summary)
- NodeParticleBlock
- ParticleInputBlock
Constructors
constructor
-
new ParticleInputBlock(
name: string,
type?: NodeParticleBlockConnectionPointTypes,
): ParticleInputBlockCreates a new InputBlock
Parameters
- name: string
defines the block name
- type: NodeParticleBlockConnectionPointTypes = NodeParticleBlockConnectionPointTypes.AutoDetect
defines the type of the input (can be set to NodeParticleBlockConnectionPointTypes.AutoDetect)
Returns ParticleInputBlock
- name: string
Properties
comments
A free comment about the block
display In Inspector
Gets or sets a boolean indicating that this input is displayed in the Inspector
group In Inspector
Gets or sets the group to use to display this block in the Inspector
max
Gets or set a value used to limit the range of float values
min
Gets or set a value used to limit the range of float values
on Build Observable
Gets an observable raised when the block is built
on Dispose Observable
Gets an observable raised when the block is disposed
on Input Changed Observable
Gets an observable raised when the inputs of the block change
on Value Changed Observable
Gets an observable raised when the value is changed
unique Id
Gets or sets the unique id of the node
visible On Frame
Gets or sets a boolean indicating that this input can be edited from a collapsed frame
Accessors
contextual Value
-
Gets or sets the current contextual value
Returns NodeParticleContextualSources
-
Parameters
Returns void
inputs
-
Gets the list of input points
Returns NodeParticleConnectionPoint[]
is Contextual
-
get isContextual(): boolean
Gets a boolean indicating that the current connection point is a contextual value
Returns boolean
is Debug
-
get isDebug(): boolean
Gets a boolean indicating if this block is a debug block
Returns boolean
is Input
-
get isInput(): boolean
Gets a boolean indicating that this block is an input block
Returns boolean
is System
-
get isSystem(): boolean
Gets a boolean indicating that this block is a system block
Returns boolean
is System Source
-
get isSystemSource(): boolean
Gets a boolean indicating that the current connection point is a system source
Returns boolean
is Teleport In
-
get isTeleportIn(): boolean
Gets a boolean indicating if this block is a teleport in
Returns boolean
is Teleport Out
-
get isTeleportOut(): boolean
Gets a boolean indicating if this block is a teleport out
Returns boolean
name
-
get name(): string
Gets or set the name of the block
Returns string
-
set name(value: string): void
Parameters
- value: string
Returns void
output
-
Gets the output component
Returns NodeParticleConnectionPoint
outputs
-
Gets the list of output points
Returns NodeParticleConnectionPoint[]
system Source
-
Gets or sets the system source used by this input block
Returns NodeParticleSystemSources
-
Parameters
- value: NodeParticleSystemSources
Returns void
type
-
Gets or sets the connection point type (default is float)
Returns NodeParticleBlockConnectionPointTypes
value
-
get value(): any
Gets or sets the value of that point. Please note that this value will be ignored if valueCallback is defined
Returns any
-
set value(value: any): void
Parameters
- value: any
Returns void
value Callback
-
get valueCallback(): () => any
Gets or sets a callback used to get the value of that point. Please note that setting this value will force the connection point to ignore the value property
Returns () => any
-
set valueCallback(value: () => any): void
Parameters
- value: () => any
Returns void
Methods
_ build
-
Builds the block. Must be implemented by derived classes.
Parameters
- state: NodeParticleBuildState
Returns void
build
-
Builds the block
Parameters
- state: NodeParticleBuildState
defines the current build state
Returns boolean
the built block
- state: NodeParticleBuildState
clone
-
Clone the current block to a new identical block
Returns NodeParticleBlock | null
a copy of the current block
dispose
-
Release resources
Returns void
get Class Name
-
Gets the current class name
Returns string
the class name
get Input By Name
-
Find an input by its name
Parameters
- name: string
defines the name of the input to look for
Returns NodeParticleConnectionPoint | null
the input or null if not found
- name: string
is An Ancestor Of
-
Checks if the current block is an ancestor of a given block
Parameters
- block: NodeParticleBlock
defines the potential descendant block to check
Returns boolean
true if block is a descendant
- block: NodeParticleBlock
is An Ancestor Of Type
-
Checks if the current block is an ancestor of a given type
Parameters
- type: string
defines the potential type to check
Returns boolean
true if block is a descendant
- type: string
register Input
-
registerInput(
name: string,
type: NodeParticleBlockConnectionPointTypes,
isOptional?: boolean,
value?: any,
valueMin?: any,
valueMax?: any,
): ParticleInputBlockRegister a new input. Must be called inside a block constructor
Parameters
- name: string
defines the connection point name
- type: NodeParticleBlockConnectionPointTypes
defines the connection point type
- isOptional: boolean = false
defines a boolean indicating that this input can be omitted
Optionalvalue: anyvalue to return if there is no connection
OptionalvalueMin: anymin value accepted for value
OptionalvalueMax: anymax value accepted for value
Returns ParticleInputBlock
the current block
- name: string
register Output
-
registerOutput(
name: string,
type: NodeParticleBlockConnectionPointTypes,
point?: NodeParticleConnectionPoint,
): ParticleInputBlockRegister a new output. Must be called inside a block constructor
Parameters
- name: string
defines the connection point name
- type: NodeParticleBlockConnectionPointTypes
defines the connection point type
Optionalpoint: NodeParticleConnectionPointan already created connection point. If not provided, create a new one
Returns ParticleInputBlock
the current block
- name: string
serialize
-
Serializes this block in a JSON representation
Returns any
the serialized block object
set Default Value
-
Set the input block to its default value (based on its type)
Returns void
Block used to expose an input value