Открыть боковую панель
valov_1205
universo-phaser
Коммиты
87358f79
Коммит
87358f79
создал
Авг 13, 2023
по автору
Medvedev Anton
Просмотр файлов
endlesspage problem
владелец
20404bd6
Изменения
6
Развернуть все
Скрыть пробелы
Построчно
Рядом
universo-frontend/package-lock.json
Просмотр файла @
87358f79
Это отличие свёрнуто
Нажмите, чтобы развернуть
universo-frontend/package.json
Просмотр файла @
87358f79
...
...
@@ -15,13 +15,14 @@
"dependencies"
:
{
"@quasar/extras"
:
"^1.16.4"
,
"phaser"
:
"^3.60.0"
,
"phaser3-rex-plugins"
:
"^1.60.4"
,
"quasar"
:
"^2.6.0"
,
"vue"
:
"^3.0.0"
,
"vue-router"
:
"^4.0.0"
},
"devDependencies"
:
{
"@quasar/app-vite"
:
"^1.3.0"
,
"@types/node"
:
"^
12.20.21
"
,
"@types/node"
:
"^
20.4.10
"
,
"@typescript-eslint/eslint-plugin"
:
"^5.10.0"
,
"@typescript-eslint/parser"
:
"^5.10.0"
,
"autoprefixer"
:
"^10.4.2"
,
...
...
@@ -29,7 +30,8 @@
"eslint-config-prettier"
:
"^8.1.0"
,
"eslint-plugin-vue"
:
"^9.0.0"
,
"prettier"
:
"^2.5.1"
,
"typescript"
:
"^4.5.4"
"typescript"
:
"^4.5.4"
,
"vite"
:
"^3.1.0"
},
"engines"
:
{
"node"
:
"^18 || ^16 || ^14.19"
,
...
...
universo-frontend/src/pages/EndlessPage.vue
0 → 100644
Просмотр файла @
87358f79
<
template
>
<q-page>
<div
ref=
"gameContainer"
></div>
</q-page>
</
template
>
<
script
lang=
"ts"
>
import
*
as
Phaser
from
'
phaser
'
;
import
RexUIPlugin
from
'
phaser3-rex-plugins/templates/ui/ui-plugin.js
'
;
class
GameScene
extends
Phaser
.
Scene
{
rexUI
:
RexUIPlugin
;
create
()
{
const
sizer
=
this
.
rexUI
.
add
.
sizer
({
// ... конфигурация sizer
});
}
}
const
config
:
Phaser
.
Types
.
Core
.
GameConfig
=
{
type
:
Phaser
.
AUTO
,
width
:
800
,
height
:
600
,
scene
:
GameScene
,
plugins
:
{
scene
:
[
{
key
:
'
rexUI
'
,
plugin
:
RexUIPlugin
,
mapping
:
'
rexUI
'
}
]
}
};
const
game
=
new
Phaser
.
Game
(
config
);
console
.
log
()
</
script
>
universo-frontend/src/pages/PhaserTest.vue
Просмотр файла @
87358f79
Это отличие свёрнуто
Нажмите, чтобы развернуть
universo-frontend/src/router/routes.ts
Просмотр файла @
87358f79
...
...
@@ -8,6 +8,7 @@ const routes: RouteRecordRaw[] = [
{
path
:
''
,
component
:
()
=>
import
(
'
pages/IndexPage.vue
'
)
},
{
path
:
'
/user
'
,
component
:
()
=>
import
(
'
pages/UserProfile.vue
'
)},
{
path
:
'
/phaser
'
,
component
:
()
=>
import
(
'
pages/PhaserTest.vue
'
)},
{
path
:
'
/endlesscanvas
'
,
component
:
()
=>
import
(
'
pages/EndlessPage.vue
'
),
},
{
path
:
'
/register
'
,
component
:
()
=>
import
(
'
pages/RegistrationPage.vue
'
),
},
{
path
:
'
/zareg
'
,
component
:
()
=>
import
(
'
pages/RegistrStr.vue
'
),
},
],
...
...
universo-frontend/tsconfig.json
Просмотр файла @
87358f79
{
"extends"
:
"@quasar/app-vite/tsconfig-preset"
,
"compilerOptions"
:
{
"baseUrl"
:
"."
}
}
\ Нет новой строки в конце файла
"baseUrl"
:
"."
,
"esModuleInterop"
:
true
,
"types"
:
[
"phaser"
,
"rex-plugins"
]
},
"include"
:
[
"src/**/*.ts"
,
"src/**/*.d.ts"
]
}
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать