animation-studio 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA512:
|
3
|
-
|
4
|
-
|
3
|
+
metadata.gz: df8bd64a630927ce031c299e21ec7e9e9916306d00d50ace074d4fe8039d776dc005a035604f4c8125313a522e15660b0cf610831c01bfa5f4805b1faf8f8db2
|
4
|
+
data.tar.gz: 6eefaf8d2e1f68e2bb81cbb7831976f27aef3a58dfc49a81e1b3567a7591e98895971978180bffb8191961249e29f364facbb44e42840f6b6c6b7ff9e58282e6
|
5
5
|
SHA1:
|
6
|
-
|
7
|
-
|
6
|
+
metadata.gz: cb025bcb7a5d3322c39237864f98930097cf39a5
|
7
|
+
data.tar.gz: 550b3a795d8e9dd43286b6f3f5ebca1f3514cacb
|
data/lib/animation-studio.rb
CHANGED
@@ -2,17 +2,24 @@
|
|
2
2
|
@import "compass/css3/animation";
|
3
3
|
|
4
4
|
$animation-sequence-name: 'walk-cycle' !default;
|
5
|
+
$animation-sequence-extend: true !default;
|
5
6
|
|
6
|
-
@mixin animation-sequence-sprite-generator($folder) {
|
7
|
+
@mixin animation-sequence-sprite-generator($folder, $generate-extendable: $animation-sequence-extend) {
|
7
8
|
$png-path: $folder + '/*.png';
|
8
9
|
$png-path: sprite-map($png-path);
|
9
10
|
|
10
|
-
|
11
|
+
@if $generate-extendable {
|
12
|
+
%#{sprite-map-name($png-path)}-animation-sequence {
|
13
|
+
background: $png-path 0 0 no-repeat;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
@else {
|
11
17
|
background: $png-path 0 0 no-repeat;
|
12
18
|
}
|
19
|
+
|
13
20
|
}
|
14
21
|
|
15
|
-
@mixin animation-sequence($folder, $time, $animation:$animation-sequence-name) {
|
22
|
+
@mixin animation-sequence($folder, $time, $animation:$animation-sequence-name, $extend: $animation-sequence-extend) {
|
16
23
|
$png-path: $folder + '/*.png';
|
17
24
|
$sprite-map: sprite-map($png-path);
|
18
25
|
$sprite-path: sprite-path($sprite-map);
|
@@ -25,7 +32,13 @@ $animation-sequence-name: 'walk-cycle' !default;
|
|
25
32
|
height: $height / $steps;
|
26
33
|
width: $width;
|
27
34
|
|
28
|
-
@extend
|
35
|
+
@if $extend {
|
36
|
+
@extend %#{sprite-map-name($sprite-map)}-animation-sequence;
|
37
|
+
}
|
38
|
+
@else {
|
39
|
+
@include animation-sequence-sprite-generator($folder, $extend);
|
40
|
+
}
|
41
|
+
|
29
42
|
@include animation(unquote($animation) $time steps($steps) infinite);
|
30
43
|
}
|
31
44
|
|