Code
var bg = new Path.Rectangle({
size: view.size,
fillColor: 'black'
})
var amount = 20
var strokeWidth = 10
var waveAmplitude = view.size.height/10
var waveLength = 0.1
var animationSpeed = 0.05
var padding = 20
var colorWidth = -8
var array = []
var rootGroup = new Group()
function createPath(i){
var path = new Path.Line({
from: [0, 0],
to: [0, 20],
strokeColor: 'blue',
strokeWidth: strokeWidth,
strokeCap: 'round',
position: view.center,
applyMatrix: false,
dashArray: [59, 20],
parent: rootGroup
})
path.segments[1].point = view.center
path.strokeColor.hue = colorWidth * i * -0.7
path.onFrame = function(event){
this.segments[0].point.y = Math.sin(animationSpeed * event.count + i * waveLength) * waveAmplitude + view.size.height/2
this.segments[0].point.x = Math.cos(animationSpeed * event.count + i * waveLength) * waveAmplitude + view.size.width/2
}
return path
}
for (var i = 0; i < amount; i++){
array.push(createPath(i))
}
rootGroup.position = view.center