GPUParticles2D

package
v0.0.0-...-e9402f6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

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

type DrawOrder

type DrawOrder = gdclass.GPUParticles2DDrawOrder //gd:GPUParticles2D.DrawOrder
const (
	/*Particles are drawn in the order emitted.*/
	DrawOrderIndex DrawOrder = 0
	/*Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front.*/
	DrawOrderLifetime DrawOrder = 1
	/*Particles are drawn in reverse order of remaining lifetime. In other words, the particle with the lowest lifetime is drawn at the front.*/
	DrawOrderReverseLifetime DrawOrder = 2
)

type EmitFlags

type EmitFlags = gdclass.GPUParticles2DEmitFlags //gd:GPUParticles2D.EmitFlags
const (
	/*Particle starts at the specified position.*/
	EmitFlagPosition EmitFlags = 1
	/*Particle starts with specified rotation and scale.*/
	EmitFlagRotationScale EmitFlags = 2
	/*Particle starts with the specified velocity vector, which defines the emission direction and speed.*/
	EmitFlagVelocity EmitFlags = 4
	/*Particle starts with specified color.*/
	EmitFlagColor EmitFlags = 8
	/*Particle starts with specified [code]CUSTOM[/code] data.*/
	EmitFlagCustom EmitFlags = 16
)

type Instance

type Instance [1]gdclass.GPUParticles2D

2D particle node used to create a variety of particle systems and effects. [GPUParticles2D] features an emitter that generates some number of particles at a given rate. Use the [member process_material] property to add a [ParticleProcessMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles. 2D particles can optionally collide with [LightOccluder2D], but they don't collide with [PhysicsBody2D] nodes.

var Nil Instance

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

func New

func New() Instance

func (Instance) Amount

func (self Instance) Amount() int

func (Instance) AmountRatio

func (self Instance) AmountRatio() Float.X

func (Instance) AsCanvasItem

func (self Instance) AsCanvasItem() CanvasItem.Instance

func (Instance) AsGPUParticles2D

func (self Instance) AsGPUParticles2D() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode2D

func (self Instance) AsNode2D() Node2D.Instance

func (Instance) AsObject

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

func (Instance) CaptureRect

func (self Instance) CaptureRect() Rect2.PositionSize

Returns a rectangle containing the positions of all existing particles. [b]Note:[/b] When using threaded rendering this method synchronizes the rendering thread. Calling it often may have a negative impact on performance.

func (Instance) CollisionBaseSize

func (self Instance) CollisionBaseSize() Float.X

func (Instance) ConvertFromParticles

func (self Instance) ConvertFromParticles(particles [1]gdclass.Node)

Sets this node's properties to match a given [CPUParticles2D] node.

func (Instance) DrawOrder

func (self Instance) DrawOrder() gdclass.GPUParticles2DDrawOrder

func (Instance) EmitParticle

func (self Instance) EmitParticle(xform Transform2D.OriginXY, velocity Vector2.XY, color Color.RGBA, custom Color.RGBA, flags int)

Emits a single particle. Whether [param xform], [param velocity], [param color] and [param custom] are applied depends on the value of [param flags]. See [enum EmitFlags]. The default ParticleProcessMaterial will overwrite [param color] and use the contents of [param custom] as [code](rotation, age, animation, lifetime)[/code].

func (Instance) Emitting

func (self Instance) Emitting() bool

func (Instance) Explosiveness

func (self Instance) Explosiveness() Float.X

func (Instance) FixedFps

func (self Instance) FixedFps() int

func (Instance) FractDelta

func (self Instance) FractDelta() bool

func (Instance) InterpToEnd

func (self Instance) InterpToEnd() Float.X

func (Instance) Interpolate

func (self Instance) Interpolate() bool

func (Instance) Lifetime

func (self Instance) Lifetime() Float.X

func (Instance) LocalCoords

func (self Instance) LocalCoords() bool

func (Instance) OnFinished

func (self Instance) OnFinished(cb func())

func (Instance) OneShot

func (self Instance) OneShot() bool

func (Instance) Preprocess

func (self Instance) Preprocess() Float.X

func (Instance) ProcessMaterial

func (self Instance) ProcessMaterial() [1]gdclass.Material

func (Instance) Randomness

func (self Instance) Randomness() Float.X

func (Instance) Restart

func (self Instance) Restart()

Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling. [b]Note:[/b] The [signal finished] signal is only emitted by [member one_shot] emitters.

func (Instance) SetAmount

func (self Instance) SetAmount(value int)

func (Instance) SetAmountRatio

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

func (Instance) SetCollisionBaseSize

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

func (Instance) SetDrawOrder

func (self Instance) SetDrawOrder(value gdclass.GPUParticles2DDrawOrder)

func (Instance) SetEmitting

func (self Instance) SetEmitting(value bool)

func (Instance) SetExplosiveness

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

func (Instance) SetFixedFps

func (self Instance) SetFixedFps(value int)

func (Instance) SetFractDelta

func (self Instance) SetFractDelta(value bool)

func (Instance) SetInterpToEnd

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

func (Instance) SetInterpolate

func (self Instance) SetInterpolate(value bool)

func (Instance) SetLifetime

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

func (Instance) SetLocalCoords

func (self Instance) SetLocalCoords(value bool)

func (Instance) SetOneShot

func (self Instance) SetOneShot(value bool)

func (Instance) SetPreprocess

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

func (Instance) SetProcessMaterial

func (self Instance) SetProcessMaterial(value [1]gdclass.Material)

func (Instance) SetRandomness

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

func (Instance) SetSpeedScale

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

func (Instance) SetSubEmitter

func (self Instance) SetSubEmitter(value string)

func (Instance) SetTexture

func (self Instance) SetTexture(value [1]gdclass.Texture2D)

func (Instance) SetTrailEnabled

func (self Instance) SetTrailEnabled(value bool)

func (Instance) SetTrailLifetime

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

func (Instance) SetTrailSectionSubdivisions

func (self Instance) SetTrailSectionSubdivisions(value int)

func (Instance) SetTrailSections

func (self Instance) SetTrailSections(value int)

func (Instance) SetVisibilityRect

func (self Instance) SetVisibilityRect(value Rect2.PositionSize)

func (Instance) SpeedScale

func (self Instance) SpeedScale() Float.X

func (Instance) SubEmitter

func (self Instance) SubEmitter() string

func (Instance) Texture

func (self Instance) Texture() [1]gdclass.Texture2D

func (Instance) TrailEnabled

func (self Instance) TrailEnabled() bool

func (Instance) TrailLifetime

func (self Instance) TrailLifetime() Float.X

func (Instance) TrailSectionSubdivisions

func (self Instance) TrailSectionSubdivisions() int

func (Instance) TrailSections

func (self Instance) TrailSections() int

func (*Instance) UnsafePointer

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

func (Instance) Virtual

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

func (Instance) VisibilityRect

func (self Instance) VisibilityRect() Rect2.PositionSize

Jump to

Keyboard shortcuts

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