diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html
index 4070d32767..e0eabf9fdf 100644
--- a/01 - JavaScript Drum Kit/index-START.html
+++ b/01 - JavaScript Drum Kit/index-START.html
@@ -58,7 +58,26 @@
diff --git a/02 - JS and CSS Clock/index-START.html b/02 - JS and CSS Clock/index-START.html
index 2712384201..ef983de8ca 100644
--- a/02 - JS and CSS Clock/index-START.html
+++ b/02 - JS and CSS Clock/index-START.html
@@ -56,6 +56,9 @@
}
.hand {
+ transform-origin: 100%;
+ transform: rotate(90deg);
+ transition-duration(0.2s);
width:50%;
height:6px;
background:black;
@@ -66,6 +69,20 @@
diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html
index ca2b59d077..1781317ddb 100644
--- a/03 - CSS Variables/index-START.html
+++ b/03 - CSS Variables/index-START.html
@@ -22,6 +22,22 @@
Update CSS Variables with JS
+ const canvas = document.querySelector('#draw');
+ const context = canvas.getContext('2d');
+ canvas.height = window.innerHeight;
+ canvas.width = window.innerWidth;
+ context.strokeStyle = 'BADA55';
+ context.lineJoin = 'round';
+ context.lineCap = 'round';
+
+ let lastX = 0;
+ let lastY = 0;
+ let isDrawing = false;
+ let hue = 0;
+ let direction = true;
+
+ function draw(e) {
+ if (!isDrawing) return;
+ console.log(e);
+ context.strokeStyle = `hsl(${hue}, 100%, 50%)`;
+ context.beginPath();
+ context.moveTo(lastX, lastY);
+ context.lineTo(e.offsetX, e.offsetY);
+ context.stroke();
+ lastX = e.offsetX;
+ lastY = e.offsetY;
+ hue++;
+ if (context.lineWidth >= 100 || context.lineWidth < 0) {
+ direction = !direction;
+ }
+ if (direction) {
+ context.lineWidth++;
+ } else {
+ context.lineWidth--;
+ }
+ }
+
+ window.addEventListener('mousemove', draw);
+ window.addEventListener('mousedown', (e) => {
+ isDrawing = true;
+ lastX = e.offsetX;
+ lastY = e.offsetY;
+ });
+ window.addEventListener('mouseup', () => isDrawing = false);
+ window.addEventListener('mouseleave', () => isDrawing = false);
+
+