# floatingnodes

> Animated & interactive floating nodes with connections (canvas)

Latest version **1.0.8** (published 2017-11-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install floatingnodes
pnpm add floatingnodes
yarn add floatingnodes
bun add floatingnodes
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2017-11-26 |
| First published | 2017-11-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Simon S. |
| Maintainers | schwsimon |
| Keywords | react, canvas, floating, nodes, particles |

## Links

- npm: https://www.npmjs.com/package/floatingnodes
- Repository: https://github.com/SchwSimon/FloatingNodes
- Homepage: https://github.com/SchwSimon/FloatingNodes#readme
- Issues: https://github.com/SchwSimon/FloatingNodes/issues
- npm.io page: https://npm.io/package/floatingnodes

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^16.1.1
- [react-dom](https://npm.io/package/react-dom.md) ^16.1.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.8 (latest) — 2017-11-26
- 1.0.7 — 2017-11-26
- 1.0.6 — 2017-11-26
- 1.0.5 — 2017-11-25
- 1.0.4 — 2017-11-25
- 1.0.3 — 2017-11-25
- 1.0.2 — 2017-11-25
- 1.0.1 — 2017-11-25
- 1.0.0 — 2017-11-25

## README

# FloatingNodes

[![npm](https://img.shields.io/npm/v/npm.svg)](https://www.npmjs.com/package/floatingnodes)
![Travis Build](https://travis-ci.org/SchwSimon/FloatingNodes.svg?branch=master)
[![License](https://img.shields.io/badge/license-ISC-blue.svg?style=flat)](https://opensource.org/licenses/ISC)

## Installation & Usage

```sh
npm install floatingnodes --save
```

### Include the Component

```js
import React from 'react'
import FloatingNodes from 'floatingnodes'

class Component extends React.Component {
  render() {
    return <FloatingNodes
      width={300}
      height={300}
    />
  }
}
```
This will produce something like this:  
![Example image](/example/example-image.png)

### Props

key | prop type / notes | example
----|---------|------
`width` | number (required) | `300`
`width` | number (required) | `300`
`nodeParams` | object | [see #nodeParams](#nodeparams)
`enableNodeDrop` | bool | `true`, `false`
`nodeDropParams` | object | [see #nodeDropParams](#nodedropparams)
`enableInteraction` | bool | `true`, `false`
`interactiveNodeParams` | object | [see #nodeParams](#nodeparams)
`initialNodeCount` | number | `25`
`movementUpdateTime` | number(every X seconds each nodes has a 50% chance to update their movement direction)  | `0.7`
`enableOutOfBound` | bool (out of bound nodes are getting a new random position) | `true`, `false`
`pauseAnimation` | bool | `true`, `false`

#### #nodeParams

key | prop type / notes | example
----|---------|------
`color` | array (of numbers) | `[0,255,0,0.9]`
`speed` | number (has no effect for `interactiveNodeParams`) | `0.1`
`radius` | number (fixed radius) | `6`
`radiusRange` | object (random radius, has no effect if `radius` is defined, has no effect for `interactiveNodeParams`) | `{min: 2, max: 8}`
`connectionSize` | number | `0.3`
`connectionColor` | array (of numbers) | `[0,0,255]`
`connectionThreshold` | number | `120`
`connectionAlphaDivisor` | number | `8`
`connectionStaticAlpha` | bool/number (if not false `connectionAlphaDivisor` has no effect) | `false`, `0.7`

#### #nodeDropParams

key | prop type / notes | example
----|---------|------
`amount` | number (nodes per drop) | `3`
`limit` | number (removes nodes over limit, `0` means no limit) | `6`
`nodeDropParams` | object | [see #nodeParams](#nodeparams)

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