# electron-window-rotator

> Rotate native Electron window on macOS

Latest version **2.1.0** (published 2020-12-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install electron-window-rotator
pnpm add electron-window-rotator
yarn add electron-window-rotator
bun add electron-window-rotator
```

## 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 | 2.1.0 |
| Published | 2020-12-26 |
| First published | 2020-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 157 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Author | Anton Fisher |
| Maintainers | afschr |
| Keywords | electron, electronjs, nswindow |

## Links

- npm: https://www.npmjs.com/package/electron-window-rotator
- Repository: https://github.com/antonfisher/electron-window-rotator
- Homepage: https://github.com/antonfisher/electron-window-rotator#readme
- Issues: https://github.com/antonfisher/electron-window-rotator/issues
- npm.io page: https://npm.io/package/electron-window-rotator

## Dependencies (1)

- [bindings](https://npm.io/package/bindings.md) ^1.5.0

## Recent versions

- 2.1.0 (latest) — 2020-12-26
- 2.0.0 — 2020-12-26
- 1.0.0 — 2020-12-25

## README

# electron-window-rotator

Rotate native Electron window on macOS.

[![npm](https://img.shields.io/npm/v/electron-window-rotator.svg?colorB=brightgreen)](https://www.npmjs.com/package/electron-window-rotator)
[![npm](https://img.shields.io/npm/dt/electron-window-rotator.svg?colorB=brightgreen)](https://www.npmjs.com/package/electron-window-rotator)
[![GitHub license](https://img.shields.io/github/license/antonfisher/electron-window-rotator.svg)](https://github.com/antonfisher/electron-window-rotator/blob/master/LICENSE)

![Demo gif](https://raw.githubusercontent.com/antonfisher/electron-window-rotator/docs/images/demo-1.0.0.gif)

>**Note:** this is a silly proof-of-concept npm module that demonstrates using Nodejs N-API.

## Run demo locally:

```shell
git clone https://github.com/antonfisher/electron-window-rotator.git
cd electron-window-rotator
npm install
cd demo && npm install && cd -
xcode-select --install
npm start
```

## Usage:

```shell
xcode-select --install
npm install electron-window-rotator
```

```js
const Rotator = require('electron-window-rotator');
const mainWindow = new BrowserWindow({ ... });

setInterval(() => {
  Rotator.rotate(
    mainWindow,             // Electron's BrowserWindow instance
    1000,                   // animation duration [ms]
    Rotator.DIRECTION_LEFT  // rotation direction
  );
}, 3000);
```

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