move.gl 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -0
  3. package/css/move.gl.css +2 -0
  4. package/css/move.gl.min.css +2 -0
  5. package/package.json +55 -0
  6. package/scss/classes/_animations.scss +576 -0
  7. package/scss/classes/_index.scss +0 -0
  8. package/scss/classes/_transforms.scss +124 -0
  9. package/scss/classes/keyboard.scss +18 -0
  10. package/scss/classes/screensaver.scss +15 -0
  11. package/scss/dev/_banner.scss +36 -0
  12. package/scss/dev/_debug.scss +18 -0
  13. package/scss/dev/_deprecation.scss +10 -0
  14. package/scss/dev/_index.scss +8 -0
  15. package/scss/dev/_modules.scss +24 -0
  16. package/scss/effects/_filter.scss +176 -0
  17. package/scss/effects/_index.scss +23 -0
  18. package/scss/effects/_opacity.scss +62 -0
  19. package/scss/effects/_shadow.scss +175 -0
  20. package/scss/functions/_index.scss +0 -0
  21. package/scss/functions/scenes/_bubble.scss +19 -0
  22. package/scss/functions/scenes/_index.scss +20 -0
  23. package/scss/index.scss +0 -0
  24. package/scss/keyframes/_beat.scss +26 -0
  25. package/scss/keyframes/_index.scss +0 -0
  26. package/scss/maps/_index.scss +0 -0
  27. package/scss/maps/_mouse.scss +96 -0
  28. package/scss/mixins/_accessibility.scss +70 -0
  29. package/scss/mixins/_boot.scss +51 -0
  30. package/scss/mixins/_hover.scss +51 -0
  31. package/scss/mixins/_index.scss +0 -0
  32. package/scss/mixins/_selection.scss +321 -0
  33. package/scss/mixins/_shape.scss +44 -0
  34. package/scss/mixins/_touch.scss +95 -0
  35. package/scss/mixins/animations/--hover.scss +107 -0
  36. package/scss/mixins/animations/_base.scss +337 -0
  37. package/scss/mixins/animations/_beat.scss +119 -0
  38. package/scss/mixins/animations/_blink.scss +151 -0
  39. package/scss/mixins/animations/_bounce.scss +192 -0
  40. package/scss/mixins/animations/_elastic.scss +65 -0
  41. package/scss/mixins/animations/_fade.scss +154 -0
  42. package/scss/mixins/animations/_flash.scss +177 -0
  43. package/scss/mixins/animations/_flip.scss +72 -0
  44. package/scss/mixins/animations/_float.scss +126 -0
  45. package/scss/mixins/animations/_glow.scss +179 -0
  46. package/scss/mixins/animations/_heartbeat.scss +175 -0
  47. package/scss/mixins/animations/_hinge.scss +119 -0
  48. package/scss/mixins/animations/_index.scss +37 -0
  49. package/scss/mixins/animations/_jello.scss +129 -0
  50. package/scss/mixins/animations/_jiggle.scss +163 -0
  51. package/scss/mixins/animations/_lightspeed.scss +130 -0
  52. package/scss/mixins/animations/_nod.scss +161 -0
  53. package/scss/mixins/animations/_pop.scss +150 -0
  54. package/scss/mixins/animations/_pulse.scss +213 -0
  55. package/scss/mixins/animations/_ripple.scss +169 -0
  56. package/scss/mixins/animations/_roll.scss +261 -0
  57. package/scss/mixins/animations/_rotate.scss +428 -0
  58. package/scss/mixins/animations/_rubber.scss +116 -0
  59. package/scss/mixins/animations/_scale.scss +113 -0
  60. package/scss/mixins/animations/_shake.scss +182 -0
  61. package/scss/mixins/animations/_slide.scss +294 -0
  62. package/scss/mixins/animations/_spin.scss +219 -0
  63. package/scss/mixins/animations/_sway.scss +167 -0
  64. package/scss/mixins/animations/_swing.scss +247 -0
  65. package/scss/mixins/animations/_tada.scss +233 -0
  66. package/scss/mixins/animations/_twist.scss +177 -0
  67. package/scss/mixins/animations/_wave.scss +166 -0
  68. package/scss/mixins/animations/_wobble.scss +254 -0
  69. package/scss/mixins/animations/_zoom.scss +166 -0
  70. package/scss/mixins/effects/_filter.scss +148 -0
  71. package/scss/mixins/effects/_index.scss +0 -0
  72. package/scss/mixins/effects/_shadow.scss +21 -0
  73. package/scss/mixins/loaders/_index.scss +0 -0
  74. package/scss/mixins/loaders/_progress.scss +174 -0
  75. package/scss/mixins/loaders/_spinner.scss +101 -0
  76. package/scss/mixins/loaders/circle_01.scss +22 -0
  77. package/scss/mixins/loaders/circle_02.scss +19 -0
  78. package/scss/mixins/loaders/circle_03.scss +29 -0
  79. package/scss/mixins/loaders/circle_inner_01.scss +33 -0
  80. package/scss/mixins/loaders/circle_inner_02.scss +33 -0
  81. package/scss/mixins/loaders/circle_inner_03.scss +34 -0
  82. package/scss/mixins/mouse/_cursor.scss +182 -0
  83. package/scss/mixins/mouse/_index.scss +0 -0
  84. package/scss/mixins/mouse/_pointer.scss +258 -0
  85. package/scss/mixins/scroll/_index.scss +0 -0
  86. package/scss/mixins/scroll/_scroll.scss +104 -0
  87. package/scss/mixins/scroll/_scrollbar.scss +249 -0
  88. package/scss/mixins/transforms/_flip.scss +76 -0
  89. package/scss/mixins/transforms/_index.scss +23 -0
  90. package/scss/mixins/transforms/_matrix.scss +1 -0
  91. package/scss/mixins/transforms/_perspective.scss +11 -0
  92. package/scss/mixins/transforms/_rotate.scss +101 -0
  93. package/scss/mixins/transforms/_scale.scss +11 -0
  94. package/scss/mixins/transforms/_skew.scss +13 -0
  95. package/scss/mixins/transforms/_translate.scss +13 -0
  96. package/scss/mixins/transitions/_index.scss +0 -0
  97. package/scss/mixins/transitions/_transition.scss +13 -0
  98. package/scss/variables/_animation.scss +91 -0
  99. package/scss/variables/_index.scss +0 -0
  100. package/ts/ARContent.ts +27 -0
  101. package/ts/ARInteraction.ts +34 -0
  102. package/ts/AdaptiveUI.ts +25 -0
  103. package/ts/ContentStreaming.ts +20 -0
  104. package/ts/Draggable.ts +71 -0
  105. package/ts/DynamicEnvironment.ts +60 -0
  106. package/ts/Gesture.ts +168 -0
  107. package/ts/ImmersiveAudio.ts +40 -0
  108. package/ts/InteractiveCanvas.ts +177 -0
  109. package/ts/InteractiveVideo.ts +29 -0
  110. package/ts/Keyboard.ts +162 -0
  111. package/ts/RealTimeCollaboration.ts +25 -0
  112. package/ts/Screensaver.ts +140 -0
  113. package/ts/SpatialNavigation.ts +38 -0
  114. package/ts/UserProfile.ts +27 -0
  115. package/ts/VRExperience.ts +58 -0
  116. package/ts/VideoOverlay.ts +116 -0
  117. package/ts/index.ts +0 -0
