@@ -12,7 +12,7 @@ A jQuery plugin for path animation using CSS.
12
12
13
13
## Getting started
14
14
Implementing this plugin is broken into two parts.
15
- Preparing your web-friendly data & Configuring lazy-line-painter.js
15
+ Preparing your svg data & Configuring lazy-line-painter.js
16
16
17
17
18
18
** Preparing your SVG data** <br >
@@ -26,19 +26,22 @@ Copy lazy line code and paste into your DOM ready function.
26
26
27
27
28
28
** Configuring lazy-line-painter options** <br >
29
- A number of attributes can be setup before the line art is Painted,
29
+ Style attributes, callbacks and other options can be setup before the line art is Painted,
30
30
these include;
31
31
``` js
32
32
' strokeWidth' // Adjust width of stroke
33
33
' strokeColor' // Adjust stroke color
34
34
' strokeCap' // Adjust stroke cap - butt | round | square
35
35
' strokeJoin' // Adjust stroke join - miter | round | bevel
36
36
' strokeOpacity' // Adjust stroke opacity 0 - 1
37
+ ' strokeDash' // Adjust stroke dash - '5, 5'
38
+
37
39
' onComplete' // Callback fired after animation finishes
38
40
' onUpdate' // Callback fired on animation update
39
41
' onStart' // Callback fired before animation starts
40
42
' onStrokeStart' // Callback fires after each stroke animation starts
41
43
' onStrokeComplete' // Callback fires after each stroke animation completes
44
+
42
45
' delay' // Delay before animation starts
43
46
' overrideKey' // Set this property if you selector id doesn't match the key referencing your path data value within svgData.
44
47
' speedMultiplier' // slow down or speed up the animation
@@ -68,22 +71,21 @@ var svgData = {
68
71
' paths' : // this contains all your SVG path info
69
72
[
70
73
{
71
- ' path' : " M144.869,199c0...." , // path string ,
72
- ' duration' : 300 , // time taken to animate that path
73
- ' strokeColor' : ' #000000' , // stroke color can be set individually
74
- ' strokeWidth' : 3 // stroke width can be set individually
74
+ ' path' : " M144.869,199c0...." , // path string
75
+ ' duration' : 300 , // path duration
76
+ ' strokeWidth' : 3 , // all style attr can be set individually
75
77
' reverse' : true // reverse stroke individually
76
- ' ease' : ' ' // ease stroke individually - i.e 'easeInOutExpo', 'easeOutBounce'
77
- ' onStrokeStart ' : function (){console .log (" Stroke started" )} // Callback fires after the stroke animation starts
78
- ' onStrokeComplete ' : function (){console .log (" Stroke completed" )} // Callback fires after the stroke
79
- ' onStrokeUpdate ' : function (){console .log (" Stroke update" )} // Callback fires during the stroke animation
78
+ ' ease' : ' easeInOutExpo ' // ease stroke individually
79
+ ' onStrokeStart ' : function (){console .log (" Stroke started" )}
80
+ ' onStrokeComplete ' : function (){console .log (" Stroke completed" )}
81
+ ' onStrokeUpdate ' : function (){console .log (" Stroke update" )}
80
82
}, {
81
83
' path' : " M155.85,29c0...."
82
84
' duration' : 1000
83
85
}, {
84
86
etc ...
85
87
],
86
- ' dimensions' : // dimensions of element
88
+ ' dimensions' : // dimensions of viewbox
87
89
{
88
90
' width' : 270 ,
89
91
' height' : 266
@@ -155,18 +157,4 @@ $('#demo').lazylinepainter('destroy');
155
157
156
158
## Author
157
159
[http://camoconnell.com/](http://camoconnell.com/) <br>
158
-
159
-
160
-
161
-
162
- ## Contributors
163
- Many thats to; <br>
164
-
165
- - saeedseyfi / 0lumide
166
- * 1.6.1 additions
167
-
168
- - [Jamie Perkins](http://inorganik.github.io)
169
- * 1.5.0 additions
170
-
171
- - Matt Kemp
172
- * specify strokeWidth and strokeColor on a per-path basis.
160
+
0 commit comments