Pixelpart 1.8.2
Unity Plugin
Loading...
Searching...
No Matches
PixelpartParticleEmitter Class Reference

Node that emits particles. More...

Inheritance diagram for PixelpartParticleEmitter:
[legend]

Public Types

enum  ShapeType : int {
  Point = 0 , Line = 1 , Ellipse = 2 , Rectangle = 3 ,
  Path = 4 , Ellipsoid = 5 , Cuboid = 6 , Cylinder = 7
}
 Types of emitter shapes. More...
 
enum  DistributionType : int {
  Uniform = 0 , Center = 1 , Hole = 2 , Boundary = 3 ,
  GridRandom = 4 , GridOrdered = 5
}
 Particle distribution modes. More...
 
enum  GridOrderType : int
 Order of points for grid distribution mode.
 
enum  EmissionModeType : int { Continuous = 0 , BurstStart = 1 , BurstEnd = 2 }
 Modes for particle emission. More...
 
enum  DirectionModeType : int {
  Fixed = 0 , Outwards = 1 , Inwards = 2 , Inherit = 3 ,
  InheritInverse = 4
}
 Modes to determine the initial direction of particles. More...
 

Public Member Functions

 PixelpartParticleEmitter (IntPtr effectRuntimePtr, uint id)
 Construct PixelpartParticleEmitter.
 
void AddShapePoint (Vector3 point)
 Add a new point to the emitter shape.
 
void RemoveShapePoint (int index)
 Remove the point at the given index from the emitter shape.
 
void SetShapePoint (int index, Vector3 point)
 Change the location of the point at the given index in the emitter shape.
 
Vector3 GetShapePoint (int index)
 Return the location of the point at the given index in the emitter shape.
 
- Public Member Functions inherited from PixelpartNode
 PixelpartNode (IntPtr effectRuntimePtr, uint id)
 Construct PixelpartNode.
 

Properties

ShapeType Shape [get, set]
 Shape of the emitter area.
 
int ShapePointCount [get]
 Number of points in the emitter shape.
 
DistributionType Distribution [get, set]
 Where particles are spawned inside the emitter area.
 
GridOrderType GridOrder [get, set]
 Grid order of grid distribution modes.
 
Vector3Int GridSize [get, set]
 Number of grid cells.
 
EmissionModeType EmissionMode [get, set]
 Emission mode to control when particles are created during the lifetime of the emitter.
 
DirectionModeType DirectionMode [get, set]
 Mode to control initial particle direction.
 
PixelpartAnimatedPropertyFloat3 Direction [get]
 Direction in which particles move when spawned, in degrees.
 
PixelpartAnimatedPropertyFloat Spread [get]
 How much the direction varies.
 
int NumShapePoints [get]
 Number of points in the emitter shape. Deprecated, use ShapePointCount.
 
- Properties inherited from PixelpartNode
uint Id [get]
 ID of the node.
 
uint ParentId [get]
 ID of the node's parent.
 
string Name [get]
 Name of the node.
 
float LifetimeStart [get, set]
 Time in seconds until the node becomes active.
 
float LifetimeDuration [get, set]
 How long the node stays active in seconds.
 
bool Repeat [get, set]
 Wether the node repeats its behavior after its lifetime is over.
 
bool Active [get]
 Whether the node is active at the current point in time.
 
float LocalTime [get]
 Time fraction the node has been active for, in range 0.0 (0%) to 1.0 (100%).
 
PixelpartAnimatedPropertyFloat3 Position [get]
 Position of the node.
 
PixelpartAnimatedPropertyFloat3 Rotation [get]
 Rotation of the node in degrees.
 
PixelpartAnimatedPropertyFloat3 Scale [get]
 Size of the node.
 

Detailed Description

Node that emits particles.

Particle emitters continuously spawn new particles of assigned particle types in a defined area. They also define in which direction particles move initially.

Member Enumeration Documentation

◆ DirectionModeType

enum DirectionModeType : int

Modes to determine the initial direction of particles.

When a particle is created by the particle emitter, it decides in which direction to emit the particle based on the specified direction and the given direction mode.

Enumerator
Fixed 

