Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fsfahrttool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fsini-informatik
fsfahrttool
Commits
cdf4667d
Commit
cdf4667d
authored
9 years ago
by
Tim Repke
Browse files
Options
Downloads
Patches
Plain Diff
made loader animation a bit smoother
parent
94728904
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
registration-system/view/signups/game1/graphics/loader.svg
+0
-0
0 additions, 0 deletions
registration-system/view/signups/game1/graphics/loader.svg
registration-system/view/signups/game1/js/game.js
+13
-12
13 additions, 12 deletions
registration-system/view/signups/game1/js/game.js
with
13 additions
and
12 deletions
registration-system/view/signups/game1/graphics/loader.svg
+128 B (+5%)
View file @
cdf4667d
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
Click to expand it.
registration-system/view/signups/game1/js/game.js
+
13
−
12
View file @
cdf4667d
...
@@ -22,7 +22,7 @@ Game.prototype.nextMap = function (map, spawn) {
...
@@ -22,7 +22,7 @@ Game.prototype.nextMap = function (map, spawn) {
clearInterval
(
Game
.
mainLoop
);
clearInterval
(
Game
.
mainLoop
);
Game
.
mainLoop
=
null
;
Game
.
mainLoop
=
null
;
var
self
=
this
;
var
self
=
this
;
setTimeout
(
function
()
{
setTimeout
(
function
()
{
var
gameRoot
=
document
.
getElementById
(
"
gameRoot
"
);
var
gameRoot
=
document
.
getElementById
(
"
gameRoot
"
);
while
(
gameRoot
.
firstChild
)
{
while
(
gameRoot
.
firstChild
)
{
gameRoot
.
removeChild
(
gameRoot
.
firstChild
);
gameRoot
.
removeChild
(
gameRoot
.
firstChild
);
...
@@ -30,7 +30,7 @@ Game.prototype.nextMap = function (map, spawn) {
...
@@ -30,7 +30,7 @@ Game.prototype.nextMap = function (map, spawn) {
Game
.
char
=
null
;
Game
.
char
=
null
;
Game
.
cam
=
null
;
Game
.
cam
=
null
;
self
.
loadMap
(
map
,
spawn
);
self
.
loadMap
(
map
,
spawn
);
},
Game
.
config
.
loopSpeed
+
5
);
},
Game
.
config
.
loopSpeed
+
5
);
};
};
Game
.
prototype
.
loadMap
=
function
(
map
,
spawn
)
{
Game
.
prototype
.
loadMap
=
function
(
map
,
spawn
)
{
...
@@ -38,7 +38,7 @@ Game.prototype.loadMap = function (map, spawn) {
...
@@ -38,7 +38,7 @@ Game.prototype.loadMap = function (map, spawn) {
var
gameRoot
=
document
.
getElementById
(
"
gameRoot
"
);
var
gameRoot
=
document
.
getElementById
(
"
gameRoot
"
);
var
gameOverlay
=
$
(
'
#game-overlay
'
);
var
gameOverlay
=
$
(
'
#game-overlay
'
);
gameOverlay
.
html
(
'
<img src="graphics/loader.svg" style="position: absolute; left: 300px; top: 200px;" />
'
).
show
(
);
gameOverlay
.
html
(
'
<img src="graphics/loader.svg" style="position: absolute; left: 300px; top: 200px;" />
'
).
fadeIn
(
500
);
var
svg
=
null
;
var
svg
=
null
;
...
@@ -53,13 +53,13 @@ Game.prototype.loadMap = function (map, spawn) {
...
@@ -53,13 +53,13 @@ Game.prototype.loadMap = function (map, spawn) {
if
(
next
)
next
[
0
].
apply
(
null
,
(
next
.
slice
(
1
)
||
[]).
concat
(
init
));
if
(
next
)
next
[
0
].
apply
(
null
,
(
next
.
slice
(
1
)
||
[]).
concat
(
init
));
}
}
init
(
);
setTimeout
(
init
,
1000
);
function
initMap
(
mapId
,
spawn
,
done
)
{
function
initMap
(
mapId
,
spawn
,
done
)
{
console
.
log
(
'
Init map:
'
+
mapId
+
'
spawn:
'
+
spawn
);
console
.
log
(
'
Init map:
'
+
mapId
+
'
spawn:
'
+
spawn
);
d3
.
xml
(
FAPI
.
resolvePath
(
'
maps/
'
+
mapId
+
'
.svg
'
),
'
image/svg+xml
'
,
function
(
xml
)
{
d3
.
xml
(
FAPI
.
resolvePath
(
'
maps/
'
+
mapId
+
'
.svg
'
),
'
image/svg+xml
'
,
function
(
xml
)
{
console
.
log
(
'
dslkjdl
'
)
gameCanvas
.
style
.
width
=
Game
.
config
.
size
[
0
]
+
'
px
'
;
gameCanvas
.
style
.
width
=
Game
.
config
.
size
[
0
]
+
'
px
'
;
gameCanvas
.
style
.
height
=
Game
.
config
.
size
[
1
]
+
'
px
'
;
gameCanvas
.
style
.
height
=
Game
.
config
.
size
[
1
]
+
'
px
'
;
gameRoot
.
appendChild
(
xml
.
documentElement
);
gameRoot
.
appendChild
(
xml
.
documentElement
);
...
@@ -69,12 +69,13 @@ Game.prototype.loadMap = function (map, spawn) {
...
@@ -69,12 +69,13 @@ Game.prototype.loadMap = function (map, spawn) {
// -------------------------------------
// -------------------------------------
// init event related stuff
// init event related stuff
var
displayEvents
=
Game
.
config
.
showEventLayers
?
0.5
:
0
;
var
displayEvents
=
Game
.
config
.
showEventLayers
?
0.5
:
0
;
svg
.
selectAll
(
'
g
'
).
filter
(
function
()
{
svg
.
selectAll
(
'
g
'
)
return
(
.
filter
(
function
()
{
this
.
getAttribute
(
'
inkscape:groupmode
'
)
==
'
layer
'
return
(
&&
Game
.
eventLayers
.
indexOf
(
this
.
getAttribute
(
'
inkscape:label
'
))
>=
0
this
.
getAttribute
(
'
inkscape:groupmode
'
)
==
'
layer
'
);
&&
Game
.
eventLayers
.
indexOf
(
this
.
getAttribute
(
'
inkscape:label
'
))
>=
0
})
);
})
.
style
(
'
display
'
,
'
block
'
)
.
style
(
'
display
'
,
'
block
'
)
.
style
(
'
opacity
'
,
displayEvents
);
.
style
(
'
opacity
'
,
displayEvents
);
...
@@ -195,7 +196,7 @@ Game.log = function (message) {
...
@@ -195,7 +196,7 @@ Game.log = function (message) {
newElem
.
appendChild
(
newElemText
);
newElem
.
appendChild
(
newElemText
);
newElem
.
style
.
backgroundColor
=
'
#474c46
'
;
newElem
.
style
.
backgroundColor
=
'
#474c46
'
;
setTimeout
(
function
(){
setTimeout
(
function
()
{
newElem
.
style
.
background
=
'
transparent
'
;
newElem
.
style
.
background
=
'
transparent
'
;
},
1000
);
},
1000
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment