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
03b929ca
Commit
03b929ca
authored
Dec 25, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update ui
parent
3bef189a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
src/ui/Duel/extraMonsters.ts
src/ui/Duel/extraMonsters.ts
+5
-2
src/ui/Duel/magics.ts
src/ui/Duel/magics.ts
+5
-2
src/ui/Duel/monsters.ts
src/ui/Duel/monsters.ts
+5
-2
No files found.
src/ui/Duel/extraMonsters.ts
View file @
03b929ca
...
@@ -6,7 +6,7 @@ export default (scene: BABYLON.Scene) => {
...
@@ -6,7 +6,7 @@ export default (scene: BABYLON.Scene) => {
const
shape
=
CONFIG
.
CardSlotShape
();
const
shape
=
CONFIG
.
CardSlotShape
();
for
(
let
i
in
xs
)
{
for
(
let
i
in
xs
)
{
const
slot
=
BABYLON
.
MeshBuilder
.
Create
Box
(
const
slot
=
BABYLON
.
MeshBuilder
.
Create
Plane
(
`extraMonster
${
i
}
`
,
`extraMonster
${
i
}
`
,
shape
,
shape
,
scene
scene
...
@@ -24,7 +24,10 @@ export default (scene: BABYLON.Scene) => {
...
@@ -24,7 +24,10 @@ export default (scene: BABYLON.Scene) => {
"
extraMonsterMaterial
"
,
"
extraMonsterMaterial
"
,
scene
scene
);
);
extraMonsterMaterial
.
diffuseColor
=
CONFIG
.
extraMonsterColor
();
extraMonsterMaterial
.
diffuseTexture
=
new
BABYLON
.
Texture
(
`http://localhost:3030/images/card_slot.png`
);
extraMonsterMaterial
.
diffuseTexture
.
hasAlpha
=
true
;
slot
.
material
=
extraMonsterMaterial
;
slot
.
material
=
extraMonsterMaterial
;
}
}
};
};
src/ui/Duel/magics.ts
View file @
03b929ca
...
@@ -7,7 +7,7 @@ export default (scene: BABYLON.Scene) => {
...
@@ -7,7 +7,7 @@ export default (scene: BABYLON.Scene) => {
const
shape
=
CONFIG
.
CardSlotShape
();
const
shape
=
CONFIG
.
CardSlotShape
();
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
const
slot
=
BABYLON
.
MeshBuilder
.
Create
Box
(
`magic
${
i
}
`
,
shape
,
scene
);
const
slot
=
BABYLON
.
MeshBuilder
.
Create
Plane
(
`magic
${
i
}
`
,
shape
,
scene
);
// 位置
// 位置
slot
.
position
=
new
BABYLON
.
Vector3
(
slot
.
position
=
new
BABYLON
.
Vector3
(
left
+
gap
*
i
,
left
+
gap
*
i
,
...
@@ -18,7 +18,10 @@ export default (scene: BABYLON.Scene) => {
...
@@ -18,7 +18,10 @@ export default (scene: BABYLON.Scene) => {
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
slot
.
rotation
=
CONFIG
.
CardSlotRotation
();
// 材质
// 材质
const
magicMaterial
=
new
BABYLON
.
StandardMaterial
(
"
magicMaterial
"
,
scene
);
const
magicMaterial
=
new
BABYLON
.
StandardMaterial
(
"
magicMaterial
"
,
scene
);
magicMaterial
.
diffuseColor
=
CONFIG
.
MagicColor
();
magicMaterial
.
diffuseTexture
=
new
BABYLON
.
Texture
(
`http://localhost:3030/images/card_slot.png`
);
magicMaterial
.
diffuseTexture
.
hasAlpha
=
true
;
slot
.
material
=
magicMaterial
;
slot
.
material
=
magicMaterial
;
}
}
};
};
src/ui/Duel/monsters.ts
View file @
03b929ca
...
@@ -7,7 +7,7 @@ export default (scene: BABYLON.Scene) => {
...
@@ -7,7 +7,7 @@ export default (scene: BABYLON.Scene) => {
const
shape
=
CONFIG
.
CardSlotShape
();
const
shape
=
CONFIG
.
CardSlotShape
();
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
const
slot
=
BABYLON
.
MeshBuilder
.
Create
Box
(
`monster
${
i
}
`
,
shape
,
scene
);
const
slot
=
BABYLON
.
MeshBuilder
.
Create
Plane
(
`monster
${
i
}
`
,
shape
,
scene
);
// 位置
// 位置
slot
.
position
=
new
BABYLON
.
Vector3
(
slot
.
position
=
new
BABYLON
.
Vector3
(
left
+
gap
*
i
,
left
+
gap
*
i
,
...
@@ -21,7 +21,10 @@ export default (scene: BABYLON.Scene) => {
...
@@ -21,7 +21,10 @@ export default (scene: BABYLON.Scene) => {
"
monsterMaterial
"
,
"
monsterMaterial
"
,
scene
scene
);
);
monsterMaterial
.
diffuseColor
=
CONFIG
.
MonsterColor
();
monsterMaterial
.
diffuseTexture
=
new
BABYLON
.
Texture
(
`http://localhost:3030/images/card_slot.png`
);
monsterMaterial
.
diffuseTexture
.
hasAlpha
=
true
;
slot
.
material
=
monsterMaterial
;
slot
.
material
=
monsterMaterial
;
}
}
};
};
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