Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
8dfbb50c
Commit
8dfbb50c
authored
Nov 27, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
render cemetery
parent
233d4409
Pipeline
#18138
passed with stages
in 3 minutes and 12 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
src/ui/Duel/simpleDuel/cemetery.ts
src/ui/Duel/simpleDuel/cemetery.ts
+21
-0
src/ui/Duel/simpleDuel/config.ts
src/ui/Duel/simpleDuel/config.ts
+11
-0
src/ui/Duel/simpleDuel/mod.tsx
src/ui/Duel/simpleDuel/mod.tsx
+4
-0
No files found.
src/ui/Duel/simpleDuel/cemetery.ts
0 → 100644
View file @
8dfbb50c
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
CONFIG
from
"
./config
"
;
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
// 墓地
const
cemetery
=
BABYLON
.
MeshBuilder
.
CreateBox
(
"
cemetery
"
,
CONFIG
.
CemeterySlotShape
()
);
// 位置
cemetery
.
position
=
new
BABYLON
.
Vector3
(
3.2
,
0.5
,
-
2.0
);
// 旋转
cemetery
.
rotation
=
CONFIG
.
CemeterySlotRotation
();
// 材质
const
cemeteryMaterial
=
new
BABYLON
.
StandardMaterial
(
"
cemeteryMaterial
"
,
scene
);
cemeteryMaterial
.
diffuseColor
=
CONFIG
.
CemeteryColor
();
cemetery
.
material
=
cemeteryMaterial
;
};
src/ui/Duel/simpleDuel/config.ts
View file @
8dfbb50c
...
@@ -17,12 +17,18 @@ export const DeckSlotShape = () => {
...
@@ -17,12 +17,18 @@ export const DeckSlotShape = () => {
export
const
ExtraDeckSlotShape
=
()
=>
{
export
const
ExtraDeckSlotShape
=
()
=>
{
return
{
width
:
0.8
,
height
:
1
,
depth
:
0.2
};
return
{
width
:
0.8
,
height
:
1
,
depth
:
0.2
};
};
};
export
const
CemeterySlotShape
=
()
=>
{
return
{
width
:
0.8
,
height
:
1
,
depth
:
0.2
};
};
export
const
CardSlotRotation
=
()
=>
{
export
const
CardSlotRotation
=
()
=>
{
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
};
};
export
const
DeckSlotRotation
=
()
=>
{
export
const
DeckSlotRotation
=
()
=>
{
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
};
};
export
const
CemeterySlotRotation
=
()
=>
{
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
};
// 手牌
// 手牌
export
const
HandShape
=
()
=>
{
export
const
HandShape
=
()
=>
{
...
@@ -56,3 +62,8 @@ export const DeckColor = () => {
...
@@ -56,3 +62,8 @@ export const DeckColor = () => {
export
const
ExtraDeckColor
=
()
=>
{
export
const
ExtraDeckColor
=
()
=>
{
return
BABYLON
.
Color3
.
Purple
();
return
BABYLON
.
Color3
.
Purple
();
};
};
// 墓地
export
const
CemeteryColor
=
()
=>
{
return
BABYLON
.
Color3
.
Teal
();
};
src/ui/Duel/simpleDuel/mod.tsx
View file @
8dfbb50c
...
@@ -13,6 +13,7 @@ import renderMonsters from "./monsters";
...
@@ -13,6 +13,7 @@ import renderMonsters from "./monsters";
import
renderExtraMonsters
from
"
./extraMonsters
"
;
import
renderExtraMonsters
from
"
./extraMonsters
"
;
import
renderMagics
from
"
./magics
"
;
import
renderMagics
from
"
./magics
"
;
import
renderDeck
from
"
./deck
"
;
import
renderDeck
from
"
./deck
"
;
import
renderCemetery
from
"
./cemetery
"
;
import
*
as
CONFIG
from
"
./config
"
;
import
*
as
CONFIG
from
"
./config
"
;
import
{
CardMeta
}
from
"
../../../api/cards
"
;
import
{
CardMeta
}
from
"
../../../api/cards
"
;
...
@@ -73,6 +74,9 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
...
@@ -73,6 +74,9 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
// 创建卡组
// 创建卡组
renderDeck
(
scene
);
renderDeck
(
scene
);
// 创建墓地
renderCemetery
(
scene
);
// 创建地板
// 创建地板
const
ground
=
BABYLON
.
MeshBuilder
.
CreateGround
(
const
ground
=
BABYLON
.
MeshBuilder
.
CreateGround
(
"
ground
"
,
"
ground
"
,
...
...
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