Documentation
¶
Overview ¶
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.
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) MoreArgs() MoreArgs
- 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 MoreArgs
- 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 [EmissionPoints]. Particle color will be modulated by [EmissionColors]. // // [EmissionColors]: https://pkg.go.dev/graphics.gd/classdb/#Instance.EmissionColors // [EmissionPoints]: https://pkg.go.dev/graphics.gd/classdb/#Instance.EmissionPoints EmissionShapePoints EmissionShape = 4 // Particles will be emitted at a position chosen randomly among [EmissionPoints]. Particle velocity and rotation will be set based on [EmissionNormals]. Particle color will be modulated by [EmissionColors]. // // [EmissionColors]: https://pkg.go.dev/graphics.gd/classdb/#Instance.EmissionColors // [EmissionNormals]: https://pkg.go.dev/graphics.gd/classdb/#Instance.EmissionNormals // [EmissionPoints]: https://pkg.go.dev/graphics.gd/classdb/#Instance.EmissionPoints EmissionShapeDirectedPoints EmissionShape = 5 // Represents the size of the [EmissionShape] enum. EmissionShapeMax EmissionShape = 6 )
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
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 (Instance) AngleCurve ¶
Each particle's rotation will be animated along this Curve. Should be a unit Curve.
func (Instance) AngularVelocityCurve ¶
Each particle's angular velocity will vary along this Curve. Should be a unit Curve.
func (Instance) AngularVelocityMax ¶
Maximum initial angular velocity (rotation speed) applied to each particle in degrees per second.
func (Instance) AngularVelocityMin ¶
Minimum equivalent of AngularVelocityMax.
func (Instance) AnimOffsetCurve ¶
Each particle's animation offset will vary along this Curve. Should be a unit Curve.
func (Instance) AnimOffsetMax ¶
Maximum animation offset that corresponds to frame index in the texture. 0 is the first frame, 1 is the last one. See CanvasItemMaterial.ParticlesAnimation.
func (Instance) AnimOffsetMin ¶
Minimum equivalent of AnimOffsetMax.
func (Instance) AnimSpeedCurve ¶
Each particle's animation speed will vary along this Curve. Should be a unit Curve.
func (Instance) AnimSpeedMax ¶
Maximum particle animation speed. Animation speed of 1 means that the particles will make full 0 to 1 offset cycle during lifetime, 2 means 2 cycles etc.
With animation speed greater than 1, remember to enable CanvasItemMaterial.ParticlesAnimLoop property if you want the animation to repeat.
func (Instance) AnimSpeedMin ¶
Minimum equivalent of AnimSpeedMax.
func (Instance) AsCPUParticles2D ¶
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) Color ¶
Each particle's initial color. If Texture is defined, it will be multiplied by this color.
func (Instance) ColorInitialRamp ¶
Each particle's initial color will vary along this Gradient (multiplied with Color).
func (Instance) ColorRamp ¶
Each particle's color will vary along this Gradient over its lifetime (multiplied with Color).
func (Instance) ConvertFromParticles ¶
Sets this node's properties to match a given GPUParticles2D node with an assigned ParticleProcessMaterial.
func (Instance) DampingCurve ¶
func (Instance) DampingMax ¶
The maximum rate at which particles lose velocity. For example value of 100 means that the particle will go from 100 velocity to 0 in 1 second.
func (Instance) DampingMin ¶
Minimum equivalent of DampingMax.
func (Instance) EmissionColors ¶
Sets the Color.RGBAs to modulate particles by when using EmissionShapePoints or EmissionShapeDirectedPoints.
func (Instance) EmissionNormals ¶
Sets the direction the particles will be emitted in when using EmissionShapeDirectedPoints.
func (Instance) EmissionPoints ¶
Sets the initial positions to spawn particles when using EmissionShapePoints or EmissionShapeDirectedPoints.
func (Instance) EmissionRectExtents ¶
The rectangle's extents if EmissionShape is set to EmissionShapeRectangle.
func (Instance) EmissionShape ¶
func (self Instance) EmissionShape() EmissionShape
Particles will be emitted inside this region.
func (Instance) EmissionSphereRadius ¶
The sphere's radius if EmissionShape is set to EmissionShapeSphere.
func (Instance) Emitting ¶
If true, particles are being emitted. Emitting can be used to start and stop particles from emitting. However, if OneShot is true setting Emitting to true will not restart the emission cycle until after all active particles finish processing. You can use the OnFinished signal to be notified once all active particles finish processing.
func (Instance) Explosiveness ¶
How rapidly particles in an emission cycle are emitted. If greater than 0, there will be a gap in emissions before the next cycle begins.
func (Instance) FixedFps ¶
The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
func (Instance) FractDelta ¶
If true, results in fractional delta calculation which has a smoother particles display effect.
func (Instance) HueVariationCurve ¶
Each particle's hue will vary along this Curve. Should be a unit Curve.
func (Instance) HueVariationMax ¶
Maximum initial hue variation applied to each particle. It will shift the particle color's hue.
func (Instance) HueVariationMin ¶
Minimum equivalent of HueVariationMax.
func (Instance) InitialVelocityMax ¶
Maximum initial velocity magnitude for each particle. Direction comes from Direction and Spread.
func (Instance) InitialVelocityMin ¶
Minimum equivalent of InitialVelocityMax.
func (Instance) LifetimeRandomness ¶
Particle lifetime randomness ratio.
func (Instance) LinearAccelCurve ¶
Each particle's linear acceleration will vary along this Curve. Should be a unit Curve.
func (Instance) LinearAccelMax ¶
Maximum linear acceleration applied to each particle in the direction of motion.
func (Instance) LinearAccelMin ¶
Minimum equivalent of LinearAccelMax.
func (Instance) LocalCoords ¶
If true, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the CPUParticles2D node (and its parents) when it is moved or rotated. If false, particles use global coordinates; they will not move or rotate along the CPUParticles2D node (and its parents) when it is moved or rotated.
func (Instance) MoreArgs ¶
MoreArgs enables certain functions to be called with additional 'optional' arguments.
func (Instance) OnFinished ¶
Emitted when all active particles have finished processing. When OneShot is disabled, particles will process continuously, so this is never emitted.
func (Instance) OneShot ¶
If true, only one emission cycle occurs. If set true during a cycle, emission will stop at the cycle's end.
func (Instance) OrbitVelocityCurve ¶
Each particle's orbital velocity will vary along this Curve. Should be a unit Curve.
func (Instance) OrbitVelocityMax ¶
Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
func (Instance) OrbitVelocityMin ¶
Minimum equivalent of OrbitVelocityMax.
func (Instance) ParticleFlagAlignY ¶
Align Y axis of particle with the direction of its velocity.
func (Instance) Preprocess ¶
Particle system starts as if it had already run for this many seconds.
func (Instance) RadialAccelCurve ¶
Each particle's radial acceleration will vary along this Curve. Should be a unit Curve.
func (Instance) RadialAccelMax ¶
Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative.
func (Instance) RadialAccelMin ¶
Minimum equivalent of RadialAccelMax.
func (Instance) Randomness ¶
Emission lifetime randomness ratio.
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 UseFixedSeed or by calling Restart with parameter keep_seed set to true.
func (Instance) Restart ¶
func (self Instance) Restart()
Restarts the particle emitter.
If 'keep_seed' is true, the current random seed will be preserved. Useful for seeking and playback.
func (Instance) ScaleAmountCurve ¶
Each particle's scale will vary along this Curve. Should be a unit Curve.
func (Instance) ScaleAmountMax ¶
Maximum initial scale applied to each particle.
func (Instance) ScaleAmountMin ¶
Minimum equivalent of ScaleAmountMax.
func (Instance) ScaleCurveX ¶
Each particle's horizontal scale will vary along this Curve. Should be a unit Curve.
SplitScale must be enabled.
func (Instance) ScaleCurveY ¶
Each particle's vertical scale will vary along this Curve. Should be a unit Curve.
SplitScale must be enabled.
func (Instance) Seed ¶
Sets the random seed used by the particle system. Only effective if UseFixedSeed is true.
func (Instance) SetAngleCurve ¶
SetAngleCurve sets the property returned by [GetParamCurve].
func (Instance) SetAngleMax ¶
SetAngleMax sets the property returned by [GetParamMax].
func (Instance) SetAngleMin ¶
SetAngleMin sets the property returned by [GetParamMin].
func (Instance) SetAngularVelocityCurve ¶
SetAngularVelocityCurve sets the property returned by [GetParamCurve].
func (Instance) SetAngularVelocityMax ¶
SetAngularVelocityMax sets the property returned by [GetParamMax].
func (Instance) SetAngularVelocityMin ¶
SetAngularVelocityMin sets the property returned by [GetParamMin].
func (Instance) SetAnimOffsetCurve ¶
SetAnimOffsetCurve sets the property returned by [GetParamCurve].
func (Instance) SetAnimOffsetMax ¶
SetAnimOffsetMax sets the property returned by [GetParamMax].
func (Instance) SetAnimOffsetMin ¶
SetAnimOffsetMin sets the property returned by [GetParamMin].
func (Instance) SetAnimSpeedCurve ¶
SetAnimSpeedCurve sets the property returned by [GetParamCurve].
func (Instance) SetAnimSpeedMax ¶
SetAnimSpeedMax sets the property returned by [GetParamMax].
func (Instance) SetAnimSpeedMin ¶
SetAnimSpeedMin sets the property returned by [GetParamMin].
func (Instance) SetColorInitialRamp ¶
SetColorInitialRamp sets the property returned by [GetColorInitialRamp].
func (Instance) SetColorRamp ¶
SetColorRamp sets the property returned by [GetColorRamp].
func (Instance) SetDampingCurve ¶
SetDampingCurve sets the property returned by [GetParamCurve].
func (Instance) SetDampingMax ¶
SetDampingMax sets the property returned by [GetParamMax].
func (Instance) SetDampingMin ¶
SetDampingMin sets the property returned by [GetParamMin].
func (Instance) SetDirection ¶
SetDirection sets the property returned by [GetDirection].
func (Instance) SetDrawOrder ¶
SetDrawOrder sets the property returned by [GetDrawOrder].
func (Instance) SetEmissionColors ¶
SetEmissionColors sets the property returned by [GetEmissionColors].
func (Instance) SetEmissionNormals ¶
SetEmissionNormals sets the property returned by [GetEmissionNormals].
func (Instance) SetEmissionPoints ¶
SetEmissionPoints sets the property returned by [GetEmissionPoints].
func (Instance) SetEmissionRectExtents ¶
SetEmissionRectExtents sets the property returned by [GetEmissionRectExtents].
func (Instance) SetEmissionShape ¶
func (self Instance) SetEmissionShape(value EmissionShape)
SetEmissionShape sets the property returned by [GetEmissionShape].
func (Instance) SetEmissionSphereRadius ¶
SetEmissionSphereRadius sets the property returned by [GetEmissionSphereRadius].
func (Instance) SetEmitting ¶
SetEmitting sets the property returned by [IsEmitting].
func (Instance) SetExplosiveness ¶
SetExplosiveness sets the property returned by [GetExplosivenessRatio].
func (Instance) SetFixedFps ¶
SetFixedFps sets the property returned by [GetFixedFps].
func (Instance) SetFractDelta ¶
SetFractDelta sets the property returned by [GetFractionalDelta].
func (Instance) SetGravity ¶
SetGravity sets the property returned by [GetGravity].
func (Instance) SetHueVariationCurve ¶
SetHueVariationCurve sets the property returned by [GetParamCurve].
func (Instance) SetHueVariationMax ¶
SetHueVariationMax sets the property returned by [GetParamMax].
func (Instance) SetHueVariationMin ¶
SetHueVariationMin sets the property returned by [GetParamMin].
func (Instance) SetInitialVelocityMax ¶
SetInitialVelocityMax sets the property returned by [GetParamMax].
func (Instance) SetInitialVelocityMin ¶
SetInitialVelocityMin sets the property returned by [GetParamMin].
func (Instance) SetLifetime ¶
SetLifetime sets the property returned by [GetLifetime].
func (Instance) SetLifetimeRandomness ¶
SetLifetimeRandomness sets the property returned by [GetLifetimeRandomness].
func (Instance) SetLinearAccelCurve ¶
SetLinearAccelCurve sets the property returned by [GetParamCurve].
func (Instance) SetLinearAccelMax ¶
SetLinearAccelMax sets the property returned by [GetParamMax].
func (Instance) SetLinearAccelMin ¶
SetLinearAccelMin sets the property returned by [GetParamMin].
func (Instance) SetLocalCoords ¶
SetLocalCoords sets the property returned by [GetUseLocalCoordinates].
func (Instance) SetOneShot ¶
SetOneShot sets the property returned by [GetOneShot].
func (Instance) SetOrbitVelocityCurve ¶
SetOrbitVelocityCurve sets the property returned by [GetParamCurve].
func (Instance) SetOrbitVelocityMax ¶
SetOrbitVelocityMax sets the property returned by [GetParamMax].
func (Instance) SetOrbitVelocityMin ¶
SetOrbitVelocityMin sets the property returned by [GetParamMin].
func (Instance) SetParticleFlagAlignY ¶
SetParticleFlagAlignY sets the property returned by [GetParticleFlag].
func (Instance) SetPreprocess ¶
SetPreprocess sets the property returned by [GetPreProcessTime].
func (Instance) SetRadialAccelCurve ¶
SetRadialAccelCurve sets the property returned by [GetParamCurve].
func (Instance) SetRadialAccelMax ¶
SetRadialAccelMax sets the property returned by [GetParamMax].
func (Instance) SetRadialAccelMin ¶
SetRadialAccelMin sets the property returned by [GetParamMin].
func (Instance) SetRandomness ¶
SetRandomness sets the property returned by [GetRandomnessRatio].
func (Instance) SetScaleAmountCurve ¶
SetScaleAmountCurve sets the property returned by [GetParamCurve].
func (Instance) SetScaleAmountMax ¶
SetScaleAmountMax sets the property returned by [GetParamMax].
func (Instance) SetScaleAmountMin ¶
SetScaleAmountMin sets the property returned by [GetParamMin].
func (Instance) SetScaleCurveX ¶
SetScaleCurveX sets the property returned by [GetScaleCurveX].
func (Instance) SetScaleCurveY ¶
SetScaleCurveY sets the property returned by [GetScaleCurveY].
func (Instance) SetSpeedScale ¶
SetSpeedScale sets the property returned by [GetSpeedScale].
func (Instance) SetSplitScale ¶
SetSplitScale sets the property returned by [GetSplitScale].
func (Instance) SetTangentialAccelCurve ¶
SetTangentialAccelCurve sets the property returned by [GetParamCurve].
func (Instance) SetTangentialAccelMax ¶
SetTangentialAccelMax sets the property returned by [GetParamMax].
func (Instance) SetTangentialAccelMin ¶
SetTangentialAccelMin sets the property returned by [GetParamMin].
func (Instance) SetTexture ¶
SetTexture sets the property returned by [GetTexture].
func (Instance) SetUseFixedSeed ¶
SetUseFixedSeed sets the property returned by [GetUseFixedSeed].
func (Instance) SpeedScale ¶
Particle system's running speed scaling ratio. A value of 0 can be used to pause the particles.
func (Instance) SplitScale ¶
If true, the scale curve will be split into x and y components. See ScaleCurveX and ScaleCurveY.
func (Instance) TangentialAccelCurve ¶
Each particle's tangential acceleration will vary along this Curve. Should be a unit Curve.
func (Instance) TangentialAccelMax ¶
Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
func (Instance) TangentialAccelMin ¶
Minimum equivalent of TangentialAccelMax.
func (Instance) UseFixedSeed ¶
If true, particles will use the same seed for every simulation using the seed defined in Seed. This is useful for situations where the visual outcome should be consistent across replays, for example when using Movie Maker mode.
type MoreArgs ¶
type MoreArgs [1]gdclass.CPUParticles2D
MoreArgs is a container for Instance functions with additional 'optional' arguments.
type Parameter ¶
type Parameter int //gd:CPUParticles2D.Parameter
const ( // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set initial velocity properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamInitialLinearVelocity Parameter = 0 // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set angular velocity properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamAngularVelocity Parameter = 1 // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set orbital velocity properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamOrbitVelocity Parameter = 2 // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set linear acceleration properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamLinearAccel Parameter = 3 // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set radial acceleration properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamRadialAccel Parameter = 4 // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set tangential acceleration properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamTangentialAccel Parameter = 5 // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set damping properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamDamping Parameter = 6 // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set angle properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamAngle Parameter = 7 // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set scale properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamScale Parameter = 8 // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set hue variation properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamHueVariation Parameter = 9 // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set animation speed properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamAnimSpeed Parameter = 10 // Use with [SetParamMin], [SetParamMax], and [SetParamCurve] to set animation offset properties. // // [SetParamCurve]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamCurve // [SetParamMax]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMax // [SetParamMin]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParamMin ParamAnimOffset Parameter = 11 // Represents the size of the [Parameter] enum. ParamMax Parameter = 12 )
type ParticleFlags ¶
type ParticleFlags int //gd:CPUParticles2D.ParticleFlags
const ( // Use with [SetParticleFlag] to set [ParticleFlagAlignY]. // // [ParticleFlagAlignY]: https://pkg.go.dev/graphics.gd/classdb/#Instance.ParticleFlagAlignY // [SetParticleFlag]: https://pkg.go.dev/graphics.gd/classdb/#Instance.SetParticleFlag 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 [ParticleFlags] enum. ParticleFlagMax ParticleFlags = 3 )