atmosphere explorer pds.ls
tool typescript atproto

randomize star rotation (very important feature) #13

merged opened by retr0.id targeting main from retr0.id/pdsls: main
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:vwzwgnygau7ed7b7wt5ux7y2/sh.tangled.repo.pull/3m4ejmunjzq22
+6 -2
Diff #0
+6 -2
src/layout.tsx
··· 74 74 @keyframes sparkle { 75 75 0% { 76 76 opacity: 1; 77 - transform: translate(0, 0) rotate(0deg) scale(1); 77 + transform: translate(0, 0) rotate(var(--ttheta1)) scale(1); 78 78 } 79 79 100% { 80 80 opacity: 0; 81 - transform: translate(var(--tx), var(--ty)) rotate(180deg) scale(0); 81 + transform: translate(var(--tx), var(--ty)) rotate(var(--ttheta2)) scale(0); 82 82 } 83 83 } 84 84 `; ··· 100 100 101 101 const tx = (Math.random() - 0.5) * 50; 102 102 const ty = (Math.random() - 0.5) * 50; 103 + const ttheta1 = Math.random() * 360; 104 + const ttheta2 = ttheta1 + (Math.random() - 0.5) * 540; 103 105 star.style.setProperty("--tx", tx + "px"); 104 106 star.style.setProperty("--ty", ty + "px"); 107 + star.style.setProperty("--ttheta1", ttheta1 + "deg"); 108 + star.style.setProperty("--ttheta2", ttheta2 + "deg"); 105 109 106 110 document.body.appendChild(star); 107 111

History

1 round 0 comments
sign up or login to add to the discussion
retr0.id submitted #0
1 commit
expand
randomize star rotation (very important feature)
expand 0 comments
pull request successfully merged