You can use the parameters in this wavy line to create energy beams, waves, or threads. By using multiple lines and playing with colors and alpha, you can compose some cool effects.
https://phaser.io/sandbox/scUBZ1Kv
creating a new beam is a simple as
const beam = new EnergyBeam(this, {
start: { x: 100, y: 300 },
end: { x: 600, y: 300 },
segments: 12,
amplitude: 20,
frequency: 1,
thickness: 20,
color: 0xFFD700,
speed: 0.1,
})
and then calling
beam.updateBeam()
on your update function