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
3a6c9638
Commit
3a6c9638
authored
Nov 27, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update drawing duel
parent
7d0f6506
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
src/ui/Duel/simpleDuel/config.ts
src/ui/Duel/simpleDuel/config.ts
+1
-1
src/ui/Duel/simpleDuel/extraMonsters.ts
src/ui/Duel/simpleDuel/extraMonsters.ts
+2
-2
src/ui/Duel/simpleDuel/magics.ts
src/ui/Duel/simpleDuel/magics.ts
+3
-3
src/ui/Duel/simpleDuel/mod.tsx
src/ui/Duel/simpleDuel/mod.tsx
+2
-2
src/ui/Duel/simpleDuel/monsters.ts
src/ui/Duel/simpleDuel/monsters.ts
+1
-1
No files found.
src/ui/Duel/simpleDuel/config.ts
View file @
3a6c9638
...
@@ -9,7 +9,7 @@ export const GroundShape = () => {
...
@@ -9,7 +9,7 @@ export const GroundShape = () => {
return
{
width
:
9.9
,
height
:
8
};
return
{
width
:
9.9
,
height
:
8
};
};
};
export
const
CardSlotShape
=
()
=>
{
export
const
CardSlotShape
=
()
=>
{
return
{
width
:
1
,
height
:
1.2
,
depth
:
0.05
};
return
{
width
:
0.8
,
height
:
1
,
depth
:
0.05
};
};
};
export
const
CardSlotRotation
=
()
=>
{
export
const
CardSlotRotation
=
()
=>
{
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
...
...
src/ui/Duel/simpleDuel/extraMonsters.ts
View file @
3a6c9638
...
@@ -2,7 +2,7 @@ import * as BABYLON from "@babylonjs/core";
...
@@ -2,7 +2,7 @@ import * as BABYLON from "@babylonjs/core";
import
*
as
CONFIG
from
"
./config
"
;
import
*
as
CONFIG
from
"
./config
"
;
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
const
xs
=
[
-
1
,
1
];
const
xs
=
[
-
1
.1
,
1
];
for
(
let
i
in
xs
)
{
for
(
let
i
in
xs
)
{
const
slot
=
BABYLON
.
MeshBuilder
.
CreateBox
(
const
slot
=
BABYLON
.
MeshBuilder
.
CreateBox
(
`extraMonster
${
i
}
`
,
`extraMonster
${
i
}
`
,
...
@@ -10,7 +10,7 @@ export default (scene: BABYLON.Scene) => {
...
@@ -10,7 +10,7 @@ export default (scene: BABYLON.Scene) => {
scene
scene
);
);
// 位置
// 位置
slot
.
position
=
new
BABYLON
.
Vector3
(
xs
[
i
],
0.5
,
-
1
);
slot
.
position
=
new
BABYLON
.
Vector3
(
xs
[
i
],
0.5
,
0
);
// 旋转
// 旋转
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
// 材质
// 材质
...
...
src/ui/Duel/simpleDuel/magics.ts
View file @
3a6c9638
...
@@ -2,8 +2,8 @@ import * as BABYLON from "@babylonjs/core";
...
@@ -2,8 +2,8 @@ import * as BABYLON from "@babylonjs/core";
import
*
as
CONFIG
from
"
./config
"
;
import
*
as
CONFIG
from
"
./config
"
;
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
const
left
=
-
2
;
const
left
=
-
2
.15
;
const
gap
=
1
;
const
gap
=
1
.05
;
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
const
slot
=
BABYLON
.
MeshBuilder
.
CreateBox
(
const
slot
=
BABYLON
.
MeshBuilder
.
CreateBox
(
`magic
${
i
}
`
,
`magic
${
i
}
`
,
...
@@ -11,7 +11,7 @@ export default (scene: BABYLON.Scene) => {
...
@@ -11,7 +11,7 @@ export default (scene: BABYLON.Scene) => {
scene
scene
);
);
// 位置
// 位置
slot
.
position
=
new
BABYLON
.
Vector3
(
left
+
gap
*
i
,
0.5
,
-
3
);
slot
.
position
=
new
BABYLON
.
Vector3
(
left
+
gap
*
i
,
0.5
,
-
2.5
);
// 旋转
// 旋转
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
// 材质
// 材质
...
...
src/ui/Duel/simpleDuel/mod.tsx
View file @
3a6c9638
...
@@ -58,13 +58,13 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
...
@@ -58,13 +58,13 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
light
.
intensity
=
0.7
;
light
.
intensity
=
0.7
;
// 魔法陷阱区
// 魔法陷阱区
//
renderMagics(scene);
renderMagics
(
scene
);
// 怪兽区
// 怪兽区
renderMonsters
(
scene
);
renderMonsters
(
scene
);
// 创建额外怪兽区
// 创建额外怪兽区
//
renderExtraMonsters(scene);
renderExtraMonsters
(
scene
);
// 创建手牌
// 创建手牌
renderHands
(
hands
,
scene
);
renderHands
(
hands
,
scene
);
...
...
src/ui/Duel/simpleDuel/monsters.ts
View file @
3a6c9638
...
@@ -11,7 +11,7 @@ export default (scene: BABYLON.Scene) => {
...
@@ -11,7 +11,7 @@ export default (scene: BABYLON.Scene) => {
scene
scene
);
);
// 位置
// 位置
slot
.
position
=
new
BABYLON
.
Vector3
(
left
+
gap
*
i
,
0.5
,
-
2.
5
);
slot
.
position
=
new
BABYLON
.
Vector3
(
left
+
gap
*
i
,
0.5
,
-
1.3
5
);
// 旋转
// 旋转
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
// 材质
// 材质
...
...
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