Jump to content

Particle system issue


Recommended Posts

Hi everyone new poster here. I have a scene that has several particle systems rotating around a sphere. When the scene starts the particle systems leave a smattering of material that I did not intend. My question is how to I fix this? I want the particle systems to behave without this "smatter". The picture show the issue.

Here is the url: http://www.sterlingrunion.com/Planet/Index

 

The javascript is  /Scripts/planet.js

part-system-issue.png

Link to comment
Share on other sites

Hi SR, welcome to the forum!  Sorry for the slow replies on this.

    window.onload = function () {
        event.preventDefault();
        let wdlg = document.getElementById('loader-display');

I am getting error:  event is not defined... on that middle line 137.  FF 52 ESR.

"Smatter".. hehe.  I like that term.  We HAVE seen residual particles happen upon re-runs... at times.

Allow me to ask... are the "smatters" less-likely to happen... on INITIAL loads/unconditional reloads?

It is more-likely to happen on subsequent runs AFTER the initial run?   Thoughts?  (thx)

I don't know what causes it... but smarter people... might. :)

Residual particles after re-runs... yep... we've seen it.  Same weird stuff happens when you un-focus (Alt-Tab) away-from a particle-spraying scene, and then return.  Sort of a PUFF thing happens.  Pent-up particle energy or something.  :D

Link to comment
Share on other sites

9 hours ago, Wingnut said:

FF 52 ESR.

That's Firefox 52 ESR... sort of a Pale Moon half-breed.  hahaha.  Ahem. 

Inside joke... Pale Moon is a serious branch-off from normal Firefox.  Firefox 52 ESR is "extended support release"... which is a limp branch-off from Firefox normal releases.  I think Firefox ESR is pretty popular... especially among those who are rejecting "Quantum".

Thanks for the added details about your issue... well done.  I still have no answers, but others are nearby... stay tuned.

Can you do scene.executeWhenReady(function() { startMyParticleSystems() })  ?  Any improvements?  (thx for checking.  just an idea, probably a bad one.)

Link to comment
Share on other sites

I will have to do some testing on Firefox it seems. I call scene.executeWhenReady(), then create the particle systems and then in scene.registerBeforeRender() the systems call start() by checking a bool flag on an object that holds the info that I need for display.

 

particleMachine.forEach(function (item) {
                item.ps.emitter = new BABYLON.Vector3(item.distance * Math.sin(item.alpha), theSun.position.y, item.distance * Math.cos(item.alpha));
                item.pe.position = new BABYLON.Vector3(item.distance * Math.sin(item.alpha), theSun.position.y, item.distance * Math.cos(item.alpha));
                item.alpha += .005;
                if (item.started == false) {
                    item.started = true;
                    item.ps.start();
                }
            });

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...