Canvas - Fill a rectangle in all areas that are fully transparent

前端 未结 2 1361
予麋鹿
予麋鹿 2020-12-09 07:03

I\'m writing a simple 2D game engine using the HTML5 canvas. I\'ve come to adding a lighting engine. Each light source has a radius value and an intensity value (0-1, eg 1 w

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 07:53

    Just an idea, but since you're getting the opposite effect you're going for from your gradient, have you tried reversing the gradient?

提交回复
热议问题