SpriteBase3D

package
v0.0.0-...-ff35923 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 32 Imported by: 0

Documentation

Overview

A node that displays 2D texture information in a 3D environment. See also graphics.gd/classdb/Sprite3D where many other properties are defined.

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 AlphaCutMode

type AlphaCutMode int //gd:SpriteBase3D.AlphaCutMode
const (
	// This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping.
	AlphaCutDisabled AlphaCutMode = 0
	// This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [graphics.gd/classdb/ProjectSettings] "rendering/anti_aliasing/quality/screen_space_aa"). On the bright side, this mode doesn't suffer from transparency sorting issues when multiple transparent materials are overlapping. This mode is also known as alpha testing or 1-bit transparency.
	AlphaCutDiscard AlphaCutMode = 1
	// This mode draws fully opaque pixels in the depth prepass. This is slower than [AlphaCutDisabled] or [AlphaCutDiscard], but it allows displaying translucent areas and smooth edges while using proper sorting.
	AlphaCutOpaquePrepass AlphaCutMode = 2
	// This mode draws cuts off all values below a spatially-deterministic threshold, the rest will remain opaque.
	AlphaCutHash AlphaCutMode = 3
)

type Any

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

type DrawFlags

type DrawFlags int //gd:SpriteBase3D.DrawFlags
const (
	// If set, the texture's transparency and the opacity are used to make those parts of the sprite invisible.
	FlagTransparent DrawFlags = 0
	// If set, lights in the environment affect the sprite.
	FlagShaded DrawFlags = 1
	// If set, texture can be seen from the back as well. If not, the texture is invisible when looking at it from behind.
	FlagDoubleSided DrawFlags = 2
	// Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
	FlagDisableDepthTest DrawFlags = 3
	// Label is scaled by depth so that it always appears the same size on screen.
	FlagFixedSize DrawFlags = 4
	// Represents the size of the [DrawFlags] enum.
	FlagMax DrawFlags = 5
)

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsGeometryInstance3D

func (self *Extension[T]) AsGeometryInstance3D() GeometryInstance3D.Instance

func (*Extension[T]) AsNode

func (self *Extension[T]) AsNode() Node.Instance

func (*Extension[T]) AsNode3D

func (self *Extension[T]) AsNode3D() Node3D.Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsSpriteBase3D

func (self *Extension[T]) AsSpriteBase3D() Instance

func (*Extension[T]) AsVisualInstance3D

func (self *Extension[T]) AsVisualInstance3D() VisualInstance3D.Instance

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.SpriteBase3D

Instance of the class with convieniently typed arguments and results.

var Nil Instance

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

func New

func New() Instance

func (Instance) AlphaAntialiasingEdge

func (self Instance) AlphaAntialiasingEdge() Float.X

func (Instance) AlphaAntialiasingMode

func (self Instance) AlphaAntialiasingMode() BaseMaterial3D.AlphaAntiAliasing

func (Instance) AlphaCut

func (self Instance) AlphaCut() AlphaCutMode

func (Instance) AlphaHashScale

func (self Instance) AlphaHashScale() Float.X

func (Instance) AlphaScissorThreshold

func (self Instance) AlphaScissorThreshold() Float.X

func (Instance) AsGeometryInstance3D

func (self Instance) AsGeometryInstance3D() GeometryInstance3D.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

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

func (Instance) AsSpriteBase3D

func (self Instance) AsSpriteBase3D() Instance

func (Instance) AsVisualInstance3D

func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance

func (Instance) Axis

func (self Instance) Axis() Vector3.Axis

func (Instance) Billboard

func (self Instance) Billboard() BaseMaterial3D.BillboardMode

func (Instance) Centered

func (self Instance) Centered() bool

func (Instance) DoubleSided

func (self Instance) DoubleSided() bool

func (Instance) FixedSize

func (self Instance) FixedSize() bool

func (Instance) FlipH

func (self Instance) FlipH() bool

func (Instance) FlipV

func (self Instance) FlipV() bool

func (Instance) GenerateTriangleMesh

func (self Instance) GenerateTriangleMesh() TriangleMesh.Instance

Returns a graphics.gd/classdb/TriangleMesh with the sprite's vertices following its current configuration (such as its Instance.Axis and Instance.PixelSize).

func (Instance) GetItemRect

func (self Instance) GetItemRect() Rect2.PositionSize

Returns the rectangle representing this sprite.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) Modulate

func (self Instance) Modulate() Color.RGBA

func (Instance) NoDepthTest

func (self Instance) NoDepthTest() bool

func (Instance) Offset

func (self Instance) Offset() Vector2.XY

func (Instance) PixelSize

func (self Instance) PixelSize() Float.X

func (Instance) RenderPriority

func (self Instance) RenderPriority() int

func (Instance) SetAlphaAntialiasingEdge

func (self Instance) SetAlphaAntialiasingEdge(value Float.X)

func (Instance) SetAlphaAntialiasingMode

func (self Instance) SetAlphaAntialiasingMode(value BaseMaterial3D.AlphaAntiAliasing)

func (Instance) SetAlphaCut

func (self Instance) SetAlphaCut(value AlphaCutMode)

func (Instance) SetAlphaHashScale

func (self Instance) SetAlphaHashScale(value Float.X)

func (Instance) SetAlphaScissorThreshold

func (self Instance) SetAlphaScissorThreshold(value Float.X)

func (Instance) SetAxis

func (self Instance) SetAxis(value Vector3.Axis)

func (Instance) SetBillboard

func (self Instance) SetBillboard(value BaseMaterial3D.BillboardMode)

func (Instance) SetCentered

func (self Instance) SetCentered(value bool)

func (Instance) SetDoubleSided

func (self Instance) SetDoubleSided(value bool)

func (Instance) SetFixedSize

func (self Instance) SetFixedSize(value bool)

func (Instance) SetFlipH

func (self Instance) SetFlipH(value bool)

func (Instance) SetFlipV

func (self Instance) SetFlipV(value bool)

func (Instance) SetModulate

func (self Instance) SetModulate(value Color.RGBA)

func (Instance) SetNoDepthTest

func (self Instance) SetNoDepthTest(value bool)

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetOffset

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

func (Instance) SetPixelSize

func (self Instance) SetPixelSize(value Float.X)

func (Instance) SetRenderPriority

func (self Instance) SetRenderPriority(value int)

func (Instance) SetShaded

func (self Instance) SetShaded(value bool)

func (Instance) SetTextureFilter

func (self Instance) SetTextureFilter(value BaseMaterial3D.TextureFilter)

func (Instance) SetTransparent

func (self Instance) SetTransparent(value bool)

func (Instance) Shaded

func (self Instance) Shaded() bool

func (Instance) TextureFilter

func (self Instance) TextureFilter() BaseMaterial3D.TextureFilter

func (Instance) Transparent

func (self Instance) Transparent() bool

func (Instance) Virtual

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

Jump to

Keyboard shortcuts

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