Drawing a nice looking Laser (Star Wars) on the canvas
问题 Im currently in the process of animation some laser effects on the canvas for the purpose of making my game a bit more enjoyable. For the purpose of that, i require the drawing and animation of "laser" weapons fire, something along the lines of Star Wars. So far, im basicly only drawing a short line in red or blue and then drawing a thinner, white, line on top of it, so it gives the impression of a gradient. I also use linecap = "round"; my current code: function drawProjectile(weapon, ox, oy