Apply Linear Gradient to Grid
This commit is contained in:
1 parent
0405b15b01
commit
d37bec5cb9
1 file changed
+5
-1
@@ -97,9 +97,13 @@ export class BrandAccent implements OnDestroy {
|
||||
|
||||
this.ctx.globalCompositeOperation = 'multiply';
|
||||
|
||||
const gridGradient = this.ctx.createLinearGradient(0, 0, this.canvasNativeSize[0], this.canvasNativeSize[1]);
|
||||
gridGradient.addColorStop(0, 'rgba(0, 0, 0, 0)');
|
||||
gridGradient.addColorStop(1, 'rgba(0, 0, 0, 0.2)');
|
||||
|
||||
this.ctx.beginPath();
|
||||
this.ctx.lineWidth = 2;
|
||||
this.ctx.strokeStyle = 'rgba(0, 0, 0, 0.2)';
|
||||
this.ctx.strokeStyle = gridGradient;
|
||||
this.ctx.lineCap = 'round';
|
||||
|
||||
const lineRenderMargin = this.animation.gridSquareSize * 2;
|
||||
|
||||
Reference in new issue
Block a user