如何阻止进一步的阴影

打开阴影后,画布上的每个新绘图都将被遮蔽。

通过将 context.shadowColor 设置为透明色来关闭进一步的阴影。

// start shadowing
context.shadowColor='black';

... render some shadowed drawings ...

// turn off shadowing.
context.shadowColor='rgba(0,0,0,0)';