animation-studio 0.1.2 → 0.1.4
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.
- checksums.yaml +7 -0
- data/lib/animation-studio.rb +2 -2
- data/stylesheets/animation-studio/_animation-sequence.scss +92 -7
- data/templates/project/Gemfile.txt +1 -1
- data/templates/project/alice/alice-frightened_1.png +0 -0
- data/templates/project/alice/alice-frightened_2.png +0 -0
- data/templates/project/alice/awake.png +0 -0
- data/templates/project/alice-s70adcc6818.png +0 -0
- metadata +14 -33
- data/templates/project/eyes/eyes_01.png +0 -0
- data/templates/project/eyes/eyes_02.png +0 -0
- data/templates/project/eyes/eyes_03.png +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA512:
|
3
|
+
metadata.gz: 0fafbf2bdde6328a36404e7c7ca59881ab250e08a24568d0de26e0eaf7a73495818abe63910373e79b5fb0878390933f3841da1ac27852b32508bcc4191732b1
|
4
|
+
data.tar.gz: 44f9a996e42e58214e43a5136a999ab7ea894d337f9f2248c3bcc3d0050c6ee61d6e2a90bbd3f56cd640c22cdfab0c248cd6e7878b8675472272f065880c2ea9
|
5
|
+
SHA1:
|
6
|
+
metadata.gz: 06dac712b5a4c85863837de786540c1b4a800b54
|
7
|
+
data.tar.gz: 7be852a08a8bec58c9edbe12eea36fecba9c9e1e
|
data/lib/animation-studio.rb
CHANGED
@@ -20,8 +20,8 @@ Compass::Frameworks.register('animation-studio', :stylesheets_directory => style
|
|
20
20
|
# a prerelease version
|
21
21
|
# Date is in the form of YYYY-MM-DD
|
22
22
|
module AnimationStudio
|
23
|
-
VERSION = "0.1.
|
24
|
-
DATE = "2013-
|
23
|
+
VERSION = "0.1.4"
|
24
|
+
DATE = "2013-11-30"
|
25
25
|
end
|
26
26
|
|
27
27
|
# This is where any custom SassScript should be placed. The functions will be
|
@@ -19,18 +19,19 @@ $animation-sequence-extend: true !default;
|
|
19
19
|
|
20
20
|
}
|
21
21
|
|
22
|
-
@mixin animation-sequence($folder, $time, $animation:$animation-sequence-name, $extend: $animation-sequence-extend) {
|
22
|
+
@mixin animation-sequence($folder, $time, $animation:$animation-sequence-name, $options: infinite, $generate-dimensions: true, $extend: $animation-sequence-extend) {
|
23
23
|
$png-path: $folder + "/*.png";
|
24
24
|
$sprite-map: sprite-map($png-path);
|
25
25
|
$sprite-path: sprite-path($sprite-map);
|
26
26
|
|
27
27
|
$steps: length(sprite-names($sprite-map));
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
@if $generate-dimensions {
|
30
|
+
$height: image-height($sprite-path);
|
31
|
+
$width: image-width($sprite-path);
|
32
|
+
height: $height / $steps;
|
33
|
+
width: $width;
|
34
|
+
}
|
34
35
|
|
35
36
|
@if $extend {
|
36
37
|
@extend %#{sprite-map-name($sprite-map)}-animation-sequence;
|
@@ -39,7 +40,7 @@ $animation-sequence-extend: true !default;
|
|
39
40
|
@include animation-sequence-sprite-generator($folder, $extend);
|
40
41
|
}
|
41
42
|
|
42
|
-
@include animation(unquote($animation) $time steps($steps)
|
43
|
+
@include animation(unquote($animation) $time steps($steps) $options);
|
43
44
|
}
|
44
45
|
|
45
46
|
@mixin animation-sequence-keyframes($folder, $name: $animation-sequence-name) {
|
@@ -59,4 +60,88 @@ $animation-sequence-extend: true !default;
|
|
59
60
|
background-position: 0 $height;
|
60
61
|
}
|
61
62
|
}
|
63
|
+
}
|
64
|
+
|
65
|
+
@mixin animation-still($folder, $frame: 1, $generate-dimensions: true) {
|
66
|
+
$png-path: $folder + "/*.png";
|
67
|
+
$sprite-map: sprite-map($png-path);
|
68
|
+
$sprite-path: sprite-path($sprite-map);
|
69
|
+
$height: image-height($sprite-path);
|
70
|
+
$frames: length(sprite-names($sprite-map));
|
71
|
+
$frame-height: $height/$frames;
|
72
|
+
$frame-position: percentage((($frame * ($frame-height)) - $frame-height + ($frame-height/$frame)) / $height);
|
73
|
+
|
74
|
+
background: $sprite-map 0 $frame-position no-repeat;
|
75
|
+
|
76
|
+
@if $generate-dimensions {
|
77
|
+
$height: image-height($sprite-path);
|
78
|
+
$width: image-width($sprite-path);
|
79
|
+
height: $height / $frames;
|
80
|
+
width: $width;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
@function strip-units($number) {
|
85
|
+
@return $number / ($number * 0 + 1);
|
86
|
+
}
|
87
|
+
|
88
|
+
@mixin animation-sequence-span($folder, $time, $animation-sequence-span-name, $start-frame, $end-frame, $options: infinite, $generate-dimensions: true, $extend: $animation-sequence-extend) {
|
89
|
+
$png-path: $folder + "/*.png";
|
90
|
+
$sprite-map: sprite-map($png-path);
|
91
|
+
$sprite-path: sprite-path($sprite-map);
|
92
|
+
$sprite-height: image-height($sprite-path);
|
93
|
+
$frames: length(sprite-names($sprite-map));
|
94
|
+
$frame-height: $sprite-height/$frames;
|
95
|
+
$start-frame-position: nth(sprite-position($sprite-map, $start-frame), 2);
|
96
|
+
$end-frame-position: nth(sprite-position($sprite-map, $end-frame), 2);
|
97
|
+
|
98
|
+
|
99
|
+
$steps: (($start-frame-position - $end-frame-position) + $frame-height) / $frame-height;
|
100
|
+
|
101
|
+
@if $generate-dimensions {
|
102
|
+
$width: image-width($sprite-path);
|
103
|
+
height: $frame-height;
|
104
|
+
width: $width;
|
105
|
+
}
|
106
|
+
|
107
|
+
@if $extend {
|
108
|
+
@extend %#{sprite-map-name($sprite-map)}-animation-sequence;
|
109
|
+
}
|
110
|
+
@else {
|
111
|
+
@include animation-sequence-sprite-generator($folder, $extend);
|
112
|
+
}
|
113
|
+
|
114
|
+
@include animation(unquote($animation-sequence-span-name) $time steps($steps) $options);
|
115
|
+
}
|
116
|
+
|
117
|
+
@mixin animation-sequence-keyframes-span($folder, $name, $start-frame, $end-frame) {
|
118
|
+
$png-path: $folder + "/*.png";
|
119
|
+
$sprite-map: sprite-map($png-path);
|
120
|
+
$sprite-path: sprite-path($sprite-map);
|
121
|
+
$height: image-height($sprite-path);
|
122
|
+
$frames: length(sprite-names($sprite-map));
|
123
|
+
$frame-height: $height/$frames;
|
124
|
+
|
125
|
+
$start-position: nth(sprite-position($sprite-map, $start-frame), 2) * -1;
|
126
|
+
$start-frame-index: strip-units($start-position/ $frame-height);
|
127
|
+
$end-position: nth(sprite-position($sprite-map, $end-frame), 2) * -1;
|
128
|
+
$end-frame-index: strip-units($end-position/ $frame-height);
|
129
|
+
|
130
|
+
// Find what the unit of increment is for each frame: 3 = 50%, 4 = 33%, 5 = 25% etc.
|
131
|
+
$frame-unit: percentage(1/($frames - 1));
|
132
|
+
|
133
|
+
// Then for the starting position, multiply that by the frame. For instance... 1 = 0%, 2 = 50%, 3 = 100%
|
134
|
+
$start-position: $start-frame-index * $frame-unit;
|
135
|
+
|
136
|
+
// For the ending position, add an extra frame. For instance... 2 = 100%, 3 = 150%
|
137
|
+
$end-position: ($end-frame-index + 1) * $frame-unit;
|
138
|
+
|
139
|
+
@include keyframes($name) {
|
140
|
+
0% {
|
141
|
+
background-position: 0 $start-position;
|
142
|
+
}
|
143
|
+
100% {
|
144
|
+
background-position: 0 $end-position;
|
145
|
+
}
|
146
|
+
}
|
62
147
|
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: animation-studio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 1
|
8
|
-
- 2
|
9
|
-
version: 0.1.2
|
4
|
+
version: 0.1.4
|
10
5
|
platform: ruby
|
11
6
|
authors:
|
12
7
|
- Sam Richard, Rachel Nabors
|
@@ -14,38 +9,28 @@ autorequire:
|
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
11
|
|
17
|
-
date: 2013-
|
18
|
-
default_executable:
|
12
|
+
date: 2013-11-30 00:00:00 Z
|
19
13
|
dependencies:
|
20
14
|
- !ruby/object:Gem::Dependency
|
21
15
|
type: :runtime
|
16
|
+
name: sass
|
22
17
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
18
|
requirements:
|
24
19
|
- - ">="
|
25
20
|
- !ruby/object:Gem::Version
|
26
|
-
segments:
|
27
|
-
- 3
|
28
|
-
- 2
|
29
|
-
- 3
|
30
21
|
version: 3.2.3
|
31
|
-
name: sass
|
32
|
-
requirement: *id001
|
33
22
|
prerelease: false
|
23
|
+
requirement: *id001
|
34
24
|
- !ruby/object:Gem::Dependency
|
35
25
|
type: :runtime
|
26
|
+
name: compass
|
36
27
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
37
28
|
requirements:
|
38
29
|
- - ">="
|
39
30
|
- !ruby/object:Gem::Version
|
40
|
-
segments:
|
41
|
-
- 0
|
42
|
-
- 13
|
43
|
-
- alpha
|
44
|
-
- 4
|
45
31
|
version: 0.13.alpha.4
|
46
|
-
name: compass
|
47
|
-
requirement: *id002
|
48
32
|
prerelease: false
|
33
|
+
requirement: *id002
|
49
34
|
description: A long description of this awesome compass extension
|
50
35
|
email:
|
51
36
|
- sam@snug.ug, rachelnabors@gmail.com
|
@@ -59,9 +44,10 @@ files:
|
|
59
44
|
- lib/animation-studio.rb
|
60
45
|
- stylesheets/_animation-studio.scss
|
61
46
|
- stylesheets/animation-studio/_animation-sequence.scss
|
62
|
-
- templates/project/
|
63
|
-
- templates/project/
|
64
|
-
- templates/project/
|
47
|
+
- templates/project/alice/alice-frightened_1.png
|
48
|
+
- templates/project/alice/alice-frightened_2.png
|
49
|
+
- templates/project/alice/awake.png
|
50
|
+
- templates/project/alice-s70adcc6818.png
|
65
51
|
- templates/project/Gemfile.txt
|
66
52
|
- templates/project/tuna-walk/tuna-walk_01.png
|
67
53
|
- templates/project/tuna-walk/tuna-walk_02.png
|
@@ -76,10 +62,11 @@ files:
|
|
76
62
|
- templates/project/tuna-walk/tuna-walk_11.png
|
77
63
|
- templates/project/tuna-walk/tuna-walk_12.png
|
78
64
|
- templates/project/tuna-walk-s77788462e5.png
|
79
|
-
has_rdoc: true
|
80
65
|
homepage: https://github.com/team-sass/animation-studio
|
81
66
|
licenses:
|
82
67
|
- MIT
|
68
|
+
metadata: {}
|
69
|
+
|
83
70
|
post_install_message:
|
84
71
|
rdoc_options: []
|
85
72
|
|
@@ -89,24 +76,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
76
|
requirements:
|
90
77
|
- - ">="
|
91
78
|
- !ruby/object:Gem::Version
|
92
|
-
segments:
|
93
|
-
- 0
|
94
79
|
version: "0"
|
95
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
81
|
requirements:
|
97
82
|
- - ">="
|
98
83
|
- !ruby/object:Gem::Version
|
99
|
-
segments:
|
100
|
-
- 1
|
101
|
-
- 3
|
102
|
-
- 6
|
103
84
|
version: 1.3.6
|
104
85
|
requirements: []
|
105
86
|
|
106
87
|
rubyforge_project: animation-studio
|
107
|
-
rubygems_version:
|
88
|
+
rubygems_version: 2.0.7
|
108
89
|
signing_key:
|
109
|
-
specification_version:
|
90
|
+
specification_version: 4
|
110
91
|
summary: A short summary of this awesome compass extension
|
111
92
|
test_files: []
|
112
93
|
|
Binary file
|
Binary file
|
Binary file
|