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
c490cf18
Commit
c490cf18
authored
Nov 27, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
render field
parent
03ed6570
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
src/ui/Duel/simpleDuel/config.ts
src/ui/Duel/simpleDuel/config.ts
+11
-0
src/ui/Duel/simpleDuel/field.ts
src/ui/Duel/simpleDuel/field.ts
+15
-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 @
c490cf18
...
...
@@ -23,6 +23,9 @@ export const CemeterySlotShape = () => {
export
const
ExclusionSlotShape
=
()
=>
{
return
{
width
:
0.8
,
height
:
1
,
depth
:
0.2
};
};
export
const
FieldSlotShape
=
()
=>
{
return
{
width
:
0.8
,
height
:
1
,
depth
:
0.2
};
};
export
const
CardSlotRotation
=
()
=>
{
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
};
...
...
@@ -35,6 +38,9 @@ export const CemeterySlotRotation = () => {
export
const
ExclusionSlotRotation
=
()
=>
{
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
};
export
const
FieldSlotRotation
=
()
=>
{
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
};
// 手牌
export
const
HandShape
=
()
=>
{
...
...
@@ -78,3 +84,8 @@ export const CemeteryColor = () => {
export
const
ExclusionColor
=
()
=>
{
return
BABYLON
.
Color3
.
Black
();
};
// 场地
export
const
FieldColor
=
()
=>
{
return
BABYLON
.
Color3
.
White
();
};
src/ui/Duel/simpleDuel/field.ts
0 → 100644
View file @
c490cf18
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
CONFIG
from
"
./config
"
;
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
// 墓地
const
field
=
BABYLON
.
MeshBuilder
.
CreateBox
(
"
field
"
,
CONFIG
.
FieldSlotShape
());
// 位置
field
.
position
=
new
BABYLON
.
Vector3
(
-
3.3
,
0.5
,
-
2.0
);
// 旋转
field
.
rotation
=
CONFIG
.
FieldSlotRotation
();
// 材质
const
fieldMaterial
=
new
BABYLON
.
StandardMaterial
(
"
fieldMaterial
"
,
scene
);
fieldMaterial
.
diffuseColor
=
CONFIG
.
FieldColor
();
field
.
material
=
fieldMaterial
;
};
src/ui/Duel/simpleDuel/mod.tsx
View file @
c490cf18
...
...
@@ -15,6 +15,7 @@ import renderMagics from "./magics";
import
renderDeck
from
"
./deck
"
;
import
renderCemetery
from
"
./cemetery
"
;
import
renderExclusion
from
"
./exclusion
"
;
import
renderField
from
"
./field
"
;
import
*
as
CONFIG
from
"
./config
"
;
import
{
CardMeta
}
from
"
../../../api/cards
"
;
...
...
@@ -81,6 +82,9 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
// 创建除外区
renderExclusion
(
scene
);
// 创建场地
renderField
(
scene
);
// 创建地板
const
ground
=
BABYLON
.
MeshBuilder
.
CreateGround
(
"
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