Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tothemoon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
tothemoon
Commits
02bf6f01
Commit
02bf6f01
authored
Jun 19, 2016
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change spaceship moving animation at correct times during transition animation
parent
01829ee6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
29 deletions
+20
-29
poll.coffee
poll.coffee
+12
-6
style.less
style.less
+8
-23
No files found.
poll.coffee
View file @
02bf6f01
...
@@ -46,7 +46,10 @@ warp = ->
...
@@ -46,7 +46,10 @@ warp = ->
# first stretch stars to create accelerating feel
# first stretch stars to create accelerating feel
Velocity
star_tails
,
Velocity
star_tails
,
{
width
:
'500px'
},
{
width
:
'500px'
},
{
duration
:
1000
,
easing
:
'ease-in'
}
{
duration
:
1000
,
easing
:
'ease-in'
,
complete
:
->
document
.
body
.
className
=
'excited'
}
# then shift
# then shift
for
tail
in
star_tails
for
tail
in
star_tails
...
@@ -65,18 +68,21 @@ unwarp = ->
...
@@ -65,18 +68,21 @@ unwarp = ->
for
tail
,
i
in
star_tails
for
tail
,
i
in
star_tails
Velocity
tail
,
Velocity
tail
,
{
width
:
star_heights
[
i
]},
{
width
:
star_heights
[
i
]},
{
duration
:
1000
,
easing
:
'ease-in'
}
{
duration
:
1000
,
easing
:
'ease-in'
,
complete
:
->
document
.
body
.
className
=
'cruising'
}
transitions
=
transitions
=
cruising_excited
:
[
warp
]
cruising_excited
:
warp
excited_cruising
:
[
unwarp
]
excited_cruising
:
unwarp
set_state
=
(
newstate
)
->
set_state
=
(
newstate
)
->
oldstate
=
document
.
body
.
className
oldstate
=
document
.
body
.
className
if
oldstate
!=
newstate
if
oldstate
!=
newstate
console
.
log
'set state from'
,
oldstate
,
'to'
,
newstate
console
.
log
'set state from'
,
oldstate
,
'to'
,
newstate
f
()
for
f
in
transitions
[
oldstate
+
'_'
+
newstate
]
?
[]
transitions
[
oldstate
+
'_'
+
newstate
]
?
()
document
.
body
.
className
=
newstate
#
document.body.className = newstate
if
debug
if
debug
document
.
addEventListener
'keypress'
,
(
e
)
->
document
.
addEventListener
'keypress'
,
(
e
)
->
...
...
style.less
View file @
02bf6f01
...
@@ -86,14 +86,12 @@ img, div {
...
@@ -86,14 +86,12 @@ img, div {
/* Cruising state */
/* Cruising state */
.cruising {
.cruising .spaceship {
.spaceship {
animation: cruising-movement @cruising-move-duration linear 0s infinite;
animation: cruising-movement @cruising-move-duration linear 0s infinite;
img {
img {
animation: cruising-rotation @cruising-tilt-duration linear 0s infinite alternate;
animation: cruising-rotation @cruising-tilt-duration linear 0s infinite alternate;
}
}
}
}
}
@keyframes cruising-movement {
@keyframes cruising-movement {
...
@@ -108,20 +106,12 @@ img, div {
...
@@ -108,20 +106,12 @@ img, div {
/* Excited state */
/* Excited state */
.excited {
.excited .spaceship {
.spaceship {
animation: excited-movement @excited-move-duration linear 0s infinite;
animation: excited-movement @excited-move-duration linear 0s infinite;
img {
img {
animation: excited-rotation @excited-tilt-duration linear 0s infinite alternate;
animation: excited-rotation @excited-tilt-duration linear 0s infinite alternate;
}
}
}
/*
.bg {
animation: excited-bg-tilt 3s linear 0s infinite alternate;
}
*/
}
}
@keyframes excited-movement {
@keyframes excited-movement {
...
@@ -133,8 +123,3 @@ img, div {
...
@@ -133,8 +123,3 @@ img, div {
from { transform: rotateZ(-@excited-nose-tilt / 2) }
from { transform: rotateZ(-@excited-nose-tilt / 2) }
to { transform: rotateZ(@excited-nose-tilt / 2) }
to { transform: rotateZ(@excited-nose-tilt / 2) }
}
}
@keyframes excited-bg-tilt {
from { transform: rotateZ(0) }
to { transform: rotateZ(70deg) }
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment