Have ideas to improve npm?Join in the discussion! »

electron-window-rotator

2.1.0 • Public • Published

electron-window-rotator

Rotate native Electron window on macOS.

npm npm GitHub license

Demo gif

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

Run demo locally:

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:

xcode-select --install
npm install electron-window-rotator
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);

Install

npm i electron-window-rotator

DownloadsWeekly Downloads

3

Version

2.1.0

License

MIT

Unpacked Size

161 kB

Total Files

16

Last publish

Collaborators

  • avatar