项目作者: jderail

项目描述 :
Easy to integrate canvas based interactive background
高级语言: JavaScript
项目地址: git://github.com/jderail/respondots.git
创建时间: 2019-09-20T17:39:03Z
项目社区:https://github.com/jderail/respondots

开源协议:MIT License

下载


Respondots

Easy to integrate canvas based interactive background. More info and demo on jderail.github.io/respondots

Getting started

Download the latest release and include respondots.min.js.

  1. <script src="{your js directory}/respondots.min.js" ></script>

Initialize a new Respondots object with the root element

  1. new Respondots(document.getElementById('root'));

Note : Canvas will fit the nearest positioned ancestor.

Options

Options can be used as second parameter of Respondots constructor as an object containing any of following properties.

Name Default value Description
gridSize 50 Spacing between dots
dotSize 5 Radius of dots
backgroundColor #333 Background color of canvas
dotColor #e0e0e0 Color of dots
range 100 Range at which dots start moving
zIndex 0 Value of z-index CSS property of appended canvas element