[+] Matcha pointer

This commit is contained in:
2025-02-14 18:51:08 -05:00
parent 5ba38d56f9
commit aaee0f56f8
3 changed files with 6 additions and 3 deletions
+3 -3
View File
@@ -62,6 +62,7 @@
let perpendicular = dir === 'bottom' || dir === 'top' ? 'left' : 'top'
obj[perpendicular] = `calc(${pos * 100}% - 100px)`
// Disable transition for the initial position
divEl.style.transition = `none`
divEl.style.cssText = Object.keys(obj).map(key => `${key}: ${obj[key]}`).join('; ')
await sleep(0.1)
@@ -88,9 +89,8 @@
imgEl.style.cssText = Object.keys(obj).map(key => `${key}: ${obj[key]}`).join('; ')
}
onMount(() => {
setTimeout(() => divStyles(), 100)
})
onMount(() => setTimeout(divStyles, 100)
)
</script>
<main>
+3
View File
@@ -16,3 +16,6 @@ body
margin: 0
width: 100%
height: 100%
*
cursor: url("./matcha_cursor.png") 16 16, auto
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB