Skip to content

Commit

Permalink
Tweak code on loading screen page
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott committed Feb 26, 2024
1 parent 263ff93 commit aadb248
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/user-manual/editor/launch-page/loading-screen.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pc.script.createLoadingScreen((app) => {
document.body.appendChild(div);

// Hide the loading screen when the app starts
app.on('start', () => {
app.once('start', () => {
document.body.removeChild(div);
});
});
Expand Down Expand Up @@ -80,12 +80,12 @@ pc.script.createLoadingScreen((app) => {
app.on('preload:progress', (value) => {
progressFiller.style.width = (value * 100) + '%';
});
app.on('preload:end', () => {
app.once('preload:end', () => {
app.off('preload:progress');
});

// Hide the loading screen when the app starts
app.on('start', () => {
app.once('start', () => {
document.body.removeChild(div);
});
});
Expand Down

0 comments on commit aadb248

Please sign in to comment.