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

scene fog and spe-particles cause crash #654

Closed
mwfarb opened this issue Jul 22, 2024 · 1 comment · Fixed by #653
Closed

scene fog and spe-particles cause crash #654

mwfarb opened this issue Jul 22, 2024 · 1 comment · Fixed by #653
Labels
bug Something isn't working

Comments

@mwfarb
Copy link
Contributor

mwfarb commented Jul 22, 2024

If any elements of https://github.com/supermedium/aframe-environment-component are set, they often enable fog behind the scenes, where fog > 0. In this state, adding any https://github.com/harlyq/aframe-spe-particles-component entity causes a runtime crash between the two particle emitter systems (env-presets vs. spe-particles).

  • Quick mitigation is to set scene-options.env-presets.fog = 0, however that is unrealistic for new users.
  • Slightly better would be to disable env-presets fog behind the scenes when spe-particles are present. Hackish, but realistic for new users. We could console log this setting to at least help awareness.
  • aframe-environment-component has been updated recently, we could see if it helps. Unfortunately aframe-spe-particles-component has not been updated for six years, and we've modified it ourselves to work with newer THREE.js. Maybe it again needs another update for THREE.
@mwfarb mwfarb added the bug Something isn't working label Jul 22, 2024
@mwfarb
Copy link
Contributor Author

mwfarb commented Jul 24, 2024

@EdwardLu2018 The best solution, aside from rewriting the spe-particles for recent THREE, is to remove the conflict from the component settings automatically for all particles by setting affectedByFog from true to false .

"spe-particles": {"affectedByFog": false}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant