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.
- package/LICENSE +21 -0
- package/README.md +38 -0
- package/css/move.gl.css +2 -0
- package/css/move.gl.min.css +2 -0
- package/package.json +55 -0
- package/scss/classes/_animations.scss +576 -0
- package/scss/classes/_index.scss +0 -0
- package/scss/classes/_transforms.scss +124 -0
- package/scss/classes/keyboard.scss +18 -0
- package/scss/classes/screensaver.scss +15 -0
- package/scss/dev/_banner.scss +36 -0
- package/scss/dev/_debug.scss +18 -0
- package/scss/dev/_deprecation.scss +10 -0
- package/scss/dev/_index.scss +8 -0
- package/scss/dev/_modules.scss +24 -0
- package/scss/effects/_filter.scss +176 -0
- package/scss/effects/_index.scss +23 -0
- package/scss/effects/_opacity.scss +62 -0
- package/scss/effects/_shadow.scss +175 -0
- package/scss/functions/_index.scss +0 -0
- package/scss/functions/scenes/_bubble.scss +19 -0
- package/scss/functions/scenes/_index.scss +20 -0
- package/scss/index.scss +0 -0
- package/scss/keyframes/_beat.scss +26 -0
- package/scss/keyframes/_index.scss +0 -0
- package/scss/maps/_index.scss +0 -0
- package/scss/maps/_mouse.scss +96 -0
- package/scss/mixins/_accessibility.scss +70 -0
- package/scss/mixins/_boot.scss +51 -0
- package/scss/mixins/_hover.scss +51 -0
- package/scss/mixins/_index.scss +0 -0
- package/scss/mixins/_selection.scss +321 -0
- package/scss/mixins/_shape.scss +44 -0
- package/scss/mixins/_touch.scss +95 -0
- package/scss/mixins/animations/--hover.scss +107 -0
- package/scss/mixins/animations/_base.scss +337 -0
- package/scss/mixins/animations/_beat.scss +119 -0
- package/scss/mixins/animations/_blink.scss +151 -0
- package/scss/mixins/animations/_bounce.scss +192 -0
- package/scss/mixins/animations/_elastic.scss +65 -0
- package/scss/mixins/animations/_fade.scss +154 -0
- package/scss/mixins/animations/_flash.scss +177 -0
- package/scss/mixins/animations/_flip.scss +72 -0
- package/scss/mixins/animations/_float.scss +126 -0
- package/scss/mixins/animations/_glow.scss +179 -0
- package/scss/mixins/animations/_heartbeat.scss +175 -0
- package/scss/mixins/animations/_hinge.scss +119 -0
- package/scss/mixins/animations/_index.scss +37 -0
- package/scss/mixins/animations/_jello.scss +129 -0
- package/scss/mixins/animations/_jiggle.scss +163 -0
- package/scss/mixins/animations/_lightspeed.scss +130 -0
- package/scss/mixins/animations/_nod.scss +161 -0
- package/scss/mixins/animations/_pop.scss +150 -0
- package/scss/mixins/animations/_pulse.scss +213 -0
- package/scss/mixins/animations/_ripple.scss +169 -0
- package/scss/mixins/animations/_roll.scss +261 -0
- package/scss/mixins/animations/_rotate.scss +428 -0
- package/scss/mixins/animations/_rubber.scss +116 -0
- package/scss/mixins/animations/_scale.scss +113 -0
- package/scss/mixins/animations/_shake.scss +182 -0
- package/scss/mixins/animations/_slide.scss +294 -0
- package/scss/mixins/animations/_spin.scss +219 -0
- package/scss/mixins/animations/_sway.scss +167 -0
- package/scss/mixins/animations/_swing.scss +247 -0
- package/scss/mixins/animations/_tada.scss +233 -0
- package/scss/mixins/animations/_twist.scss +177 -0
- package/scss/mixins/animations/_wave.scss +166 -0
- package/scss/mixins/animations/_wobble.scss +254 -0
- package/scss/mixins/animations/_zoom.scss +166 -0
- package/scss/mixins/effects/_filter.scss +148 -0
- package/scss/mixins/effects/_index.scss +0 -0
- package/scss/mixins/effects/_shadow.scss +21 -0
- package/scss/mixins/loaders/_index.scss +0 -0
- package/scss/mixins/loaders/_progress.scss +174 -0
- package/scss/mixins/loaders/_spinner.scss +101 -0
- package/scss/mixins/loaders/circle_01.scss +22 -0
- package/scss/mixins/loaders/circle_02.scss +19 -0
- package/scss/mixins/loaders/circle_03.scss +29 -0
- package/scss/mixins/loaders/circle_inner_01.scss +33 -0
- package/scss/mixins/loaders/circle_inner_02.scss +33 -0
- package/scss/mixins/loaders/circle_inner_03.scss +34 -0
- package/scss/mixins/mouse/_cursor.scss +182 -0
- package/scss/mixins/mouse/_index.scss +0 -0
- package/scss/mixins/mouse/_pointer.scss +258 -0
- package/scss/mixins/scroll/_index.scss +0 -0
- package/scss/mixins/scroll/_scroll.scss +104 -0
- package/scss/mixins/scroll/_scrollbar.scss +249 -0
- package/scss/mixins/transforms/_flip.scss +76 -0
- package/scss/mixins/transforms/_index.scss +23 -0
- package/scss/mixins/transforms/_matrix.scss +1 -0
- package/scss/mixins/transforms/_perspective.scss +11 -0
- package/scss/mixins/transforms/_rotate.scss +101 -0
- package/scss/mixins/transforms/_scale.scss +11 -0
- package/scss/mixins/transforms/_skew.scss +13 -0
- package/scss/mixins/transforms/_translate.scss +13 -0
- package/scss/mixins/transitions/_index.scss +0 -0
- package/scss/mixins/transitions/_transition.scss +13 -0
- package/scss/variables/_animation.scss +91 -0
- package/scss/variables/_index.scss +0 -0
- package/ts/ARContent.ts +27 -0
- package/ts/ARInteraction.ts +34 -0
- package/ts/AdaptiveUI.ts +25 -0
- package/ts/ContentStreaming.ts +20 -0
- package/ts/Draggable.ts +71 -0
- package/ts/DynamicEnvironment.ts +60 -0
- package/ts/Gesture.ts +168 -0
- package/ts/ImmersiveAudio.ts +40 -0
- package/ts/InteractiveCanvas.ts +177 -0
- package/ts/InteractiveVideo.ts +29 -0
- package/ts/Keyboard.ts +162 -0
- package/ts/RealTimeCollaboration.ts +25 -0
- package/ts/Screensaver.ts +140 -0
- package/ts/SpatialNavigation.ts +38 -0
- package/ts/UserProfile.ts +27 -0
- package/ts/VRExperience.ts +58 -0
- package/ts/VideoOverlay.ts +116 -0
- package/ts/index.ts +0 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Poster
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
////
|
|
6
|
+
///
|
|
7
|
+
/// Twist 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
|
+
/// Twist Animation
|
|
40
|
+
/// Creates a twist effect with scaling and rotating.
|
|
41
|
+
/// @name animate_twist
|
|
42
|
+
/// @param {Number} $scale_end [0.9] - The scale factor at the midpoint of the animation.
|
|
43
|
+
/// @param {Angle} $rotation [10deg] - The rotation angle at the midpoint of the animation.
|
|
44
|
+
/// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
|
|
45
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
46
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
47
|
+
///
|
|
48
|
+
@mixin animate_twist(
|
|
49
|
+
$scale_end: 0.9,
|
|
50
|
+
$rotation: 10deg,
|
|
51
|
+
$duration: $animate_base_duration,
|
|
52
|
+
$timing_function: ease-in-out,
|
|
53
|
+
$iteration_count: $animate_base_iteration_count
|
|
54
|
+
) {
|
|
55
|
+
@include animate_base(
|
|
56
|
+
animate_twist,
|
|
57
|
+
$duration,
|
|
58
|
+
$timing_function,
|
|
59
|
+
$iteration_count,
|
|
60
|
+
);
|
|
61
|
+
@keyframes animate_twist {
|
|
62
|
+
0%, 100% { transform: scale(1) rotate(0deg); }
|
|
63
|
+
50% { transform: scale($scale_end) rotate($rotation); }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
// Gentle Twist Animation
|
|
70
|
+
// ----------------------------------------------------------------------------
|
|
71
|
+
|
|
72
|
+
///
|
|
73
|
+
/// Gentle Twist Animation
|
|
74
|
+
/// A slower and subtler version of the Twist animation.
|
|
75
|
+
/// @name animate_twist_slow
|
|
76
|
+
/// @param {Number} $scale_end [0.95] - The scale factor at the midpoint of the animation.
|
|
77
|
+
/// @param {Angle} $rotation [5deg] - The rotation angle at the midpoint of the animation.
|
|
78
|
+
/// @param {Duration} $duration [$animate_base_duration_slow] - The duration of the animation.
|
|
79
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
80
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
81
|
+
///
|
|
82
|
+
@mixin animate_twist_slow(
|
|
83
|
+
$scale_end: 0.95,
|
|
84
|
+
$rotation: 5deg,
|
|
85
|
+
$duration: $animate_base_duration_slow,
|
|
86
|
+
$timing_function: ease-in-out,
|
|
87
|
+
$iteration_count: $animate_base_iteration_count
|
|
88
|
+
) {
|
|
89
|
+
@include animate_base(
|
|
90
|
+
animate_twist_slow,
|
|
91
|
+
$duration,
|
|
92
|
+
$timing_function,
|
|
93
|
+
$iteration_count,
|
|
94
|
+
);
|
|
95
|
+
@keyframes animate_twist_slow {
|
|
96
|
+
0%, 100% { transform: scale(1) rotate(0deg); }
|
|
97
|
+
50% { transform: scale($scale_end) rotate($rotation); }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
// Rapid Twist Animation
|
|
104
|
+
// ----------------------------------------------------------------------------
|
|
105
|
+
|
|
106
|
+
///
|
|
107
|
+
/// Rapid Twist Animation
|
|
108
|
+
/// A faster and more intense version of the Twist animation.
|
|
109
|
+
/// @name animate_twist_fast
|
|
110
|
+
/// @param {Number} $scale_end [0.85] - The scale factor at the midpoint of the animation.
|
|
111
|
+
/// @param {Angle} $rotation [15deg] - The rotation angle at the midpoint of the animation.
|
|
112
|
+
/// @param {Duration} $duration [$animate_base_duration_fast] - The duration of the animation.
|
|
113
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
114
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
115
|
+
///
|
|
116
|
+
@mixin animate_twist_fast(
|
|
117
|
+
$scale_end: 0.85,
|
|
118
|
+
$rotation: 15deg,
|
|
119
|
+
$duration: $animate_base_duration_fast,
|
|
120
|
+
$timing_function: ease-in-out,
|
|
121
|
+
$iteration_count: $animate_base_iteration_count
|
|
122
|
+
) {
|
|
123
|
+
@include animate_base(
|
|
124
|
+
animate_twist_fast,
|
|
125
|
+
$duration,
|
|
126
|
+
$timing_function,
|
|
127
|
+
$iteration_count,
|
|
128
|
+
);
|
|
129
|
+
@keyframes animate_twist_fast {
|
|
130
|
+
0%, 100% { transform: scale(1) rotate(0deg); }
|
|
131
|
+
50% { transform: scale($scale_end) rotate($rotation); }
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
// Twist with Color Change
|
|
138
|
+
// ----------------------------------------------------------------------------
|
|
139
|
+
|
|
140
|
+
///
|
|
141
|
+
/// Twist with Color Change Animation
|
|
142
|
+
/// Adds a color transition to the Twist animation.
|
|
143
|
+
/// @name animate_twist_color
|
|
144
|
+
/// @param {Number} $scale_end [0.9] - The scale factor at the midpoint of the animation.
|
|
145
|
+
/// @param {Angle} $rotation [10deg] - The rotation angle at the midpoint of the animation.
|
|
146
|
+
/// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
|
|
147
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
148
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
149
|
+
/// @param {Color} $color_start [$animate_base_color_start] - The starting color of the animation.
|
|
150
|
+
/// @param {Color} $color_end [$animate_base_color_end] - The ending color of the animation.
|
|
151
|
+
///
|
|
152
|
+
@mixin animate_twist_color(
|
|
153
|
+
$scale_end: 0.9,
|
|
154
|
+
$rotation: 10deg,
|
|
155
|
+
$duration: $animate_base_duration,
|
|
156
|
+
$timing_function: ease-in-out,
|
|
157
|
+
$iteration_count: $animate_base_iteration_count,
|
|
158
|
+
$color_start: $animate_base_color_start,
|
|
159
|
+
$color_end: $animate_base_color_end,
|
|
160
|
+
) {
|
|
161
|
+
@include animate_base(
|
|
162
|
+
animate_twist_color,
|
|
163
|
+
$duration,
|
|
164
|
+
$timing_function,
|
|
165
|
+
$iteration_count,
|
|
166
|
+
);
|
|
167
|
+
@keyframes animate_twist_color {
|
|
168
|
+
0%, 100% {
|
|
169
|
+
transform: scale(1) rotate(0deg);
|
|
170
|
+
color: $color_start;
|
|
171
|
+
}
|
|
172
|
+
50% {
|
|
173
|
+
transform: scale($scale_end) rotate($rotation);
|
|
174
|
+
color: $color_end;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Poster
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
////
|
|
6
|
+
///
|
|
7
|
+
/// Wave 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
|
+
/// Wave Animation
|
|
42
|
+
/// Creates a wave effect by rotating an element back and forth.
|
|
43
|
+
/// @name animate_wave
|
|
44
|
+
/// @param {Angle} $angle [20deg] - The maximum rotation angle during the wave.
|
|
45
|
+
/// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
|
|
46
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
47
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
48
|
+
///
|
|
49
|
+
@mixin animate_wave(
|
|
50
|
+
$angle: 20deg,
|
|
51
|
+
$duration: $animate_base_duration,
|
|
52
|
+
$timing_function: ease-in-out,
|
|
53
|
+
$iteration_count: $animate_base_iteration_count
|
|
54
|
+
) {
|
|
55
|
+
@include animate_base(
|
|
56
|
+
animate_wave,
|
|
57
|
+
$duration,
|
|
58
|
+
$timing_function,
|
|
59
|
+
$iteration_count,
|
|
60
|
+
);
|
|
61
|
+
@keyframes animate_wave {
|
|
62
|
+
0%, 100% { transform: rotate(0deg); }
|
|
63
|
+
50% { transform: rotate($angle); }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
// Gentle Wave Animation
|
|
69
|
+
// ----------------------------------------------------------------------------
|
|
70
|
+
|
|
71
|
+
///
|
|
72
|
+
/// Gentle Wave Animation
|
|
73
|
+
/// A slower and subtler wave animation.
|
|
74
|
+
/// @name animate_wave_slow
|
|
75
|
+
/// @param {Angle} $angle [10deg] - The maximum rotation angle during the wave.
|
|
76
|
+
/// @param {Duration} $duration [$animate_base_duration_slow] - The duration of the animation.
|
|
77
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
78
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
79
|
+
///
|
|
80
|
+
@mixin animate_wave_slow(
|
|
81
|
+
$angle: 10deg,
|
|
82
|
+
$duration: $animate_base_duration_slow,
|
|
83
|
+
$timing_function: ease-in-out,
|
|
84
|
+
$iteration_count: $animate_base_iteration_count
|
|
85
|
+
) {
|
|
86
|
+
@include animate_base(
|
|
87
|
+
animate_wave_slow,
|
|
88
|
+
$duration,
|
|
89
|
+
$timing_function,
|
|
90
|
+
$iteration_count,
|
|
91
|
+
);
|
|
92
|
+
@keyframes animate_wave_slow {
|
|
93
|
+
0%, 100% { transform: rotate(0deg); }
|
|
94
|
+
50% { transform: rotate($angle); }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
// Rapid Wave Animation
|
|
101
|
+
// ----------------------------------------------------------------------------
|
|
102
|
+
|
|
103
|
+
///
|
|
104
|
+
/// Rapid Wave Animation
|
|
105
|
+
/// A faster and more intense wave animation.
|
|
106
|
+
/// @name animate_wave_fast
|
|
107
|
+
/// @param {Angle} $angle [30deg] - The maximum rotation angle during the wave.
|
|
108
|
+
/// @param {Duration} $duration [$animate_base_duration_fast] - The duration of the animation.
|
|
109
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
110
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
111
|
+
///
|
|
112
|
+
@mixin animate_wave_fast(
|
|
113
|
+
$angle: 30deg,
|
|
114
|
+
$duration: $animate_base_duration_fast,
|
|
115
|
+
$timing_function: ease-in-out,
|
|
116
|
+
$iteration_count: $animate_base_iteration_count
|
|
117
|
+
) {
|
|
118
|
+
@include animate_base(
|
|
119
|
+
animate_wave_fast,
|
|
120
|
+
$duration,
|
|
121
|
+
$timing_function,
|
|
122
|
+
$iteration_count,
|
|
123
|
+
);
|
|
124
|
+
@keyframes animate_wave_fast {
|
|
125
|
+
0%, 100% { transform: rotate(0deg); }
|
|
126
|
+
50% { transform: rotate($angle); }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
// Wave with Fade Animation
|
|
133
|
+
// ----------------------------------------------------------------------------
|
|
134
|
+
|
|
135
|
+
///
|
|
136
|
+
/// Wave with Fade Animation
|
|
137
|
+
/// A wave animation combined with a fading effect.
|
|
138
|
+
/// @name animate_wave_fade
|
|
139
|
+
/// @param {Angle} $angle [20deg] - The maximum rotation angle during the wave.
|
|
140
|
+
/// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
|
|
141
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
142
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
143
|
+
///
|
|
144
|
+
@mixin animate_wave_fade(
|
|
145
|
+
$angle: 20deg,
|
|
146
|
+
$duration: $animate_base_duration,
|
|
147
|
+
$timing_function: ease-in-out,
|
|
148
|
+
$iteration_count: $animate_base_iteration_count
|
|
149
|
+
) {
|
|
150
|
+
@include animate_base(
|
|
151
|
+
animate_wave_fade
|
|
152
|
+
$duration,
|
|
153
|
+
$timing_function,
|
|
154
|
+
$iteration_count,
|
|
155
|
+
);
|
|
156
|
+
@keyframes animate_wave_fade {
|
|
157
|
+
0%, 100% {
|
|
158
|
+
transform: rotate(0deg);
|
|
159
|
+
opacity: 1;
|
|
160
|
+
}
|
|
161
|
+
50% {
|
|
162
|
+
transform: rotate($angle);
|
|
163
|
+
opacity: 0.5;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Poster
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
////
|
|
6
|
+
///
|
|
7
|
+
/// Wobble 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
|
+
/// Wobble Animation
|
|
43
|
+
/// Creates a wobble effect by rotating an element back and forth.
|
|
44
|
+
/// @name animate_wobble
|
|
45
|
+
/// @param {Angle} $angle [5deg] - The maximum rotation angle during the wobble.
|
|
46
|
+
/// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
|
|
47
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
48
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
49
|
+
///
|
|
50
|
+
@mixin animate_wobble(
|
|
51
|
+
$angle: 5deg,
|
|
52
|
+
$duration: $animate_base_duration,
|
|
53
|
+
$timing_function: ease-in-out,
|
|
54
|
+
$iteration_count: $animate_base_iteration_count
|
|
55
|
+
) {
|
|
56
|
+
@include animate_base(
|
|
57
|
+
animate_wobble,
|
|
58
|
+
$duration,
|
|
59
|
+
$timing_function,
|
|
60
|
+
$iteration_count,
|
|
61
|
+
);
|
|
62
|
+
@keyframes animate_wobble {
|
|
63
|
+
0%, 100% { transform: rotate(0deg); }
|
|
64
|
+
25% { transform: rotate(-$angle); }
|
|
65
|
+
50% { transform: rotate($angle); }
|
|
66
|
+
75% { transform: rotate(-$angle); }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
// Gentle Wobble Animation
|
|
72
|
+
// ----------------------------------------------------------------------------
|
|
73
|
+
|
|
74
|
+
///
|
|
75
|
+
/// Gentle Wobble Animation
|
|
76
|
+
/// A slower and subtler wobble animation.
|
|
77
|
+
/// @name animate_wobble_slow
|
|
78
|
+
/// @param {Angle} $angle [3deg] - The maximum rotation angle during the wobble.
|
|
79
|
+
/// @param {Duration} $duration [$animate_base_duration_slow] - The duration of the animation.
|
|
80
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
81
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
82
|
+
///
|
|
83
|
+
@mixin animate_wobble_slow(
|
|
84
|
+
$angle: 3deg,
|
|
85
|
+
$duration: $animate_base_duration_slow,
|
|
86
|
+
$timing_function: ease-in-out,
|
|
87
|
+
$iteration_count: $animate_base_iteration_count
|
|
88
|
+
) {
|
|
89
|
+
@include animate_base(
|
|
90
|
+
animate_wobble_slow,
|
|
91
|
+
$duration,
|
|
92
|
+
$timing_function,
|
|
93
|
+
$iteration_count,
|
|
94
|
+
);
|
|
95
|
+
@keyframes animate_wobble_slow {
|
|
96
|
+
0%, 100% { transform: rotate(0deg); }
|
|
97
|
+
25% { transform: rotate(-$angle); }
|
|
98
|
+
50% { transform: rotate($angle); }
|
|
99
|
+
75% { transform: rotate(-$angle); }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
// Rapid Wobble Animation
|
|
105
|
+
// ----------------------------------------------------------------------------
|
|
106
|
+
|
|
107
|
+
///
|
|
108
|
+
/// Rapid Wobble Animation
|
|
109
|
+
/// A faster and more intense wobble animation.
|
|
110
|
+
/// @name animate_wobble_fast
|
|
111
|
+
/// @param {Angle} $angle [10deg] - The maximum rotation angle during the wobble.
|
|
112
|
+
/// @param {Duration} $duration [$animate_base_duration_fast] - The duration of the animation.
|
|
113
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
114
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
115
|
+
///
|
|
116
|
+
@mixin animate_wobble_fast(
|
|
117
|
+
$angle: 10deg,
|
|
118
|
+
$duration: $animate_base_duration_fast,
|
|
119
|
+
$timing_function: ease-in-out,
|
|
120
|
+
$iteration_count: $animate_base_iteration_count
|
|
121
|
+
) {
|
|
122
|
+
@include animate_base(
|
|
123
|
+
animate_wobble_fast,
|
|
124
|
+
$duration,
|
|
125
|
+
$timing_function,
|
|
126
|
+
$iteration_count,
|
|
127
|
+
);
|
|
128
|
+
@keyframes animate_wobble_fast {
|
|
129
|
+
0%, 100% { transform: rotate(0deg); }
|
|
130
|
+
25% { transform: rotate(-$angle); }
|
|
131
|
+
50% { transform: rotate($angle); }
|
|
132
|
+
75% { transform: rotate(-$angle); }
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
// Wobble with Scale Animation
|
|
138
|
+
// ----------------------------------------------------------------------------
|
|
139
|
+
|
|
140
|
+
///
|
|
141
|
+
/// Wobble with Scale Animation
|
|
142
|
+
/// A wobble animation combined with a scaling effect.
|
|
143
|
+
/// @name animate_wobble_scale
|
|
144
|
+
/// @param {Angle} $angle [5deg] - The maximum rotation angle during the wobble.
|
|
145
|
+
/// @param {Number} $scale [1.1] - The scale factor during the wobble.
|
|
146
|
+
/// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
|
|
147
|
+
/// @param {String} $timing_function [ease-in-out] - The timing function for the animation.
|
|
148
|
+
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
|
|
149
|
+
///
|
|
150
|
+
@mixin animate_wobble_scale(
|
|
151
|
+
$angle: 5deg,
|
|
152
|
+
$scale: 1.1,
|
|
153
|
+
$duration: $animate_base_duration,
|
|
154
|
+
$timing_function: ease-in-out,
|
|
155
|
+
$iteration_count: $animate_base_iteration_count
|
|
156
|
+
) {
|
|
157
|
+
@include animate_base(
|
|
158
|
+
animate_wobble_scale,
|
|
159
|
+
$duration,
|
|
160
|
+
$timing_function,
|
|
161
|
+
$iteration_count,
|
|
162
|
+
);
|
|
163
|
+
@keyframes animate_wobble_scale {
|
|
164
|
+
0%, 100% { transform: scale(1) rotate(0deg); }
|
|
165
|
+
25% { transform: scale($scale) rotate(-$angle); }
|
|
166
|
+
50% { transform: scale($scale) rotate($angle); }
|
|
167
|
+
75% { transform: scale($scale) rotate(-$angle); }
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
// originally authored by Nick Pettit - https://github.com/nickpettit/glide
|
|
175
|
+
|
|
176
|
+
// @-webkit-keyframes wobble {
|
|
177
|
+
// from {
|
|
178
|
+
// -webkit-transform: none;
|
|
179
|
+
// transform: none;
|
|
180
|
+
// }
|
|
181
|
+
|
|
182
|
+
// 15% {
|
|
183
|
+
// -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
|
|
184
|
+
// transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
|
|
185
|
+
// }
|
|
186
|
+
|
|
187
|
+
// 30% {
|
|
188
|
+
// -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
|
|
189
|
+
// transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
|
|
190
|
+
// }
|
|
191
|
+
|
|
192
|
+
// 45% {
|
|
193
|
+
// -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
|
|
194
|
+
// transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
|
|
195
|
+
// }
|
|
196
|
+
|
|
197
|
+
// 60% {
|
|
198
|
+
// -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
|
|
199
|
+
// transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
|
|
200
|
+
// }
|
|
201
|
+
|
|
202
|
+
// 75% {
|
|
203
|
+
// -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
|
|
204
|
+
// transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
|
|
205
|
+
// }
|
|
206
|
+
|
|
207
|
+
// 100% {
|
|
208
|
+
// -webkit-transform: none;
|
|
209
|
+
// transform: none;
|
|
210
|
+
// }
|
|
211
|
+
// }
|
|
212
|
+
|
|
213
|
+
// @keyframes wobble {
|
|
214
|
+
// from {
|
|
215
|
+
// -webkit-transform: none;
|
|
216
|
+
// transform: none;
|
|
217
|
+
// }
|
|
218
|
+
|
|
219
|
+
// 15% {
|
|
220
|
+
// -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
|
|
221
|
+
// transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
|
|
222
|
+
// }
|
|
223
|
+
|
|
224
|
+
// 30% {
|
|
225
|
+
// -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
|
|
226
|
+
// transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
|
|
227
|
+
// }
|
|
228
|
+
|
|
229
|
+
// 45% {
|
|
230
|
+
// -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
|
|
231
|
+
// transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
|
|
232
|
+
// }
|
|
233
|
+
|
|
234
|
+
// 60% {
|
|
235
|
+
// -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
|
|
236
|
+
// transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
|
|
237
|
+
// }
|
|
238
|
+
|
|
239
|
+
// 75% {
|
|
240
|
+
// -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
|
|
241
|
+
// transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
|
|
242
|
+
// }
|
|
243
|
+
|
|
244
|
+
// 100% {
|
|
245
|
+
// -webkit-transform: none;
|
|
246
|
+
// transform: none;
|
|
247
|
+
// }
|
|
248
|
+
// }
|
|
249
|
+
|
|
250
|
+
// .wobble {
|
|
251
|
+
// -webkit-animation-name: wobble;
|
|
252
|
+
// animation-name: wobble;
|
|
253
|
+
// }
|
|
254
|
+
|