Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
regl-error2d
Advanced tools
Draw error bars for a set of points with regl.
Remake on gl-error2d:
color
may define per-bar colors.1e5
to 4e6
) via instanced draw.lineWidth
and capSize
are adjusted to actual pixels.Demo.
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.
(c) 2017 Dima Yv. MIT License
Development supported by plot.ly.
FAQs
Render error bars for the set of points
The npm package regl-error2d receives a total of 148,393 weekly downloads. As such, regl-error2d popularity was classified as popular.
We found that regl-error2d demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 17 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.