https://github.com/rozek/banglejs-2-rounded-clock-hands
draws still simple, yet rounded, hands for an analog clock on a Bangle.js 2
https://github.com/rozek/banglejs-2-rounded-clock-hands
banglejs
Last synced: about 1 year ago
JSON representation
draws still simple, yet rounded, hands for an analog clock on a Bangle.js 2
- Host: GitHub
- URL: https://github.com/rozek/banglejs-2-rounded-clock-hands
- Owner: rozek
- License: mit
- Created: 2022-01-08T13:17:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-01T05:54:06.000Z (over 4 years ago)
- Last Synced: 2025-01-29T20:29:59.341Z (over 1 year ago)
- Topics: banglejs
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# banglejs-2-rounded-clock-hands #
draws still simple, yet rounded, hands for an analog clock on a Bangle.js 2
This module draws some rounded hands (with a small bolt in the center) for an analog clock running on a [Bangle.js 2](https://www.espruino.com/Bangle.js2). The inner "bolt" is based on an idea of forum user [HughB](http://forum.espruino.com/profiles/167235/) (see [this discussion](http://forum.espruino.com/conversations/371242/)).

## Usage ##
Within a clock implementation, the module may be used as follows:
```javascript
let Clockwork = require(...);
Clockwork.windUp({
hands:require('https://raw.githubusercontent.com/rozek/banglejs-2-rounded-clock-hands/main/ClockHands.js'),
...
});
```
## Example ##
The following code shows a complete example for a (still simple) analog clock using these clock hands:
```javascript
let Clockwork = require('https://raw.githubusercontent.com/rozek/banglejs-2-simple-clockwork/main/Clockwork.js');
Clockwork.windUp({
face: require('https://raw.githubusercontent.com/rozek/banglejs-2-four-numbered-clock-face/main/ClockFace.js'),
hands:require('https://raw.githubusercontent.com/rozek/banglejs-2-rounded-clock-hands/main/ClockHands.js'),
},{
Foreground:'#000000', Background:'#FFFFFF', Seconds:'#FF0000'
});
```
`Settings.Seconds` is optional and specifies the color in which the second hand should be drawn - if it is missing, `null` or `undefined`) no second hand will be drawn.
## License ##
[MIT License](LICENSE.md)