Pixelpart 1.8.2
Godot Plugin
Loading...
Searching...
No Matches
godot::PixelpartParticleType Class Reference

Defines the appearance and behavior of particles. More...

Public Member Functions

int get_id () const
 ID of the particle type.
 
int get_parent_id () const
 ID of the parent particle type.
 
String get_name () const
 Name of the particle type.
 
void set_position_relative (bool mode)
 Set whether the position of particles is tied to the position of the emitter.
 
bool is_position_relative () const
 Whether the position of particles is tied to the position of the emitter.
 
void set_rotation_mode (int mode)
 Set whether the rotation property represents the exact rotation of particles or their angular velocity.
 
int get_rotation_mode () const
 Whether the rotation property represents the exact rotation of particles or their angular velocity.
 
void set_alignment_mode (int mode)
 Set direction to which particles are aligned.
 
int get_alignment_mode () const
 Direction to which particles are aligned.
 
Ref< PixelpartStaticPropertyFloat3get_pivot () const
 Center of rotation relative to the particle’s center.
 
Ref< PixelpartStaticPropertyFloatget_motion_path_force () const
 How much particles are influenced by the motion path.
 
void set_visible (bool mode)
 Set whether particles of this type are visible.
 
bool is_visible () const
 Whether particles of this type are visible.
 
void set_layer (int layer)
 Set layer particles are drawn on.
 
int get_layer () const
 Layer particles are drawn on.
 
Ref< PixelpartAnimatedPropertyFloatget_count () const
 How many particles of this type are spawned by emitters.
 
Ref< PixelpartAnimatedPropertyFloatget_lifespan () const
 How long particles exist after being spawned by emitters.
 
Ref< PixelpartAnimatedPropertyFloatget_initial_size () const
 Size of each particle when created.
 
Ref< PixelpartAnimatedPropertyFloat3get_initial_rotation () const
 Rotation of each particle when created, in degrees.
 
Ref< PixelpartAnimatedPropertyFloatget_initial_velocity () const
 How fast each particle is initially after being spawned by the emitter.
 
Ref< PixelpartAnimatedPropertyFloatget_inherited_velocity () const
 How much speed particles inherit from the parent particle or emitter.
 
Ref< PixelpartAnimatedPropertyFloatget_initial_opacity () const
 Opacity of each particle when created.
 
Ref< PixelpartAnimatedPropertyFloat3get_position () const
 Motion path for particles.
 
Ref< PixelpartAnimatedPropertyFloat3get_size () const
 Size of each particle over its lifetime as a fraction of its initial size.
 
Ref< PixelpartAnimatedPropertyFloat3get_stretch () const
 How much particles are stretched based on their speed.
 
Ref< PixelpartAnimatedPropertyFloatget_physical_size () const
 Relative size of each particle for motion and collision calculations over its lifetime.
 
Ref< PixelpartAnimatedPropertyFloat3get_rotation () const
 How particles rotate over time from their initial rotation, in degrees.
 
Ref< PixelpartAnimatedPropertyFloat3get_rotation_by_speed () const
 How much particles rotate based on their velocity, in degrees.
 
Ref< PixelpartAnimatedPropertyFloatget_acceleration () const
 Linear acceleration applied to each particle over its lifetime.
 
Ref< PixelpartAnimatedPropertyFloatget_radial_acceleration () const
 Acceleration of each particle towards the emitter over its lifetime.
 
Ref< PixelpartAnimatedPropertyFloatget_weight () const
 How strongly each particle is affected by force fields over its lifetime.
 
Ref< PixelpartAnimatedPropertyFloatget_bounce () const
 How much each particle bounces back from colliders over its lifetime.
 
Ref< PixelpartAnimatedPropertyFloatget_friction () const
 How resistant each particle is to sliding down colliders over its lifetime.
 
Ref< PixelpartAnimatedPropertyFloat4get_color () const
 Color of each particle over its lifetime.
 
Ref< PixelpartAnimatedPropertyFloatget_opacity () const
 Opacity of each particle over its lifetime as a fraction of its initial opacity.
 
Ref< PixelpartStaticPropertyFloatget_lifespan_variance () const
 How much the lifespan varies between particles.
 
Ref< PixelpartStaticPropertyFloatget_size_variance () const
 How much the size varies between particles.
 
Ref< PixelpartStaticPropertyFloat3get_rotation_variance () const
 How much the rotation varies between particles, in degrees.
 
Ref< PixelpartStaticPropertyFloat3get_angular_velocity_variance () const
 How much the angular velocity varies between particles, in degrees/second.
 
Ref< PixelpartStaticPropertyFloatget_velocity_variance () const
 How much the speed varies between particles.
 
