#Energy Beam

3 messages ยท Page 1 of 1 (latest)

cosmic mesa
#

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

soft hare
#

Interesting. I suppose it wouldn't take much to adapt that to use particles either.

cosmic mesa