sigma
Version:
A JavaScript library dedicated to graph drawing.
26 lines (25 loc) • 695 B
TypeScript
/**
* Sigma.js Animation Helpers
* ===========================
*
* Handy helper functions dealing with nodes & edges attributes animation.
* @module
*/
import Graph from "graphology";
import { PlainObject } from "../types";
import easings from "./easings";
/**
* Defaults.
*/
export interface AnimateOptions {
easing: keyof typeof easings | ((k: number) => number);
duration: number;
}
export declare const ANIMATE_DEFAULTS: {
easing: string;
duration: number;
};
/**
* Function used to animate the nodes.
*/
export declare function animateNodes(graph: Graph, targets: PlainObject<PlainObject<number>>, opts: Partial<AnimateOptions>, callback: () => void): () => void;