Class GeometryInputBlock
Hierarchy (View Summary)
- NodeGeometryBlock
- GeometryInputBlock
Constructors
constructor
-
new GeometryInputBlock(
name: string,
type?: NodeGeometryBlockConnectionPointTypes,
): GeometryInputBlockCreates a new InputBlock
Parameters
- name: string
defines the block name
- type: NodeGeometryBlockConnectionPointTypes = NodeGeometryBlockConnectionPointTypes.AutoDetect
defines the type of the input (can be set to NodeGeometryBlockConnectionPointTypes.AutoDetect)
Returns GeometryInputBlock
- 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 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
build Execution Time
-
get buildExecutionTime(): number
Gets the time spent to build this block (in ms)
Returns number
contextual Value
-
Gets or sets the current contextual value
Returns NodeGeometryContextualSources
-
Parameters
Returns void
inputs
-
Gets the list of input points
Returns NodeGeometryConnectionPoint[]
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 if this block is an input
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
is Unique
-
get isUnique(): boolean
Gets a boolean indicating that this block can only be used once per NodeGeometry
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 geometry output component
Returns NodeGeometryConnectionPoint
outputs
-
Gets the list of output points
Returns NodeGeometryConnectionPoint[]
type
-
Gets or sets the connection point type (default is float)
Returns NodeGeometryBlockConnectionPointTypes
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
auto Configure
-
Lets the block try to connect some inputs automatically
Parameters
- _nodeGeometry: NodeGeometry
defines the node geometry to use for auto connection
Returns void
- _nodeGeometry: NodeGeometry
build
-
Build the current node and generate the vertex data
Parameters
- state: NodeGeometryBuildState
defines the current generation state
Returns boolean
true if already built
- state: NodeGeometryBuildState
clone
-
Clone the current block to a new identical block
Returns NodeGeometryBlock | null
a copy of the current block
get Class Name
-
Gets the current class name
Returns string
the class name
get Descendant Of Predicate
-
getDescendantOfPredicate(
predicate: (block: NodeGeometryBlock) => boolean,
): Nullable<NodeGeometryBlock>Get the first descendant using a predicate
Parameters
- predicate: (block: NodeGeometryBlock) => boolean
defines the predicate to check
Returns Nullable<NodeGeometryBlock>
descendant or null if none found
- predicate: (block: NodeGeometryBlock) => boolean
get Input By Name
-
Find an input by its name
Parameters
- name: string
defines the name of the input to look for
Returns NodeGeometryConnectionPoint | null
the input or null if not found
- name: string
get Output By Name
-
Find an output by its name
Parameters
- name: string
defines the name of the output to look for
Returns NodeGeometryConnectionPoint | null
the output or null if not found
- name: string
initialize
-
Initialize the block and prepare the context for build
Returns void
is An Ancestor Of
-
Checks if the current block is an ancestor of a given block
Parameters
- block: NodeGeometryBlock
defines the potential descendant block to check
Returns boolean
true if block is a descendant
- block: NodeGeometryBlock
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: NodeGeometryBlockConnectionPointTypes,
isOptional?: boolean,
value?: any,
valueMin?: any,
valueMax?: any,
): GeometryInputBlockRegister a new input. Must be called inside a block constructor
Parameters
- name: string
defines the connection point name
- type: NodeGeometryBlockConnectionPointTypes
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 GeometryInputBlock
the current block
- name: string
register Output
-
registerOutput(
name: string,
type: NodeGeometryBlockConnectionPointTypes,
point?: NodeGeometryConnectionPoint,
): GeometryInputBlockRegister a new output. Must be called inside a block constructor
Parameters
- name: string
defines the connection point name
- type: NodeGeometryBlockConnectionPointTypes
defines the connection point type
Optionalpoint: NodeGeometryConnectionPointan already created connection point. If not provided, create a new one
Returns GeometryInputBlock
the current block
- name: string
set Default Value
-
Set the input block to its default value (based on its type)
Returns void
Block used to expose an input value