# sprite-nodes-links

> sprite-nodes-links

Latest version **0.5.8** (published 2020-04-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install sprite-nodes-links
pnpm add sprite-nodes-links
yarn add sprite-nodes-links
bun add sprite-nodes-links
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.8 |
| Published | 2020-04-29 |
| First published | 2019-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 928.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | yaotaiyang |
| Maintainers | yaotaiyang |
| Keywords | sprite, nodes, links |

## Links

- npm: https://www.npmjs.com/package/sprite-nodes-links
- Repository: https://github.com/yaotaiyang/sprite-nodes-links
- Homepage: https://github.com/yaotaiyang/sprite-nodes-links#readme
- Issues: https://github.com/yaotaiyang/sprite-nodes-links/issues
- npm.io page: https://npm.io/package/sprite-nodes-links

## Dependencies (2)

- [filter-clone](https://npm.io/package/filter-clone.md) ^0.0.11
- [next-draggable](https://npm.io/package/next-draggable.md) 0.0.4

## Recent versions

- 0.5.8 (latest) — 2020-04-29
- 0.5.7 — 2020-04-29
- 0.5.6 — 2020-04-15
- 0.5.5 — 2020-04-15
- 0.5.4 — 2020-03-22
- 0.5.3 — 2020-03-22
- 0.5.2 — 2020-03-21
- 0.5.1 — 2020-03-21
- 0.5.0 — 2020-03-21
- 0.0.36 — 2020-03-21
- 0.0.35 — 2019-12-26
- 0.0.34 — 2019-12-17
- 0.0.33 — 2019-12-17
- 0.0.32 — 2019-12-17
- 0.0.31 — 2019-12-12
- … 30 more at https://npm.io/package/sprite-nodes-links/versions

## README

# sprite-nodes-links

基于 spritejs 的节点链接基础库

```javascript
import { Node, Stage, Link } from '../src/index'
let stage = new Stage({
  selector: '#app'
})
let node1 = new Node({ pos: [200, 200], fixed: true, text: '不受力固定点' })
let node2 = new Node({ pos: [200, 200], text: 'y轴受力', forceAxis: 'y' })
let node3 = new Node({ pos: [200, 200], text: '自由节点' })
let node4 = new Node({ pos: [200, 200], text: '自由节点' })
let link1 = new Link({ startId: node1.attr('id'), endId: node2.attr('id') })
let link2 = new Link({ startId: node2.attr('id'), endId: node3.attr('id') })
let link3 = new Link({ startId: node3.attr('id'), endId: node4.attr('id') })
stage.append([node1, node2, node3, node4, link1, link2, link3])
stage.checkForceLink(false) //校验弹性影响，不带动画
console.log(stage)
```

![sprite-mind](/node-links.png)

---
_Source: https://npm.io/package/sprite-nodes-links · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
