/* -----------------------------------
Code by Brandio
------------------------------------*/
"use strict"
window.onload = function() {
var canvas = document.getElementById('pagebg');
paper.setup(canvas);
var rect = new paper.Path.Rectangle(0, 0, paper.view.bounds.width, paper.view.bounds.height);
rect.fillColor = {
gradient: {
stops: ['#42287C', '#714091']
},
origin: paper.view.bounds.topLeft,
destination: paper.view.bounds.bottomLeft
}
var svg = [paper.project.importSVG(''),
paper.project.importSVG(''),
paper.project.importSVG(''),
paper.project.importSVG('')];
var path = [new paper.Path(),new paper.Path(),new paper.Path(),new paper.Path()];
var orgSeg = [[],[],[],[]];
var pathOptions = [{color: '#2D1E56',opacity: 0.35,angle: 0, position: 'TL',x: -250,y: -220,scale: 1},
{color: '#2D1E56',opacity: 0.18,angle: 0, position: 'TL',x: -50,y: -50,scale: 1},
{color: '#2D1E56',opacity: 0.18,angle: 0, position: 'BL',x: 100,y: 130,scale: 1},
{color: '#2D1E56',opacity: 0.18,angle: 0, position: 'BR',x: 150,y: 160,scale: 1}];
var moveSize = 10;
var moveSpeed = 300;
initializePath();
function initializePath() {
for(var p=0;p