Gathering detailed insights and metrics for gl-spikes3d
Gathering detailed insights and metrics for gl-spikes3d
Gathering detailed insights and metrics for gl-spikes3d
Gathering detailed insights and metrics for gl-spikes3d
npm install gl-spikes3d
Typescript
Module System
Node Version
NPM Version
JavaScript (85.76%)
GLSL (14.24%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
4 Stars
45 Commits
2 Forks
2 Watchers
3 Branches
11 Contributors
Updated on May 15, 2024
Latest Version
1.0.11
Package Id
gl-spikes3d@1.0.11
Unpacked Size
11.06 kB
Size
4.03 kB
File Count
8
NPM Version
8.19.3
Node Version
16.19.0
Published on
May 15, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Draws axis spikes compatible with gl-axes3d. This can be useful to illustrate selections or specific points in a point cloud
1var shell = require("gl-now")({ clearColor: [0,0,0,0], tickRate: 5 }) 2var camera = require("game-shell-orbit-camera")(shell) 3var mat4 = require("gl-matrix").mat4 4var createAxes = require("gl-axes") 5var createSpikes = require("gl-spikes") 6 7//Bounds on function to plot 8var bounds = [[-1,-1,-1], [1,1,1]] 9 10//camera.lookAt([-15,20,-15], [0,0,0], [0, 1, 0]) 11camera.lookAt([2, 2, 2], [0,0,0], [0,1,0]) 12 13//State variables 14var axes, spikes 15 16shell.on("gl-init", function() { 17 var gl = shell.gl 18 19 axes = createAxes(gl, { 20 bounds: bounds, 21 tickSpacing: [0.1,0.1,0.1], 22 textSize: 0.05 23 }) 24 25 spikes = createSpikes(gl, { 26 bounds: bounds, 27 colors: [[1,0,0,1], [0,1,0,1], [0,0,1,1]], 28 position: [0,0,0] 29 }) 30}) 31 32shell.on("gl-render", function() { 33 var gl = shell.gl 34 gl.enable(gl.DEPTH_TEST) 35 36 //Compute camera parameters 37 var cameraParameters = { 38 view: camera.view(), 39 projection: mat4.perspective( 40 mat4.create(), 41 Math.PI/4.0, 42 shell.width/shell.height, 43 0.1, 44 1000.0) 45 } 46 47 48 //Update spike position 49 var t = 0.001*Date.now() 50 spikes.position = [Math.cos(t), Math.sin(t), Math.cos(2*t+0.1)] 51 52 //Draw objects 53 axes.draw(cameraParameters) 54 spikes.draw(cameraParameters) 55})
npm install gl-spikes
var spikes = require('gl-spikes')(gl, options)
Creates a new spike object.
gl
is a WebGL contextoptions
is a list of optional parameters which are passed alongspikes.draw(camera)
Draws the axis spikes using the given camera coordinates.
camera.model
is the model matrix for the cameracamera.view
is the view matrixcamera.projection
is the projection matrixspikes.update(options)
Updates the parameters of the axes spikes. options
is an object with the following properties:
position
the position of the spike ball in data coordinatesbounds
the bounds of the axes objectcolors
an array of 3 length 4 arrays encoding the RGBA colors for the spikes along the x/y/z directionsenabled
an array of 3 flags which if set turns on or off the spikesdrawSides
an array of 3 flag which if set turns on or off the projected spikes in each data planelineWidth
an array of 3 numbers giving the thickness of the spikes for each axisspikes.dispose()
Destroys the spike object and releases all associated resources.
(c) 2014 Mikola Lysenko. MIT License
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 1/21 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More