# PostEffectQueue

Class · category: Graphics

Source: https://github.com/playcanvas/engine/blob/f059dc005842f76e052cdf44d8370c8c7ec475ac/src/framework/components/camera/post-effect-queue.js#L30

Used to manage multiple post effects for a camera. This is the legacy post-processing path. For
new work use [CameraFrame](https://api.playcanvas.com/engine/classes/CameraFrame.md), which implements bloom, SSAO, depth of field, TAA, volumetric
fog and tone mapping as one HDR pipeline; `playcanvas/scripts/esm/camera-frame.mjs` wraps it as
an attachable script.

## Constructors

### constructor

```ts
new PostEffectQueue(app: AppBase, camera: CameraComponent)
```

Create a new PostEffectQueue instance.

**Parameters**

- `app` ([`AppBase`](https://api.playcanvas.com/engine/classes/AppBase.md)): The application.
- `camera` ([`CameraComponent`](https://api.playcanvas.com/engine/classes/CameraComponent.md)): The camera component.

## Methods

### addEffect

```ts
addEffect(effect: PostEffect): void
```

Adds a post effect to the queue. If the queue is disabled adding a post effect will
automatically enable the queue.

**Parameters**

- `effect` ([`PostEffect`](https://api.playcanvas.com/engine/classes/PostEffect.md)): The post effect to add to the queue.

### destroy

```ts
destroy(): void
```

Removes all the effects from the queue and disables it.

### disable

```ts
disable(): void
```

Disables the queue and all of its effects.

### enable

```ts
enable(): void
```

Enables the queue and all of its effects. If there are no effects then the queue will not be
enabled.

### removeEffect

```ts
removeEffect(effect: PostEffect): void
```

Removes a post effect from the queue. If the queue becomes empty it will be disabled
automatically.

**Parameters**

- `effect` ([`PostEffect`](https://api.playcanvas.com/engine/classes/PostEffect.md)): The post effect to remove.
