Coding Challenge #74: Clock with p5.js
In this coding challenge, I attempt to program a clock in HTML5 canvas with the p5.js library. Code: https://thecodingtrain.com/challenges/74-clock
๐น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/2lvHFWPbW
๐ฅ Next video: https://youtu.be/RPz75gcHj18?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
๐ Golan Levin's notes on MAEDAโS 12 OโCLOCKS: http://cmuems.com/2016/60212/lectures/lecture-09-09b-clocks/maedas-clocks/
๐ Alca's Clock Collection: https://codepen.io/collection/DqRNLQ/
๐ ICM-2017 Syllabus: https://github.com/ITPNYU/ICM-2017
Videos:
๐ฅ Livestream Archive: https://youtu.be/BcbS0MR3vxQ
Related Coding Challenges:
๐ #66 JavaScript Countdown Timer: https://youtu.be/MLtAMg9_Svw
Timestamps:
0:00 Introducing today's topic
0:44 Inspiration
2:15 How do we get the time information?
3:15 Add a digital clock
4:55 Use arcs to visualize the time
7:05 Add angleMode()
9:17 Map the end of the arc to the seconds, minutes, and hour
12:07 Translate to the center of canvas and rotate by -90 degrees
15:15 Add hour, minutes, and second hands
18:57 Concluson and creative possibilities
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
๐ Website: http://thecodingtrain.com/
๐พ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
๐ฉ Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
๐ก GitHub: https://github.com/CodingTrain
๐ฌ Discord: https://discord.gg/hPuGy2g
๐ Membership: http://youtube.com/thecodingtrain/join
๐ Store: https://standard.tv/codingtrain
๐๏ธ Twitter: https://twitter.com/thecodingtrain
๐ธ Instagram: https://www.instagram.com/the.coding.train/
๐ฅ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
๐ p5.js: https://p5js.org
๐ p5.js Web Editor: https://editor.p5js.org/
๐ Processing: https://processing.org
๐ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
#beginner #clocks #generativeart #javascript #p5js