AnimationNodeBlendSpace2D

package
v0.0.0-...-c909628 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package AnimationNodeBlendSpace2D provides methods for working with AnimationNodeBlendSpace2D 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
	AsAnimationNodeBlendSpace2D() Instance
}

type BlendMode

type BlendMode = gdclass.AnimationNodeBlendSpace2DBlendMode //gd:AnimationNodeBlendSpace2D.BlendMode
const (
	/*The interpolation between animations is linear.*/
	BlendModeInterpolated BlendMode = 0
	/*The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations.*/
	BlendModeDiscrete BlendMode = 1
	/*Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position.*/
	BlendModeDiscreteCarry BlendMode = 2
)

type Instance

A resource used by [AnimationNodeBlendTree]. [AnimationNodeBlendSpace1D] represents a virtual 2D space on which [AnimationRootNode]s are placed. Outputs the linear blend of the three adjacent animations using a [Vector2] weight. Adjacent in this context means the three [AnimationRootNode]s making up the triangle that contains the current value. You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to triangulate the blend space by hand.

var Nil Instance

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

func New

func New() Instance

func (Instance) AddBlendPoint

func (self Instance) AddBlendPoint(node [1]gdclass.AnimationRootNode, pos Vector2.XY)

Adds a new point that represents a [param node] at the position set by [param pos]. You can insert it at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array.

func (Instance) AddTriangle

func (self Instance) AddTriangle(x int, y int, z int)

Creates a new triangle using three points [param x], [param y], and [param z]. Triangles can overlap. You can insert the triangle at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array.

func (Instance) AsAnimationNode

func (self Instance) AsAnimationNode() AnimationNode.Instance

func (Instance) AsAnimationNodeBlendSpace2D

func (self Instance) AsAnimationNodeBlendSpace2D() Instance

func (Instance) AsAnimationRootNode

func (self Instance) AsAnimationRootNode() AnimationRootNode.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) AutoTriangles

func (self Instance) AutoTriangles() bool

func (Instance) BlendMode

func (Instance) GetBlendPointCount

func (self Instance) GetBlendPointCount() int

Returns the number of points in the blend space.

func (Instance) GetBlendPointNode

func (self Instance) GetBlendPointNode(point int) [1]gdclass.AnimationRootNode

Returns the [AnimationRootNode] referenced by the point at index [param point].

func (Instance) GetBlendPointPosition

func (self Instance) GetBlendPointPosition(point int) Vector2.XY

Returns the position of the point at index [param point].

func (Instance) GetTriangleCount

func (self Instance) GetTriangleCount() int

Returns the number of triangles in the blend space.

func (Instance) GetTrianglePoint

func (self Instance) GetTrianglePoint(triangle int, point int) int

Returns the position of the point at index [param point] in the triangle of index [param triangle].

func (Instance) MaxSpace

func (self Instance) MaxSpace() Vector2.XY

func (Instance) MinSpace

func (self Instance) MinSpace() Vector2.XY

func (Instance) OnTrianglesUpdated

func (self Instance) OnTrianglesUpdated(cb func())

func (Instance) RemoveBlendPoint

func (self Instance) RemoveBlendPoint(point int)

Removes the point at index [param point] from the blend space.

func (Instance) RemoveTriangle

func (self Instance) RemoveTriangle(triangle int)

Removes the triangle at index [param triangle] from the blend space.

func (Instance) SetAutoTriangles

func (self Instance) SetAutoTriangles(value bool)

func (Instance) SetBlendMode

func (self Instance) SetBlendMode(value gdclass.AnimationNodeBlendSpace2DBlendMode)

func (Instance) SetBlendPointNode

func (self Instance) SetBlendPointNode(point int, node [1]gdclass.AnimationRootNode)

Changes the [AnimationNode] referenced by the point at index [param point].

func (Instance) SetBlendPointPosition

func (self Instance) SetBlendPointPosition(point int, pos Vector2.XY)

Updates the position of the point at index [param point] on the blend axis.

func (Instance) SetMaxSpace

func (self Instance) SetMaxSpace(value Vector2.XY)

func (Instance) SetMinSpace

func (self Instance) SetMinSpace(value Vector2.XY)

func (Instance) SetSnap

func (self Instance) SetSnap(value Vector2.XY)

func (Instance) SetSync

func (self Instance) SetSync(value bool)

func (Instance) SetXLabel

func (self Instance) SetXLabel(value string)

func (Instance) SetYLabel

func (self Instance) SetYLabel(value string)

func (Instance) Snap

func (self Instance) Snap() Vector2.XY

func (Instance) Sync

func (self Instance) Sync() bool

func (*Instance) UnsafePointer

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

func (Instance) Virtual

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

func (Instance) XLabel

func (self Instance) XLabel() string

func (Instance) YLabel

func (self Instance) YLabel() string

Jump to

Keyboard shortcuts

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