SterlingRunion Posted May 8, 2018 Share Posted May 8, 2018 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 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 9, 2018 Share Posted May 9, 2018 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. Quote Link to comment Share on other sites More sharing options...
SterlingRunion Posted May 9, 2018 Author Share Posted May 9, 2018 Hi Wingnut thanks for the reply. What browser are you using that throws the event is not defined? The residual particles happen on initial run. It starts twice but the code only starts it once. It "puffs" then starts again. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 9, 2018 Share Posted May 9, 2018 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.) Quote Link to comment Share on other sites More sharing options...
SterlingRunion Posted May 9, 2018 Author Share Posted May 9, 2018 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(); } }); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.