> Learn all about tuning basic particle properties in Babylon.js.

Source: https://doc.babylonjs.com/features/featuresDeepDive/particles/particle_system/particles_tuning

# Basic Particle Properties

There is a wide range of properties to tune the behavior of particles, including their lifetime, size, color, emission rate, speed, direction of travel, orientation, and gravity.

This page covers setting initial property values when creating a particle system. The next page shows how to animate these properties over time.

## Size

The size of the particles can be varied randomly within a given range:

```javascript
particleSystem.minSize = 0.1;
particleSystem.maxSize = 0.5;
```

Size range: [Playground: Particle Size Range Example](https://playground.babylonjs.com/#0K3AQ2#3797) - Simple example showing how to set a size range for a particle system.

## Scale

When you want to change the particle base shape from square to rectangular, scale the x and y values:

```javascript
particleSystem.minScaleX = 0.1;
particleSystem.maxScaleX = 0.5;

particleSystem.minScaleY = 0.2;
particleSystem.maxScaleY = 0.4;
```

Scale range: [Playground: Particle Scale Range Example](https://playground.babylonjs.com/#0K3AQ2#3798) - Simple example showing how to set a scale range for a particle system.

## Color

There are three colors that can be set for a particle system. Two of them (`color1` and `color2`) are blended during the particle's lifetime, and a third (`colorDead`) is applied just before the particle expires.

```javascript
particleSystem.color1 = new BABYLON.Color4(0.7, 0.8, 1.0, 1.0);
particleSystem.color2 = new BABYLON.Color4(0.2, 0.5, 1.0, 1.0);
particleSystem.colorDead = new BABYLON.Color4(0, 0, 0.2, 0.0);
```

Color: [Playground: Particle Color Example](https://playground.babylonjs.com/#0K3AQ2#3799) - Simple example showing how to set colors of particles.

## Speed

The speed of a particle is determined by the amount of power applied when it is emitted. Higher power means faster movement. The emission power can be varied randomly within a given range:

```javascript
particleSystem.minEmitPower = 1;
particleSystem.maxEmitPower = 3;
```

Power range: [Playground: Particle Power Range Example](https://playground.babylonjs.com/#0K3AQ2#3802) - Simple example showing how to set a power range for a particle system.

## Rotation

You can define a range of angular speeds in radians per second:

```javascript
particleSystem.minAngularSpeed = 0;
particleSystem.maxAngularSpeed = Math.PI;
```

You can also define a particle's initial rotation angle:

```javascript
particleSystem.minInitialRotation = 0;
particleSystem.maxInitialRotation = Math.PI / 2;
```

Rotating: [Playground: Rotating Particles](https://playground.babylonjs.com/#0K3AQ2#3805) - Simple example showing how to rotate particles.  
Rotating with set initial angle: [Playground: Rotating Particles With Initial Angle](https://playground.babylonjs.com/#0K3AQ2#3807) - Simple example showing how to rotate particles with an initial angle.

## Translation Pivot

By default, a particle's transformation center is at the middle of its plane. You can move it to a different point relative to the center:

```javascript
particleSystem.translationPivot = new BABYLON.Vector2(2, 2); // across and up the containing plane
```

Rotation with translation pivot: [Playground: Changing Particle Pivot Points](https://playground.babylonjs.com/#0K3AQ2#3811) - Simple example showing how to change the pivot point of a particle.

## Direction

Two directions can be specified. If you specify just *direction1*, the particles will travel randomly in the general direction given. When both directions are given, the particles will travel in a random direction between the two.

Note that these vectors also affect speed — their magnitude acts as a multiplier. For example, particles with direction `(10, -10, 10)` will travel 10 times faster than those with direction `(1, -1, 1)`.

```javascript
particleSystem.direction1 = new BABYLON.Vector3(-7, 8, 3);
particleSystem.direction2 = new BABYLON.Vector3(7, 8, -3);
```

Direction range: [Playground: Particle Direction Range Example](https://playground.babylonjs.com/#0K3AQ2#3815) - Simple example showing how to set a direction range for a particle system.

## Gravity

Gravity can be applied as a Vector3 in any direction. For example, a negative Y value pulls particles downward.

```javascript
particleSystem.gravity = new BABYLON.Vector3(0, -9.81, 0);
```

Direction and gravity: [Playground: Direction And Gravity](https://playground.babylonjs.com/#0K3AQ2#3820) - Simple example showing how to set direction and gravity in a particle system.

## Emit Rate

The emit rate determines the number of particles emitted per second. The larger the number, the denser the particle cloud. As particles die, they are recycled to be emitted again. If their lifetime is long enough and the emission rate is fast enough, there may be a visible gap in the emission of particles.

![emitRate](https://doc.babylonjs.com/img/how_to/Particles/12-3.webp)

```javascript
particleSystem.emitRate = 1000;
```

You can stop the continuous emission of particles by setting a manual emit count.

```javascript
particleSystem.manualEmitCount = 300;
```

In this case, the specified number of particles are emitted once, and there are no further emissions.

Slow emit rate: [Playground: Slow Emission Rate](https://playground.babylonjs.com/#0K3AQ2#3822) - Simple example showing how to set a slow emission rate of a particle system.  
Fast emit rate: [Playground: Fast Emission Rate](https://playground.babylonjs.com/#0K3AQ2#3824) - Simple example showing how to set a fast emission rate of a particle system.  
Emit just 10: [Playground: Emission Limits](https://playground.babylonjs.com/#0K3AQ2#3828) - Simple example showing how to limit particle emission to a certain number.

## Lifetime

The time it takes for a particle to die after being emitted can be varied within a chosen range. Each particle's lifetime is set as a random value between a minimum and maximum.

```javascript
particleSystem.minLifeTime = 0.3;
particleSystem.maxLifeTime = 1.5;
```

Short lifetime: [Playground: Short Particle Lifetimes](https://playground.babylonjs.com/#0K3AQ2#3830) - Simple example showing how to create particles with a short lifetime.  
Long lifetime: [Playground: Long Particle Lifetimes](https://playground.babylonjs.com/#0K3AQ2#3840) - Simple example showing how to create particles with a long lifetime.

## Adjustable Examples

The following examples allow you to modify the properties of the particle system in real time and see the effects they produce.

Adjust Min & Max of EmitBox: [Playground: Adjust Min And Max of EmitBox](https://playground.babylonjs.com/#0K3AQ2#45) - Simple example showing how to adjust the min and max of an emission box.  
Adjust Emit Life Time, Rate, Power and Update Speed: [Playground: Adjust Various Particle Properties](https://playground.babylonjs.com/#0K3AQ2#46) - Simple example showing how to adjust various particle properties.
