
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
gl-surface3d
Advanced tools
3D parametric surface plotting, compatible with gl-vis.
var createScene = require('gl-plot3d')
var createSurfacePlot = require('gl-surface3d')
var ndarray = require('ndarray')
var fill = require('ndarray-fill')
var diric = require('dirichlet')
var scene = createScene()
//Create field
var field = ndarray(new Float32Array(512*512), [512,512])
fill(field, function(x,y) {
return 128 * diric(10, 10.0*(x-256)/512) * diric(10, 10.0*(y-256)/512)
})
//Create surface plot
var surface = createSurfacePlot({
gl: scene.gl,
field: field
})
scene.add(surface)
Here is what this should look like:
Test it in your browser (requires WebGL)
npm install gl-surface3d
var surface = require('gl-surface3d')(params)
Creates a surface plot object. params
is an object with any of the following parameters
gl
is a WebGL contextfield
a new 2D field encoded as an ndarraycoords
is an array of 3 2D fields, each encoded as ndarrays (for parameteric surfaces)intensity
a 2D intensity field (defaults to field
or `coords[2] is not present)colormap
the name of the new color map for the surface (see list of names in colormap
docs)intensityBounds
sets the intensity range for the colormapticks
is a pair of arrays of ticks representing the spacing of the points for the axes of the surfaceshowSurface
if set, draw the surfaceshowContour
if set, draw contour linescontourWidth
the width fo the contour linescontourTint
the amount of tint of the contour linescontourColor
the color of the contour line tintlevels
an array of arrays representing the level of the isolines.dynamicWidth
the width of the dynamic isolinesdynamicColors
the color of the dynamic isolinesdynamicTint
the tint of the dynamic isolinesvertexColor
interpolate color in fragment or vertex shader, useful for discontinuous functions (ref)surface.update(params)
Modify the surface. params
is an object with the same properties as the constructor
(c) 2014-2015 Mikola Lysenko. MIT License.
FAQs
Renders parametric surfaces in 3D
The npm package gl-surface3d receives a total of 21,111 weekly downloads. As such, gl-surface3d popularity was classified as popular.
We found that gl-surface3d demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 19 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.