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,175 @@
1
+ // ============================================================================
2
+ // Poster
3
+ // ============================================================================
4
+
5
+ ////
6
+ ///
7
+ /// Heartbeat 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
+ /// Heartbeat Animation
40
+ /// Creates a heartbeat animation where the element scales up and down.
41
+ ///
42
+ /// @name animate_heartbeat
43
+ /// @param {Number} $scale_min [0.9] - The minimum scale of the heartbeat.
44
+ /// @param {Number} $scale_max [1.1] - The maximum scale of the heartbeat.
45
+ /// @param {Number|String} $duration [$animate_base_duration] - The duration of the heartbeat animation.
46
+ /// @param {String} $timing_function [linear] - The timing function for the heartbeat animation.
47
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
48
+ ///
49
+ @mixin animate_heartbeat(
50
+ $scale_min: 0.9,
51
+ $scale_max: 1.1,
52
+ $duration: $animate_base_duration,
53
+ $timing_function: linear,
54
+ $iteration_count: $animate_base_iteration_count
55
+ ) {
56
+ @include animate_base(
57
+ animate_heartbeat,
58
+ $duration,
59
+ $timing_function,
60
+ $iteration_count,
61
+ );
62
+ @keyframes animate_heartbeat {
63
+ 0%, 100% { transform: scale(1); }
64
+ 25% { transform: scale($scale_min); }
65
+ 50% { transform: scale($scale_max); }
66
+ 75% { transform: scale($scale_min); }
67
+ }
68
+ }
69
+
70
+
71
+
72
+ ///
73
+ /// Rapid Heartbeat Animation
74
+ /// Creates a rapid heartbeat animation with faster scaling transitions.
75
+ ///
76
+ /// @name animate_heartbeat_fast
77
+ /// @param {Number} $scale_min [0.85] - The minimum scale of the heartbeat.
78
+ /// @param {Number} $scale_max [1.15] - The maximum scale of the heartbeat.
79
+ /// @param {Number|String} $duration [$animate_base_duration_fast] - The duration of the heartbeat animation.
80
+ /// @param {String} $timing_function [linear] - The timing function for the heartbeat animation.
81
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
82
+ ///
83
+ @mixin animate_heartbeat_fast(
84
+ $scale_min: 0.85,
85
+ $scale_max: 1.15,
86
+ $duration: $animate_base_duration_fast,
87
+ $timing_function: linear,
88
+ $iteration_count: $animate_base_iteration_count
89
+ ) {
90
+ @include animate_base(
91
+ animate_heartbeat_fast,
92
+ $duration,
93
+ $timing_function,
94
+ $iteration_count,
95
+ );
96
+ @keyframes animate_heartbeat_fast {
97
+ 0%, 100% { transform: scale(1); }
98
+ 14%, 86% { transform: scale($scale_min); }
99
+ 28%, 72% { transform: scale($scale_max); }
100
+ 42%, 58% { transform: scale($scale_min); }
101
+ }
102
+ }
103
+
104
+
105
+ ///
106
+ /// Slow Heartbeat Animation
107
+ /// Creates a slow heartbeat animation with more gradual scaling transitions.
108
+ /// @name animate_heartbeat_slow
109
+ /// @param {Number} $scale_min [0.95] - The minimum scale of the heartbeat.
110
+ /// @param {Number} $scale_max [1.05] - The maximum scale of the heartbeat.
111
+ /// @param {Number|String} $duration [$animate_base_duration_slow] - The duration of the heartbeat animation.
112
+ /// @param {String} $timing_function [ease-in-out] - The timing function for the heartbeat animation.
113
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
114
+ ///
115
+ @mixin animate_heartbeat_slow(
116
+ $scale_min: 0.95,
117
+ $scale_max: 1.05,
118
+ $duration: $animate_base_duration_slow,
119
+ $timing_function: ease-in-out,
120
+ $iteration_count: $animate_base_iteration_count
121
+ ) {
122
+ @include animate_base(
123
+ animate_heartbeat_slow,
124
+ $duration,
125
+ $timing_function,
126
+ $iteration_count
127
+ );
128
+ @keyframes animate_heartbeat_slow {
129
+ 0%, 100% { transform: scale(1); }
130
+ 25% { transform: scale($scale_min); }
131
+ 50% { transform: scale($scale_max); }
132
+ 75% { transform: scale($scale_min); }
133
+ }
134
+ }
135
+
136
+
137
+
138
+ ///
139
+ /// Heartbeat with Color Change
140
+ /// Creates a heartbeat animation that includes a color transition.
141
+ /// @name animate_heartbeat_color
142
+ /// @param {Number} $scale_min [0.9] - The minimum scale of the heartbeat.
143
+ /// @param {Number} $scale_max [1.1] - The maximum scale of the heartbeat.
144
+ /// @param {Number|String} $duration [$animate_base_duration] - The duration of the heartbeat animation.
145
+ /// @param {String} $timing_function [linear] - The timing function for the heartbeat animation.
146
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
147
+ /// @param {Color} $color_start [$animate_base_color_start] - The starting color of the element.
148
+ /// @param {Color} $color_end [$animate_base_color_end] - The ending color of the element.
149
+ ///
150
+ @mixin animate_heartbeat_color(
151
+ $scale_min: 0.9,
152
+ $scale_max: 1.1,
153
+ $duration: $animate_base_duration,
154
+ $timing_function: linear,
155
+ $iteration_count: $animate_base_iteration_count,
156
+ $color_start: $animate_base_color_start,
157
+ $color_end: $animate_base_color_end,
158
+ ) {
159
+ @include animate_base(
160
+ animate_heartbeat_color,
161
+ $duration,
162
+ $timing_function,
163
+ $iteration_count,
164
+ );
165
+ @keyframes animate_heartbeat_color {
166
+ 0%, 100% {
167
+ transform: scale(1);
168
+ color: $color_start;
169
+ }
170
+ 50% {
171
+ transform: scale($scale_max);
172
+ color: $color_end;
173
+ }
174
+ }
175
+ }
@@ -0,0 +1,119 @@
1
+ // ============================================================================
2
+ // Poster
3
+ // ============================================================================
4
+
5
+ ////
6
+ ///
7
+ /// Hinge 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
+ // .animated.hinge {
42
+ // -webkit-animation-duration: 2s;
43
+ // animation-duration: 2s;
44
+ // }
45
+
46
+
47
+ // @-webkit-keyframes hinge {
48
+ // 0% {
49
+ // -webkit-transform-origin: top left;
50
+ // transform-origin: top left;
51
+ // -webkit-animation-timing-function: ease-in-out;
52
+ // animation-timing-function: ease-in-out;
53
+ // }
54
+
55
+ // 20%, 60% {
56
+ // -webkit-transform: rotate3d(0, 0, 1, 80deg);
57
+ // transform: rotate3d(0, 0, 1, 80deg);
58
+ // -webkit-transform-origin: top left;
59
+ // transform-origin: top left;
60
+ // -webkit-animation-timing-function: ease-in-out;
61
+ // animation-timing-function: ease-in-out;
62
+ // }
63
+
64
+ // 40%, 80% {
65
+ // -webkit-transform: rotate3d(0, 0, 1, 60deg);
66
+ // transform: rotate3d(0, 0, 1, 60deg);
67
+ // -webkit-transform-origin: top left;
68
+ // transform-origin: top left;
69
+ // -webkit-animation-timing-function: ease-in-out;
70
+ // animation-timing-function: ease-in-out;
71
+ // opacity: 1;
72
+ // }
73
+
74
+ // 100% {
75
+ // -webkit-transform: translate3d(0, 700px, 0);
76
+ // transform: translate3d(0, 700px, 0);
77
+ // opacity: 0;
78
+ // }
79
+ // }
80
+
81
+ // @keyframes hinge {
82
+ // 0% {
83
+ // -webkit-transform-origin: top left;
84
+ // transform-origin: top left;
85
+ // -webkit-animation-timing-function: ease-in-out;
86
+ // animation-timing-function: ease-in-out;
87
+ // }
88
+
89
+ // 20%, 60% {
90
+ // -webkit-transform: rotate3d(0, 0, 1, 80deg);
91
+ // transform: rotate3d(0, 0, 1, 80deg);
92
+ // -webkit-transform-origin: top left;
93
+ // transform-origin: top left;
94
+ // -webkit-animation-timing-function: ease-in-out;
95
+ // animation-timing-function: ease-in-out;
96
+ // }
97
+
98
+ // 40%, 80% {
99
+ // -webkit-transform: rotate3d(0, 0, 1, 60deg);
100
+ // transform: rotate3d(0, 0, 1, 60deg);
101
+ // -webkit-transform-origin: top left;
102
+ // transform-origin: top left;
103
+ // -webkit-animation-timing-function: ease-in-out;
104
+ // animation-timing-function: ease-in-out;
105
+ // opacity: 1;
106
+ // }
107
+
108
+ // 100% {
109
+ // -webkit-transform: translate3d(0, 700px, 0);
110
+ // transform: translate3d(0, 700px, 0);
111
+ // opacity: 0;
112
+ // }
113
+ // }
114
+
115
+ // .hinge {
116
+ // -webkit-animation-name: hinge;
117
+ // animation-name: hinge;
118
+ // }
119
+
@@ -0,0 +1,37 @@
1
+ // ============================================================================
2
+ // StyleScape | Animations | Index
3
+ // ============================================================================
4
+
5
+ @forward "base";
6
+ @forward "beat";
7
+ @forward "blink";
8
+ @forward "bounce";
9
+ @forward "elastic";
10
+ @forward "fade";
11
+ @forward "flash";
12
+ @forward "flip";
13
+ @forward "float";
14
+ @forward "glow";
15
+ @forward "heartbeat";
16
+ @forward "hinge";
17
+ @forward "jello";
18
+ @forward "jiggle";
19
+ @forward "lightspeed";
20
+ @forward "nod";
21
+ @forward "pop";
22
+ @forward "pulse";
23
+ @forward "ripple";
24
+ @forward "roll";
25
+ @forward "rotate";
26
+ @forward "rubber";
27
+ @forward "scale";
28
+ @forward "shake";
29
+ @forward "slide";
30
+ @forward "spin";
31
+ @forward "sway";
32
+ @forward "swing";
33
+ @forward "tada";
34
+ @forward "twist";
35
+ @forward "wave";
36
+ @forward "wobble";
37
+ @forward "zoom";
@@ -0,0 +1,129 @@
1
+ // ============================================================================
2
+ // Poster
3
+ // ============================================================================
4
+
5
+ ////
6
+ ///
7
+ /// Jello 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
+ // @-webkit-keyframes jello {
41
+ // from, 11.1%, 100% {
42
+ // -webkit-transform: none;
43
+ // transform: none;
44
+ // }
45
+
46
+ // 22.2% {
47
+ // -webkit-transform: skewX(-12.5deg) skewY(-12.5deg);
48
+ // transform: skewX(-12.5deg) skewY(-12.5deg);
49
+ // }
50
+
51
+ // 33.3% {
52
+ // -webkit-transform: skewX(6.25deg) skewY(6.25deg);
53
+ // transform: skewX(6.25deg) skewY(6.25deg);
54
+ // }
55
+
56
+ // 44.4% {
57
+ // -webkit-transform: skewX(-3.125deg) skewY(-3.125deg);
58
+ // transform: skewX(-3.125deg) skewY(-3.125deg);
59
+ // }
60
+
61
+ // 55.5% {
62
+ // -webkit-transform: skewX(1.5625deg) skewY(1.5625deg);
63
+ // transform: skewX(1.5625deg) skewY(1.5625deg);
64
+ // }
65
+
66
+ // 66.6% {
67
+ // -webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg);
68
+ // transform: skewX(-0.78125deg) skewY(-0.78125deg);
69
+ // }
70
+
71
+ // 77.7% {
72
+ // -webkit-transform: skewX(0.390625deg) skewY(0.390625deg);
73
+ // transform: skewX(0.390625deg) skewY(0.390625deg);
74
+ // }
75
+
76
+ // 88.8% {
77
+ // -webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
78
+ // transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
79
+ // }
80
+ // }
81
+
82
+ // @keyframes jello {
83
+ // from, 11.1%, 100% {
84
+ // -webkit-transform: none;
85
+ // transform: none;
86
+ // }
87
+
88
+ // 22.2% {
89
+ // -webkit-transform: skewX(-12.5deg) skewY(-12.5deg);
90
+ // transform: skewX(-12.5deg) skewY(-12.5deg);
91
+ // }
92
+
93
+ // 33.3% {
94
+ // -webkit-transform: skewX(6.25deg) skewY(6.25deg);
95
+ // transform: skewX(6.25deg) skewY(6.25deg);
96
+ // }
97
+
98
+ // 44.4% {
99
+ // -webkit-transform: skewX(-3.125deg) skewY(-3.125deg);
100
+ // transform: skewX(-3.125deg) skewY(-3.125deg);
101
+ // }
102
+
103
+ // 55.5% {
104
+ // -webkit-transform: skewX(1.5625deg) skewY(1.5625deg);
105
+ // transform: skewX(1.5625deg) skewY(1.5625deg);
106
+ // }
107
+
108
+ // 66.6% {
109
+ // -webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg);
110
+ // transform: skewX(-0.78125deg) skewY(-0.78125deg);
111
+ // }
112
+
113
+ // 77.7% {
114
+ // -webkit-transform: skewX(0.390625deg) skewY(0.390625deg);
115
+ // transform: skewX(0.390625deg) skewY(0.390625deg);
116
+ // }
117
+
118
+ // 88.8% {
119
+ // -webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
120
+ // transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
121
+ // }
122
+ // }
123
+
124
+ // .jello {
125
+ // -webkit-animation-name: jello;
126
+ // animation-name: jello;
127
+ // -webkit-transform-origin: center;
128
+ // transform-origin: center;
129
+ // }
@@ -0,0 +1,163 @@
1
+ // ============================================================================
2
+ // Poster
3
+ // ============================================================================
4
+
5
+ ////
6
+ ///
7
+ /// Jiggle 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
+ /// Jiggle Animation
40
+ /// Creates a horizontal jiggle animation where the element moves left and
41
+ /// right.
42
+ ///
43
+ /// @name animate_jiggle
44
+ /// @param {Number|String} $amplitude [5px] - The distance the element moves during the jiggle.
45
+ /// @param {Number|String} $duration [$animate_base_duration_fast] - The duration of the jiggle animation.
46
+ /// @param {String} $timing_function [ease-in-out] - The timing function for the jiggle animation.
47
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
48
+ ///
49
+ @mixin animate_jiggle(
50
+ $amplitude: 5px,
51
+ $duration: $animate_base_duration_fast,
52
+ $timing_function: ease-in-out,
53
+ $iteration_count: $animate_base_iteration_count
54
+ ) {
55
+ @include animate_base(
56
+ animate_jiggle,
57
+ $duration,
58
+ $timing_function,
59
+ $iteration_count,
60
+ );
61
+ @keyframes animate_jiggle {
62
+ 0%, 100% { transform: translateX(0); }
63
+ 25% { transform: translateX(-$amplitude); }
64
+ 50% { transform: translateX($amplitude); }
65
+ 75% { transform: translateX(-$amplitude); }
66
+ }
67
+ }
68
+
69
+
70
+
71
+ ///
72
+ /// Vertical Jiggle Animation
73
+ /// Creates a vertical jiggle animation where the element moves up and down.
74
+ ///
75
+ /// @name animate_jiggle_vertical
76
+ /// @param {Number|String} $amplitude [5px] - The distance the element moves during the jiggle.
77
+ /// @param {Number|String} $duration [$animate_base_duration_fast] - The duration of the jiggle animation.
78
+ /// @param {String} $timing_function [ease-in-out] - The timing function for the jiggle animation.
79
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
80
+ ///
81
+ @mixin animate_jiggle_vertical(
82
+ $amplitude: 5px,
83
+ $duration: $animate_base_duration_fast,
84
+ $timing_function: ease-in-out,
85
+ $iteration_count: $animate_base_iteration_count
86
+ ) {
87
+ @include animate_base(
88
+ animate_jiggle_vertical,
89
+ $duration,
90
+ $timing_function,
91
+ $iteration_count,
92
+ );
93
+ @keyframes animate_jiggle_vertical {
94
+ 0%, 100% { transform: translateY(0); }
95
+ 25% { transform: translateY(-$amplitude); }
96
+ 50% { transform: translateY($amplitude); }
97
+ 75% { transform: translateY(-$amplitude); }
98
+ }
99
+ }
100
+
101
+
102
+
103
+ ///
104
+ /// Multi-Directional Jiggle Animation
105
+ /// Creates a jiggle animation where the element moves in both X and Y
106
+ /// directions.
107
+ ///
108
+ /// @name animate_jiggle_multi
109
+ /// @param {Number|String} $amplitude [5px] - The distance the element moves during the jiggle.
110
+ /// @param {Number|String} $duration [$animate_base_duration_fast] - The duration of the jiggle animation.
111
+ /// @param {String} $timing_function [ease-in-out] - The timing function for the jiggle animation.
112
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
113
+ ///
114
+ @mixin animate_jiggle_multi(
115
+ $amplitude: 5px,
116
+ $duration: $animate_base_duration_fast,
117
+ $timing_function: ease-in-out,
118
+ $iteration_count: $animate_base_iteration_count
119
+ ) {
120
+ @include animate_base(
121
+ animate_jiggle_multi,
122
+ $duration,
123
+ $timing_function,
124
+ $iteration_count,
125
+ );
126
+ @keyframes animate_jiggle_multi {
127
+ 0%, 100% { transform: translate(0, 0); }
128
+ 25% { transform: translate(-$amplitude, $amplitude); }
129
+ 50% { transform: translate($amplitude, -$amplitude); }
130
+ 75% { transform: translate(-$amplitude, $amplitude); }
131
+ }
132
+ }
133
+
134
+
135
+ ///
136
+ /// Gentle Jiggle Animation
137
+ /// Creates a gentler jiggle animation with slower transitions.
138
+ ///
139
+ /// @name animate_jiggle_slow
140
+ /// @param {Number|String} $amplitude [3px] - The distance the element moves during the jiggle.
141
+ /// @param {Number|String} $duration [$animate_base_duration] - The duration of the jiggle animation.
142
+ /// @param {String} $timing_function [ease-in-out] - The timing function for the jiggle animation.
143
+ /// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
144
+ ///
145
+ @mixin animate_jiggle_slow(
146
+ $amplitude: 3px,
147
+ $duration: $animate_base_duration,
148
+ $timing_function: ease-in-out,
149
+ $iteration_count: $animate_base_iteration_count
150
+ ) {
151
+ @include animate_base(
152
+ animate_jiggle_slow,
153
+ $duration,
154
+ $timing_function,
155
+ $iteration_count,
156
+ );
157
+ @keyframes animate_jiggle_slow {
158
+ 0%, 100% { transform: translateX(0); }
159
+ 25% { transform: translateX(-$amplitude); }
160
+ 50% { transform: translateX($amplitude); }
161
+ 75% { transform: translateX(-$amplitude); }
162
+ }
163
+ }