Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aframe-forcegraph-component

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aframe-forcegraph-component - npm Package Compare versions

Comparing version 1.6.8 to 1.6.9

.idea/encodings.xml

34

index.js

@@ -122,3 +122,6 @@ /* global AFRAME */

elData.links.forEach(function(link) {
el3d.add(link.__line = new THREE.Line(new THREE.Geometry(), lineMaterial));
var geometry = new THREE.BufferGeometry();
geometry.addAttribute('position', new THREE.BufferAttribute(new Float32Array(2 * 3), 3));
el3d.add(link.__line = new THREE.Line(geometry, lineMaterial));
});

@@ -184,19 +187,18 @@

elData.links.forEach(function(link) {
var line = link.__line;
var line = link.__line,
pos = isD3Sim
? link
: layout.getLinkPosition(layout.graph.getLink(link.source, link.target).id),
start = pos[isD3Sim ? 'source' : 'from'],
end = pos[isD3Sim ? 'target' : 'to'],
linePos = line.geometry.attributes.position;
if (isD3Sim) {
line.geometry.vertices = [
new THREE.Vector3(link.source.x, link.source.y || 0, link.source.z || 0),
new THREE.Vector3(link.target.x, link.target.y || 0, link.target.z || 0)
];
} else { // ngraph
var pos = layout.getLinkPosition(layout.graph.getLink(link.source, link.target).id);
linePos.array[0] = start.x;
linePos.array[1] = start.y || 0;
linePos.array[2] = start.z || 0;
linePos.array[3] = end.x;
linePos.array[4] = end.y || 0;
linePos.array[5] = end.z || 0;
line.geometry.vertices = [
new THREE.Vector3(pos.from.x, pos.from.y || 0, pos.from.z || 0),
new THREE.Vector3(pos.to.x, pos.to.y || 0, pos.to.z || 0)
];
}
line.geometry.verticesNeedUpdate = true;
linePos.needsUpdate = true;
line.geometry.computeBoundingSphere();

@@ -203,0 +205,0 @@ });

{
"name": "aframe-forcegraph-component",
"version": "1.6.8",
"version": "1.6.9",
"description": "A 3D Force-Directed Graph component for A-Frame.",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc