https://github.com/cytoscape/cytoscape.js-euler
Euler is a fast, high-quality force-directed (physics simulation) layout for Cytoscape.js
Science Score: 20.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 6 committers (16.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.3%) to scientific vocabulary
Keywords from Contributors
Repository
Euler is a fast, high-quality force-directed (physics simulation) layout for Cytoscape.js
Basic Info
Statistics
- Stars: 31
- Watchers: 22
- Forks: 23
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
cytoscape-euler
Description
Euler is a fast, high-quality force-directed (physics simulation) layout for Cytoscape.js (demo)
It is based on cytoscape-ngraph.forcelayout, with several parts reworked and several general improvements.
Dependencies
- cytoscape@^3.0.0
Usage instructions
Download the library:
* via npm: npm install cytoscape-euler,
* via bower: bower install cytoscape-euler, or
* via direct download in the repository (probably from a tag).
Import the library as appropriate for your project:
ES import:
```js import cytoscape from 'cytoscape'; import euler from 'cytoscape-euler';
cytoscape.use( euler ); ```
CommonJS:
```js let cytoscape = require('cytoscape'); let euler = require('cytoscape-euler');
cytoscape.use( euler ); ```
AMD:
js
require(['cytoscape', 'cytoscape-euler'], function( cytoscape, euler ){
euler( cytoscape ); // register extension
});
Plain HTML/JS has the extension registered for you automatically, because no require() is needed.
API
Specify an options object with name: 'euler' to run the layout. All other fields are optional. An example with the default options follows:
```js let defaults = { name: 'euler',
// The ideal length of a spring // - This acts as a hint for the edge length // - The edge length can be longer or shorter if the forces are set to extreme values springLength: edge => 80,
// Hooke's law coefficient // - The value ranges on [0, 1] // - Lower values give looser springs // - Higher values give tighter springs springCoeff: edge => 0.0008,
// The mass of the node in the physics simulation // - The mass affects the gravity node repulsion/attraction mass: node => 4,
// Coulomb's law coefficient // - Makes the nodes repel each other for negative values // - Makes the nodes attract each other for positive values gravity: -1.2,
// A force that pulls nodes towards the origin (0, 0) // Higher values keep the components less spread out pull: 0.001,
// Theta coefficient from Barnes-Hut simulation // - Value ranges on [0, 1] // - Performance is better with smaller values // - Very small values may not create enough force to give a good result theta: 0.666,
// Friction / drag coefficient to make the system stabilise over time dragCoeff: 0.02,
// When the total of the squared position deltas is less than this value, the simulation ends movementThreshold: 1,
// The amount of time passed per tick // - Larger values result in faster runtimes but might spread things out too far // - Smaller values produce more accurate results timeStep: 20,
// The number of ticks per frame for animate:true // - A larger value reduces rendering cost but can be jerky // - A smaller value increases rendering cost but is smoother refresh: 10,
// Whether to animate the layout // - true : Animate while the layout is running // - false : Just show the end result // - 'end' : Animate directly to the end result animate: true,
// Animation duration used for animate:'end' animationDuration: undefined,
// Easing for animate:'end' animationEasing: undefined,
// Maximum iterations and time (in ms) before the layout will bail out // - A large value may allow for a better result // - A small value may make the layout end prematurely // - The layout may stop before this if it has settled maxIterations: 1000, maxSimulationTime: 4000,
// Prevent the user grabbing nodes during the layout (usually with animate:true) ungrabifyWhileSimulating: false,
// Whether to fit the viewport to the repositioned graph // true : Fits at end of layout for animate:false or animate:'end'; fits on each frame for animate:true fit: true,
// Padding in rendered co-ordinates around the layout padding: 30,
// Constrain layout bounds with one of // - { x1, y1, x2, y2 } // - { x1, y1, w, h } // - undefined / null : Unconstrained boundingBox: undefined,
// Layout event callbacks; equivalent to layout.one('layoutready', callback) for example
ready: function(){}, // on layoutready
stop: function(){}, // on layoutstop
// Whether to randomize the initial positions of the nodes // true : Use random positions within the bounding box // false : Use the current node positions as the initial positions randomize: false };
cy.layout( defaults ).run(); ```
Build instructions
npm run build: Build./src/**intocytoscape-euler.jsnpm run watch: Automatically build on changes with live reloading (N.b. you must already have an HTTP server running)npm run dev: Automatically build on changes with live reloading with webpack dev servernpm run lint: Run eslint on the source
N.b. all builds use babel, so modern ES features can be used in the src.
Publishing instructions
This project is set up to automatically be published to npm and bower. To publish:
- Build the extension :
npm run build:release - Commit the build :
git commit -am "Build for release" - Bump the version number and tag:
npm version major|minor|patch - Push to origin:
git push && git push --tags - Publish to npm:
npm publish . - If publishing to bower for the first time, you'll need to run
bower register cytoscape-euler https://github.com/cytoscape/cytoscape.js-euler.git - Make a release on GitHub to automatically register a new Zenodo DOI
Owner
- Name: Cytoscape Consortium
- Login: cytoscape
- Kind: organization
- Website: http://www.cytoscape.org/
- Repositories: 153
- Profile: https://github.com/cytoscape
GitHub Events
Total
Last Year
Committers
Last synced: 11 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Max Franz | m****z@g****m | 48 |
| Konrad Höffner | k****r@u****e | 2 |
| Dylan Fong | d****t@g****m | 2 |
| The Gitter Badger | b****r@g****m | 1 |
| Jan Žák | zj@z****z | 1 |
| Alexander Li | a****0@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 20
- Total pull requests: 6
- Average time to close issues: 10 months
- Average time to close pull requests: about 10 hours
- Total issue authors: 8
- Total pull request authors: 4
- Average comments per issue: 2.25
- Average comments per pull request: 0.33
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 2
- Average time to close issues: 28 days
- Average time to close pull requests: about 4 hours
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 2.0
- Average comments per pull request: 0.5
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- maxkfranz (8)
- KonradHoeffner (5)
- torman119 (2)
- jspautsch (1)
- Alexithemia (1)
- jamesscottbrown (1)
- kimbuz (1)
- DaniilRyb (1)
Pull Request Authors
- d2fong (2)
- gitter-badger (1)
- KonradHoeffner (1)
- zakjan (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- npm 10,718 last-month
- Total docker downloads: 35
-
Total dependent packages: 24
(may contain duplicates) -
Total dependent repositories: 128
(may contain duplicates) - Total versions: 12
- Total maintainers: 5
npmjs.org: cytoscape-euler
A fast, high-quality force-directed (physics simulation) layout for Cytoscape.js
- Homepage: https://github.com/cytoscape/cytoscape.js-euler
- License: MIT
-
Latest release: 1.2.3
published almost 2 years ago
Rankings
Maintainers (5)
bower.io: cytoscape-euler
A fast, high-quality force-directed (physics simulation) layout for Cytoscape.js
- License: MIT
-
Latest release: v1.2.2
published over 6 years ago
Rankings
repo1.maven.org: org.webjars.npm:cytoscape-euler
WebJar for cytoscape-euler
- Homepage: http://webjars.org
- Documentation: https://appdoc.app/artifact/org.webjars.npm/cytoscape-euler/
- License: MIT
-
Latest release: 1.2.1
published over 7 years ago