Advertisement
Guest User

Untitled

a guest
Mar 18th, 2013
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Define object containing your Raphael path data.
  2. // goto http://lazylinepainter.info to convert your svg into a svgData object.
  3. var svgData  = {
  4.     "aboutflow": {
  5.         "strokepath": [
  6.             {
  7.                 "path": "M4.122,4.609c233.988,0,350.981,325.483,581.971,325.483",
  8.                 "duration": 600
  9.             }
  10.         ],
  11.         "dimensions": {
  12.             "width": 590,
  13.             "height": 334
  14.         }
  15.     }
  16. };
  17.  
  18.  
  19. var svgData2  = {
  20.     "projectsflow": {
  21.         "strokepath": [
  22.             {
  23.                 "path": "M4.122,4.609c233.988,0,350.981,325.483,581.971,325.483",
  24.                 "duration": 600
  25.             }
  26.         ],
  27.         "dimensions": {
  28.             "width": 590,
  29.             "height": 334
  30.         }
  31.     }
  32. };
  33.  
  34.                
  35.                
  36. // newsbar scroll
  37. $(document).ready(function(){      
  38.  
  39.     $('#sitecanvas').localScroll({
  40.                 target:'#mp_bg',
  41.                 duration:3000
  42.     });          
  43.  
  44.     // Setup your Lazy Line element.
  45.     // see README file for more settings
  46.     $('#projectsflow').lazylinepainter({
  47.         'svgData' : svgData2,
  48.         'strokeWidth':9,  
  49.         'strokeColor':'#dc908e',
  50.     });
  51.  
  52.     $('#aboutflow').lazylinepainter({
  53.                 'svgData' : svgData,
  54.                 'strokeWidth':9,  
  55.                 'strokeColor':'#dc908e',
  56.     });                
  57.  
  58. });
  59.  
  60. // draw About flows
  61. var x = 0;         
  62. function aboutanim(){
  63.  
  64.         ++x;
  65.         if (x==1) {
  66.  
  67.             $('#aboutflow').lazylinepainter('paint');
  68.  
  69.         }
  70.  
  71.         if (x==2) {
  72.    
  73.             x = 0;
  74.             $('#aboutflow').lazylinepainter('erase');
  75.        
  76.         }
  77. }
  78.  
  79.  
  80. // draw Project flows
  81. var x2 = 0;        
  82. function projectsanim(){
  83.  
  84.         ++x2;
  85.  
  86.         if (x2==1) {
  87.  
  88.             $('#projectsflow').lazylinepainter('paint');
  89.         }
  90.  
  91.         if (x2==2) {
  92.  
  93.             x2 = 0;
  94.             $('#projectsflow').lazylinepainter('erase');
  95.         }
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement