DanMMX/trianglesCanvas


Triangles background animation using canvas.

License: MIT

Language: JavaScript


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
})

Demo

Project Statistics

Sourcerank 2
Repository Size 1.92 MB
Stars 0
Forks 0
Watchers 1
Open issues 0
Dependencies 378
Contributors 1
Tags 8
Created
Last updated
Last pushed

Top Contributors See all

Dan Rocha

Packages Referencing this Repo

triangles-canvas
Triangles background animation using canvas.
Latest release 0.1.5 - Updated

Recent Tags See all

v0.1.5 May 28, 2018
v0.1.4 May 28, 2018
v0.1.3 May 28, 2018
v0.1.2 May 28, 2018
0.1.2 May 28, 2018
0.1.2 May 28, 2018
0.1.1 May 28, 2018
0.1.0 May 28, 2018

Something wrong with this page? Make a suggestion

Last synced: 2018-05-28 06:15:57 UTC

Login to resync this repository