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
adf8a0f9
Commit
adf8a0f9
authored
Dec 29, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Exclusion component
parent
3c0eb8f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
19 deletions
+28
-19
src/ui/Duel/exclusion.ts
src/ui/Duel/exclusion.ts
+0
-19
src/ui/Duel/exclusion_.tsx
src/ui/Duel/exclusion_.tsx
+26
-0
src/ui/Duel/main.tsx
src/ui/Duel/main.tsx
+2
-0
No files found.
src/ui/Duel/exclusion.ts
deleted
100644 → 0
View file @
3c0eb8f7
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
CONFIG
from
"
../../config/ui
"
;
export
default
(
scene
:
BABYLON
.
Scene
)
=>
{
// 除外区
const
shape
=
CONFIG
.
ExclusionSlotShape
();
const
exclusion
=
BABYLON
.
MeshBuilder
.
CreateBox
(
"
exclusion
"
,
shape
);
// 位置
exclusion
.
position
=
new
BABYLON
.
Vector3
(
3.2
,
CONFIG
.
Floating
,
-
0.7
);
// 旋转
exclusion
.
rotation
=
CONFIG
.
ExclusionSlotRotation
();
// 材质
const
exclusionMaterial
=
new
BABYLON
.
StandardMaterial
(
"
exclusionMaterial
"
,
scene
);
exclusionMaterial
.
diffuseColor
=
CONFIG
.
ExclusionColor
();
exclusion
.
material
=
exclusionMaterial
;
};
src/ui/Duel/exclusion_.tsx
0 → 100644
View file @
adf8a0f9
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
CONFIG
from
"
../../config/ui
"
;
const
Exclusion
=
()
=>
{
const
shape
=
CONFIG
.
ExclusionSlotShape
();
const
position
=
new
BABYLON
.
Vector3
(
3.2
,
CONFIG
.
Floating
,
-
0.7
);
const
rotation
=
CONFIG
.
ExclusionSlotRotation
();
return
(
<
box
name=
"exclusion"
width=
{
shape
.
width
}
height=
{
shape
.
height
}
depth=
{
shape
.
depth
}
position=
{
position
}
rotation=
{
rotation
}
>
<
standardMaterial
name=
"exclusion-mat"
diffuseColor=
{
CONFIG
.
ExclusionColor
()
}
></
standardMaterial
>
</
box
>
);
};
export
default
Exclusion
;
src/ui/Duel/main.tsx
View file @
adf8a0f9
...
@@ -10,6 +10,7 @@ import HintNotification from "./hintNotification";
...
@@ -10,6 +10,7 @@ import HintNotification from "./hintNotification";
import
Magics
from
"
./magics_
"
;
import
Magics
from
"
./magics_
"
;
import
Field
from
"
./field_
"
;
import
Field
from
"
./field_
"
;
import
Deck
from
"
./deck_
"
;
import
Deck
from
"
./deck_
"
;
import
Exclusion
from
"
./exclusion_
"
;
const
NeosDuel
=
()
=>
(
const
NeosDuel
=
()
=>
(
<>
<>
...
@@ -25,6 +26,7 @@ const NeosDuel = () => (
...
@@ -25,6 +26,7 @@ const NeosDuel = () => (
<
Magics
/>
<
Magics
/>
<
Field
/>
<
Field
/>
<
Deck
/>
<
Deck
/>
<
Exclusion
/>
<
Ground
/>
<
Ground
/>
</
Provider
>
</
Provider
>
</
Scene
>
</
Scene
>
...
...
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