Socket
Book a DemoInstallSign in
Socket

floatingnodes

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

floatingnodes

Animated & interactive floating nodes with connections (canvas)

1.0.8
latest
Source
npmnpm
Version published
Weekly downloads
10
Maintainers
1
Weekly downloads
 
Created
Source

FloatingNodes

npm Travis Build License

Installation & Usage

npm install floatingnodes --save

Include the Component

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

Props

keyprop type / notesexample
widthnumber (required)300
widthnumber (required)300
nodeParamsobjectsee #nodeParams
enableNodeDropbooltrue, false
nodeDropParamsobjectsee #nodeDropParams
enableInteractionbooltrue, false
interactiveNodeParamsobjectsee #nodeParams
initialNodeCountnumber25
movementUpdateTimenumber(every X seconds each nodes has a 50% chance to update their movement direction)0.7
enableOutOfBoundbool (out of bound nodes are getting a new random position)true, false
pauseAnimationbooltrue, false

#nodeParams

keyprop type / notesexample
colorarray (of numbers)[0,255,0,0.9]
speednumber (has no effect for interactiveNodeParams)0.1
radiusnumber (fixed radius)6
radiusRangeobject (random radius, has no effect if radius is defined, has no effect for interactiveNodeParams){min: 2, max: 8}
connectionSizenumber0.3
connectionColorarray (of numbers)[0,0,255]
connectionThresholdnumber120
connectionAlphaDivisornumber8
connectionStaticAlphabool/number (if not false connectionAlphaDivisor has no effect)false, 0.7

#nodeDropParams

keyprop type / notesexample
amountnumber (nodes per drop)3
limitnumber (removes nodes over limit, 0 means no limit)6
nodeDropParamsobjectsee #nodeParams

Keywords

react

FAQs

Package last updated on 26 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.