Ref< PixelpartStaticPropertyFloat4get_color_variance () const
 How much the color varies between particles.
 
Ref< PixelpartStaticPropertyFloatget_opacity_variance () const
 How much the opacity varies between particles.
 

Public Attributes

bool position_relative
 Whether the position of particles is tied to the position of the emitter.
 
int rotation_mode
 Whether the rotation property represents the exact rotation of particles or their angular velocity.
 
int alignment_mode
 Direction to which particles are aligned.
 
bool visible
 Whether particles of this type are visible.
 
int layer
 Layer particles are drawn on.
 

Detailed Description

Defines the appearance and behavior of particles.

Each particle emitter has a list of assigned particle types, which it will use for generating particles. The particle type defines how particles move through space (e.g. velocity, acceleration) and how they look (e.g. size, color).

Nested particle types

Particle types can be assigned a parent particle type. This causes a particle of the parent type to emit particles of the child particle type.

Particle renderers

There are three types of particles, which determines how they are rendered.

  • Sprite particle: The sprite renderer renders each particle as a separate sprite.
  • Trail particle: The trail renderer generates continuous trails along the path of particles with the same parent particle.
  • Mesh particle: The mesh renderer renders each particles as a three-dimensional mesh.

Member Function Documentation

◆ get_acceleration()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_acceleration ( ) const

Linear acceleration applied to each particle over its lifetime.

Returns
Acceleration property

◆ get_alignment_mode()

int godot::PixelpartParticleType::get_alignment_mode ( ) const

Direction to which particles are aligned.

Returns
Alignment mode

◆ get_angular_velocity_variance()

Ref< PixelpartStaticPropertyFloat3 > godot::PixelpartParticleType::get_angular_velocity_variance ( ) const

How much the angular velocity varies between particles, in degrees/second.

Returns
Angular velocity variance property

◆ get_bounce()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_bounce ( ) const

How much each particle bounces back from colliders over its lifetime.

Returns
Bounce property

◆ get_color()

Ref< PixelpartAnimatedPropertyFloat4 > godot::PixelpartParticleType::get_color ( ) const

Color of each particle over its lifetime.

Returns
Color property

◆ get_color_variance()

Ref< PixelpartStaticPropertyFloat4 > godot::PixelpartParticleType::get_color_variance ( ) const

How much the color varies between particles.

Returns
Color variance property

◆ get_count()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_count ( ) const

How many particles of this type are spawned by emitters.

Returns
Count property

◆ get_friction()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_friction ( ) const

How resistant each particle is to sliding down colliders over its lifetime.

Returns
Friction property

◆ get_id()

int godot::PixelpartParticleType::get_id ( ) const

ID of the particle type.

Returns
ID

◆ get_inherited_velocity()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_inherited_velocity ( ) const

How much speed particles inherit from the parent particle or emitter.

Returns
Inherited velocity property

◆ get_initial_opacity()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_initial_opacity ( ) const

Opacity of each particle when created.

Returns
Initial opacity property

◆ get_initial_rotation()

Ref< PixelpartAnimatedPropertyFloat3 > godot::PixelpartParticleType::get_initial_rotation ( ) const

Rotation of each particle when created, in degrees.

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

Returns
Initial rotation property

◆ get_initial_size()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_initial_size ( ) const

Size of each particle when created.

Returns
Initial size property

◆ get_initial_velocity()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_initial_velocity ( ) const

How fast each particle is initially after being spawned by the emitter.

Returns
Initial velocity property

◆ get_layer()

int godot::PixelpartParticleType::get_layer ( ) const

Layer particles are drawn on.

Returns
Layer

◆ get_lifespan()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_lifespan ( ) const

How long particles exist after being spawned by emitters.

Returns
Lifespan property

◆ get_lifespan_variance()

Ref< PixelpartStaticPropertyFloat > godot::PixelpartParticleType::get_lifespan_variance ( ) const

How much the lifespan varies between particles.

Returns
Lifespan variance property

◆ get_motion_path_force()

Ref< PixelpartStaticPropertyFloat > godot::PixelpartParticleType::get_motion_path_force ( ) const

How much particles are influenced by the motion path.

Set to 0 to disable motion paths.

Returns
Motion path force property

◆ get_name()

String godot::PixelpartParticleType::get_name ( ) const

Name of the particle type.

Returns
Name

◆ get_opacity()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_opacity ( ) const

Opacity of each particle over its lifetime as a fraction of its initial opacity.

Returns
Opacity property

◆ get_opacity_variance()

Ref< PixelpartStaticPropertyFloat > godot::PixelpartParticleType::get_opacity_variance ( ) const

How much the opacity varies between particles.

Returns
Opacity variance property

◆ get_parent_id()

int godot::PixelpartParticleType::get_parent_id ( ) const

ID of the parent particle type.

Returns
Parent ID or -1 if the particle type has no parent

◆ get_physical_size()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_physical_size ( ) const

Relative size of each particle for motion and collision calculations over its lifetime.

Returns
Physical size property

◆ get_pivot()

Ref< PixelpartStaticPropertyFloat3 > godot::PixelpartParticleType::get_pivot ( ) const

Center of rotation relative to the particle’s center.

Returns
Pivot property

◆ get_position()

Ref< PixelpartAnimatedPropertyFloat3 > godot::PixelpartParticleType::get_position ( ) const

Motion path for particles.

Returns
Position property

◆ get_radial_acceleration()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_radial_acceleration ( ) const

Acceleration of each particle towards the emitter over its lifetime.

Returns
Radial acceleration property

◆ get_rotation()

Ref< PixelpartAnimatedPropertyFloat3 > godot::PixelpartParticleType::get_rotation ( ) const

How particles rotate over time from their initial rotation, in degrees.

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

Returns
Rotation property

◆ get_rotation_by_speed()

Ref< PixelpartAnimatedPropertyFloat3 > godot::PixelpartParticleType::get_rotation_by_speed ( ) const

How much particles rotate based on their velocity, in degrees.

Returns
Rotation by speed property

◆ get_rotation_mode()

int godot::PixelpartParticleType::get_rotation_mode ( ) const

Whether the rotation property represents the exact rotation of particles or their angular velocity.

Returns
Rotation mode

◆ get_rotation_variance()

Ref< PixelpartStaticPropertyFloat3 > godot::PixelpartParticleType::get_rotation_variance ( ) const

How much the rotation varies between particles, in degrees.

Returns
Rotation variance property

◆ get_size()

Ref< PixelpartAnimatedPropertyFloat3 > godot::PixelpartParticleType::get_size ( ) const

Size of each particle over its lifetime as a fraction of its initial size.

Returns
Size property

◆ get_size_variance()

Ref< PixelpartStaticPropertyFloat > godot::PixelpartParticleType::get_size_variance ( ) const

How much the size varies between particles.

Returns
Size variance property

◆ get_stretch()

Ref< PixelpartAnimatedPropertyFloat3 > godot::PixelpartParticleType::get_stretch ( ) const

How much particles are stretched based on their speed.

Returns
Stretch property

◆ get_velocity_variance()

Ref< PixelpartStaticPropertyFloat > godot::PixelpartParticleType::get_velocity_variance ( ) const

How much the speed varies between particles.

Returns
Velocity variance property

◆ get_weight()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleType::get_weight ( ) const

How strongly each particle is affected by force fields over its lifetime.

Returns
Weight property

◆ is_position_relative()

bool godot::PixelpartParticleType::is_position_relative ( ) const

Whether the position of particles is tied to the position of the emitter.

Returns
Relative particle position

◆ is_visible()

bool godot::PixelpartParticleType::is_visible ( ) const

Whether particles of this type are visible.

Returns
Whether particles of this type are visible

◆ set_alignment_mode()

void godot::PixelpartParticleType::set_alignment_mode ( int mode)

Set direction to which particles are aligned.

Parameters
modeAlignment mode

◆ set_layer()

void godot::PixelpartParticleType::set_layer ( int layer)

Set layer particles are drawn on.

Particles on upper layers occlude those on lower layers.

Parameters
layerLayer

◆ set_position_relative()

void godot::PixelpartParticleType::set_position_relative ( bool mode)

Set whether the position of particles is tied to the position of the emitter.

Parameters
modeRelative particle position

◆ set_rotation_mode()

void godot::PixelpartParticleType::set_rotation_mode ( int mode)

Set whether the rotation property represents the exact rotation of particles or their angular velocity.

Parameters
modeRotation mode

◆ set_visible()

void godot::PixelpartParticleType::set_visible ( bool mode)

Set whether particles of this type are visible.

Parameters
modeWhether particles of this type are visible

Member Data Documentation

◆ alignment_mode

int godot::PixelpartParticleType::alignment_mode

Direction to which particles are aligned.

Possible values:

  • NONE
  • CAMERA
  • MOTION
  • EMISSION
  • EMITTER

◆ layer

int godot::PixelpartParticleType::layer

Layer particles are drawn on.

Particles on upper layers occlude those on lower layers.

◆ rotation_mode

int godot::PixelpartParticleType::rotation_mode

Whether the rotation property represents the exact rotation of particles or their angular velocity.

Possible values:

  • ANGLE
  • VELOCITY

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