Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Augmentile
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Auglement
Augmentile
Commits
6ac56824
Verified
Commit
6ac56824
authored
3 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Restructure frontend code and instantiate game
parent
7b1816de
No related branches found
No related tags found
No related merge requests found
Pipeline
#7273
passed
3 years ago
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/frontend/game.js
+13
-22
13 additions, 22 deletions
src/frontend/game.js
src/frontend/scenes/test.js
+13
-0
13 additions, 0 deletions
src/frontend/scenes/test.js
src/widget.js
+3
-0
3 additions, 0 deletions
src/widget.js
with
29 additions
and
22 deletions
src/frontend/game.js
+
13
−
22
View file @
6ac56824
import
Phaser
from
'
phaser
'
;
import
TestScene
from
'
./scenes/test
'
;
function
preload
()
{
this
.
load
.
image
(
'
404
'
,
'
http://labs.phaser.io/assets/sprites/phaser3-logo.png
'
)
}
function
create
()
{
this
.
add
.
image
(
300
,
400
,
'
404
'
)
}
let
scene
=
{
preload
:
preload
,
create
:
create
};
class
Game
{
constructo
()
{
this
.
config
=
{
type
:
Phaser
.
AUTO
,
width
:
800
,
height
:
600
,
scene
:
TestScene
};
let
config
=
{
type
:
Phaser
.
AUTO
,
width
:
800
,
height
:
600
,
scene
:
scene
};
let
game
=
new
Phaser
.
Game
(
config
);
this
.
game
=
new
Phaser
.
Game
(
this
.
config
);
}
}
export
default
g
ame
;
export
default
G
ame
;
This diff is collapsed.
Click to expand it.
src/frontend/scenes/test.js
0 → 100644
+
13
−
0
View file @
6ac56824
function
preload
()
{
this
.
load
.
image
(
'
404
'
,
'
http://labs.phaser.io/assets/sprites/phaser3-logo.png
'
)
}
function
create
()
{
this
.
add
.
image
(
300
,
400
,
'
404
'
)
}
let
TestScene
=
{
preload
:
preload
,
create
:
create
};
export
default
TestScene
;
This diff is collapsed.
Click to expand it.
src/widget.js
+
3
−
0
View file @
6ac56824
import
WidgetBackend
from
'
./backends/widget
'
;
import
Game
from
'
./frontend/game
'
;
let
game
=
Game
();
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