Documentation
¶
Overview ¶
Package CPUParticles2D provides methods for working with CPUParticles2D object instances.
Index ¶
- type Advanced
- type Any
- type DrawOrder
- type EmissionShape
- type Expanded
- type Extension
- type ID
- type Instance
- func (self Instance) Amount() int
- func (self Instance) AngleCurve() Curve.Instance
- func (self Instance) AngleMax() Float.X
- func (self Instance) AngleMin() Float.X
- func (self Instance) AngularVelocityCurve() Curve.Instance
- func (self Instance) AngularVelocityMax() Float.X
- func (self Instance) AngularVelocityMin() Float.X
- func (self Instance) AnimOffsetCurve() Curve.Instance
- func (self Instance) AnimOffsetMax() Float.X
- func (self Instance) AnimOffsetMin() Float.X
- func (self Instance) AnimSpeedCurve() Curve.Instance
- func (self Instance) AnimSpeedMax() Float.X
- func (self Instance) AnimSpeedMin() Float.X
- func (self Instance) AsCPUParticles2D() Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode2D() Node2D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) Color() Color.RGBA
- func (self Instance) ColorInitialRamp() Gradient.Instance
- func (self Instance) ColorRamp() Gradient.Instance
- func (self Instance) ConvertFromParticles(particles Node.Instance)
- func (self Instance) DampingCurve() Curve.Instance
- func (self Instance) DampingMax() Float.X
- func (self Instance) DampingMin() Float.X
- func (self Instance) Direction() Vector2.XY
- func (self Instance) DrawOrder() DrawOrder
- func (self Instance) EmissionColors() []Color.RGBA
- func (self Instance) EmissionNormals() []Vector2.XY
- func (self Instance) EmissionPoints() []Vector2.XY
- func (self Instance) EmissionRectExtents() Vector2.XY
- func (self Instance) EmissionShape() EmissionShape
- func (self Instance) EmissionSphereRadius() Float.X
- func (self Instance) Emitting() bool
- func (self Instance) Explosiveness() Float.X
- func (self Instance) FixedFps() int
- func (self Instance) FractDelta() bool
- func (self Instance) Gravity() Vector2.XY
- func (self Instance) HueVariationCurve() Curve.Instance
- func (self Instance) HueVariationMax() Float.X
- func (self Instance) HueVariationMin() Float.X
- func (self Instance) ID() ID
- func (self Instance) InitialVelocityMax() Float.X
- func (self Instance) InitialVelocityMin() Float.X
- func (self Instance) Lifetime() Float.X
- func (self Instance) LifetimeRandomness() Float.X
- func (self Instance) LinearAccelCurve() Curve.Instance
- func (self Instance) LinearAccelMax() Float.X
- func (self Instance) LinearAccelMin() Float.X
- func (self Instance) LocalCoords() bool
- func (self Instance) OnFinished(cb func(), flags ...Signal.Flags)
- func (self Instance) OneShot() bool
- func (self Instance) OrbitVelocityCurve() Curve.Instance
- func (self Instance) OrbitVelocityMax() Float.X
- func (self Instance) OrbitVelocityMin() Float.X
- func (self Instance) ParticleFlagAlignY() bool
- func (self Instance) Preprocess() Float.X
- func (self Instance) RadialAccelCurve() Curve.Instance
- func (self Instance) RadialAccelMax() Float.X
- func (self Instance) RadialAccelMin() Float.X
- func (self Instance) Randomness() Float.X
- func (self Instance) RequestParticlesProcess(process_time Float.X)
- func (self Instance) Restart()
- func (self Instance) ScaleAmountCurve() Curve.Instance
- func (self Instance) ScaleAmountMax() Float.X
- func (self Instance) ScaleAmountMin() Float.X
- func (self Instance) ScaleCurveX() Curve.Instance
- func (self Instance) ScaleCurveY() Curve.Instance
- func (self Instance) Seed() int
- func (self Instance) SetAmount(value int)
- func (self Instance) SetAngleCurve(value Curve.Instance)
- func (self Instance) SetAngleMax(value Float.X)
- func (self Instance) SetAngleMin(value Float.X)
- func (self Instance) SetAngularVelocityCurve(value Curve.Instance)
- func (self Instance) SetAngularVelocityMax(value Float.X)
- func (self Instance) SetAngularVelocityMin(value Float.X)
- func (self Instance) SetAnimOffsetCurve(value Curve.Instance)
- func (self Instance) SetAnimOffsetMax(value Float.X)
- func (self Instance) SetAnimOffsetMin(value Float.X)
- func (self Instance) SetAnimSpeedCurve(value Curve.Instance)
- func (self Instance) SetAnimSpeedMax(value Float.X)
- func (self Instance) SetAnimSpeedMin(value Float.X)
- func (self Instance) SetColor(value Color.RGBA)
- func (self Instance) SetColorInitialRamp(value Gradient.Instance)
- func (self Instance) SetColorRamp(value Gradient.Instance)
- func (self Instance) SetDampingCurve(value Curve.Instance)
- func (self Instance) SetDampingMax(value Float.X)
- func (self Instance) SetDampingMin(value Float.X)
- func (self Instance) SetDirection(value Vector2.XY)
- func (self Instance) SetDrawOrder(value DrawOrder)
- func (self Instance) SetEmissionColors(value []Color.RGBA)
- func (self Instance) SetEmissionNormals(value []Vector2.XY)
- func (self Instance) SetEmissionPoints(value []Vector2.XY)
- func (self Instance) SetEmissionRectExtents(value Vector2.XY)
- func (self Instance) SetEmissionShape(value EmissionShape)
- func (self Instance) SetEmissionSphereRadius(value Float.X)
- 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) SetGravity(value Vector2.XY)
- func (self Instance) SetHueVariationCurve(value Curve.Instance)
- func (self Instance) SetHueVariationMax(value Float.X)
- func (self Instance) SetHueVariationMin(value Float.X)
- func (self Instance) SetInitialVelocityMax(value Float.X)
- func (self Instance) SetInitialVelocityMin(value Float.X)
- func (self Instance) SetLifetime(value Float.X)
- func (self Instance) SetLifetimeRandomness(value Float.X)
- func (self Instance) SetLinearAccelCurve(value Curve.Instance)
- func (self Instance) SetLinearAccelMax(value Float.X)
- func (self Instance) SetLinearAccelMin(value Float.X)
- func (self Instance) SetLocalCoords(value bool)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetOneShot(value bool)
- func (self Instance) SetOrbitVelocityCurve(value Curve.Instance)
- func (self Instance) SetOrbitVelocityMax(value Float.X)
- func (self Instance) SetOrbitVelocityMin(value Float.X)
- func (self Instance) SetParticleFlagAlignY(value bool)
- func (self Instance) SetPreprocess(value Float.X)
- func (self Instance) SetRadialAccelCurve(value Curve.Instance)
- func (self Instance) SetRadialAccelMax(value Float.X)
- func (self Instance) SetRadialAccelMin(value Float.X)
- func (self Instance) SetRandomness(value Float.X)
- func (self Instance) SetScaleAmountCurve(value Curve.Instance)
- func (self Instance) SetScaleAmountMax(value Float.X)
- func (self Instance) SetScaleAmountMin(value Float.X)
- func (self Instance) SetScaleCurveX(value Curve.Instance)
- func (self Instance) SetScaleCurveY(value Curve.Instance)
- func (self Instance) SetSeed(value int)
- func (self Instance) SetSpeedScale(value Float.X)
- func (self Instance) SetSplitScale(value bool)
- func (self Instance) SetSpread(value Float.X)
- func (self Instance) SetTangentialAccelCurve(value Curve.Instance)
- func (self Instance) SetTangentialAccelMax(value Float.X)
- func (self Instance) SetTangentialAccelMin(value Float.X)
- func (self Instance) SetTexture(value Texture2D.Instance)
- func (self Instance) SetUseFixedSeed(value bool)
- func (self Instance) SpeedScale() Float.X
- func (self Instance) SplitScale() bool
- func (self Instance) Spread() Float.X
- func (self Instance) TangentialAccelCurve() Curve.Instance
- func (self Instance) TangentialAccelMax() Float.X
- func (self Instance) TangentialAccelMin() Float.X
- func (self Instance) Texture() Texture2D.Instance
- func (self Instance) UseFixedSeed() bool
- func (self Instance) Virtual(name string) reflect.Value
- type Parameter
- type ParticleFlags
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 EmissionShape ¶
type EmissionShape int //gd:CPUParticles2D.EmissionShape
const ( /*All particles will be emitted from a single point.*/ EmissionShapePoint EmissionShape = 0 /*Particles will be emitted in the volume of a sphere flattened to two dimensions.*/ EmissionShapeSphere EmissionShape = 1 /*Particles will be emitted on the surface of a sphere flattened to two dimensions.*/ EmissionShapeSphereSurface EmissionShape = 2 /*Particles will be emitted in the area of a rectangle.*/ EmissionShapeRectangle EmissionShape = 3 /*Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors].*/ EmissionShapePoints EmissionShape = 4 /*Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors].*/ EmissionShapeDirectedPoints EmissionShape = 5 /*Represents the size of the [enum EmissionShape] enum.*/ EmissionShapeMax EmissionShape = 6 )
type Expanded ¶
type Expanded [1]gdclass.CPUParticles2D
type Extension ¶
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]) AsCPUParticles2D ¶
func (*Extension[T]) AsCanvasItem ¶
func (self *Extension[T]) AsCanvasItem() CanvasItem.Instance
type 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.
type Instance ¶
type Instance [1]gdclass.CPUParticles2D
CPU-based 2D particle node used to create a variety of particle systems and effects. See also [GPUParticles2D], which provides the same functionality with hardware acceleration, but may not run on older devices.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AngleCurve ¶
func (Instance) AngularVelocityCurve ¶
func (Instance) AngularVelocityMax ¶
func (Instance) AngularVelocityMin ¶
func (Instance) AnimOffsetCurve ¶
func (Instance) AnimOffsetMax ¶
func (Instance) AnimOffsetMin ¶
func (Instance) AnimSpeedCurve ¶
func (Instance) AnimSpeedMax ¶
func (Instance) AnimSpeedMin ¶
func (Instance) AsCPUParticles2D ¶
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) ColorInitialRamp ¶
func (Instance) ConvertFromParticles ¶
Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticleProcessMaterial].
func (Instance) DampingCurve ¶
func (Instance) DampingMax ¶
func (Instance) DampingMin ¶
func (Instance) EmissionColors ¶
func (Instance) EmissionNormals ¶
func (Instance) EmissionPoints ¶
func (Instance) EmissionRectExtents ¶
func (Instance) EmissionShape ¶
func (self Instance) EmissionShape() EmissionShape
func (Instance) EmissionSphereRadius ¶
func (Instance) Explosiveness ¶
func (Instance) FractDelta ¶
func (Instance) HueVariationCurve ¶
func (Instance) HueVariationMax ¶
func (Instance) HueVariationMin ¶
func (Instance) InitialVelocityMax ¶
func (Instance) InitialVelocityMin ¶
func (Instance) LifetimeRandomness ¶
func (Instance) LinearAccelCurve ¶
func (Instance) LinearAccelMax ¶
func (Instance) LinearAccelMin ¶
func (Instance) LocalCoords ¶
func (Instance) OnFinished ¶
func (Instance) OrbitVelocityCurve ¶
func (Instance) OrbitVelocityMax ¶
func (Instance) OrbitVelocityMin ¶
func (Instance) ParticleFlagAlignY ¶
func (Instance) Preprocess ¶
func (Instance) RadialAccelCurve ¶
func (Instance) RadialAccelMax ¶
func (Instance) RadialAccelMin ¶
func (Instance) Randomness ¶
func (Instance) RequestParticlesProcess ¶
Requests the particles to process for extra process time during a single frame. Useful for particle playback, if used in combination with [member use_fixed_seed] or by calling [method restart] with parameter [code]keep_seed[/code] set to [code]true[/code].
func (Instance) Restart ¶
func (self Instance) Restart()
Restarts the particle emitter. If [param keep_seed] is [code]true[/code], the current random seed will be preserved. Useful for seeking and playback.
func (Instance) ScaleAmountCurve ¶
func (Instance) ScaleAmountMax ¶
func (Instance) ScaleAmountMin ¶
func (Instance) ScaleCurveX ¶
func (Instance) ScaleCurveY ¶
func (Instance) SetAngleCurve ¶
func (Instance) SetAngleMax ¶
func (Instance) SetAngleMin ¶
func (Instance) SetAngularVelocityCurve ¶
func (Instance) SetAngularVelocityMax ¶
func (Instance) SetAngularVelocityMin ¶
func (Instance) SetAnimOffsetCurve ¶
func (Instance) SetAnimOffsetMax ¶
func (Instance) SetAnimOffsetMin ¶
func (Instance) SetAnimSpeedCurve ¶
func (Instance) SetAnimSpeedMax ¶
func (Instance) SetAnimSpeedMin ¶
func (Instance) SetColorInitialRamp ¶
func (Instance) SetColorRamp ¶
func (Instance) SetDampingCurve ¶
func (Instance) SetDampingMax ¶
func (Instance) SetDampingMin ¶
func (Instance) SetDirection ¶
func (Instance) SetDrawOrder ¶
func (Instance) SetEmissionColors ¶
func (Instance) SetEmissionNormals ¶
func (Instance) SetEmissionPoints ¶
func (Instance) SetEmissionRectExtents ¶
func (Instance) SetEmissionShape ¶
func (self Instance) SetEmissionShape(value EmissionShape)
func (Instance) SetEmissionSphereRadius ¶
func (Instance) SetEmitting ¶
func (Instance) SetExplosiveness ¶
func (Instance) SetFixedFps ¶
func (Instance) SetFractDelta ¶
func (Instance) SetGravity ¶
func (Instance) SetHueVariationCurve ¶
func (Instance) SetHueVariationMax ¶
func (Instance) SetHueVariationMin ¶
func (Instance) SetInitialVelocityMax ¶
func (Instance) SetInitialVelocityMin ¶
func (Instance) SetLifetime ¶
func (Instance) SetLifetimeRandomness ¶
func (Instance) SetLinearAccelCurve ¶
func (Instance) SetLinearAccelMax ¶
func (Instance) SetLinearAccelMin ¶
func (Instance) SetLocalCoords ¶
func (Instance) SetOneShot ¶
func (Instance) SetOrbitVelocityCurve ¶
func (Instance) SetOrbitVelocityMax ¶
func (Instance) SetOrbitVelocityMin ¶
func (Instance) SetParticleFlagAlignY ¶
func (Instance) SetPreprocess ¶
func (Instance) SetRadialAccelCurve ¶
func (Instance) SetRadialAccelMax ¶
func (Instance) SetRadialAccelMin ¶
func (Instance) SetRandomness ¶
func (Instance) SetScaleAmountCurve ¶
func (Instance) SetScaleAmountMax ¶
func (Instance) SetScaleAmountMin ¶
func (Instance) SetScaleCurveX ¶
func (Instance) SetScaleCurveY ¶
func (Instance) SetSpeedScale ¶
func (Instance) SetSplitScale ¶
func (Instance) SetTangentialAccelCurve ¶
func (Instance) SetTangentialAccelMax ¶
func (Instance) SetTangentialAccelMin ¶
func (Instance) SetTexture ¶
func (Instance) SetUseFixedSeed ¶
func (Instance) SpeedScale ¶
func (Instance) SplitScale ¶
func (Instance) TangentialAccelCurve ¶
func (Instance) TangentialAccelMax ¶
func (Instance) TangentialAccelMin ¶
func (Instance) UseFixedSeed ¶
type Parameter ¶
type Parameter int //gd:CPUParticles2D.Parameter
const ( /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties.*/ ParamInitialLinearVelocity Parameter = 0 /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties.*/ ParamAngularVelocity Parameter = 1 /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties.*/ ParamOrbitVelocity Parameter = 2 /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties.*/ ParamLinearAccel Parameter = 3 /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties.*/ ParamRadialAccel Parameter = 4 /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties.*/ ParamTangentialAccel Parameter = 5 /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties.*/ ParamDamping Parameter = 6 /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties.*/ ParamAngle Parameter = 7 /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties.*/ ParamScale Parameter = 8 /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties.*/ ParamHueVariation Parameter = 9 /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties.*/ ParamAnimSpeed Parameter = 10 /*Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties.*/ ParamAnimOffset Parameter = 11 /*Represents the size of the [enum Parameter] enum.*/ ParamMax Parameter = 12 )
type ParticleFlags ¶
type ParticleFlags int //gd:CPUParticles2D.ParticleFlags
const ( /*Use with [method set_particle_flag] to set [member particle_flag_align_y].*/ ParticleFlagAlignYToVelocity ParticleFlags = 0 /*Present for consistency with 3D particle nodes, not used in 2D.*/ ParticleFlagRotateY ParticleFlags = 1 /*Present for consistency with 3D particle nodes, not used in 2D.*/ ParticleFlagDisableZ ParticleFlags = 2 /*Represents the size of the [enum ParticleFlags] enum.*/ ParticleFlagMax ParticleFlags = 3 )