Skip to content

Commit

Permalink
crazy_circle_update
Browse files Browse the repository at this point in the history
  • Loading branch information
altunenes committed Jun 7, 2023
1 parent 6cf6549 commit 7336ed0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Build status](https://ci.appveyor.com/api/projects/status/71rohei2h9q6ru0s?svg=true)](https://ci.appveyor.com/project/altunenes/sorceress)


![bannner](./docs//assets/banner.PNG)
![banner](https://user-images.githubusercontent.com/54986652/227795451-aa41dcb1-3a87-4142-91ff-69a275bed8f8.png)


### Purpose of package
Expand Down
33 changes: 27 additions & 6 deletions docs/js/circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@ document.addEventListener("DOMContentLoaded", function() {
speedFactor *= 2;
});

var hideLines = false;
var hideLinesButton = document.createElement('button');
hideLinesButton.innerHTML = 'Hide Lines';

hideLinesButton.style.position = 'absolute';
hideLinesButton.style.bottom = '20%';
hideLinesButton.style.left = '25%';
hideLinesButton.style.backgroundColor = '#4CAF50';
hideLinesButton.style.padding = '10px';
hideLinesButton.style.boxShadow = '0px 0px 10px red';

hideLinesButton.addEventListener('click', function(e) {
hideLines = !hideLines;
hideLinesButton.innerHTML = hideLines ? 'Show Lines' : 'Hide Lines';
});

document.body.appendChild(hideLinesButton);

document.body.appendChild(increaseButton);

var decreaseButton = document.createElement('button');
Expand Down Expand Up @@ -87,12 +105,15 @@ document.addEventListener("DOMContentLoaded", function() {

circles.stroke();
var a= 0;
for (var i=0; i< num*2; i++){
circles.moveTo(width2,width2);
circles.lineTo(width2+Math.cos(a)*width2, width2+Math.sin(a)*width2);
a+= ratio/2;
}
circles.stroke();
if (!hideLines) {
for (var i=0; i< num*2; i++){
circles.moveTo(width2,width2);
circles.lineTo(width2+Math.cos(a)*width2, width2+Math.sin(a)*width2);
a+= ratio/2;
}
circles.stroke();
}


a= 0;
for (var i=0; i< num; i++){
Expand Down

0 comments on commit 7336ed0

Please sign in to comment.