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
34425c60
Commit
34425c60
authored
Mar 14, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/wasm_loader' into 'main'
fix See merge request
mycard/Neos!134
parents
bbee7335
54e935ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
.gitlab-ci.yml
.gitlab-ci.yml
+8
-12
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/damage.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/damage.ts
+4
-3
src/ui/Duel/main.tsx
src/ui/Duel/main.tsx
+3
-0
No files found.
.gitlab-ci.yml
View file @
34425c60
...
@@ -22,17 +22,14 @@ npm_ci:
...
@@ -22,17 +22,14 @@ npm_ci:
dependencies
:
dependencies
:
-
npm_ci
-
npm_ci
# ts_check:
ts_check
:
# dependencies:
dependencies
:
# - npm_ci
-
npm_ci
# stage: check
stage
:
check
# tags:
tags
:
# - linux
-
linux
# before_script:
script
:
# - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
-
npx tsc
# script:
# - wasm-pack build ./rust-src --target web
# - npx tsc
rs_check
:
rs_check
:
stage
:
check
stage
:
check
...
@@ -83,7 +80,6 @@ npm_build:
...
@@ -83,7 +80,6 @@ npm_build:
script
:
script
:
-
mv neos.config.prod.json neos.config.json
-
mv neos.config.prod.json neos.config.json
-
npm run build:prod
-
npm run build:prod
-
npx tsc
artifacts
:
artifacts
:
paths
:
paths
:
-
dist
-
dist
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/damage.ts
View file @
34425c60
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
init
,
{
ocgDamageAdapter
}
from
"
rust-src
"
;
//@ts-ignore
import
{
ocgDamageAdapter
}
from
"
rust-src
"
;
/*
/*
* Msg Damage
* Msg Damage
...
@@ -7,8 +8,8 @@ import init, { ocgDamageAdapter } from "rust-src";
...
@@ -7,8 +8,8 @@ import init, { ocgDamageAdapter } from "rust-src";
* @param player - 玩家编号
* @param player - 玩家编号
* @param value - 减少的Hp数值
* @param value - 减少的Hp数值
* */
* */
export
default
async
(
data
:
Uint8Array
)
=>
{
export
default
(
data
:
Uint8Array
)
=>
{
const
damage
=
await
init
().
then
(()
=>
ocgDamageAdapter
(
data
)
);
const
damage
=
ocgDamageAdapter
(
data
);
return
new
ygopro
.
StocGameMessage
.
MsgUpdateHp
(
damage
);
return
new
ygopro
.
StocGameMessage
.
MsgUpdateHp
(
damage
);
};
};
src/ui/Duel/main.tsx
View file @
34425c60
...
@@ -31,6 +31,8 @@ import {
...
@@ -31,6 +31,8 @@ import {
selectMeInitInfo
,
selectMeInitInfo
,
selectOpInitInfo
,
selectOpInitInfo
,
}
from
"
../../reducers/duel/initInfoSlice
"
;
}
from
"
../../reducers/duel/initInfoSlice
"
;
//@ts-ignore
import
rustInit
from
"
rust-src
"
;
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126
const
NeosDuel
=
()
=>
{
const
NeosDuel
=
()
=>
{
...
@@ -39,6 +41,7 @@ const NeosDuel = () => {
...
@@ -39,6 +41,7 @@ const NeosDuel = () => {
useEffect
(()
=>
{
useEffect
(()
=>
{
const
init
=
async
()
=>
{
const
init
=
async
()
=>
{
await
initStrings
();
await
initStrings
();
await
rustInit
();
};
};
if
(
initialRender
.
current
)
{
if
(
initialRender
.
current
)
{
...
...
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