Particles shoot off in a common direction.

Outwards 

Particles move away from the emitter.

Inwards 

Particles move towards the emitter’s center.

Inherit 

Particles move along the direction of the parent particle or emitter.

InheritInverse 

Particles move against the direction of the parent particle or emitter.

◆ DistributionType

enum DistributionType : int

Particle distribution modes.

When spawning particles inside the emitter shape, particle emitters can use different techniques to determine the exact points where particles are spawned. For example, you may want to spawn particles near the edge of the shape or on in a grid-like pattern.

Enumerator
Uniform 

Particles are spawned at randomly generated locations (uniform distribution) inside the emitter area.

Center 

Particles are created mostly around the center and less at the boundary.

Hole 

More particles spawn near the emitter boundary and less in the center.

Boundary 

Particles are created only on the emitter boundary.

GridRandom 

Particles spawn at random points of a grid.

GridOrdered 

Particles are created on points in a grid, one grid point after the other.

◆ EmissionModeType

enum EmissionModeType : int

Modes for particle emission.

The emission mode of particle emitters controls when particles are created during the lifetime of the emitter.

Enumerator
Continuous 

The emitter continuously spawns particles throughout its lifetime.

BurstStart 

The emitter instantiates all particles immediately after being created.

BurstEnd 

Particles are spawned at the end of the emitter lifetime, or.

  • if the emitter is a sub-emitter - when particles of the parent emitter reach the end of their lifetime.

◆ ShapeType

enum ShapeType : int

Types of emitter shapes.

Enumerator
Point 

The emitter generates particles at a single point.

Line 

Particles are emitted on a straight line.

Ellipse 

Particles are emitted inside a circular or elliptical shape.

Rectangle 

Particles are emitted inside a rectangle.

Path 

Particles are emitted on a custom path consisting of connected line segments.

Ellipsoid 

Particles are emitted inside a sphere or ellipsoid. Only for 3D effects.

Cuboid 

Particles are emitted inside a cube. Only for 3D effects.

Cylinder 

Particles are emitted inside a cylinder. Only for 3D effects.

Constructor & Destructor Documentation

◆ PixelpartParticleEmitter()

PixelpartParticleEmitter ( IntPtr effectRuntimePtr,
uint id )

Construct PixelpartParticleEmitter.

Parameters
effectRuntimePtrEffect runtime
idNode ID

Member Function Documentation

◆ AddShapePoint()

void AddShapePoint ( Vector3 point)

Add a new point to the emitter shape.

Only applicable for emitter shape Path.

Parameters
pointPoint to add

◆ GetShapePoint()

Vector3 GetShapePoint ( int index)

Return the location of the point at the given index in the emitter shape.

Only applicable for emitter shape Path.

Parameters
indexIndex of point
Returns
Location of point

◆ RemoveShapePoint()

void RemoveShapePoint ( int index)

Remove the point at the given index from the emitter shape.

Only applicable for emitter shape Path.

Parameters
indexIndex of point to remove

◆ SetShapePoint()

void SetShapePoint ( int index,
Vector3 point )

Change the location of the point at the given index in the emitter shape.

Only applicable for emitter shape Path.

Parameters
indexIndex of point to change
pointNew location

Property Documentation

◆ Direction

Direction in which particles move when spawned, in degrees.

For 3D effects, the direction is composed of roll, yaw and pitch.

◆ DirectionMode

DirectionModeType DirectionMode
getset

Mode to control initial particle direction.

When a particle is created by the particle emitter, it decides in which direction to emit the particle based on the specified direction and the given direction mode.

◆ GridSize

Vector3Int GridSize
getset

Number of grid cells.

Only applicable for grid distribution modes.

◆ NumShapePoints

int NumShapePoints
get

Number of points in the emitter shape. Deprecated, use ShapePointCount.

Only applicable for emitter shape Path.

◆ ShapePointCount

int ShapePointCount
get

Number of points in the emitter shape.

Only applicable for emitter shape Path.

◆ Spread

How much the direction varies.

A spread of 0° means that particles only move in the specified direction, while 360° leads to particles shooting off in all directions.


The documentation for this class was generated from the following file: