实用绘制和动画SVG描边路径的JavaScript插件
A little JavaScript class (without dependencies) to draw and animate SVG path strokes
Segment
Random
下面的参数可以进行修改。
segment.draw(
0
100
25% + 50
50% - 50
50%
Segment begin
,
50%
400
50% + 50
75% - 50
100%
Segment end
,
0.5
1
1.5
2
3
Duration
, {easing:
linear
quad_in
quad_out
quad_in_out
cubic_in
cubic_out
cubic_in_out
sin_in
sin_out
sin_in_out
exp_in
exp_out
exp_in_out
circle_in
circle_out
circle_in_out
bounce_in
bounce_out
bounce_in_out
back_in
back_out
back_in_out
elastic_in
elastic_out
elastic_in_out
Easing function
} );
Draw