# theora-timeir-clock

> timeir clock is automatic canvas timer !

Latest version **1.0.0** (published 2022-05-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install theora-timeir-clock
pnpm add theora-timeir-clock
yarn add theora-timeir-clock
bun add theora-timeir-clock
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-05-22 |
| First published | 2022-05-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 22 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Theora Vilderson |
| Maintainers | theora.vilderson |
| Keywords | theroa, clock, time, timeir, timeirclock, timerir-clock, theora-timerir-clock |

## Links

- npm: https://www.npmjs.com/package/theora-timeir-clock
- Repository: https://github.com/theoraVilderson/theora-timeir-clock
- Homepage: https://github.com/theoraVilderson/theora-timeir-clock#readme
- Issues: https://github.com/theoraVilderson/theora-timeir-clock/issues
- npm.io page: https://npm.io/package/theora-timeir-clock

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-05-22

## README

#Library


## Contact

<theora.vilderson.contact@gmail.com>

### Features

- **use amPM**
- **Change all part color**
- **responsive!**
- **Date Auto sync**
- **can be used with optional Date**
- **Events for Tick and Tock!**

### Default Options :

- **scaleWidth**: ***200***,
- **scaleHeight**: ***200***,
- **fontSize**: ***15***,
- **space**: ***10***,
- **secondPointerSize**: ***2***,
- **minutePointerSize**: ***5***,
- **hourPointerSize**: ***7***,
- **secondPointerStayBack**: ***10***,
- **secondPointerHandsOff**: ***10***,
- **minutePointerHandsOff**: ***20***,
- **hourPointerHandsOff**: ***26***,
- **clockBorderSize**: ***5***,
- **markerDashedWidth**: ***1***,
- **markerMinuteDashedSize**: ***1***,
- **markerHourDashedSize**: ***5***,
- **centralDotSize**: ***5***,
- **textHourSpace**: ***5***,
- **mainBorderColor**: "***grey***",
- **mainBorderCoverColor**: "***white***",
- **centralDotColor**: "***grey***",
- **secondPointerColor**: "***red***",
- **minutePointerColor**: "***black***",
- **hourPointerColor**: "***black***",
- **minDashColor**: "***rgb***(0,0,0)",
- **hourDashColor**: "***rgb***(0,0,0)",
- **hourTextColor**: "***rgb***(0,0,0)",
- **titleColor**: "***rgb***(0,0,0)",
- **title**: "***Theora*** Vilderson",
- **titleFont**: "***sans***-serif",
- **hourFont**: "***monospace***",



### Create Clock Object :
```   
let clock = new Clock({
      element: canvasElm, // the element should be canvas
      onTick:(date)=>{ /* do something*/ },
      onTock:(date)=>{ /* do something*/ },
      time: userDate, //you can use optional Date
      options:{}
    });
    // run it once and the element should be valid !
    // otherwise will be Error shown up

```
### Start/Stop Clock :
```
let clock = new Clock({
      element: canvasRef.current, // the element should be canvas
      onTick:(date)=>{ /* do something*/ },
      onTock:(date)=>{ /* do something*/ },
      time: userDate, //you can use optional Date
      options:{}
    });
    clock.startClock(); // start
    clock.stopClock(); // stop

    //
    // remember in react use  useEffect to create clock 
    // return function and stop the Clock!

```

- **the options for sizing uses Scale Algorithm**
- **YourPixlSize * CurrentSurface / defaultSurface**
- **use your imagine size Handler to just work it out! :)**

---
_Source: https://npm.io/package/theora-timeir-clock · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
