
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
gl-cone3d
Advanced tools
Visualization module for vector fields.
var createScene = require('gl-plot3d')
var createConePlot = require('gl-cone3d')
var createMesh = createConePlot.createConeMesh
var wind = require('dataset-wind')
var scene = createScene()
var bounds = [];
var conePlot = createConePlot({
positions: wind.positions,
vectors: wind.vectors,
coneSize: 4,
colormap: 'portland'
}, bounds)
var mesh = createMesh(gl, conePlot)
scene.add(mesh)
Try out the example in your browser
npm i gl-cone3d
var conePlot = require('gl-cone3d')(params, bounds)
Creates a cone plot of a vector field.
params
is an object that has the following properties:
positions
(Required) An array of positions determining the location of the cones, encoded as arraysvectors
(Required) An array of vectors for the vector field, encoded as arraysconeSize
Size of the cones, scaled so that the reference cone size for the maximum vector magnitude is 1absoluteConeSize
Size of the cones, scaled so that the reference cone size for vector magnitude 1 is one grid unit.coneOffset
The position of the cone with regard to the cone location. Ranges from 0 to 1 where 0 puts the center of the cone base at the cone location, and 1 puts the tip at the cone location.colormap
Colormap for the cone plot.Returns A cone plot object that can be passed to gl-mesh3d.
(c) 2013-2017 Mikola Lysenko, Ilmari Heikkinen. MIT License
FAQs
3D cone plot
The npm package gl-cone3d receives a total of 29,683 weekly downloads. As such, gl-cone3d popularity was classified as popular.
We found that gl-cone3d demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 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
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.