Initial commit
This commit is contained in:
commit
7b51551856
27 files changed
+911
No files matched your search
@@ -0,0 +1,9 @@
|
||||
// light follows the cursor across a card's glass
|
||||
document.querySelectorAll('.shard').forEach(el=>{
|
||||
el.addEventListener('pointermove',e=>{
|
||||
const r=el.getBoundingClientRect();
|
||||
el.style.setProperty('--mx',(e.clientX-r.left)+'px');
|
||||
el.style.setProperty('--my',(e.clientY-r.top)+'px');
|
||||
});
|
||||
el.addEventListener('pointerleave',()=>{el.style.removeProperty('--mx');el.style.removeProperty('--my')});
|
||||
});
|
||||
Reference in new issue
Block a user