https://github.com/davidfig/spotlight
a simple canvas-based spotlight that can be used to highlight elements
https://github.com/davidfig/spotlight
Last synced: 24 days ago
JSON representation
a simple canvas-based spotlight that can be used to highlight elements
- Host: GitHub
- URL: https://github.com/davidfig/spotlight
- Owner: davidfig
- License: mit
- Created: 2018-07-29T05:34:56.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-28T02:04:45.000Z (over 6 years ago)
- Last Synced: 2025-04-14T23:44:03.488Z (24 days ago)
- Language: JavaScript
- Size: 1.09 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spotlight-canvas
a simple canvas-based spotlight that can be used to highlight elementsFeatures:
* a canvas that darkens the screen
* spotlight areas based on circles or polygons
* spotlight areas can be dynamically changed or cleared
* the canvas includes fadeIn and fadeOut functions## Live Example
[davidfig.github.io/spotlight/](https://davidfig.github.io/spotlight/)## Rationale
I needed a way to highlight elements in my UI.## Simple Example
```js
var Spotlight = require('spotlight-canvas');// create the scrollbox
var spotlight = new Spotlight();// create a circle spotlight
spotlight.circle(100, 100, 200);```
## Installation
```
npm i spotlight-canvas
```## API Documentation
[https://davidfig.github.io/spotlight/jsdoc/](https://davidfig.github.io/spotlight/jsdoc/)## license
MIT License
(c) 2018 [YOPEY YOPEY LLC](https://yopeyopey.com/) by [David Figatner](https://twitter.com/yopey_yopey/)