@@ -0,0 +1,182 @@
1
+ // ============================================================================
2
+ // Poster
3
+ // ============================================================================
4
+
5
+ ////
6
+ ///
7
+ /// Shake Animations Mixin Module
8
+ /// ===========================================================================
9
+ ///
10
+ /// This module ...
11
+ ///
12
+ ///
13
+ /// @group Animations
14
+ /// @author Scape Agency
15
+ /// @link https://move.gl
16
+ /// @since 0.1.0 initial release
17
+ /// @todo None
18
+ /// @access public
19
+ ///
20
+ ////
21
+
22
+
23
+ // ============================================================================
24
+ // Use
25
+ // ============================================================================
26
+
27
+ @use "sass:math";
28
+ @use "../dev" as *;
29
+ @use "../variables" as *;
30
+ @use "../keyframes" as *;
31
+ @use "base" as *;
32
+
33
+
34
+ // ============================================================================
35
+ // Mixins
36
+ // ============================================================================
37
+
38
+
39
+
40
+ ///
41
+ /// Shake Animation
42
+ /// Creates a shake animation with configurable amplitude, duration, timing function,
43
+ /// and iteration count.
44
+ /// @name animate_shake
45
+ /// @param {Number} $amplitude [15deg] - The maximum angle of the shake.
46
+ /// @param {Number} $duration [math.div($animate_base_duration, 2)] - The duration of the animation.
47
+ /// @param {String} $timing_function [ease-in-out] - The timing function to use for the animation.
48
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of times the animation should run.
49
+ ///
50
+ @mixin animate_shake(
51
+ $amplitude: 15deg,
52
+ $duration: math.div($animate_base_duration, 2),
53
+ $timing_function: ease-in-out,
54
+ $iteration_count: $animate_base_iteration_count
55
+ ) {
56
+ @include animate_base(
57
+ animate_shake,
58
+ $duration,
59
+ $timing_function,
60
+ $iteration_count,
61
+ );
62
+ @keyframes animate_shake {
63
+ 0% { transform: rotate(-$amplitude); }
64
+ 4% { transform: rotate($amplitude); }
65
+ 8%, 24% { transform: rotate(-1.2 * $amplitude); }
66
+ 12%, 28% { transform: rotate(1.2 * $amplitude); }
67
+ 16% { transform: rotate(-1.4 * $amplitude); }
68
+ 20% { transform: rotate(1.4 * $amplitude); }
69
+ 32% { transform: rotate(-0.8 * $amplitude); }
70
+ 36% { transform: rotate(0.8 * $amplitude); }
71
+ 40%, 100% { transform: rotate(0deg); }
72
+ }
73
+ }
74
+
75
+
76
+ // Gentle Shake Animation
77
+ // ----------------------------------------------------------------------------
78
+
79
+ ///
80
+ /// Gentle Shake Animation
81
+ /// Creates a gentle shake animation with a smaller amplitude, designed for
82
+ /// slower and less intense shaking effects.
83
+ /// @name animate_shake_slow
84
+ /// @param {Number} $amplitude [10deg] - The maximum angle of the shake.
85
+ /// @param {Number} $duration [math.div($animate_base_duration_slow, 2)] - The duration of the animation.
86
+ /// @param {String} $timing_function [ease-in-out] - The timing function to use for the animation.
87
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of times the animation should run.
88
+ ///
89
+ @mixin animate_shake_slow(
90
+ $amplitude: 10deg,
91
+ $duration: math.div($animate_base_duration_slow, 2),
92
+ $timing_function: ease-in-out,
93
+ $iteration_count: $animate_base_iteration_count
94
+ ) {
95
+ @include animate_base(
96
+ animate_shake_slow,
97
+ $duration,
98
+ $timing_function,
99
+ $iteration_count,
100
+ );
101
+ @keyframes animate_shake_slow {
102
+ 0%, 100% { transform: rotate(0deg); }
103
+ 10%, 30%, 50%, 70%, 90% { transform: rotate(-$amplitude); }
104
+ 20%, 40%, 60%, 80% { transform: rotate($amplitude); }
105
+ }
106
+ }
107
+
108
+
109
+
110
+ // Horizontal Shake Animation
111
+ // ----------------------------------------------------------------------------
112
+
113
+ ///
114
+ /// Horizontal Shake Animation
115
+ /// Creates a horizontal shake animation, moving the element side to side
116
+ /// by a configurable distance.
117
+ /// @name animate_shake_horizontal
118
+ /// @param {Number} $distance [10px] - The distance to move the element.
119
+ /// @param {Number} $duration [math.div($animate_base_duration, 2)] - The duration of the animation.
120
+ /// @param {String} $timing_function [ease-in-out] - The timing function to use for the animation.
121
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of times the animation should run.
122
+ ///
123
+ @mixin animate_shake_horizontal(
124
+ $distance: 10px,
125
+ $duration: math.div($animate_base_duration, 2),
126
+ $timing_function: ease-in-out,
127
+ $iteration_count: $animate_base_iteration_count
128
+ ) {
129
+ @include animate_base(
130
+ animate_shake_horizontal,
131
+ $duration,
132
+ $timing_function,
133
+ $iteration_count,
134
+ );
135
+ @keyframes animate_shake_horizontal {
136
+ 0%, 100% { transform: translateX(0); }
137
+ 25%, 75% { transform: translateX(-$distance); }
138
+ 50% { transform: translateX($distance); }
139
+ }
140
+ }
141
+
142
+
143
+
144
+ // @-webkit-keyframes shake {
145
+ // from, 100% {
146
+ // -webkit-transform: translate3d(0, 0, 0);
147
+ // transform: translate3d(0, 0, 0);
148
+ // }
149
+
150
+ // 10%, 30%, 50%, 70%, 90% {
151
+ // -webkit-transform: translate3d(-10px, 0, 0);
152
+ // transform: translate3d(-10px, 0, 0);
153
+ // }
154
+
155
+ // 20%, 40%, 60%, 80% {
156
+ // -webkit-transform: translate3d(10px, 0, 0);
157
+ // transform: translate3d(10px, 0, 0);
158
+ // }
159
+ // }
160
+
161
+ // @keyframes shake {
162
+ // from, 100% {
163
+ // -webkit-transform: translate3d(0, 0, 0);
164
+ // transform: translate3d(0, 0, 0);
165
+ // }
166
+
167
+ // 10%, 30%, 50%, 70%, 90% {
168
+ // -webkit-transform: translate3d(-10px, 0, 0);
169
+ // transform: translate3d(-10px, 0, 0);
170
+ // }
171
+
172
+ // 20%, 40%, 60%, 80% {
173
+ // -webkit-transform: translate3d(10px, 0, 0);
174
+ // transform: translate3d(10px, 0, 0);
175
+ // }
176
+ // }
177
+
178
+ // .shake {
179
+ // -webkit-animation-name: shake;
180
+ // animation-name: shake;
181
+ // }
182
+
@@ -0,0 +1,294 @@
1
+ // ============================================================================
2
+ // Poster
3
+ // ============================================================================
4
+
5
+ ////
6
+ ///
7
+ /// Slide Animations Mixin Module
8
+ /// ===========================================================================
9
+ ///
10
+ /// This module ...
11
+ ///
12
+ ///
13
+ /// @group Animations
14
+ /// @author Scape Agency
15
+ /// @link https://move.gl
16
+ /// @since 0.1.0 initial release
17
+ /// @todo None
18
+ /// @access public
19
+ ///
20
+ ////
21
+
22
+
23
+ // ============================================================================
24
+ // Use
25
+ // ============================================================================
26
+
27
+ @use "../dev" as *;
28
+ @use "../variables" as *;
29
+ @use "../keyframes" as *;
30
+ @use "base" as *;
31
+
32
+
33
+ // ============================================================================
34
+ // Mixins
35
+ // ============================================================================
36
+
37
+
38
+
39
+
40
+
41
+ ///
42
+ /// Slide Animation
43
+ /// Creates a sliding animation in a specified direction.
44
+ /// @name animate_slide
45
+ /// @param {String} $direction [left] - The direction in which the element slides (left, right).
46
+ /// @param {Number|String} $distance [100%] - The distance the element slides.
47
+ /// @param {Number|String} $duration [$animate_base_duration] - The duration of the slide animation.
48
+ /// @param {String} $timing_function [$animate_base_timing_function] - The timing function for the slide animation.
49
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
50
+ ///
51
+ @mixin animate_slide(
52
+ $direction: left,
53
+ $distance: 100%,
54
+ $duration: $animate_base_duration,
55
+ $timing-function: $animate_base_timing_function,
56
+ $iteration-count: $animate_base_iteration_count
57
+ ) {
58
+ @include animate_base(
59
+ animate_slide,
60
+ $duration,
61
+ $timing-function,
62
+ $iteration-count,
63
+ );
64
+
65
+ $translate-value: if($direction == left, -1 * $distance, $distance);
66
+
67
+ @keyframes animate_slide {
68
+ 0% { transform: translateX(0); }
69
+ 100% { transform: translateX($translate-value); }
70
+ }
71
+ }
72
+
73
+
74
+ // Slide Up Animation
75
+ // ----------------------------------------------------------------------------
76
+
77
+ ///
78
+ /// Slide Up Animation
79
+ /// Creates a slide up animation.
80
+ /// @name animate_slide_up
81
+ /// @param {Number|String} $distance [20px] - The distance the element slides up.
82
+ /// @param {Number|String} $duration [$animate_base_duration] - The duration of the slide up animation.
83
+ /// @param {String} $timing_function [ease-in-out] - The timing function for the slide up animation.
84
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
85
+ ///
86
+ @mixin animate_slide_up(
87
+ $distance: 20px,
88
+ $duration: $animate_base_duration,
89
+ $timing_function: ease-in-out,
90
+ $iteration_count: $animate_base_iteration_count
91
+ ) {
92
+ @include animate_base(
93
+ animate_slide_up,
94
+ $duration,
95
+ $timing_function,
96
+ $iteration_count,
97
+ );
98
+ @keyframes animate_slide_up {
99
+ 0%, 100% { transform: translateY(0); }
100
+ 50% { transform: translateY(-$distance); }
101
+ }
102
+ }
103
+
104
+
105
+ // Slide Down Animation
106
+ // ----------------------------------------------------------------------------
107
+
108
+ ///
109
+ /// Slide Down Animation
110
+ /// Creates a slide down animation.
111
+ /// @name animate_slide_down
112
+ /// @param {Number|String} $distance [20px] - The distance the element slides down.
113
+ /// @param {Number|String} $duration [$animate_base_duration] - The duration of the slide down animation.
114
+ /// @param {String} $timing_function [ease-in-out] - The timing function for the slide down animation.
115
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
116
+ ///
117
+ @mixin animate_slide_down(
118
+ $distance: 20px,
119
+ $duration: $animate_base_duration,
120
+ $timing_function: ease-in-out,
121
+ $iteration_count: $animate_base_iteration_count
122
+ ) {
123
+ @include animate_base(
124
+ animate_slide_down,
125
+ $duration,
126
+ $timing_function,
127
+ $iteration_count,
128
+ );
129
+ @keyframes animate_slide_down {
130
+ 0%, 100% { transform: translateY(0); }
131
+ 50% { transform: translateY($distance); }
132
+ }
133
+ }
134
+
135
+
136
+ // Slide In Left Animation
137
+ // ----------------------------------------------------------------------------
138
+
139
+ ///
140
+ /// Slide In Left Animation
141
+ /// Creates a slide in animation from the left.
142
+ /// @name animate_slide_in_left
143
+ /// @param {Number|String} $distance [100%] - The distance the element slides in from the left.
144
+ /// @param {Number|String} $duration [$animate_base_duration] - The duration of the slide in animation.
145
+ /// @param {String} $timing_function [ease-out] - The timing function for the slide in animation.
146
+ ///
147
+ @mixin animate_slide_in_left(
148
+ $distance: 100%,
149
+ $duration:
150
+ $animate_base_duration,
151
+ $timing_function: ease-out
152
+ ) {
153
+ @include animate_base(
154
+ animate_slide_in_left,
155
+ $duration,
156
+ $timing_function,
157
+ 1,
158
+ );
159
+ @keyframes animate_slide_in_left {
160
+ 0% { transform: translateX(-$distance); }
161
+ 100% { transform: translateX(0); }
162
+ }
163
+ }
164
+
165
+
166
+ // Slide In Right Animation
167
+ // ----------------------------------------------------------------------------
168
+
169
+ ///
170
+ /// Slide In Right Animation
171
+ /// Creates a slide in animation from the right.
172
+ /// @name animate_slide_in_right
173
+ /// @param {Number|String} $distance [100%] - The distance the element slides in from the right.
174
+ /// @param {Number|String} $duration [$animate_base_duration] - The duration of the slide in animation.
175
+ /// @param {String} $timing_function [ease-out] - The timing function for the slide in animation.
176
+ ///
177
+ @mixin animate_slide_in_right(
178
+ $distance: 100%,
179
+ $duration: $animate_base_duration,
180
+ $timing_function: ease-out
181
+ ) {
182
+ @include animate_base(
183
+ animate_slide_in_right,
184
+ $duration,
185
+ $timing_function,
186
+ 1,
187
+ );
188
+ @keyframes animate_slide_in_right {
189
+ 0% { transform: translateX($distance); }
190
+ 100% { transform: translateX(0); }
191
+ }
192
+ }
193
+
194
+ // Slide Out Left Animation:
195
+ // ----------------------------------------------------------------------------
196
+
197
+ ///
198
+ /// Slide Out Left Animation
199
+ /// Creates a slide out animation to the left.
200
+ /// @name animate_slide_out_left
201
+ /// @param {Number|String} $distance [100%] - The distance the element slides out to the left.
202
+ /// @param {Number|String} $duration [$animate_base_duration] - The duration of the slide out animation.
203
+ /// @param {String} $timing_function [ease-in] - The timing function for the slide out animation.
204
+ ///
205
+ @mixin animate_slide_out_left(
206
+ $distance: 100%,
207
+ $duration: $animate_base_duration,
208
+ $timing_function: ease-in,
209
+ ) {
210
+ @include animate_base(
211
+ animate_slide_out_left,
212
+ $duration,
213
+ $timing_function,
214
+ 1,
215
+ );
216
+ @keyframes animate_slide_out_left {
217
+ 0% { transform: translateX(0); }
218
+ 100% { transform: translateX(-$distance); }
219
+ }
220
+ }
221
+
222
+
223
+
224
+
225
+ // Slide Out Right Animation:
226
+ // ----------------------------------------------------------------------------
227
+
228
+ ///
229
+ /// Slide Out Right Animation
230
+ /// Creates a slide out animation to the right.
231
+ /// @name animate_slide_out_right
232
+ /// @param {Number|String} $distance [100%] - The distance the element slides out to the right.
233
+ /// @param {Number|String} $duration [$animate_base_duration] - The duration of the slide out animation.
234
+ /// @param {String} $timing_function [ease-in] - The timing function for the slide out animation.
235
+ ///
236
+ @mixin animate_slide_out_right(
237
+ $distance: 100%,
238
+ $duration: $animate_base_duration,
239
+ $timing_function: ease-in,
240
+ ) {
241
+ @include animate_base(
242
+ animate_slide_out_right,
243
+ $duration,
244
+ $timing_function,
245
+ 1,
246
+ );
247
+ @keyframes animate_slide_out_right {
248
+ 0% { transform: translateX(0); }
249
+ 100% { transform: translateX($distance); }
250
+ }
251
+ }
252
+
253
+
254
+
255
+
256
+ // Slide In Fade Animation
257
+ // ----------------------------------------------------------------------------
258
+
259
+ ///
260
+ /// Slide In Fade Animation
261
+ /// Creates a sliding animation with a fade-in effect.
262
+ /// @name animate_slide_in_fade
263
+ /// @param {String} $direction [left] - The direction from which the element slides in.
264
+ /// @param {Number|String} $distance [100%] - The distance the element slides.
265
+ /// @param {Number|String} $duration [$animate_base_duration] - The duration of the slide in fade animation.
266
+ /// @param {String} $timing_function [ease-out] - The timing function for the slide in fade animation.
267
+ ///
268
+ @mixin animate_slide_in_fade(
269
+ $direction: left,
270
+ $distance: 100%,
271
+ $duration: $animate_base_duration,
272
+ $timing-function: ease-out
273
+ ) {
274
+ @include animate_base(
275
+ animate_slide_in_fade,
276
+ $duration,
277
+ $timing-function,
278
+ 1,
279
+ );
280
+
281
+ // Calculate the translate value based on the direction
282
+ $translate-value: if($direction == left, -1 * $distance, $distance);
283
+
284
+ @keyframes animate_slide_in_fade {
285
+ 0% {
286
+ transform: translateX($translate-value);
287
+ opacity: 0;
288
+ }
289
+ 100% {
290
+ transform: translateX(0);
291
+ opacity: 1;
292
+ }
293
+ }
294
+ }
@@ -0,0 +1,219 @@
1
+ // ============================================================================
2
+ // Poster
3
+ // ============================================================================
4
+
5
+ ////
6
+ ///
7
+ /// Spin Animations Mixin Module
8
+ /// ===========================================================================
9
+ ///
10
+ /// This module ...
11
+ ///
12
+ ///
13
+ /// @group Animations
14
+ /// @author Scape Agency
15
+ /// @link https://move.gl
16
+ /// @since 0.1.0 initial release
17
+ /// @todo None
18
+ /// @access public
19
+ ///
20
+ ////
21
+
22
+
23
+ // ============================================================================
24
+ // Use
25
+ // ============================================================================
26
+
27
+ @use "../dev" as *;
28
+ @use "../variables" as *;
29
+ @use "../keyframes" as *;
30
+ @use "base" as *;
31
+
32
+
33
+ // ============================================================================
34
+ // Mixins
35
+ // ============================================================================
36
+
37
+
38
+ ///
39
+ /// Spin Animation
40
+ /// Creates a continuous spinning animation.
41
+ /// @name animate_spin
42
+ /// @param {Angle} $start_angle [0deg] - The starting angle for the spin.
43
+ /// @param {Angle} $end_angle [360deg] - The ending angle for the spin.
44
+ /// @param {Duration} $duration [$animate_base_duration] - The duration of the spin animation.
45
+ /// @param {String} $timing_function [linear] - The timing function for the spin animation.
46
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
47
+ ///
48
+ @mixin animate_spin(
49
+ $start_angle: 0deg,
50
+ $end_angle: 360deg,
51
+ $duration: $animate_base_duration,
52
+ $timing_function: linear,
53
+ $iteration_count: $animate_base_iteration_count
54
+ ) {
55
+ @include animate_base(
56
+ animate_spin,
57
+ $duration,
58
+ $timing_function,
59
+ $iteration_count,
60
+ );
61
+ @keyframes animate_spin {
62
+ from { transform: rotate($start_angle); }
63
+ to { transform: rotate($end_angle); }
64
+ }
65
+ }
66
+
67
+
68
+ // .spin {
69
+ // // position: absolute;
70
+ // // top: 50%;
71
+ // // left: 50%;
72
+ // // width: 120px;
73
+ // // height: 120px;
74
+ // // margin:-60px 0 0 -60px;
75
+ // -webkit-animation:spin 4s linear infinite;
76
+ // -moz-animation:spin 4s linear infinite;
77
+ // animation:spin 4s linear infinite;
78
+ // }
79
+ // @-moz-keyframes spin {
80
+ // 100% { -moz-transform: rotate(360deg); }
81
+ // }
82
+ // @-webkit-keyframes spin {
83
+ // 100% { -webkit-transform: rotate(360deg); }
84
+ // }
85
+ // @keyframes spin {
86
+ // 100% {
87
+ // -webkit-transform: rotate(360deg);
88
+ // transform:rotate(360deg);
89
+ // }
90
+ // }
91
+
92
+ // Spin Reverse Animation
93
+ // ----------------------------------------------------------------------------
94
+
95
+ ///
96
+ /// Spin Reverse Animation
97
+ /// Creates a reverse spinning animation.
98
+ /// @name animate_spin_reverse
99
+ /// @param {Angle} $start_angle [360deg] - The starting angle for the reverse spin.
100
+ /// @param {Angle} $end_angle [0deg] - The ending angle for the reverse spin.
101
+ /// @param {Duration} $duration [$animate_base_duration] - The duration of the spin animation.
102
+ /// @param {String} $timing_function [linear] - The timing function for the spin animation.
103
+ ///
104
+ @mixin animate_spin_reverse(
105
+ $start_angle: 360deg,
106
+ $end_angle: 0deg,
107
+ $duration: $animate_base_duration,
108
+ $timing_function: linear
109
+ ) {
110
+ @include animate_base(
111
+ animate_spin_reverse,
112
+ $duration,
113
+ $timing_function,
114
+ infinite,
115
+ );
116
+ @keyframes animate_spin_reverse {
117
+ from { transform: rotate($start_angle); }
118
+ to { transform: rotate($end_angle); }
119
+ }
120
+ }
121
+
122
+
123
+ // Spin and Grow Animation
124
+ // ----------------------------------------------------------------------------
125
+
126
+ ///
127
+ /// Spin and Grow Animation
128
+ /// Creates a spinning animation with a scaling effect.
129
+ /// @name animate_spin_grow
130
+ /// @param {Number} $scale [1.2] - The scale factor for the grow effect.
131
+ /// @param {Duration} $duration [$animate_base_duration_slow] - The duration of the animation.
132
+ /// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
133
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
134
+ ///
135
+ @mixin animate_spin_grow(
136
+ $scale: 1.2,
137
+ $duration: $animate_base_duration_slow,
138
+ $timing_function: ease-in-out,
139
+ $iteration_count: $animate_base_iteration_count
140
+ ) {
141
+ @include animate_base(
142
+ animate_spin_grow,
143
+ $duration,
144
+ $timing_function,
145
+ $iteration_count
146
+ );
147
+ @keyframes animate_spin_grow {
148
+ 0%, 100% { transform: scale(1) rotate(0deg); }
149
+ 50% { transform: scale($scale) rotate(180deg); }
150
+ }
151
+ }
152
+
153
+
154
+ // Spin Pulse Animation
155
+ // ----------------------------------------------------------------------------
156
+
157
+ ///
158
+ /// Spin Pulse Animation
159
+ /// Creates a spinning animation with a pulsing scale effect.
160
+ /// @name animate_spin_pulse
161
+ /// @param {Number} $scale_min [1] - The minimum scale for the pulse effect.
162
+ /// @param {Number} $scale_max [1.1] - The maximum scale for the pulse effect.
163
+ /// @param {Angle} $rotation_angle [360deg] - The angle for the rotation.
164
+ /// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
165
+ /// @param {String} $timing_function [linear] - The timing function for the animation.
166
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
167
+ ///
168
+ @mixin animate_spin_pulse(
169
+ $scale_min: 1,
170
+ $scale_max: 1.1,
171
+ $rotation_angle: 360deg,
172
+ $duration: $animate_base_duration,
173
+ $timing_function: linear,
174
+ $iteration_count: $animate_base_iteration_count
175
+ ) {
176
+ @include animate_base(
177
+ animate_spin_pulse,
178
+ $duration,
179
+ $timing_function,
180
+ $iteration_count,
181
+ );
182
+ @keyframes animate_spin_pulse {
183
+ 0%, 100% { transform: rotate(0deg) scale($scale_min); }
184
+ 50% { transform: rotate($rotation_angle) scale($scale_max); }
185
+ }
186
+ }
187
+
188
+
189
+ // Spin and Flip Animation
190
+ // ----------------------------------------------------------------------------
191
+
192
+ ///
193
+ /// Spin and Flip Animation
194
+ /// Creates a spinning animation with a flipping effect.
195
+ /// @name animate_spin_flip
196
+ /// @param {Angle} $rotation_angle [360deg] - The angle for the rotation.
197
+ /// @param {Angle} $flip_angle [180deg] - The angle for the flip effect.
198
+ /// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
199
+ /// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
200
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
201
+ ///
202
+ @mixin animate_spin_flip(
203
+ $rotation_angle: 360deg,
204
+ $flip-angle: 180deg,
205
+ $duration: $animate_base_duration,
206
+ $timing_function: ease-in-out,
207
+ $iteration_count: $animate_base_iteration_count
208
+ ) {
209
+ @include animate_base(
210
+ animate_spin_flip,
211
+ $duration,
212
+ $timing_function,
213
+ $iteration_count,
214
+ );
215
+ @keyframes animate_spin_flip {
216
+ 0%, 100% { transform: rotateY(0deg) rotate($rotation_angle); }
217
+ 50% { transform: rotateY($flip-angle) rotate($rotation_angle); }
218
+ }
219
+ }