Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
VaryingType
VisualShader.swift:75enum VaryingType
Cases
case float
Varying is of type float.
case int
Varying is of type integer.
case uint
Varying is of type unsigned integer.
case vector2d
Varying is of type
Vector2
.case vector3d
Varying is of type
Vector3
.case vector4d
Varying is of type
Vector4
.case boolean
Varying is of type [bool].
case transform
Varying is of type
Transform3D
.case max
Represents the size of the
VaryingType
enum.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (24) members.
Types
Type members
static let nodeIdInvalid: Int
Denotes invalid
VisualShader
node.static let nodeIdOutput: Int
Denotes output node of
VisualShader
.class var godotClassName: StringName
Instance members
var graphOffset: Vector2
The offset vector of the whole graph.
func addNode(type: VisualShader.GType, node: VisualShaderNode?, position: Vector2, id: Int32
) Adds the specified
node
to the shader.func addVarying(name: String, mode: VisualShader.VaryingMode, type: VisualShader.VaryingType
) Adds a new varying value node to the shader.
func canConnectNodes(type: VisualShader.GType, fromNode: Int32, fromPort: Int32, toNode: Int32, toPort: Int32
) -> Bool Returns
true
if the specified nodes and ports can be connected together.func connectNodes(type: VisualShader.GType, fromNode: Int32, fromPort: Int32, toNode: Int32, toPort: Int32
) -> GodotError Connects the specified nodes and ports.
func connectNodesForced(type: VisualShader.GType, fromNode: Int32, fromPort: Int32, toNode: Int32, toPort: Int32
) Connects the specified nodes and ports, even if they can’t be connected. Such connection is invalid and will not function properly.
func disconnectNodes(type: VisualShader.GType, fromNode: Int32, fromPort: Int32, toNode: Int32, toPort: Int32
) Connects the specified nodes and ports.
func getNode(type: VisualShader.GType, id: Int32
) -> VisualShaderNode? Returns the shader node instance with specified
type
andid
.func getNodeConnections(type: VisualShader.GType
) -> VariantCollection<GDictionary> Returns the list of connected nodes with the specified type.
func getNodeList(type: VisualShader.GType
) -> PackedInt32Array Returns the list of all nodes in the shader with the specified type.
func getNodePosition(type: VisualShader.GType, id: Int32
) -> Vector2 Returns the position of the specified node within the shader graph.
func getValidNodeId(type: VisualShader.GType
) -> Int32 Returns next valid node ID that can be added to the shader graph.
func hasVarying(name: String
) -> Bool Returns
true
if the shader has a varying with the givenname
.func isNodeConnection(type: VisualShader.GType, fromNode: Int32, fromPort: Int32, toNode: Int32, toPort: Int32
) -> Bool Returns
true
if the specified node and port connection exist.func removeNode(type: VisualShader.GType, id: Int32
) Removes the specified node from the shader.
func removeVarying(name: String
) Removes a varying value node with the given
name
. Prints an error if a node with this name is not found.func replaceNode(type: VisualShader.GType, id: Int32, newClass: StringName
) Replaces the specified node with a node of new class type.
func setMode(Shader.Mode
) Sets the mode of this shader.
func setNodePosition(type: VisualShader.GType, id: Int32, position: Vector2
) Sets the position of the specified node.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.