VisualShaderNode

package
v0.0.0-...-ae8aae0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package VisualShaderNode provides methods for working with VisualShaderNode object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsVisualShaderNode() Instance
}

type Instance

type Instance [1]gdclass.VisualShaderNode

Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node also has connection ports that allow to connect it to another nodes and control the flow of the shader.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsVisualShaderNode

func (self Instance) AsVisualShaderNode() Instance

func (Instance) ClearDefaultInputValues

func (self Instance) ClearDefaultInputValues()

Clears the default input ports value.

func (Instance) DefaultInputValues

func (self Instance) DefaultInputValues() []any

func (Instance) GetDefaultInputPort

func (self Instance) GetDefaultInputPort(atype gdclass.VisualShaderNodePortType) int

Returns the input port which should be connected by default when this node is created as a result of dragging a connection from an existing node to the empty space on the graph.

func (Instance) GetInputPortDefaultValue

func (self Instance) GetInputPortDefaultValue(port int) any

Returns the default value of the input [param port].

func (Instance) LinkedParentGraphFrame

func (self Instance) LinkedParentGraphFrame() int

func (Instance) OutputPortForPreview

func (self Instance) OutputPortForPreview() int

func (Instance) RemoveInputPortDefaultValue

func (self Instance) RemoveInputPortDefaultValue(port int)

Removes the default value of the input [param port].

func (Instance) SetDefaultInputValues

func (self Instance) SetDefaultInputValues(value []any)

func (Instance) SetInputPortDefaultValue

func (self Instance) SetInputPortDefaultValue(port int, value any)

Sets the default [param value] for the selected input [param port].

func (Instance) SetLinkedParentGraphFrame

func (self Instance) SetLinkedParentGraphFrame(value int)

func (Instance) SetOutputPortForPreview

func (self Instance) SetOutputPortForPreview(value int)

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type PortType

type PortType = gdclass.VisualShaderNodePortType //gd:VisualShaderNode.PortType
const (
	/*Floating-point scalar. Translated to [code skip-lint]float[/code] type in shader code.*/
	PortTypeScalar PortType = 0
	/*Integer scalar. Translated to [code skip-lint]int[/code] type in shader code.*/
	PortTypeScalarInt PortType = 1
	/*Unsigned integer scalar. Translated to [code skip-lint]uint[/code] type in shader code.*/
	PortTypeScalarUint PortType = 2
	/*2D vector of floating-point values. Translated to [code skip-lint]vec2[/code] type in shader code.*/
	PortTypeVector2d PortType = 3
	/*3D vector of floating-point values. Translated to [code skip-lint]vec3[/code] type in shader code.*/
	PortTypeVector3d PortType = 4
	/*4D vector of floating-point values. Translated to [code skip-lint]vec4[/code] type in shader code.*/
	PortTypeVector4d PortType = 5
	/*Boolean type. Translated to [code skip-lint]bool[/code] type in shader code.*/
	PortTypeBoolean PortType = 6
	/*Transform type. Translated to [code skip-lint]mat4[/code] type in shader code.*/
	PortTypeTransform PortType = 7
	/*Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes.*/
	PortTypeSampler PortType = 8
	/*Represents the size of the [enum PortType] enum.*/
	PortTypeMax PortType = 9
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL