Make 12/3/6/9 hour markers longer and thicker
This commit is contained in:
1 parent
07a26b2dee
commit
933ebb8ce7
1 file changed
+8
-5
+8
-5
@@ -550,17 +550,20 @@ var effect = (VANTA.CLOUDS2 || VANTA.CLOUDS)({
|
|||||||
// Generate hour marks
|
// Generate hour marks
|
||||||
for (var i = 0; i < 12; i++) {
|
for (var i = 0; i < 12; i++) {
|
||||||
var angle = (i * 30) * Math.PI / 180;
|
var angle = (i * 30) * Math.PI / 180;
|
||||||
var x1 = 140 + Math.sin(angle) * 122;
|
var isMain = i % 3 === 0;
|
||||||
var y1 = 140 - Math.cos(angle) * 122;
|
var innerR = isMain ? 116 : 122;
|
||||||
var x2 = 140 + Math.sin(angle) * 128;
|
var outerR = isMain ? 134 : 128;
|
||||||
var y2 = 140 - Math.cos(angle) * 128;
|
var x1 = 140 + Math.sin(angle) * innerR;
|
||||||
|
var y1 = 140 - Math.cos(angle) * innerR;
|
||||||
|
var x2 = 140 + Math.sin(angle) * outerR;
|
||||||
|
var y2 = 140 - Math.cos(angle) * outerR;
|
||||||
var line = document.createElementNS('http://www.w3.org/2000/svg', 'line');
|
var line = document.createElementNS('http://www.w3.org/2000/svg', 'line');
|
||||||
line.setAttribute('x1', x1);
|
line.setAttribute('x1', x1);
|
||||||
line.setAttribute('y1', y1);
|
line.setAttribute('y1', y1);
|
||||||
line.setAttribute('x2', x2);
|
line.setAttribute('x2', x2);
|
||||||
line.setAttribute('y2', y2);
|
line.setAttribute('y2', y2);
|
||||||
line.setAttribute('stroke', '#e6dfd1');
|
line.setAttribute('stroke', '#e6dfd1');
|
||||||
line.setAttribute('stroke-width', i % 3 === 0 ? 4 : 3);
|
line.setAttribute('stroke-width', isMain ? 5 : 3);
|
||||||
hourMarks.appendChild(line);
|
hourMarks.appendChild(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user