
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@graspologic/camera
Advanced tools
Contains the graspologic-js graph renderer.
React bindings are also available here.
import { WebGLGraphRenderer } from '@graspologic/renderer'
import { GraphContainer } from '@graspologic/graph'
// Simple graph dataset
const GRAPH_DATA = {
nodes: [
{
id: 'A',
x: -10,
y: 10,
z: 0,
radius: 5,
// Format 0xBBGGRR
color: 0x00ff00,
},
{
id: 'B',
x: 10,
y: 10,
z: 0,
radius: 5,
// Format 0xBBGGRR
color: 0xff0000,
},
],
edges: [
{
source: 'A',
target: 'B',
weight: 1,
},
],
}
function createRenderer(data, width, height) {
// Create a renderer and add it to the container
const renderer = WebGLGraphRenderer.createInstance({
width,
height,
// Set the min/max width of the edges to be a constant width
edgeMinWidth: 5,
edgeMaxWidth: 5,
// All edges are completely opaque
edgeAlpha: 1,
})
// Load the dataset
renderer.load(GraphContainer.intern(data))
// Start rendering
renderer.start()
return renderer
}
export default () => {
// Create the renderer
const renderer = createRenderer(GRAPH_DATA, 200, 200)
// Return the renderer's canvas to the docs site, so it can be viewed
return renderer.view
}
import {
WebGLGraphRenderer,
enableClickEvents,
VertexSetRenderable,
} from '@graspologic/renderer'
import { GraphContainer } from '@graspologic/graph'
import { exampleData, utils } from 'docs'
function createRenderer(data, width, height) {
// Create a renderer and add it to the container
const renderer = WebGLGraphRenderer.createInstance({
width,
height,
// Set the min/max width of the edges to be a constant width
edgeMinWidth: 5,
edgeMaxWidth: 5,
// All edges are completely opaque
edgeAlpha: 1,
// Control the sizing of the nodes
nodeMinRadius: 5,
nodeMaxRadius: 5,
})
// A function which takes a "group" property from a node and returns a color
const categoricalColorizer = utils.createColorizer()
// Load the dataset
renderer.load(GraphContainer.intern(data), categoricalColorizer)
// Enable the click events
enableClickEvents(renderer)
// Add a renderer that highlights hovered nodes
const renderable = new VertexSetRenderable(renderer.gl)
renderable.color = [0.5, 0.5, 0.8, 1]
renderer.scene.addRenderable(renderable)
renderer.on('vertexHovered', hovered => {
renderable.setData(hovered ? [hovered] : [])
})
// Start rendering
renderer.start()
return renderer
}
const GRAPH_DATA = exampleData.smallGraph()
export default () => {
// Create the renderer
const renderer = createRenderer(GRAPH_DATA, 600, 300)
let selectedNodeIds = []
renderer.on('vertexClick', id => {
console.log('click', id)
if (id) {
if (selectedNodeIds.indexOf(id) === -1) {
selectedNodeIds = [...selectedNodeIds, id]
} else {
selectedNodeIds = selectedNodeIds.filter(v => v !== id)
}
}
})
// Return the renderer's canvas to the docs site, so it can be viewed
return renderer.view
}
See the API documentation or examples for additional examples.
FAQs
Contains a camera implementation used within @graspologic
We found that @graspologic/camera demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.