-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.md~
89 lines (65 loc) · 2.6 KB
/
README.md~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
arduinoLightAnimation
=====================
CSS3 style color animation for controlling RGB leds on Arduino
css3 animation comparison
-------
- animation-duration
- CSS3: Specifies how many seconds or milliseconds an animation takes to complete one cycle. Default 0.
- aLA: Specifies how many milliseconds an animation takes to complete one cycle. Default 1000ms.
- can be set either when the animation is set:
```
myAnimator.setAnimation(animationKeyFrameArray, nKeyFrames, duration_ms);
```
- or BEFORE to set the animation:
```
myAnimator.setDuration(duration_ms);
myAnimator.setAnimation(animationKeyFrameArray, nKeyFrames);
```
- animation-timing-function
- CSS3: Describes how the animation will progress over one cycle of its duration. Default "ease"
- aLA: Now only linear
- animation-delay
- CSS3: Specifies when the animation will start. Default 0
- aLA: Start to update after a delay will suffice.
- animation-iteration-count
- CSS3: Specifies the number of times an animation is played. Default 1
- aLA: Specifies the number of times an animation is played. Default infinite;
- in setup, for setting number of iterations
```
myAnimator.setIterations(nIterations);
```
- for setting infinite iterations
```
myAnimator.setIterationsInfinite(true);
```
- or restore past number of iterations
```
myAnimator.setIterationsInfinite(false);
```
- animation-direction
- CSS3: Specifies whether or not the animation should play in reverse on alternate cycles. Default "normal"
http://www.w3schools.com/cssref/css3_pr_animation-direction.asp
- aLA: Specifies if the animation is played always from begin to end "normal" or alternately from begin to end, then from end to begin "alternate". Default is "normal".
- in setup, for setting the "alternate" mode.
```
myAnimator.setAlternate(true);
```
- "normal" mode
```
myAnimator.setAlternate(false);
```
- animation-play-state
- CSS3: Specifies whether the animation is running or paused. Default "running"
- aLA: Not updating works as a pause.
Other features and info
-------
- Order for setting animation keyframe is not relevant
- Transition when animation are changed on runtime
- Set time of trasition between different animations
```
myAnimator.setTransitionDuration(unsigned long _transitionDuration)
```
- Can put colors in rgb, hex, hsb
- Putting "delay" function will interfere with the timing of the animation, since the update function is supposed to be executed each cycle.
=====================
Check the Examples for an idea of how to use the library