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
Biluo Shen
Neos
Commits
50f95383
Commit
50f95383
authored
Nov 27, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update simpleDuel
parent
c490cf18
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
55 additions
and
29 deletions
+55
-29
src/ui/Duel/simpleDuel/cemetery.ts
src/ui/Duel/simpleDuel/cemetery.ts
+7
-5
src/ui/Duel/simpleDuel/config.ts
src/ui/Duel/simpleDuel/config.ts
+3
-0
src/ui/Duel/simpleDuel/deck.ts
src/ui/Duel/simpleDuel/deck.ts
+10
-2
src/ui/Duel/simpleDuel/exclusion.ts
src/ui/Duel/simpleDuel/exclusion.ts
+3
-5
src/ui/Duel/simpleDuel/extraMonsters.ts
src/ui/Duel/simpleDuel/extraMonsters.ts
+8
-2
src/ui/Duel/simpleDuel/field.ts
src/ui/Duel/simpleDuel/field.ts
+7
-2
src/ui/Duel/simpleDuel/magics.ts
src/ui/Duel/simpleDuel/magics.ts
+8
-6
src/ui/Duel/simpleDuel/mod.tsx
src/ui/Duel/simpleDuel/mod.tsx
+1
-1
src/ui/Duel/simpleDuel/monsters.ts
src/ui/Duel/simpleDuel/monsters.ts
+8
-6
No files found.
src/ui/Duel/simpleDuel/cemetery.ts
View file @
50f95383
...
@@ -3,12 +3,14 @@ import * as CONFIG from "./config";
...
@@ -3,12 +3,14 @@ import * as CONFIG from "./config";
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
// 墓地
// 墓地
const
cemetery
=
BABYLON
.
MeshBuilder
.
CreateBox
(
const
shape
=
CONFIG
.
CemeterySlotShape
();
"
cemetery
"
,
const
cemetery
=
BABYLON
.
MeshBuilder
.
CreateBox
(
"
cemetery
"
,
shape
);
CONFIG
.
CemeterySlotShape
()
);
// 位置
// 位置
cemetery
.
position
=
new
BABYLON
.
Vector3
(
3.2
,
0.5
,
-
2.0
);
cemetery
.
position
=
new
BABYLON
.
Vector3
(
3.2
,
shape
.
depth
/
2
+
CONFIG
.
Floating
,
-
2.0
);
// 旋转
// 旋转
cemetery
.
rotation
=
CONFIG
.
CemeterySlotRotation
();
cemetery
.
rotation
=
CONFIG
.
CemeterySlotRotation
();
// 材质
// 材质
...
...
src/ui/Duel/simpleDuel/config.ts
View file @
50f95383
...
@@ -42,6 +42,9 @@ export const FieldSlotRotation = () => {
...
@@ -42,6 +42,9 @@ export const FieldSlotRotation = () => {
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
return
new
BABYLON
.
Vector3
(
1.5
,
0
,
0
);
};
};
// 浮空
export
const
Floating
=
0.02
;
// 手牌
// 手牌
export
const
HandShape
=
()
=>
{
export
const
HandShape
=
()
=>
{
return
{
width
:
0.5
,
height
:
0.75
};
return
{
width
:
0.5
,
height
:
0.75
};
...
...
src/ui/Duel/simpleDuel/deck.ts
View file @
50f95383
...
@@ -9,7 +9,11 @@ export default (scene: BABYLON.Scene) => {
...
@@ -9,7 +9,11 @@ export default (scene: BABYLON.Scene) => {
scene
scene
);
);
// 位置
// 位置
deck
.
position
=
new
BABYLON
.
Vector3
(
3.2
,
0.5
,
-
3.2
);
deck
.
position
=
new
BABYLON
.
Vector3
(
3.2
,
CONFIG
.
DeckSlotShape
().
depth
/
2
+
CONFIG
.
Floating
,
-
3.2
);
// 旋转
// 旋转
deck
.
rotation
=
CONFIG
.
DeckSlotRotation
();
deck
.
rotation
=
CONFIG
.
DeckSlotRotation
();
// 材质
// 材质
...
@@ -25,7 +29,11 @@ export default (scene: BABYLON.Scene) => {
...
@@ -25,7 +29,11 @@ export default (scene: BABYLON.Scene) => {
scene
scene
);
);
// 位置
// 位置
extraDeck
.
position
=
new
BABYLON
.
Vector3
(
-
3.3
,
0.5
,
-
3.2
);
extraDeck
.
position
=
new
BABYLON
.
Vector3
(
-
3.3
,
CONFIG
.
ExtraDeckSlotShape
().
depth
/
2
+
CONFIG
.
Floating
,
-
3.2
);
// 旋转
// 旋转
extraDeck
.
rotation
=
CONFIG
.
DeckSlotRotation
();
extraDeck
.
rotation
=
CONFIG
.
DeckSlotRotation
();
// 材质
// 材质
...
...
src/ui/Duel/simpleDuel/exclusion.ts
View file @
50f95383
...
@@ -3,12 +3,10 @@ import * as CONFIG from "./config";
...
@@ -3,12 +3,10 @@ import * as CONFIG from "./config";
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
// 除外区
// 除外区
const
exclusion
=
BABYLON
.
MeshBuilder
.
CreateBox
(
const
shape
=
CONFIG
.
ExclusionSlotShape
();
"
exclusion
"
,
const
exclusion
=
BABYLON
.
MeshBuilder
.
CreateBox
(
"
exclusion
"
,
shape
);
CONFIG
.
ExclusionSlotShape
()
);
// 位置
// 位置
exclusion
.
position
=
new
BABYLON
.
Vector3
(
3.2
,
0.5
,
-
0.7
);
exclusion
.
position
=
new
BABYLON
.
Vector3
(
3.2
,
CONFIG
.
Floating
,
-
0.7
);
// 旋转
// 旋转
exclusion
.
rotation
=
CONFIG
.
ExclusionSlotRotation
();
exclusion
.
rotation
=
CONFIG
.
ExclusionSlotRotation
();
// 材质
// 材质
...
...
src/ui/Duel/simpleDuel/extraMonsters.ts
View file @
50f95383
...
@@ -3,14 +3,20 @@ import * as CONFIG from "./config";
...
@@ -3,14 +3,20 @@ import * as CONFIG from "./config";
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
const
xs
=
[
-
1.1
,
1
];
const
xs
=
[
-
1.1
,
1
];
const
shape
=
CONFIG
.
CardSlotShape
();
for
(
let
i
in
xs
)
{
for
(
let
i
in
xs
)
{
const
slot
=
BABYLON
.
MeshBuilder
.
CreateBox
(
const
slot
=
BABYLON
.
MeshBuilder
.
CreateBox
(
`extraMonster
${
i
}
`
,
`extraMonster
${
i
}
`
,
CONFIG
.
CardSlotShape
()
,
shape
,
scene
scene
);
);
// 位置
// 位置
slot
.
position
=
new
BABYLON
.
Vector3
(
xs
[
i
],
0.5
,
0
);
slot
.
position
=
new
BABYLON
.
Vector3
(
xs
[
i
],
shape
.
depth
/
2
+
CONFIG
.
Floating
,
0
);
// 旋转
// 旋转
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
// 材质
// 材质
...
...
src/ui/Duel/simpleDuel/field.ts
View file @
50f95383
...
@@ -3,9 +3,14 @@ import * as CONFIG from "./config";
...
@@ -3,9 +3,14 @@ import * as CONFIG from "./config";
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
// 墓地
// 墓地
const
field
=
BABYLON
.
MeshBuilder
.
CreateBox
(
"
field
"
,
CONFIG
.
FieldSlotShape
());
const
shape
=
CONFIG
.
FieldSlotShape
();
const
field
=
BABYLON
.
MeshBuilder
.
CreateBox
(
"
field
"
,
shape
);
// 位置
// 位置
field
.
position
=
new
BABYLON
.
Vector3
(
-
3.3
,
0.5
,
-
2.0
);
field
.
position
=
new
BABYLON
.
Vector3
(
-
3.3
,
shape
.
depth
/
2
+
CONFIG
.
Floating
,
-
2.0
);
// 旋转
// 旋转
field
.
rotation
=
CONFIG
.
FieldSlotRotation
();
field
.
rotation
=
CONFIG
.
FieldSlotRotation
();
// 材质
// 材质
...
...
src/ui/Duel/simpleDuel/magics.ts
View file @
50f95383
...
@@ -4,14 +4,16 @@ import * as CONFIG from "./config";
...
@@ -4,14 +4,16 @@ import * as CONFIG from "./config";
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
const
left
=
-
2.15
;
const
left
=
-
2.15
;
const
gap
=
1.05
;
const
gap
=
1.05
;
const
shape
=
CONFIG
.
CardSlotShape
();
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
}
`
,
shape
,
scene
);
`magic
${
i
}
`
,
CONFIG
.
CardSlotShape
(),
scene
);
// 位置
// 位置
slot
.
position
=
new
BABYLON
.
Vector3
(
left
+
gap
*
i
,
0.5
,
-
2.5
);
slot
.
position
=
new
BABYLON
.
Vector3
(
left
+
gap
*
i
,
shape
.
depth
/
2
+
CONFIG
.
Floating
,
-
2.5
);
// 旋转
// 旋转
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
// 材质
// 材质
...
...
src/ui/Duel/simpleDuel/mod.tsx
View file @
50f95383
...
@@ -47,7 +47,7 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
...
@@ -47,7 +47,7 @@ export default class SimpleDuelPlateImpl implements IDuelPlate {
// 创建Camera
// 创建Camera
const
camera
=
new
BABYLON
.
FreeCamera
(
const
camera
=
new
BABYLON
.
FreeCamera
(
"
camera1
"
,
"
camera1
"
,
new
BABYLON
.
Vector3
(
0
,
12
,
0
),
// 俯视方向
new
BABYLON
.
Vector3
(
0
,
8
,
-
1
0
),
// 俯视方向
scene
scene
);
);
camera
.
setTarget
(
BABYLON
.
Vector3
.
Zero
());
// 俯视向前
camera
.
setTarget
(
BABYLON
.
Vector3
.
Zero
());
// 俯视向前
...
...
src/ui/Duel/simpleDuel/monsters.ts
View file @
50f95383
...
@@ -4,14 +4,16 @@ import * as CONFIG from "./config";
...
@@ -4,14 +4,16 @@ import * as CONFIG from "./config";
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
const
left
=
-
2.15
;
const
left
=
-
2.15
;
const
gap
=
1.05
;
const
gap
=
1.05
;
const
shape
=
CONFIG
.
CardSlotShape
();
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
const
slot
=
BABYLON
.
MeshBuilder
.
CreateBox
(
const
slot
=
BABYLON
.
MeshBuilder
.
CreateBox
(
`monster
${
i
}
`
,
shape
,
scene
);
`monster
${
i
}
`
,
CONFIG
.
CardSlotShape
(),
scene
);
// 位置
// 位置
slot
.
position
=
new
BABYLON
.
Vector3
(
left
+
gap
*
i
,
0.5
,
-
1.35
);
slot
.
position
=
new
BABYLON
.
Vector3
(
left
+
gap
*
i
,
shape
.
depth
/
2
+
CONFIG
.
Floating
,
-
1.35
);
// 旋转
// 旋转
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