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