Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kww_dayDayGetCredits_250512
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
kww_dayDayGetCredits_250512
Commits
4a0c27b0
Commit
4a0c27b0
authored
May 15, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
c7efd18e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
Top.tsx
src/pages/HomePage/Top/Top.tsx
+6
-5
Base.ts
src/pages/HomePage/Top/base/Base.ts
+3
-7
No files found.
src/pages/HomePage/Top/Top.tsx
View file @
4a0c27b0
...
@@ -14,7 +14,7 @@ import "./base/mix.ts";
...
@@ -14,7 +14,7 @@ import "./base/mix.ts";
import
handSvga
from
"@/assets/svga/3牌子转动.svga"
;
import
handSvga
from
"@/assets/svga/3牌子转动.svga"
;
import
{
initDevtools
}
from
'@pixi/devtools'
;
import
{
initDevtools
}
from
'@pixi/devtools'
;
import
.
meta
.
env
.
DEV
&&
initDevtools
({});
export
function
getApp
():
Application
{
export
function
getApp
():
Application
{
return
window
[
"__app"
];
return
window
[
"__app"
];
...
@@ -29,9 +29,6 @@ class Top extends React.Component<any, any> {
...
@@ -29,9 +29,6 @@ class Top extends React.Component<any, any> {
game
:
Game
=
null
;
game
:
Game
=
null
;
async
componentDidMount
()
{
async
componentDidMount
()
{
import
.
meta
.
env
.
DEV
&&
initDevtools
({});
await
initBundle
();
await
initBundle
();
await
this
.
initStage
();
await
this
.
initStage
();
}
}
...
@@ -39,7 +36,11 @@ class Top extends React.Component<any, any> {
...
@@ -39,7 +36,11 @@ class Top extends React.Component<any, any> {
componentWillUnmount
()
{
componentWillUnmount
()
{
Tween
.
removeAllTweens
();
Tween
.
removeAllTweens
();
this
.
app
.
ticker
.
remove
(
this
.
onUpdate
);
this
.
app
.
ticker
.
remove
(
this
.
onUpdate
);
this
.
game
.
destroy
();
this
.
game
.
destroy
({
children
:
true
,
texture
:
false
,
textureSource
:
false
,
});
}
}
async
initStage
()
{
async
initStage
()
{
...
...
src/pages/HomePage/Top/base/Base.ts
View file @
4a0c27b0
import
{
Container
,
Ticker
}
from
"pixi.js"
;
import
{
Container
,
Ticker
,
DestroyOptions
}
from
"pixi.js"
;
export
interface
IBase
{
export
interface
IBase
{
onLoad
:
()
=>
void
,
onLoad
:
()
=>
void
,
...
@@ -27,12 +27,8 @@ export class Base extends Container implements IBase {
...
@@ -27,12 +27,8 @@ export class Base extends Container implements IBase {
}
}
destroy
()
{
destroy
(
options
?:
DestroyOptions
)
{
this
.
onDestroy
();
this
.
onDestroy
();
super
.
destroy
({
super
.
destroy
(
options
);
children
:
true
,
texture
:
false
,
textureSource
:
false
,
});
}
}
}
}
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