Skip to content

Commit 37adba2

Browse files
committed
Add another sheep vibing to... Despacito
1 parent b162fc4 commit 37adba2

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

src/index.coffee

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ $ document
291291
.text title
292292
setInterval tick, 1000
293293

294+
# Despacito BPM
295+
PERIOD = 60000 / 89
294296
do paint = ->
295297
do renderCurrentTime
298+
299+
t = (do Date.now * Math.PI / PERIOD)
300+
$ '#vibing'
301+
.css 'transform', "skewX(#{(Math.cbrt Math.cos t) * 5}deg) scaleY(#{1 - (Math.sin t) ** 20 / 8})"
296302
window.requestAnimationFrame paint

src/index.pug

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ html(lang="en")
1717
p#status
1818
div#days
1919

20+
img(src="./vibing.svg" alt="vibing sheep")#vibing
21+
2022
h2 About
2123
p.
2224
thsi is open source on #[a.link(href="https://github.com/SheepTester/uxdy") Github]

src/styles.sass

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,13 @@ button
9696
right: 0
9797
z-index: -1
9898

99+
#vibing
100+
position: fixed
101+
top: 0
102+
right: 0
103+
z-index: -1
104+
width: 150px
105+
transform-origin: bottom
106+
99107
.hidden
100108
display: none

static/vibing.svg

Lines changed: 27 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)