# Particles

## `castle.particles.new(options)`

Creates a particle emitter.

```lua
local emitter = castle.particles.new({
  emitRate = 50,
  lifetime  = {0.5, 1.5},
  speed     = {50, 150},
  spread    = math.pi,
  colors    = {
    {1, 1, 0, 1},
    {1, 0, 0, 0},
  },
  gravity   = {0, 100},
})

emitter:start()
emitter:stop()
emitter:emit(5)
emitter:setPosition(x, y)
emitter:destroy()
```
