GraphicsAPI reference
Class ParticleSpec
Namespace: MicroEngine.Graphics
Assembly: MicroEngine.Graphics2D.dll
Guide: Graphics
How a burst of particles looks and moves. Ranges are (min, max).
public sealed record ParticleSpec : IEquatable<ParticleSpec>Inheritance
Implements
Constructors
ParticleSpec()
public ParticleSpec()Properties
Angle
Emission angle range in radians (0 = right, -PI/2 = up).
public (float Min, float Max) Angle { get; init; }Property Value
Drag
Velocity multiplier per second (1 = no drag).
public float Drag { get; init; }Property Value
EndColor
Colour at death, blended linearly from StartColor (transparent white by default).
public Color EndColor { get; init; }Property Value
Gravity
Downward acceleration in pixels per second squared (0 by default; negative values rise).
public float Gravity { get; init; }Property Value
Life
Lifetime range in seconds (0.3 to 0.6 by default).
public (float Min, float Max) Life { get; init; }Property Value
Round
Draws circles instead of pixel-aligned squares.
public bool Round { get; init; }Property Value
Size
Size in pixels at birth and at death (2 to 1 by default). Particles smaller than 0.2 pixels are not drawn.
public (float Start, float End) Size { get; init; }Property Value
Speed
Initial speed range in pixels per second (20 to 60 by default).
public (float Min, float Max) Speed { get; init; }Property Value
Spread
Random spread of the spawn position around the emit point.
public float Spread { get; init; }Property Value
StartColor
Colour at birth (white by default).
public Color StartColor { get; init; }Property Value
Methods
<Clone>$()
public ParticleSpec <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(ParticleSpec?)
public bool Equals(ParticleSpec? other)Parameters
other ParticleSpec?
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(ParticleSpec?, ParticleSpec?)
public static bool operator ==(ParticleSpec? left, ParticleSpec? right)Parameters
left ParticleSpec?
right ParticleSpec?
Returns
operator !=(ParticleSpec?, ParticleSpec?)
public static bool operator !=(ParticleSpec? left, ParticleSpec? right)Parameters
left ParticleSpec?
right ParticleSpec?