a flexible ,configurable animation of wave
Two parameters are received at instantiation time
First params:the selector for the animation container
Second parameter(optional):Options
import Wave from './dist/wave.es.js'
const wave = new Wave('body')
<script src="./dist/wave.js"></script>
<script >
const wave = new Wave('body')
</script>
Type: string
Default: --
Description: selector for the animation container
Type: number
Default:3
Description: number of waves (number of layers)
Type: number
Default: 50
Description: smooth degree
Type: number
Default:1
Description: speed of the animation
Type: number
Default:.3
Description: wave height can be either a percentage or a specific height
Type: Array<{ hex: string, rgba: string }>
Default:['#ff7657']
Description: color of every waves
Type: number
Default:.5
Description: opacity of wave
Type: boolean
Default:true
Description: whether to display border or not
Type: number
Default:2
Description: border width
Type: string[]
Default:['']
Description: border color, the default is the same as the wave color
Type: 'top' | 'bottom' | 'left' | 'right'
Default:"bottom"
Description: position of waves
start animation
pause animation
set options
reset animation