Options
All
  • Public
  • Public/Protected
  • All
Menu

Class b2ParticleSystemDef

Hierarchy

  • b2ParticleSystemDef

Index

Properties

colorMixingStrength

colorMixingStrength: number = 0.5

Determines how fast colors are mixed 1.0f ==> mixed immediately 0.5f ==> mixed half way each simulation step (see b2World::Step())

dampingStrength

dampingStrength: number = 1

Reduces velocity along the collision normal Smaller value reduces less

density

density: number = 1

Set the particle density. See SetDensity for details.

destroyByAge

destroyByAge: boolean = true

Whether to destroy particles by age when no more particles can be created. See #b2ParticleSystem::SetDestructionByAge() for more information.

ejectionStrength

ejectionStrength: number = 0.5

Pushes particles out of solid particle group Larger values repulse more

elasticStrength

elasticStrength: number = 0.25

Restores shape of elastic particle groups Larger values increase elastic particle velocity

gravityScale

gravityScale: number = 1

Change the particle gravity scale. Adjusts the effect of the global gravity vector on particles. Default value is 1.0f.

lifetimeGranularity

lifetimeGranularity: number = 1.0 / 60.0

Granularity of particle lifetimes in seconds. By default this is set to (1.0f / 60.0f) seconds. b2ParticleSystem uses a 32-bit signed value to track particle lifetimes so the maximum lifetime of a particle is (2^32 - 1) / (1.0f / lifetimeGranularity) seconds. With the value set to 1/60 the maximum lifetime or age of a particle is 2.27 years.

maxCount

maxCount: number = 0

Set the maximum number of particles. By default, there is no maximum. The particle buffers can continue to grow while b2World's block allocator still has memory. See SetMaxParticleCount for details.

powderStrength

powderStrength: number = 0.5

Produces repulsion between powder particles Larger values repulse more

pressureStrength

pressureStrength: number = 0.005

Increases pressure in response to compression Smaller values allow more compression

radius

radius: number = 1

Particles behave as circles with this radius. In Box2D units.

repulsiveStrength

repulsiveStrength: number = 1

Produces additional pressure on repulsive particles Larger values repulse more Negative values mean attraction. The range where particles behave stably is about -0.2 to 2.0.

springStrength

springStrength: number = 0.25

Restores length of spring particle groups Larger values increase spring particle velocity

staticPressureIterations

staticPressureIterations: number = 8

Computes static pressure more precisely See SetStaticPressureIterations for details

staticPressureRelaxation

staticPressureRelaxation: number = 0.2

Reduces instability in static pressure calculation Larger values make stabilize static pressure with fewer iterations

staticPressureStrength

staticPressureStrength: number = 0.2

Produces static pressure Larger values increase the pressure on neighboring partilces For a description of static pressure, see http://en.wikipedia.org/wiki/Static_pressure#Static_pressure_in_fluid_dynamics

strictContactCheck

strictContactCheck: boolean = false

Enable strict Particle/Body contact check. See SetStrictContactCheck for details.

surfaceTensionNormalStrength

surfaceTensionNormalStrength: number = 0.2

Smoothes outline of tensile particles 0~0.2. Larger values result in rounder, smoother, water-drop-like clusters of particles.

surfaceTensionPressureStrength

surfaceTensionPressureStrength: number = 0.2

Produces pressure on tensile particles 0~0.2. Larger values increase the amount of surface tension.

viscousStrength

viscousStrength: number = 0.25

Reduces relative velocity of viscous particles Larger values slow down viscous particles more

Methods

Clone

  • Returns b2ParticleSystemDef

Copy

Generated using TypeDoc