regl-error2d

WebJar for regl-error2d

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

regl-error2d
Last Version

Last Version

2.0.11
Release Date

Release Date

Type

Type

jar
Description

Description

regl-error2d
WebJar for regl-error2d
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/gl-vis/regl-error2d

Download regl-error2d

How to add to project

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

Dependencies

compile (7)

Group / Artifact Type Version
org.webjars.npm : to-float32 jar [1.0.1,2)
org.webjars.npm : pick-by-alias jar [1.2.0,2)
org.webjars.npm : flatten-vertex-data jar [1.0.2,2)
org.webjars.npm : color-normalize jar [1.5.0,2)
org.webjars.npm : array-bounds jar [1.0.1,2)
org.webjars.npm : object-assign jar [4.1.1,5)
org.webjars.npm : update-diff jar [1.1.0,2)

Project Modules

There are no modules declared in this project.

regl-error2d experimental

Draw error bars for a set of points with regl.

regl-error2d

Remake on gl-error2d:

  • color may define per-bar colors.
  • max number of points extended 40 times (from 1e5 to 4e6) via instanced draw.
  • lineWidth and capSize are adjusted to actual pixels.
  • enhanced performance via vertex shader.

Demo.

Usage

npm install regl-error2d

let regl = require('regl')({extensions: 'angle_instanced_arrays'})
let createError2d = require('regl-error2d')

let error2d = createError2d(regl)

error2d({
  positions: [0,0, .5,0, ...],
  errors: [.5,.5,.5,.6, .2,.3,.4,.1, ...],
  color: 'rgba(0, 100, 200, .75)'
})

createError2d(regl, options?)

Create new error2d instance from regl and initial options. Note that regl instance should have ANGLE_instanced_arrays extension enabled.

error2d(options|list?)

Draw errors, update options.

Option Default Description
positions, points, data [] An array of unrolled xy coordinates of the points as [x,y, x,y, ...] or array of points [[x,y], [x,y], ...].
errors, error [] Array with error values corresponding to the points [e0l,e0r,e0b,e0t, e1l,e1r,e1b,e1t, ...]
capSize, cap 5 Error bar cap size, in pixels
lineWidth, thickness 1 Error bar line width, in pixels
color, colors 'red' Color or array with colors. Each color can be a css color string or an array with float 0..1 values.
opacity 1 Error bars opacity.
range, dataBox null Visible data range.
viewport, viewBox null Output area within the canvas.

A list of options can be passed for batch rendering:

error2d([options1, options2, ...])

error2d.update(options|list)

Update options, not incurring redraw.

error2d.draw(id?)

Draw errors based on last options. id integer can specify a list item to redraw from batch update.

error2d.destroy()

Dispose error2d and associated resources.

License

(c) 2017 Dima Yv. MIT License

Development supported by plot.ly.

org.webjars.npm

Versions

Version
2.0.11
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4