# triangles-canvas

> Triangles background animation using canvas.

Latest version **0.1.5** (published 2018-05-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install triangles-canvas
pnpm add triangles-canvas
yarn add triangles-canvas
bun add triangles-canvas
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2018-05-28 |
| First published | 2018-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.9.3 |
| Dependencies | 2 |
| Unpacked size | 29.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Daniel Rocha |
| Maintainers | danmmx |
| Keywords | triangles, canvas, animation, background |

## Links

- npm: https://www.npmjs.com/package/triangles-canvas
- Repository: https://github.com/DanMMX/trianglesCanvas
- Homepage: https://github.com/DanMMX/trianglesCanvas#readme
- Issues: https://github.com/DanMMX/trianglesCanvas/issues
- npm.io page: https://npm.io/package/triangles-canvas

## Dependencies (2)

- [lodash.debounce](https://npm.io/package/lodash.debounce.md) ^4.0.8
- [@danmmx/distance-between-points](https://npm.io/package/@danmmx/distance-between-points.md) ^1.0.3

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2018-05-28
- 0.1.4 — 2018-05-28
- 0.1.3 — 2018-05-28
- 0.1.2 — 2018-05-28
- 0.1.1 — 2018-05-28
- 0.1.0 — 2018-05-28

## README

# Triangles Background Animation using Canvas

## Installation

`npm install trianglescanvas`

## Usage

```

import trianglesCanvas from 'triangles-canvas'

trianglesCanvas({
  id, // the id where the canvas should be drawn
  cb, // a callback to be run when the rendering is done
  dark = 20, // darkest color in rgba
  light = 45, // lightest color in rgba
  darkColor = 'rgba(255, 122, 5, 0.3)', // darkest color to be highlighted when mousemove
  lightColor = 'rgba(246, 90, 90, 0.3)', // lightest color to be highlighted when mousemove
  size = 25, // amount of squares to be drawn on the canvas (in px)
  refreshTime = 50 // time in ms to draw each set of triangles
})

```

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