electron-window-rotator
v2.1.0
Published
Rotate native Electron window on macOS
Downloads
25
Readme
electron-window-rotator
Rotate native Electron window on macOS.
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);