This commit is contained in:
Sam 2023-03-30 11:58:32 +13:00
parent c4de1e375a
commit eadf04184e
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ function setCanvasSize() {
setCanvasSize(); setCanvasSize();
window.addEventListener("resize", setCanvasSize); window.addEventListener("resize", setCanvasSize);
const degPerSec = 0.00000015; const degPerSec = 0.000001;
const maxTime = 99999999; const maxTime = 99999999;
let startingRotation = 1; let startingRotation = 1;
@ -53,7 +53,7 @@ function drawSpiral(angle) {
for (let n = 0; n < maxIterations; n++) { for (let n = 0; n < maxIterations; n++) {
const nColor = lerpRGB(startColor, endColor, Math.cos(rad(n / 2))); const nColor = lerpRGB(startColor, endColor, Math.cos(rad(n / 2)));
const nAngle = n * angle + Math.sin(angle * n * 3); const nAngle = n * angle + Math.sin(angle * n * 2);
const radius = distanceMultiplier * n; const radius = distanceMultiplier * n;
const xCoord = radius * Math.cos(nAngle) + centerX; const xCoord = radius * Math.cos(nAngle) + centerX;
const yCoord = radius * Math.sin(nAngle) + centerY; const yCoord = radius * Math.sin(nAngle) + centerY;