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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
love_飞影
Neos
Commits
03ed6570
Commit
03ed6570
authored
Nov 27, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
render exclusion
parent
8dfbb50c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
src/ui/Duel/simpleDuel/config.ts
src/ui/Duel/simpleDuel/config.ts
+11
-0
src/ui/Duel/simpleDuel/exclusion.ts
src/ui/Duel/simpleDuel/exclusion.ts
+21
-0
src/ui/Duel/simpleDuel/mod.tsx
src/ui/Duel/simpleDuel/mod.tsx
+4
-0
No files found.
src/ui/Duel/simpleDuel/config.ts
View file @
03ed6570
...
@@ -20,6 +20,9 @@ export const ExtraDeckSlotShape = () => {
...
@@ -20,6 +20,9 @@ export const ExtraDeckSlotShape = () => {
export
const
CemeterySlotShape
=
()
=>
{
export
const
CemeterySlotShape
=
()
=>
{
return
{
width
:
0.8
,
height
:
1
,
depth
:
0.2
};
return
{
width
:
0.8
,
height
:
1
,
depth
:
0.2
};
};
};
export
const
ExclusionSlotShape
=
()
=>
{
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
);
};
};
...
@@ -29,6 +32,9 @@ export const DeckSlotRotation = () => {
...
@@ -29,6 +32,9 @@ export const DeckSlotRotation = () => {
export
const
CemeterySlotRotation
=
()
=>
{
export
const
CemeterySlotRotation
=
()
=>
{
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
};
};
export
const
ExclusionSlotRotation
=
()
=>
{
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
};
// 手牌
// 手牌
export
const
HandShape
=
()
=>
{
export
const
HandShape
=
()
=>
{
...
@@ -67,3 +73,8 @@ export const ExtraDeckColor = () => {
...
@@ -67,3 +73,8 @@ export const ExtraDeckColor = () => {
export
const
CemeteryColor
=
()
=>
{
export
const
CemeteryColor
=
()
=>
{
return
BABYLON
.
Color3
.
Teal
();
return
BABYLON
.
Color3
.
Teal
();
};
};
// 除外区
export
const
ExclusionColor
=
()
=>
{
return
BABYLON
.
Color3
.
Black
();
};
src/ui/Duel/simpleDuel/exclusion.ts
0 → 100644
View file @
03ed6570
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
CONFIG
from
"
./config
"
;
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
// 除外区
const
exclusion
=
BABYLON
.
MeshBuilder
.
CreateBox
(
"
exclusion
"
,
CONFIG
.
ExclusionSlotShape
()
);
// 位置
exclusion
.
position
=
new
BABYLON
.
Vector3
(
3.2
,
0.5
,
-
0.7
);
// 旋转
exclusion
.
rotation
=
CONFIG
.
ExclusionSlotRotation
();
// 材质
const
exclusionMaterial
=
new
BABYLON
.
StandardMaterial
(
"
exclusionMaterial
"
,
scene
);
exclusionMaterial
.
diffuseColor
=
CONFIG
.
ExclusionColor
();
exclusion
.
material
=
exclusionMaterial
;
};
src/ui/Duel/simpleDuel/mod.tsx
View file @
03ed6570
...
@@ -14,6 +14,7 @@ import renderExtraMonsters from "./extraMonsters";
...
@@ -14,6 +14,7 @@ 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
renderCemetery
from
"
./cemetery
"
;
import
renderExclusion
from
"
./exclusion
"
;
import
*
as
CONFIG
from
"
./config
"
;
import
*
as
CONFIG
from
"
./config
"
;
import
{
CardMeta
}
from
"
../../../api/cards
"
;
import
{
CardMeta
}
from
"
../../../api/cards
"
;
...
@@ -77,6 +78,9 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
...
@@ -77,6 +78,9 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
// 创建墓地
// 创建墓地
renderCemetery
(
scene
);
renderCemetery
(
scene
);
// 创建除外区
renderExclusion
(
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