trassel
Version:
Graph computing in JavaScript
17 lines (16 loc) • 670 B
TypeScript
/**
* A force directed layout component using Fruchterman's & Reingold's algorithm.
* @param {number=} size - Parameter used to control the size of the graph. Generally a fairly high number.
* @param {number=} gravity - Strength of the gravity in the layout
* @param {number=} speed - The speed at which things move in the graph.
*/
export default class NBody extends LayoutComponent {
constructor(size?: null, speed?: number, gravity?: number);
size: any;
gravity: number;
speed: number;
nodeDisplacementMap: Map<any, any>;
initialize(...args: any[]): void;
execute(alpha: any): void;
}
import LayoutComponent from "./layoutcomponent";