Documentation
¶
Overview ¶
Package GPUParticles2D provides methods for working with GPUParticles2D object instances.
Index ¶
- type Advanced
- type Any
- type DrawOrder
- type EmitFlags
- type Instance
- func (self Instance) Amount() int
- func (self Instance) AmountRatio() Float.X
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsGPUParticles2D() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode2D() Node2D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) CaptureRect() Rect2.PositionSize
- func (self Instance) CollisionBaseSize() Float.X
- func (self Instance) ConvertFromParticles(particles [1]gdclass.Node)
- func (self Instance) DrawOrder() gdclass.GPUParticles2DDrawOrder
- func (self Instance) EmitParticle(xform Transform2D.OriginXY, velocity Vector2.XY, color Color.RGBA, ...)
- func (self Instance) Emitting() bool
- func (self Instance) Explosiveness() Float.X
- func (self Instance) FixedFps() int
- func (self Instance) FractDelta() bool
- func (self Instance) InterpToEnd() Float.X
- func (self Instance) Interpolate() bool
- func (self Instance) Lifetime() Float.X
- func (self Instance) LocalCoords() bool
- func (self Instance) OnFinished(cb func())
- func (self Instance) OneShot() bool
- func (self Instance) Preprocess() Float.X
- func (self Instance) ProcessMaterial() [1]gdclass.Material
- func (self Instance) Randomness() Float.X
- func (self Instance) Restart()
- func (self Instance) SetAmount(value int)
- func (self Instance) SetAmountRatio(value Float.X)
- func (self Instance) SetCollisionBaseSize(value Float.X)
- func (self Instance) SetDrawOrder(value gdclass.GPUParticles2DDrawOrder)
- func (self Instance) SetEmitting(value bool)
- func (self Instance) SetExplosiveness(value Float.X)
- func (self Instance) SetFixedFps(value int)
- func (self Instance) SetFractDelta(value bool)
- func (self Instance) SetInterpToEnd(value Float.X)
- func (self Instance) SetInterpolate(value bool)
- func (self Instance) SetLifetime(value Float.X)
- func (self Instance) SetLocalCoords(value bool)
- func (self Instance) SetOneShot(value bool)
- func (self Instance) SetPreprocess(value Float.X)
- func (self Instance) SetProcessMaterial(value [1]gdclass.Material)
- func (self Instance) SetRandomness(value Float.X)
- func (self Instance) SetSpeedScale(value Float.X)
- func (self Instance) SetSubEmitter(value string)
- func (self Instance) SetTexture(value [1]gdclass.Texture2D)
- func (self Instance) SetTrailEnabled(value bool)
- func (self Instance) SetTrailLifetime(value Float.X)
- func (self Instance) SetTrailSectionSubdivisions(value int)
- func (self Instance) SetTrailSections(value int)
- func (self Instance) SetVisibilityRect(value Rect2.PositionSize)
- func (self Instance) SpeedScale() Float.X
- func (self Instance) SubEmitter() string
- func (self Instance) Texture() [1]gdclass.Texture2D
- func (self Instance) TrailEnabled() bool
- func (self Instance) TrailLifetime() Float.X
- func (self Instance) TrailSectionSubdivisions() int
- func (self Instance) TrailSections() int
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) VisibilityRect() Rect2.PositionSize
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 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 (Instance) AmountRatio ¶
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsGPUParticles2D ¶
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 (Instance) ConvertFromParticles ¶
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) Explosiveness ¶
func (Instance) FractDelta ¶
func (Instance) InterpToEnd ¶
func (Instance) Interpolate ¶
func (Instance) LocalCoords ¶
func (Instance) OnFinished ¶
func (self Instance) OnFinished(cb func())
func (Instance) Preprocess ¶
func (Instance) ProcessMaterial ¶
func (Instance) Randomness ¶
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) SetAmountRatio ¶
func (Instance) SetCollisionBaseSize ¶
func (Instance) SetDrawOrder ¶
func (self Instance) SetDrawOrder(value gdclass.GPUParticles2DDrawOrder)
func (Instance) SetEmitting ¶
func (Instance) SetExplosiveness ¶
func (Instance) SetFixedFps ¶
func (Instance) SetFractDelta ¶
func (Instance) SetInterpToEnd ¶
func (Instance) SetInterpolate ¶
func (Instance) SetLifetime ¶
func (Instance) SetLocalCoords ¶
func (Instance) SetOneShot ¶
func (Instance) SetPreprocess ¶
func (Instance) SetProcessMaterial ¶
func (Instance) SetRandomness ¶
func (Instance) SetSpeedScale ¶
func (Instance) SetSubEmitter ¶
func (Instance) SetTexture ¶
func (Instance) SetTrailEnabled ¶
func (Instance) SetTrailLifetime ¶
func (Instance) SetTrailSectionSubdivisions ¶
func (Instance) SetTrailSections ¶
func (Instance) SetVisibilityRect ¶
func (self Instance) SetVisibilityRect(value Rect2.PositionSize)
func (Instance) SpeedScale ¶
func (Instance) SubEmitter ¶
func (Instance) TrailEnabled ¶
func (Instance) TrailLifetime ¶
func (Instance) TrailSectionSubdivisions ¶
func (Instance) TrailSections ¶
func (*Instance) UnsafePointer ¶
func (Instance) VisibilityRect ¶
func (self Instance) VisibilityRect() Rect2.PositionSize