Table of Contents

Class ParticleEmitter

Namespace
Lime
Assembly
Lime.dll
[TangerineNodeBuilder("BuildForTangerine")]
[TangerineAllowedChildrenTypes(new Type[] { typeof(ParticleModifier), typeof(EmitterShapePoint) })]
[TangerineVisualHintGroup("/All/Nodes/Particles", null)]
public class ParticleEmitter : Widget, IDisposable, IAnimatorHost, IRenderChainBuilder, IAnimable, ICloneable, ITangerinePreviewAnimationListener, IUpdatableNode, IMaterialComponentOwner
Inheritance
ParticleEmitter
Implements
Inherited Members
Extension Methods

Constructors

ParticleEmitter()

public ParticleEmitter()

Fields

GloballyEnabled

public static bool GloballyEnabled

Field Value

bool

Particles

public List<ParticleEmitter.Particle> Particles

Field Value

List<ParticleEmitter.Particle>

Properties

Action

[TangerineKeyframeColor(1)]
public EmitterAction Action { get; set; }

Property Value

EmitterAction

AlongPathOrientation

Whether particles are oriented along track.

[YuzuMember]
[TangerineKeyframeColor(16)]
public bool AlongPathOrientation { get; set; }

Property Value

bool

AngularVelocity

Angular velocity of emitter (degrees)

[YuzuMember]
[TangerineKeyframeColor(30)]
public NumericRange AngularVelocity { get; set; }

Property Value

NumericRange

AspectRatio

Designates width to height ratio.

[YuzuMember]
[TangerineKeyframeColor(27)]
public NumericRange AspectRatio { get; set; }

Property Value

NumericRange

BurstDistance

Pixel distance to trigger burst-generation of particles. When BurstDistance > 0 ParticleEmitter will generate Number particles for every BurstDistance pixels of ParticleEmitter's movement.

[YuzuMember]
[Validation.Range(0, Infinity)]
[TangerineKeyframeColor(7)]
public float BurstDistance { get; set; }

Property Value

float

DefaultMaterial

public IMaterial DefaultMaterial { get; }

Property Value

IMaterial

Direction

Rotation angle of emitter (degrees, clockwise)

[YuzuMember]
[TangerineKeyframeColor(24)]
public NumericRange Direction { get; set; }

Property Value

NumericRange

EmissionType

[YuzuMember]
[TangerineKeyframeColor(10)]
public EmissionType EmissionType { get; set; }

Property Value

EmissionType

GravityAmount

[YuzuMember]
[TangerineKeyframeColor(21)]
public NumericRange GravityAmount { get; set; }

Property Value

NumericRange

GravityDirection

degrees (0 - right, 90 - down)

[YuzuMember]
[TangerineKeyframeColor(20)]
public NumericRange GravityDirection { get; set; }

Property Value

NumericRange

ImmortalParticles

Particles are generated once and live forever.

[YuzuMember]
[TangerineKeyframeColor(8)]
public bool ImmortalParticles { get; set; }

Property Value

bool

InitialColor

Initial color of the particle at the moment of birth.

[YuzuMember]
public Color4 InitialColor { get; set; }

Property Value

Color4

Lifetime

Particle lifetime in seconds

[YuzuMember]
[TangerineKeyframeColor(25)]
public NumericRange Lifetime { get; set; }

Property Value

NumericRange

LinkageWidgetName

When ParticleLinkage is Other this makes sense as name of widget particle emitter is linked to.

[YuzuMember]
[TangerineKeyframeColor(12)]
public string LinkageWidgetName { get; set; }

Property Value

string

MagnetAmount

[YuzuMember]
[TangerineKeyframeColor(22)]
public NumericRange MagnetAmount { get; set; }

Property Value

NumericRange

Material

public IMaterial Material { get; set; }

Property Value

IMaterial

Number

Number of particles generated per second.

[YuzuMember]
[TangerineKeyframeColor(13)]
public float Number { get; set; }

Property Value

float

NumberPerBurst

[YuzuMember]
public bool NumberPerBurst { get; set; }

Property Value

bool

Orientation

Rotation angle of generated particles

[YuzuMember]
[TangerineKeyframeColor(23)]
public NumericRange Orientation { get; set; }

Property Value

NumericRange

ParticlesLinkage

[YuzuMember]
[TangerineKeyframeColor(11)]
public ParticlesLinkage ParticlesLinkage { get; set; }

