Class ParticleEmitter

    Definition

    Namespace:
    Tizen.NUI.ParticleSystem
    Assembly:
    Tizen.NUI.dll

    Class ParticleEmitter creates a single emitter attached to a specified View. ParticleEmitter is responsible for spawning and updating particles.

    Emitter must contain: ParticleSource - responsible for spawning new particles ParticleModifier(s) - responsible for updating particles in the system

    ParticleSource and ParticleModifier callback interfaces should not be accessing Event side (NUI) objects. Both callbacks are executed on Update thread.

    public class ParticleEmitter : BaseHandle, IDynamicResourceHandler, INameScope, System.IDisposable
    Inheritance
    object
    BindableObject
    Element
    BaseHandle
    ParticleEmitter
    Implements
    IDynamicResourceHandler
    INameScope
    System.IDisposable

    Constructors

    View Source

    ParticleEmitter(View)

    Create an initialized ParticleEmitter.

    Declaration
    public ParticleEmitter(View view)
    Parameters
    Type Name Description
    View view

    View to attach the particle emitter.

    Properties

    View Source

    ActiveParticleLimit

    Limit of active particles in the system

    Declaration
    public uint ActiveParticleLimit { set; }
    Property Value
    Type Description
    uint
    Remarks

    Active particles in the system can be limited without changing ParticleCount.

    View Source

    EmissionRate

    Rate of emission per second

    Declaration
    public uint EmissionRate { get; set; }
    Property Value
    Type Description
    uint
    Remarks

    EmissionRate defines number of particles emitted per second.

    View Source

    InitialParticleCount

    Initial particle count

    Declaration
    public uint InitialParticleCount { get; set; }
    Property Value
    Type Description
    uint
    Remarks

    Initial number of particles to be emitted immediately after emitter starts. It allows initial burst emission. By default it's set to 0.

    View Source

    ParticleCount

    Maximum particle count

    Declaration
    public uint ParticleCount { get; set; }
    Property Value
    Type Description
    uint
    View Source

    RendererBlendingMode

    Gets/sets blending mode for particle renderer

    Declaration
    public ParticleBlendingMode RendererBlendingMode { get; set; }
    Property Value
    Type Description
    ParticleBlendingMode
    Remarks

    Currently two blending modes are supported: Additive and Screen (advanced blending mode). ParticleBlendingMode

    View Source

    TextureResourceUrl

    Sets texture to be used by the renderer

    Declaration
    public string TextureResourceUrl { set; }
    Property Value
    Type Description
    string

    Methods

    View Source

    AddLocalStreamFloat(float)

    Adds local (not used by shader) data stream to the particle emitter

    Declaration
    public uint AddLocalStreamFloat(float defaultValue)
    Parameters
    Type Name Description
    float defaultValue

    Default value to fill the stream with

    Returns
    Type Description
    uint

    Index of newly created data stream

    Remarks

    Adds new stream of float type.

    View Source

    AddLocalStreamVector2(Vector2)

    Adds local (not used by shader) data stream to the particle emitter

    Declaration
    public uint AddLocalStreamVector2(Vector2 defaultValue)
    Parameters
    Type Name Description
    Vector2 defaultValue

    Default value to fill the stream with

    Returns
    Type Description
    uint

    Index of newly created data stream

    Remarks

    Adds new stream of Vector2 type.

    View Source

    AddLocalStreamVector3(Vector3)

    Adds local (not used by shader) data stream to the particle emitter

    Declaration
    public uint AddLocalStreamVector3(Vector3 defaultValue)
    Parameters
    Type Name Description
    Vector3 defaultValue

    Default value to fill the stream with

    Returns
    Type Description
    uint

    Index of newly created data stream

    Remarks

    Adds new stream of Vector3 type.

    View Source

    AddLocalStreamVector4(Vector4)

    Adds local (not used by shader) data stream to the particle emitter

    Declaration
    public uint AddLocalStreamVector4(Vector4 defaultValue)
    Parameters
    Type Name Description
    Vector4 defaultValue

    Default value to fill the stream with

    Returns
    Type Description
    uint

    Index of newly created data stream

    Remarks

    Adds new stream of Vector4 type.

    View Source

    AddModifier<T>(ParticleModifier<T>)

    Adds ParticleModifier to the stack

    Declaration
    public void AddModifier<T>(ParticleModifier<T> modifier) where T : ParticleModifierInterface, new()
    Parameters
    Type Name Description
    ParticleModifier<T> modifier

    Valid modifier object

    Type Parameters
    Name Description
    T
    Remarks

    ParticleEmitter implements a stack of modifiers which are responsible for updating particles in the system. The stack is processed such as result of previous modifier is an input for next modifier.

    View Source

    Dispose(DisposeTypes)

    Dispose.

    Declaration
    protected override void Dispose(DisposeTypes type)
    Parameters
    Type Name Description
    DisposeTypes type
    Overrides
    BaseHandle.Dispose(DisposeTypes)
    View Source

    GetSource<T>()

    Returns associated ParticleSource object

    Declaration
    public ParticleSource<T> GetSource<T>() where T : ParticleSourceInterface, new()
    Returns
    Type Description
    ParticleSource<T>

    Valid ParticleSource object or null

    Type Parameters
    Name Description
    T
    View Source

    SetSource<T>(ParticleSource<T>)

    Raises the window to the top of the window stack.

    Declaration
    public void SetSource<T>(ParticleSource<T> source) where T : ParticleSourceInterface, new()
    Parameters
    Type Name Description
    ParticleSource<T> source

    Source object to copy.

    Type Parameters
    Name Description
    T
    View Source

    Start()

    Starts emission of particles.

    Declaration
    public void Start()
    View Source

    Stop()

    Stops emission of particles.

    Declaration
    public void Stop()

    Implements

    IDynamicResourceHandler
    INameScope
    System.IDisposable

    Extension Methods

    BindableObjectExtensions.SetBinding(BindableObject, BindableProperty, string, BindingMode, IValueConverter, string)
    NameScopeExtensions.FindByName<T>(Element, string)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX