WebGL 2D point cloud for lots of points
... to be created
Using npm, you can install this module as follows:
npm i gl-pointcloud2d
var pointcloud = require('gl-pointcloud2d')(plot, options)
Creates a new 2D point cloud.
plotis a reference to a
optionsis a JSON object containing the parameters which are passed to the object when it is updated.
options has the following properties:
datais a packed 2*n length array of the unrolled xy coordinates of the points (required) - buffering is significantly faster if it's of type Float32Array
idToIndexis an optional array of length n where
idToIndex[i] = i- buffering is significantly faster if it's supplied and of type Int32Array
coloris the color of a marker as a length 4 RGBA array (default
borderSizeis the ratio of the border around each point (default
borderColoris the color of the border of each point (default
glblending is enabled for a translucency effect on overlaps; enabling it lowers draw speed somewhat (default
Returns A new point cloud plot object, which is also registered to
Updates the point cloud plot.
optionsis an object with the same properties as in the point cloud plot constructor
Destroys the point cloud plot and all associated resources.
(c) 2015 Mikola Lysenko. MIT License
Development supported by plot.ly