Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate heal effect2 #2967

Merged
merged 5 commits into from
May 11, 2022
Merged

Integrate heal effect2 #2967

merged 5 commits into from
May 11, 2022

Conversation

tcm390
Copy link
Contributor

@tcm390 tcm390 commented May 10, 2022

Integrate heal effect

character-fx.js Outdated
if (!this.healEffect ) {
this.healEffect = metaversefile.createApp();
(async () => {
await metaverseModules.waitForLoad();
Copy link
Contributor

@avaer avaer May 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should not wait for this here. By the time this code runs, wevaverse.js should already have waited for everything we need.

The list of all of the loads is here:

physx.waitForLoad(),

This comment also applies to the rest of the character fx meshes which have a similar code pattern.

Copy link
Contributor

@avaer avaer May 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, instead, of on the first frame, we can create this app the first time it is needed, when the character first gets a heal/cure action.

Since the module is preloaded, it should be ready to go when we hit this code path so there should not be any loading delay.

Copy link
Contributor

@avaer avaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some timing fixes are probably needed, but it looks good overall!

@avaer avaer merged commit a450f11 into master May 11, 2022
lalalune pushed a commit to TheNexusCity/webaverse-app that referenced this pull request Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants