Skip to content

Commit e522213

Browse files
committed
Added full rotation animation
1 parent 53d4e75 commit e522213

File tree

5 files changed

+81
-20
lines changed

5 files changed

+81
-20
lines changed

neptune-animations.css

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
11

22

33
/* Fading Animations */
4-
@import url('./src/css/fade/neptune_fade_in.css');
5-
@import url('./src/css/fade/neptune_fade_out.css');
4+
@import url('./src/css/neptune_fade_in.css');
5+
@import url('./src/css/neptune_fade_out.css');
66

77
/* Rotate Animations */
8-
/* Rotate Right */
9-
.nep-rotate-right {
10-
animation: nep-rotate-right var(--nep-animation-duration) var(--nep-animation-delay) var(--nep-animation-direction) var(--nep-animation-fillmode);
11-
}
12-
13-
@keyframes nep-rotate-right {
14-
100% { transform: rotate(360deg);}
15-
}
16-
17-
/* Rotate Left */
18-
.nep-rotate-left {
19-
animation: nep-rotate-left var(--nep-animation-duration) var(--nep-animation-delay) var(--nep-animation-direction) var(--nep-animation-fillmode);
20-
}
21-
22-
@keyframes nep-rotate-left {
23-
100% { transform: rotate(-360deg);}
24-
}
8+
@import url(./src/css/neptune_rotate.css);
259

2610

2711

File renamed without changes.
File renamed without changes.

src/css/neptune_rotate.css

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/* Rotate Right */
2+
.nep-rotate-right {
3+
animation: nep-rotate-right var(--nep-animation-duration) var(--nep-animation-delay) var(--nep-animation-direction) var(--nep-animation-fillmode);
4+
}
5+
6+
@keyframes nep-rotate-right {
7+
100% { transform: rotate(360deg);}
8+
}
9+
10+
/* Rotate Right In*/
11+
.nep-rotate-right-in {
12+
animation: nep-rotate-right-in var(--nep-animation-duration) var(--nep-animation-delay) var(--nep-animation-direction) var(--nep-animation-fillmode);
13+
}
14+
15+
@keyframes nep-rotate-right-in {
16+
0% {
17+
opacity: 0;
18+
}
19+
100% {
20+
opacity: 1;
21+
transform: rotate(360deg);
22+
}
23+
}
24+
25+
/* Rotate Right Out*/
26+
.nep-rotate-right-out {
27+
animation: nep-rotate-right-out var(--nep-animation-duration) var(--nep-animation-delay) var(--nep-animation-direction) var(--nep-animation-fillmode);
28+
}
29+
30+
@keyframes nep-rotate-right-out {
31+
0% {
32+
opacity: 1;
33+
}
34+
100% {
35+
opacity: 0;
36+
transform: rotate(360deg);
37+
}
38+
}
39+
40+
/* Rotate Left */
41+
.nep-rotate-left {
42+
animation: nep-rotate-left var(--nep-animation-duration) var(--nep-animation-delay) var(--nep-animation-direction) var(--nep-animation-fillmode);
43+
}
44+
45+
@keyframes nep-rotate-left {
46+
100% { transform: rotate(-360deg);}
47+
}
48+
49+
/* Rotate Left In*/
50+
.nep-rotate-left-in {
51+
animation: nep-rotate-left-in var(--nep-animation-duration) var(--nep-animation-delay) var(--nep-animation-direction) var(--nep-animation-fillmode);
52+
}
53+
54+
@keyframes nep-rotate-left-in {
55+
0% {
56+
opacity: 0;
57+
}
58+
100% {
59+
opacity: 1;
60+
transform: rotate(-360deg);
61+
}
62+
}
63+
64+
/* Rotate Left Out*/
65+
.nep-rotate-left-out {
66+
animation: nep-rotate-left-out var(--nep-animation-duration) var(--nep-animation-delay) var(--nep-animation-direction) var(--nep-animation-fillmode);
67+
}
68+
69+
@keyframes nep-rotate-left-out {
70+
0% {
71+
opacity: 1;
72+
}
73+
100% {
74+
opacity: 0;
75+
transform: rotate(-360deg);
76+
}
77+
}

test/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import NeptuneAnimate from "../neptune-animations.js"
1717

1818
const myElement = document.getElementById("test");
19-
const neptuneAnimate = new NeptuneAnimate(myElement, "nep-fade-out-right");
19+
const neptuneAnimate = new NeptuneAnimate(myElement, "nep-rotate-left-in");
2020

2121
neptuneAnimate.startAnimation();
2222
</script>

0 commit comments

Comments
 (0)