fix file names

pull/874/head
jeffmer 2021-11-01 18:06:15 +00:00
parent 6f5b902adb
commit 54514220db
4 changed files with 51 additions and 0 deletions

51
apps/multiclock/README.md Normal file
View File

@ -0,0 +1,51 @@
# Multiclock
This is a clock app that supports multiple clock faces. The user can switch between faces while retaining widget state which makes the switch fast. Currently there are four clock faces as shown below.
### Analog Clock Face
### Digital Clock Face
### Big Digit Clock Face
### Text Clock Face
### Time and Date Clock Face
## Controls
Clock faces are kept in a circular list.
*BTN1* - switches to the next clock face.
*BTN2* - switches to the app launcher.
*BTN3* - switches to the previous clock face.
## Adding a new face
Clock faces are described in javascript storage files named `name.face.js`. For example, the Analog Clock Face is described in `ana.face.js`. These files have the following structure:
```
(() => {
function getFace(){
function onSecond(){
//draw digits, hands etc
}
function drawAll(){
//draw background + initial state of digits, hands etc
}
return {init:drawAll, tick:onSecond};
}
return getFace;
})();
```
For those familiar with the structure of widgets, this is similar, however, there is an additional level of function nesting. This means that although faces are loaded when the clock app starts running they are not instantiated until their `getFace` function is called, i.e. memory is not allocated to structures such as image buffer arrays declared in `getFace` until the face is selected. Consequently, adding a face does not require a lot of extra memory.
The app at start up loads all files `*.face.js`. The simplest way of adding a face is thus to load it into `Storage` using the WebIDE. Similarly, to remove an unwanted face, simply delete it from `Storage` using the WebIDE.
## Support
Please report bugs etc. by raising an issue [here](https://github.com/jeffmer/JeffsBangleAppsDev).

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB