# add-effects

Helps pick the right PlayCanvas approach for an effect: particle systems, shader chunk overrides, runtime meshes, or post-processing.

Skill by PlayCanvas. Category: Design and frontend.

## Install

Project (for this project only):

```sh
npx skills add playcanvas/skills --skill add-effects
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add playcanvas/skills --skill add-effects -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Pass

Installs: 226. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/playcanvas/skills/add-effects)

## Source

[Open the source](https://github.com/playcanvas/skills/tree/HEAD/skills/add-effects). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: add-effects
description: Use when adding visual effects to a PlayCanvas app, to choose between particle systems, shader chunks, runtime meshes, and post-processing.
---

# Effects

Pick the Engine building block first, then adapt its closest official example with
`find-examples`:

- Particle systems: the `particlesystem` component (`graphics/particles-*` examples).
- Custom shading on existing surfaces: `StandardMaterial` chunk overrides
  (`override-shader-chunks`), or a `ShaderMaterial` when the effect needs its own shader pair.
- Procedural or per-frame geometry: a runtime-updated `Mesh` on a `render` component
  (`graphics/mesh-*` examples), or `WideLineRenderer` for lines with width.
- Full-screen effects: `CameraFrame` (`light-scene`).
- Gaussian splat effects: the shipped gsplat scripts (`reuse-scripts`).

## Engine gotchas

- `CurveSet` takes one key array per channel. A flattened array type-checks, then fails at texture
  upload.
- Create emitters and meshes at load and reuse them. Fire an emitter with `reset()` then `play()`;
  one-shots use `loop: false`.
- The first use of a shader stalls a frame. Render each effect once behind a loading screen.
- Animate values with `setParameter`, not a per-frame `material.update()`.
- A lit material on a custom mesh needs normals; otherwise use an unlit material.

Trigger each effect through the app's real inputs, and confirm repeated triggers keep entity counts
stable.
````

- Previous: [reuse-scripts](https://syn4pse.dev/terminal/playcanvas-reuse-scripts.md)
- Next: [reduce-draw-calls](https://syn4pse.dev/terminal/playcanvas-reduce-draw-calls.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
