gl-scatter2d

WebJar for gl-scatter2d

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

gl-scatter2d
Last Version

Last Version

1.0.6
Release Date

Release Date

Type

Type

jar
Description

Description

gl-scatter2d
WebJar for gl-scatter2d
Project URL

Project URL

http://webjars.org

Download gl-scatter2d

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/gl-scatter2d/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>gl-scatter2d</artifactId>
    <version>1.0.6</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/gl-scatter2d/
implementation 'org.webjars.npm:gl-scatter2d:1.0.6'
// https://jarcasting.com/artifacts/org.webjars.npm/gl-scatter2d/
implementation ("org.webjars.npm:gl-scatter2d:1.0.6")
'org.webjars.npm:gl-scatter2d:jar:1.0.6'
<dependency org="org.webjars.npm" name="gl-scatter2d" rev="1.0.6">
  <artifact name="gl-scatter2d" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='gl-scatter2d', version='1.0.6')
)
libraryDependencies += "org.webjars.npm" % "gl-scatter2d" % "1.0.6"
[org.webjars.npm/gl-scatter2d "1.0.6"]

Dependencies

compile (6)

Group / Artifact Type Version
org.webjars.npm : gl-shader jar [4.0.4,5)
org.webjars.npm : glslify jar [2.1.2,3)
org.webjars.npm : typedarray-pool jar [1.1.0,2)
org.webjars.npm : snap-points-2d jar [3.0.0,4)
org.webjars.npm : binary-search-bounds jar [2.0.3,3)
org.webjars.npm : gl-buffer jar [2.1.2,3)

Project Modules

There are no modules declared in this project.

gl-scatter2d

WebGL 2D scatter plots for lots of points

Example

For now, see gl-plot2d.

Install

Using npm, you can install this module as follows:

npm i gl-scatter2d

API

Constructor

var scatter = require('gl-scatter2d')(plot, options)

Creates a new 2D scatter plot.

  • plot is a reference to a gl-plot2d object
  • options is a JSON object containing the parameters which are passed to the object when it is updated.

options has the following properties:

  • positions is a packed 2*n length array of the unrolled xy coordinates of the points (required)
  • size is a number giving the diameter of a marker in pixels (default 12)
  • color is the color of a marker as a length 4 RGBA array (default [1,0,0,1])
  • borderSize is the width of the border around each point in pixels (default 1)
  • borderColor is the color of the border of each point (default [0,0,0,1])
  • snapPoints defines whether points should be grouped hierarchically to optimize rendering of huge number of points

Returns A new scatter plot object, which is also registered to plot

Methods

scatter.update(options)

Updates the scatter plot.

  • options is an object with the same properties as in the scatter plot constructor

scatter.dispose()

Destroys the scatter plot and all associated resources.

License

(c) 2015 Mikola Lysenko. MIT License

Development supported by plot.ly

org.webjars.npm

Versions

Version
1.0.6