multilayerlayout3d
v0.1.3
Published
A multilayer layout for ngraph.three
Downloads
8
Maintainers
Readme
Multilayerlayout3d
A multilayer layout for ngraph.three
This is a custom layout for the great ngraph project, more specifically for ngraph.three. It is heavily based on ngraph.forcelayout and ngraph.forcelayout3d
It is used in my multilayer network visualisation module mplexviz-ngraph. Every layer of the graph is calculated separately as a 2d force-directed graph.
Getting Started
Install the module with: npm install multilayerlayout3d
Initialize ngraph.three with this layout:
var mplexLayout = require('multilayerlayout3d');
/*
Initialize ngraph.three
*/
var graphics = nthree(this.graph, {
container: document.body,
layout: mplexLayout(this.graph, physicsSettings)
});
Compare to ngraph.three
You can also specify the distance between layers in the options, passed as an additional input value/
/*
Set options
*/
var options = {
interLayerDistance: 100
};
/*
Initialize ngraph.three
*/
var graphics = nthree(this.graph, {
container: document.body,
layout: mplexLayout(this.graph, physicsSettings, options)
});
Contributing
Please submit all issues and pull requests to the DennisSchwartz/multilayerlayout3d repository!
Support
If you have any problem or suggestion please open an issue here.
License
The MIT License
Copyright (c) 2015, Dennis Schwartz
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.