0.1.0 • Published 4 years ago

rainbow-bubbles v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

rainbow-bubbles

rainbow-bubbles is a wave component on Vue by z7xisoo in github.

Install

npm i --save rainbow-bubbles
import RainbowBubbles from 'rainbow-bubbles'

Usage

<rainbow-bubbles :config="config" :bubbles="bubbles"></rainbow-bubbles>

Options

  • config
keytypedefaultuse
elString"rainbow-bubbles"canvas id
newBooleantruecreate new canvas
clearBooleantrueclear canvas when animation
widthNumber1920canvas width
heightNumber1080canvas height
moveBooleantruemouse interaction
blowBooleantrueautomatic explosion
backgroundObject{...}canvas background
  • background
keytypedefaultuserange
typeString""type"color","image","gradient"
colorString Array""color-
positionArray""image-gradient-positon0,0,width,0
srcString""image-url"color","image","gradient"
repetitionString""image-repetition"repeat","repeat-x","repeat-y","no-repeat"
import image from "rainbow-bubbles.png";

background = {
  type: "gradient",
  color: ["red", "orange", "green", "blue"],
  position:[0,0,1920,1080]
};

background = {
  type: "image",
  src:image,
  repetition:"repeat", // "repeat","repeat-x","repeat-y","no-repeat"
};

background = {
  type: "color",
  color: ["red", "orange", "green", "blue"],
};

background = {
  type: "color",
  color: "green",
};
  • bubbles
keytypedefaultuse
maxObject{...}big bubbles config
minObject{...}explosion bubbles config
  • bubbles - max
keytypedefaultuse
numberNumber3每次生成气泡的数量
rateNumber0.1生成气泡频率
radiusArray15,20生成气泡半径范围
blowHeightNumber0.6气泡爆炸高度占比
backgroundObject{...}bubbles background
  • bubbles - min
keytypedefaultuse
showBooleantrue是否生成小气泡
numberNumber4每次生成气泡的数量
radiusArray1,1生成气泡半径范围
backgroundObject{...}bubbles background

LICENSE

MIT


npm.io

0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago