{"name":"cytoscape-euler","version":"1.2.4","keywords":["cytoscape","cytoscape-extension"],"license":"MIT","_id":"cytoscape-euler@1.2.4","maintainers":[{"name":"cytoscapenpm","email":"cytoscapenpm@gmail.com"},{"name":"maxkfranz","email":"maxkfranz@gmail.com"},{"name":"dylanfong","email":"dylanfong.ut@gmail.com"},{"name":"mikekucera","email":"mikekucera@gmail.com"},{"name":"chrtannus","email":"chrtannus@gmail.com"}],"homepage":"https://github.com/cytoscape/cytoscape.js-euler","bugs":{"url":"https://github.com/cytoscape/cytoscape.js-euler/issues"},"dist":{"shasum":"bbd8ecb053c2ad53a6dc98f5b69fea2033374e18","tarball":"http://registry-npm.ywwl.com/cytoscape-euler/download/cytoscape-euler-1.2.4.tgz","fileCount":39,"integrity":"sha512-RRYQydZ3E+UDao0MwFy7zXk08MHhdO9X/+HVoeurDCsg7P51tJ7fKIS4VSAe/TztM/V97MnbtJky9QihZ7nKDw==","signatures":[{"sig":"MEUCIQCMIpUwpUsZyw1VyFA16fmoN3IoDQMX7cQPNTRk6uCUzgIgSXMRCuhan9FVGnFz0msxU0MmOylZIw3zkVlPmS3HaQ8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":722036,"size":107437,"noattachment":false,"key":"/cytoscape-euler/-/cytoscape-euler-1.2.4.tgz"},"main":"cytoscape-euler.js","gitHead":"1068ca145f84745d4dae806faf392cdf21442e14","scripts":{"dev":"webpack-dev-server --open","lint":"eslint src","test":"echo \"Error: no test specified\" && exit 1","build":"cross-env NODE_ENV=production webpack","watch":"webpack --progress --watch","build:min":"cross-env NODE_ENV=production MIN=true webpack","copyright":"update license","postpublish":"run-s gh-pages:demo gh-pages:deploy gh-pages:clean","build:release":"run-s build copyright","gh-pages:demo":"cpy demo.html . --rename=index.html","gh-pages:clean":"rimraf index.html","gh-pages:deploy":"gh-pages -d . -v node_modules/**"},"_npmUser":{"name":"maxkfranz","email":"maxkfranz@gmail.com"},"repository":{"url":"git+https://github.com/cytoscape/cytoscape.js-euler.git","type":"git"},"_npmVersion":"11.5.1","description":"A fast, high-quality force-directed (physics simulation) layout for Cytoscape.js","directories":{},"_nodeVersion":"24.7.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.15.0","rimraf":"^2.6.2","update":"^0.7.4","cpy-cli":"^1.0.1","webpack":"^2.6.1","gh-pages":"^1.0.0","camelcase":"^4.1.0","cross-env":"^5.0.0","babel-core":"^6.24.1","npm-run-all":"^4.1.2","babel-loader":"^7.0.0","updater-license":"^1.0.0","babel-preset-env":"^1.5.1","webpack-dev-server":"^2.4.5"},"peerDependencies":{"cytoscape":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cytoscape-euler_1.2.4_1777993715410_0.10626268232283365","host":"s3://npm-registry-packages-npm-production"},"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","publish_time":1777993715631,"_cnpm_publish_time":1777993715631,"dist-tags":{"latest":"1.2.4"}}