Skip to content

gl-vis/gl-line2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Aug 17, 2017
88b835a · Aug 17, 2017

History

25 Commits
Nov 5, 2016
Aug 6, 2015
Aug 17, 2017
Aug 17, 2017
Aug 17, 2017
Aug 17, 2017
Aug 17, 2017
Aug 17, 2017

Repository files navigation

gl-line2d

WebGL 2D line plots for lots of data points

Example

For now, see gl-plot2d.

Install

Using npm, you can install this module as follows:

npm i gl-line2d

Options

Option Meaning
positions Array with sequence of points to connect lines, akin to sequence of ctx.lineTo() calls, eg. [0,0, 1,1, 0,2, 1,-1]
color Array with channel values [0, .2, .5, 1]
width Line width, number, defaults to 1
fill Array with 4 values to fill area under the line towards direction of an axis [false, true, false, false]
fillColor Array with colors corresponding to filling areas, eg. [[0,0,0,1], [0,0,1,1], [0,1,0,1], [.5,.5,0,1]]
dashes Array with dash lengths, altering color/space pairs, ie. [2,10, 5,10, ...]