Property Value

ParticlesLinkage

RandomMotionAspectRatio

[YuzuMember]
[TangerineKeyframeColor(2)]
public float RandomMotionAspectRatio { get; set; }

Property Value

float

RandomMotionRadius

[YuzuMember]
[TangerineKeyframeColor(31)]
public NumericRange RandomMotionRadius { get; set; }

Property Value

NumericRange

RandomMotionRotation

[YuzuMember]
[TangerineKeyframeColor(3)]
public NumericRange RandomMotionRotation { get; set; }

Property Value

NumericRange

RandomMotionSpeed

[YuzuMember]
[TangerineKeyframeColor(1)]
public NumericRange RandomMotionSpeed { get; set; }

Property Value

NumericRange

Seed

public int Seed { get; set; }

Property Value

int

Shape

[YuzuMember]
[TangerineKeyframeColor(9)]
public EmitterShape Shape { get; set; }

Property Value

EmitterShape

SpawnBetweenFrames

[YuzuMember]
public bool SpawnBetweenFrames { get; set; }

Property Value

bool

Speed

Update: delta *= Speed

[YuzuMember]
[TangerineKeyframeColor(15)]
public float Speed { get; set; }

Property Value

float

Spin

Angular velocity of particles.

[YuzuMember]
[TangerineKeyframeColor(29)]
public NumericRange Spin { get; set; }

Property Value

NumericRange

TimeShift

Simulate TimeShift seconds on first update.

[YuzuMember]
[TangerineKeyframeColor(14)]
public float TimeShift { get; set; }

Property Value

float

UV0

public Vector2 UV0 { get; }

Property Value

Vector2

UV1

public Vector2 UV1 { get; }

Property Value

Vector2

UseCustomSeed

public bool UseCustomSeed { get; set; }

Property Value

bool

Velocity

[YuzuMember]
[TangerineKeyframeColor(28)]
public NumericRange Velocity { get; set; }

Property Value

NumericRange

WindAmount

[YuzuMember]
[TangerineKeyframeColor(19)]
public NumericRange WindAmount { get; set; }

Property Value

NumericRange

WindDirection

degrees (0 - right, 90 - down)

[YuzuMember]
[TangerineKeyframeColor(17)]
public NumericRange WindDirection { get; set; }

Property Value

NumericRange

Zoom

Scale of generated particles

[YuzuMember]
[TangerineKeyframeColor(26)]
public NumericRange Zoom { get; set; }

Property Value

NumericRange

Methods

AddToRenderChain(RenderChain)

Adds widget and all its descendants to render chain.

public override void AddToRenderChain(RenderChain chain)

Parameters

chain RenderChain

ApplyAspectRatio(Vector2, float)

public static Vector2 ApplyAspectRatio(Vector2 scale, float aspectRatio)

Parameters

scale Vector2
aspectRatio float

Returns

Vector2

ApplyAspectRatio(float, float)

public static Vector2 ApplyAspectRatio(float zoom, float aspectRatio)

Parameters

zoom float
aspectRatio float

Returns

Vector2

ClearParticles()

public void ClearParticles()

DecomposeScale(Vector2, out float, out float)

public static void DecomposeScale(Vector2 scale, out float aspectRatio, out float zoom)

Parameters

scale Vector2
aspectRatio float
zoom float

DeleteAllParticles()

public void DeleteAllParticles()

Dispose()

Stops all tasks and calls Dispose of all descendants.

public override void Dispose()

DrawCustomShape(Color4, Color4, Matrix32)

public void DrawCustomShape(Color4 areaColor, Color4 lineColor, Matrix32 transform)

Parameters

areaColor Color4
lineColor Color4
transform Matrix32

GetLinkageWidget()

public Widget GetLinkageWidget()

Returns

Widget

GetRenderObject()

TODO: Add summary.

protected override RenderObject GetRenderObject()

Returns

RenderObject

OnTrigger(string, object, double)

Invokes when the trigger property has been changed by animation.

public override void OnTrigger(string property, object value, double animationTimeCorrection = 0)

Parameters

property string

A property name.

value object

A new property value.

animationTimeCorrection double

An animation time correction.

OnUpdate(float)

public virtual void OnUpdate(float delta)

Parameters

delta float

ResetRandom()

public void ResetRandom()