Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jochen Bauer
spn-website
Commits
9ef03c8e
Commit
9ef03c8e
authored
May 05, 2018
by
Hubert Denkmair
Browse files
make stage non-transparent for performance reasons?
parent
7cdf3048
Changes
2
Hide whitespace changes
Inline
Side-by-side
visualization/static/visualization/GameVisualization.js
View file @
9ef03c8e
...
...
@@ -24,7 +24,7 @@ function GameVisualization(assets, snakeMoveStrategy, container)
[
0xFF0000
,
0xFF0000
,
0xFF0000
,
0xFF0000
,
0xFF0000
,
0xFF0000
,
0xFF0000
,
0xFF0000
,
0xFFFFFF
,
0xFFFFFF
,
0xFFFFFF
,
0xFFFFFF
,
0xFFFFFF
,
0xFFFFFF
,
0xFFFFFF
,
0xFFFFFF
,
],
];
this
.
app
=
new
PIXI
.
Application
({
'
transparent
'
:
tru
e
});
this
.
app
=
new
PIXI
.
Application
({
'
transparent
'
:
fals
e
});
this
.
app
.
stage
.
interactiveChildren
=
false
;
this
.
txHead
=
PIXI
.
Texture
.
fromImage
(
assets
[
'
head.png
'
]);
...
...
visualization/static/visualization/Snake.js
View file @
9ef03c8e
...
...
@@ -190,6 +190,6 @@ Snake.prototype.AnimateEat = function()
let
factor
=
(
dist
-
food
.
speed
)
/
dist
;
food
.
x
=
x
+
dx
*
factor
;
food
.
y
=
y
+
dy
*
factor
;
food
.
speed
*=
1.
2
;
food
.
speed
*=
1.
3
;
}
};
\ No newline at end of file
Write
Preview
Supports
Markdown
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