adding blue lines
This commit is contained in:
@@ -53,7 +53,7 @@ module.exports = {
|
|||||||
ctx.fillRect(Math.random() * canvas.width, Math.random() * canvas.height, 1, 1);
|
ctx.fillRect(Math.random() * canvas.width, Math.random() * canvas.height, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adding lines
|
// Adding white lines
|
||||||
for (let i = 0; i < 30; i++) {
|
for (let i = 0; i < 30; i++) {
|
||||||
ctx.strokeStyle = `rgba(255,255,255,${Math.random() * 1.8})`;
|
ctx.strokeStyle = `rgba(255,255,255,${Math.random() * 1.8})`;
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
@@ -62,6 +62,15 @@ module.exports = {
|
|||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Adding blue lines
|
||||||
|
for (let i = 0; i < 30; i++) {
|
||||||
|
ctx.strokeStyle = `rgba(0, 0, 255, ${Math.random() * 0.9})`;
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.moveTo(Math.random() * canvas.width, Math.random() * canvas.height);
|
||||||
|
ctx.lineTo(Math.random() * canvas.width, Math.random() * canvas.height);
|
||||||
|
ctx.stroke();
|
||||||
|
}
|
||||||
|
|
||||||
// Rotation
|
// Rotation
|
||||||
const rotation = Math.random() * 0.2 - 0.1; // Random rotation between -0.1 and 0.1 radians
|
const rotation = Math.random() * 0.2 - 0.1; // Random rotation between -0.1 and 0.1 radians
|
||||||
ctx.translate(canvas.width / 2, canvas.height / 2);
|
ctx.translate(canvas.width / 2, canvas.height / 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user