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

A 3D Force-Directed Graph component for A-Frame.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.5K
decreased by-4.03%
Maintainers
1
Weekly downloads
 
Created
Source

aframe-forcegraph-component

Version License

A 3D Force-Directed Graph component for A-Frame.

An A-Frame entity component to represent a graph data structure in a VR environment using a force-directed iterative layout. Uses d3-force-3d for the layout physics engine.

See also the standalone VR component version.

API

PropertyDescriptionDefault Value
json-urlURL of JSON file containing graph data. Should contain an object with two list properties: nodes and links-
node-rel-sizeNode sphere volume per val unit4
line-opacityOpacity of links0.2
auto-color-byNode field to automatically group colors by (if the node doesn't already have a color property set)name
id-fieldNode object field name referring to unique node id (used in link objects source/target)id
val-fieldNode object field name referring to node value (affects sphere volume)val
name-fieldNode object field name referring to node name (shown in label)name
color-fieldNode object field name referring to node value (affects sphere color)color
link-source-fieldLink object field name referring to id of source nodesource
link-target-fieldLink object field name referring to id of target nodetarget
warmup-ticksHow many times to tick the force simulation engine at ignition before starting to render0
cooldown-ticksHow many times to tick the force simulation engine after rendering begins before stopping and freezing the engineInfinity
cooldown-timeHow much time (ms) to tick the force simulation engine for after rendering begins before stopping and freezing the engine15000

Installation

Browser

Install and use by directly including the browser files:

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
  <script src="https://unpkg.com/aframe-forcegraph-component/dist/aframe-forcegraph-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity forcegraph="json-url: myGraphData.json"></a-entity>
  </a-scene>
</body>
npm

Install via npm:

npm install aframe-forcegraph-component

Then require and use.

require('aframe');
require('aframe-forcegraph-component');

Keywords

FAQs

Package last updated on 27 Apr 2017

Did you know?

Socket

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.

Install

Related posts

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