Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Define object containing your Raphael path data.
- // goto http://lazylinepainter.info to convert your svg into a svgData object.
- var svgData = {
- "aboutflow": {
- "strokepath": [
- {
- "path": "M4.122,4.609c233.988,0,350.981,325.483,581.971,325.483",
- "duration": 600
- }
- ],
- "dimensions": {
- "width": 590,
- "height": 334
- }
- }
- };
- var svgData2 = {
- "projectsflow": {
- "strokepath": [
- {
- "path": "M4.122,4.609c233.988,0,350.981,325.483,581.971,325.483",
- "duration": 600
- }
- ],
- "dimensions": {
- "width": 590,
- "height": 334
- }
- }
- };
- // newsbar scroll
- $(document).ready(function(){
- $('#sitecanvas').localScroll({
- target:'#mp_bg',
- duration:3000
- });
- // Setup your Lazy Line element.
- // see README file for more settings
- $('#projectsflow').lazylinepainter({
- 'svgData' : svgData2,
- 'strokeWidth':9,
- 'strokeColor':'#dc908e',
- });
- $('#aboutflow').lazylinepainter({
- 'svgData' : svgData,
- 'strokeWidth':9,
- 'strokeColor':'#dc908e',
- });
- });
- // draw About flows
- var x = 0;
- function aboutanim(){
- ++x;
- if (x==1) {
- $('#aboutflow').lazylinepainter('paint');
- }
- if (x==2) {
- x = 0;
- $('#aboutflow').lazylinepainter('erase');
- }
- }
- // draw Project flows
- var x2 = 0;
- function projectsanim(){
- ++x2;
- if (x2==1) {
- $('#projectsflow').lazylinepainter('paint');
- }
- if (x2==2) {
- x2 = 0;
- $('#projectsflow').lazylinepainter('erase');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement