DEVLOG- 15
This time I replaced the old Clock app with Capy Timer, since we already have a clock on the desktop anyway.
Added 8 timer presets (1 min to 1 hour), a stopwatch, and Start, Pause and Reset buttons.
For the code, I used data-minutes in HTML to get the selected time, then Date.now() and setInterval() to handle the countdown. Also made a displayTimer() function to update the time on screen.
Had a funny bug where I typed minute instead of minutes, and the stopwatch just refused to work 💀
Also added smooth closing animations to all 11 apps! I used CSS keyframes for the animation and a closeAppWindow() function that waits 200ms before hiding the window. Now the windows don’t just disappear into another dimension.
Learned a bit more about JavaScript timers, event listeners and CSS animations.
CAPY can now track exactly how many hours he wasted sleeping. Very useful feature. 🦫💤
Next up, some games! 🐍🍊
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.