You are browsing as a guest. Sign up (or log in) to start making projects!

2h 27m 33s logged

clock time

Figured I’d make this devlog now because upcoming stuff is going to be big and messy and I’ll probably forget what I’ve done here by the time I’m done that. anyway, The biggest addition today was adding a clock system. I’ve made a createClock function, that works at a very basic level. This should work for the heal clock as well as user-created clocks. It has some basic exception handling, ensuring that the size is either 4, 6, or 8 (the clock sizes in BitD). This uses some modified code for circular arrays in JS from stackoverflow (credited in the code), and a css clip-path to make the pie shape. Each pie slice is a div, and the divs are much larger than the slices. However, since they aren’t buttons, I’m not concerned about overlap. The divs are this size so that I can simply round two edges 50% and then apply a triangular clip-path on top of that. I initially experimented with using set SVGs for this, but they proved to be too much work for the benefits (deathly afraid of whatever the heck xmlns is). I also used a flex display to add some crude buttons on the side, for incrementing, decrementing, and removing the clock. Since the clocks only ever change by one or two at a time, I think this is an appropriate, human friendly input type. I also modified the radio selectors to be on top of each other, I believe that looks better. Last, I made a notes section at the bottom, which is just a resizable html <textarea> that uses the same oninput="store()" logic as my other text inputs.

0
2

Comments 0

No comments yet. Be the first!