{"_id":"cytoscape-euler","_rev":"302857","name":"cytoscape-euler","description":"A fast, high-quality force-directed (physics simulation) layout for Cytoscape.js","dist-tags":{"latest":"1.2.2"},"maintainers":[{"name":"cytoscapenpm","email":"cytoscapenpm@gmail.com"},{"name":"dylanfong","email":"dylanfong.ut@gmail.com"},{"name":"maxkfranz","email":"maxkfranz@gmail.com"}],"time":{"modified":"2021-06-03T19:21:36.000Z","created":"2017-07-18T15:09:45.869Z","1.2.2":"2020-01-28T15:50:02.724Z","1.2.1":"2018-04-03T19:52:41.599Z","1.2.0":"2018-01-17T19:01:26.586Z","1.1.0":"2017-10-06T19:21:55.199Z","1.0.0":"2017-07-18T15:09:45.869Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/cytoscape/cytoscape.js-euler.git"},"versions":{"1.2.2":{"name":"cytoscape-euler","version":"1.2.2","description":"A fast, high-quality force-directed (physics simulation) layout for Cytoscape.js","main":"cytoscape-euler.js","scripts":{"postpublish":"run-s gh-pages:demo gh-pages:deploy gh-pages:clean","gh-pages:demo":"cpy demo.html . --rename=index.html","gh-pages:deploy":"gh-pages -d . -v node_modules/**","gh-pages:clean":"rimraf index.html","copyright":"update license","lint":"eslint src","build":"cross-env NODE_ENV=production webpack","build:min":"cross-env NODE_ENV=production MIN=true webpack","build:release":"run-s build copyright","watch":"webpack --progress --watch","dev":"webpack-dev-server --open","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/cytoscape/cytoscape.js-euler.git"},"keywords":["cytoscape","cytoscape-extension"],"license":"MIT","bugs":{"url":"https://github.com/cytoscape/cytoscape.js-euler/issues"},"homepage":"https://github.com/cytoscape/cytoscape.js-euler","devDependencies":{"babel-core":"^6.24.1","babel-loader":"^7.0.0","babel-preset-env":"^1.5.1","camelcase":"^4.1.0","cpy-cli":"^1.0.1","cross-env":"^5.0.0","eslint":"^4.15.0","gh-pages":"^1.0.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","update":"^0.7.4","updater-license":"^1.0.0","webpack":"^2.6.1","webpack-dev-server":"^2.4.5"},"peerDependencies":{"cytoscape":"^3.0.0"},"dependencies":{},"gitHead":"176686f435b61fc93b2c49f4054faa19923cc7dc","_id":"cytoscape-euler@1.2.2","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"shasum":"d599aa0656c022216f93a5c3ac8fce1ad69ef9b4","size":109174,"noattachment":false,"key":"/cytoscape-euler/-/cytoscape-euler-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/cytoscape-euler/download/cytoscape-euler-1.2.2.tgz"},"maintainers":[{"name":"cytoscapenpm","email":"cytoscapenpm@gmail.com"},{"name":"dylanfong","email":"dylanfong.ut@gmail.com"},{"name":"maxkfranz","email":"maxkfranz@gmail.com"}],"_npmUser":{"name":"maxkfranz","email":"maxkfranz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cytoscape-euler_1.2.2_1580226602497_0.6042574725318726"},"_hasShrinkwrap":false,"publish_time":1580226602724,"_cnpm_publish_time":1580226602724},"1.2.1":{"name":"cytoscape-euler","version":"1.2.1","description":"A fast, high-quality force-directed (physics simulation) layout for Cytoscape.js","main":"cytoscape-euler.js","scripts":{"postpublish":"run-s gh-pages:demo gh-pages:deploy gh-pages:clean","gh-pages:demo":"cpy demo.html . --rename=index.html","gh-pages:deploy":"gh-pages -d .","gh-pages:clean":"rimraf index.html","copyright":"update license","lint":"eslint src","build":"cross-env NODE_ENV=production webpack","build:min":"cross-env NODE_ENV=production MIN=true webpack","build:release":"run-s build copyright","watch":"webpack --progress --watch","dev":"webpack-dev-server --open","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/cytoscape/cytoscape.js-euler.git"},"keywords":["cytoscape","cytoscape-extension"],"license":"MIT","bugs":{"url":"https://github.com/cytoscape/cytoscape.js-euler/issues"},"homepage":"https://github.com/cytoscape/cytoscape.js-euler","devDependencies":{"babel-core":"^6.24.1","babel-loader":"^7.0.0","babel-preset-env":"^1.5.1","camelcase":"^4.1.0","cpy-cli":"^1.0.1","cross-env":"^5.0.0","eslint":"^4.15.0","gh-pages":"^1.0.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","update":"^0.7.4","updater-license":"^1.0.0","webpack":"^2.6.1","webpack-dev-server":"^2.4.5"},"peerDependencies":{"cytoscape":"^3.0.0"},"dependencies":{},"gitHead":"205cafdb6e9c5fd5dc0fddf470075ef7fdf3fc99","_id":"cytoscape-euler@1.2.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"maxkfranz","email":"maxkfranz@gmail.com"},"dist":{"shasum":"e5c76e0c2d3e10b14023af00903eeee79e5457b2","size":109181,"noattachment":false,"key":"/cytoscape-euler/-/cytoscape-euler-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/cytoscape-euler/download/cytoscape-euler-1.2.1.tgz"},"maintainers":[{"name":"cytoscapenpm","email":"cytoscapenpm@gmail.com"},{"name":"dylanfong","email":"dylanfong.ut@gmail.com"},{"name":"maxkfranz","email":"maxkfranz@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cytoscape-euler_1.2.1_1522785161477_0.8139981537471899"},"_hasShrinkwrap":false,"publish_time":1522785161599,"_cnpm_publish_time":1522785161599},"1.2.0":{"name":"cytoscape-euler","version":"1.2.0","description":"A fast, high-quality force-directed (physics simulation) layout for Cytoscape.js","main":"cytoscape-euler.js","scripts":{"postpublish":"run-s gh-pages:demo gh-pages:deploy gh-pages:clean","gh-pages:demo":"cpy demo.html . --rename=index.html","gh-pages:deploy":"gh-pages -d .","gh-pages:clean":"rimraf index.html","copyright":"update license","lint":"eslint src","build":"cross-env NODE_ENV=production webpack","build:min":"cross-env NODE_ENV=production MIN=true webpack","build:release":"run-s build copyright","watch":"webpack --progress --watch","dev":"webpack-dev-server --open","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/cytoscape/cytoscape.js-euler.git"},"keywords":["cytoscape","cytoscape-extension"],"license":"MIT","bugs":{"url":"https://github.com/cytoscape/cytoscape.js-euler/issues"},"homepage":"https://github.com/cytoscape/cytoscape.js-euler","devDependencies":{"babel-core":"^6.24.1","babel-loader":"^7.0.0","babel-preset-env":"^1.5.1","camelcase":"^4.1.0","cpy-cli":"^1.0.1","cross-env":"^5.0.0","eslint":"^4.15.0","gh-pages":"^1.0.0","npm-run-all":"^4.1.2","rimraf":"^2.6.2","update":"^0.7.4","updater-license":"^1.0.0","webpack":"^2.6.1","webpack-dev-server":"^2.4.5"},"peerDependencies":{"cytoscape":"^3.0.0"},"dependencies":{},"gitHead":"b5a6e24c99db04909208a4fcc5532cc2448bc29f","_id":"cytoscape-euler@1.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.1","_npmUser":{"name":"maxkfranz","email":"maxkfranz@gmail.com"},"dist":{"shasum":"10fb9846163c91a07d7eec40503771efd0fcdc62","size":109091,"noattachment":false,"key":"/cytoscape-euler/-/cytoscape-euler-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/cytoscape-euler/download/cytoscape-euler-1.2.0.tgz"},"maintainers":[{"name":"cytoscapenpm","email":"cytoscapenpm@gmail.com"},{"name":"dylanfong","email":"dylanfong.ut@gmail.com"},{"name":"maxkfranz","email":"maxkfranz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cytoscape-euler-1.2.0.tgz_1516215686473_0.2454471685923636"},"directories":{},"publish_time":1516215686586,"_hasShrinkwrap":false,"_cnpm_publish_time":1516215686586},"1.1.0":{"name":"cytoscape-euler","version":"1.1.0","description":"A fast, high-quality force-directed (physics simulation) layout for Cytoscape.js","main":"cytoscape-euler.js","scripts":{"lint":"eslint src","build":"cross-env NODE_ENV=production webpack","build:min":"cross-env NODE_ENV=production MIN=true webpack","watch":"webpack --progress --watch","dev":"webpack-dev-server --open","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/cytoscape/cytoscape.js-euler.git"},"keywords":["cytoscape","cytoscape-extension"],"license":"MIT","bugs":{"url":"https://github.com/cytoscape/cytoscape.js-euler/issues"},"homepage":"https://github.com/cytoscape/cytoscape.js-euler","devDependencies":{"babel-core":"^6.24.1","babel-loader":"^7.0.0","babel-preset-env":"^1.5.1","camelcase":"^4.1.0","cross-env":"^5.0.0","webpack":"^2.6.1","webpack-dev-server":"^2.4.5"},"peerDependencies":{"cytoscape":"^3.0.0"},"dependencies":{},"gitHead":"9d82443a13ae975ba3afab35ba942ad222e1b714","_id":"cytoscape-euler@1.1.0","_shasum":"a281749ce7496a93cd2fdea9f1890eb57cc0ff01","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.0","_npmUser":{"name":"maxkfranz","email":"maxkfranz@gmail.com"},"dist":{"shasum":"a281749ce7496a93cd2fdea9f1890eb57cc0ff01","size":108603,"noattachment":false,"key":"/cytoscape-euler/-/cytoscape-euler-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/cytoscape-euler/download/cytoscape-euler-1.1.0.tgz"},"maintainers":[{"name":"cytoscapenpm","email":"cytoscapenpm@gmail.com"},{"name":"dylanfong","email":"dylanfong.ut@gmail.com"},{"name":"maxkfranz","email":"maxkfranz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cytoscape-euler-1.1.0.tgz_1507317715060_0.17903905804269016"},"directories":{},"publish_time":1507317715199,"_cnpm_publish_time":1507317715199,"_hasShrinkwrap":false},"1.0.0":{"name":"cytoscape-euler","version":"1.0.0","description":"A fast, high-quality force-directed (physics simulation) layout for Cytoscape.js","main":"cytoscape-euler.js","scripts":{"lint":"eslint src","build":"cross-env NODE_ENV=production webpack","build:min":"cross-env NODE_ENV=production MIN=true webpack","watch":"webpack --progress --watch","dev":"webpack-dev-server --open","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/cytoscape/cytoscape.js-euler.git"},"keywords":["cytoscape","cytoscape-extension"],"license":"MIT","bugs":{"url":"https://github.com/cytoscape/cytoscape.js-euler/issues"},"homepage":"https://github.com/cytoscape/cytoscape.js-euler","devDependencies":{"babel-core":"^6.24.1","babel-loader":"^7.0.0","babel-preset-env":"^1.5.1","camelcase":"^4.1.0","cross-env":"^5.0.0","webpack":"^2.6.1","webpack-dev-server":"^2.4.5"},"peerDependencies":{"cytoscape":"^3.0.0"},"dependencies":{},"gitHead":"0e260e6e48cd9bbd2a65a40576930e98b5f4d573","_id":"cytoscape-euler@1.0.0","_shasum":"4b4e24ea0df260c8204fe1f179cf57c65d966f13","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.0","_npmUser":{"name":"maxkfranz","email":"maxkfranz@gmail.com"},"dist":{"shasum":"4b4e24ea0df260c8204fe1f179cf57c65d966f13","size":107908,"noattachment":false,"key":"/cytoscape-euler/-/cytoscape-euler-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/cytoscape-euler/download/cytoscape-euler-1.0.0.tgz"},"maintainers":[{"name":"cytoscapenpm","email":"cytoscapenpm@gmail.com"},{"name":"dylanfong","email":"dylanfong.ut@gmail.com"},{"name":"maxkfranz","email":"maxkfranz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cytoscape-euler-1.0.0.tgz_1500390585701_0.9023622979875654"},"directories":{},"publish_time":1500390585869,"_hasShrinkwrap":false,"_cnpm_publish_time":1500390585869}},"readme":"# cytoscape-euler\n\n[![Join the chat at https://gitter.im/cytoscape-js-euler/Lobby](https://badges.gitter.im/cytoscape-js-euler/Lobby.svg)](https://gitter.im/cytoscape-js-euler/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![DOI](https://zenodo.org/badge/91359702.svg)](https://zenodo.org/badge/latestdoi/91359702)\n\n\n\n## Description\n\nEuler is a fast, high-quality force-directed (physics simulation) layout for Cytoscape.js ([demo](https://cytoscape.github.io/cytoscape.js-euler))\n\nIt is based on cytoscape-ngraph.forcelayout, with several parts reworked and several general improvements.\n\n\n## Dependencies\n\n * cytoscape@^3.0.0\n\n\n## Usage instructions\n\nDownload the library:\n * via npm: `npm install cytoscape-euler`,\n * via bower: `bower install cytoscape-euler`, or\n * via direct download in the repository (probably from a tag).\n\nImport the library as appropriate for your project:\n\nES import:\n\n```js\nimport cytoscape from 'cytoscape';\nimport euler from 'cytoscape-euler';\n\ncytoscape.use( euler );\n```\n\nCommonJS:\n\n```js\nlet cytoscape = require('cytoscape');\nlet euler = require('cytoscape-euler');\n\ncytoscape.use( euler );\n```\n\nAMD:\n\n```js\nrequire(['cytoscape', 'cytoscape-euler'], function( cytoscape, euler ){\n  euler( cytoscape ); // register extension\n});\n```\n\nPlain HTML/JS has the extension registered for you automatically, because no `require()` is needed.\n\n\n## API\n\nSpecify an options object with `name: 'euler'` to run the layout.  All other fields are optional.  An example with the default options follows:\n\n```js\nlet defaults = {\n  name: 'euler',\n\n  // The ideal length of a spring\n  // - This acts as a hint for the edge length\n  // - The edge length can be longer or shorter if the forces are set to extreme values\n  springLength: edge => 80,\n\n  // Hooke's law coefficient\n  // - The value ranges on [0, 1]\n  // - Lower values give looser springs\n  // - Higher values give tighter springs\n  springCoeff: edge => 0.0008,\n\n  // The mass of the node in the physics simulation\n  // - The mass affects the gravity node repulsion/attraction\n  mass: node => 4,\n\n  // Coulomb's law coefficient\n  // - Makes the nodes repel each other for negative values\n  // - Makes the nodes attract each other for positive values\n  gravity: -1.2,\n\n  // A force that pulls nodes towards the origin (0, 0)\n  // Higher values keep the components less spread out\n  pull: 0.001,\n\n  // Theta coefficient from Barnes-Hut simulation\n  // - Value ranges on [0, 1]\n  // - Performance is better with smaller values\n  // - Very small values may not create enough force to give a good result\n  theta: 0.666,\n\n  // Friction / drag coefficient to make the system stabilise over time\n  dragCoeff: 0.02,\n\n  // When the total of the squared position deltas is less than this value, the simulation ends\n  movementThreshold: 1,\n\n  // The amount of time passed per tick\n  // - Larger values result in faster runtimes but might spread things out too far\n  // - Smaller values produce more accurate results\n  timeStep: 20,\n\n  // The number of ticks per frame for animate:true\n  // - A larger value reduces rendering cost but can be jerky\n  // - A smaller value increases rendering cost but is smoother\n  refresh: 10,\n\n  // Whether to animate the layout\n  // - true : Animate while the layout is running\n  // - false : Just show the end result\n  // - 'end' : Animate directly to the end result\n  animate: true,\n\n  // Animation duration used for animate:'end'\n  animationDuration: undefined,\n\n  // Easing for animate:'end'\n  animationEasing: undefined,\n\n  // Maximum iterations and time (in ms) before the layout will bail out\n  // - A large value may allow for a better result\n  // - A small value may make the layout end prematurely\n  // - The layout may stop before this if it has settled\n  maxIterations: 1000,\n  maxSimulationTime: 4000,\n\n  // Prevent the user grabbing nodes during the layout (usually with animate:true)\n  ungrabifyWhileSimulating: false,\n\n  // Whether to fit the viewport to the repositioned graph\n  // true : Fits at end of layout for animate:false or animate:'end'; fits on each frame for animate:true\n  fit: true,\n\n  // Padding in rendered co-ordinates around the layout\n  padding: 30,\n\n  // Constrain layout bounds with one of\n  // - { x1, y1, x2, y2 }\n  // - { x1, y1, w, h }\n  // - undefined / null : Unconstrained\n  boundingBox: undefined,\n\n  // Layout event callbacks; equivalent to `layout.one('layoutready', callback)` for example\n  ready: function(){}, // on layoutready\n  stop: function(){}, // on layoutstop\n\n  // Whether to randomize the initial positions of the nodes\n  // true : Use random positions within the bounding box\n  // false : Use the current node positions as the initial positions\n  randomize: false\n};\n\ncy.layout( defaults ).run();\n```\n\n\n## Build instructions\n\n* `npm run build` : Build `./src/**` into `cytoscape-euler.js`\n* `npm run watch` : Automatically build on changes with live reloading (N.b. you must already have an HTTP server running)\n* `npm run dev` : Automatically build on changes with live reloading with webpack dev server\n* `npm run lint` : Run eslint on the source\n\nN.b. all builds use babel, so modern ES features can be used in the `src`.\n\n\n## Publishing instructions\n\nThis project is set up to automatically be published to npm and bower.  To publish:\n\n1. Build the extension : `npm run build:release`\n1. Commit the build : `git commit -am \"Build for release\"`\n1. Bump the version number and tag: `npm version major|minor|patch`\n1. Push to origin: `git push && git push --tags`\n1. Publish to npm: `npm publish .`\n1. 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`\n1. [Make a release on GitHub](https://github.com/cytoscape/cytoscape.js-euler/releases/new) to automatically register a new Zenodo DOI\n","_attachments":{},"homepage":"https://github.com/cytoscape/cytoscape.js-euler","bugs":{"url":"https://github.com/cytoscape/cytoscape.js-euler/issues"},"license":"MIT"}