DigiHz Data Posted April 5, 2016 Share Posted April 5, 2016 It seams that all particleSystems in a .babylon scene file is automaticly started. ParticleSystem.Parse = function (parsedParticleSystem, scene, rootUrl) { ..... particleSystem.start(); ....... }; This is great, BUT.....sometimes we do NOT want all the particleSystems to start when the scene loads! So we should add an option to the particleSystem: In function ParticleSystem(name, capacity, scene, customEffect) { ..... this.autoStart = true; ..... } (true as default value, but the user can set this to false and then this particleSystem will not start when the scene is loaded, the user want to start this particleSystem manually later in his code.) In ParticleSystem.prototype.serialize = function () { ..... serializationObject.autoStart = this.autoStart; ...... }; In ParticleSystem.Parse = function (parsedParticleSystem, scene, rootUrl) { .... particleSystem.autoStart = parsedParticleSystem.autoStart; if (particleSystem.autoStart){ particleSystem.start(); } ..... }; adam 1 Quote Link to comment Share on other sites More sharing options...
Temechon Posted April 5, 2016 Share Posted April 5, 2016 I think it's a great idea ! Do you mind creating a PR about it ? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 5, 2016 Share Posted April 5, 2016 Ignore/delete my post, here. I thought I had an easier answer, but then I woke up and noticed that the topic was about particle systems that are instantiated by .babylon file imports. At first, I thought we were talking about local particle systems. Sorry. I WAS thinking... hey... http://playground.babylonjs.com/?12 ... just include/discard line 68 for full control. But noooo... Wingnut, that's not the subject. (Wingnut runs for more coffee and some duct tape for his mouth.) Quote Link to comment Share on other sites More sharing options...
DigiHz Data Posted April 5, 2016 Author Share Posted April 5, 2016 Temechon: I do not know how to actually do a PR. I am nt a member on github. But hopefully RaananW or Deltakosh will do a proper PR about this. Wingnut: Yes you missed the whole idea ALL particleSystems autostart from a .babylon scen file when we load it! That is not allways what we want. Maybe we have 3 particleSystems in the scene, but we only want 1 of them to autostart when the scene loads, the other two we want to start manuall in the code. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Temechon Posted April 5, 2016 Share Posted April 5, 2016 Maybe this tutorial can help you create your first PR http://pixelcodr.com/tutos/contribute/contribute.html Quote Link to comment Share on other sites More sharing options...
DigiHz Data Posted April 5, 2016 Author Share Posted April 5, 2016 Thank you Temechon, i check that link a bit deeper when i get time. Quote Link to comment Share on other sites More sharing options...
DigiHz Data Posted April 7, 2016 Author Share Posted April 7, 2016 RaananW or Deltakosh have anything to say about this? Quote Link to comment Share on other sites More sharing options...
RaananW Posted April 8, 2016 Share Posted April 8, 2016 To prevent breaking changes I would have introduced a "preventAutoStart" variable. Then if it is set the parse method won't start the system. This way we don't need to change all previous scene files to oxide auto start. But I like it a lot! I can do that later today. Quote Link to comment Share on other sites More sharing options...
DigiHz Data Posted April 8, 2016 Author Share Posted April 8, 2016 hello RaananW. Well, i do think twice before i do any suggestions here, and when i do my suggestions, i try to benefit all of us users of BJS. "preventAutoStart" sounds good to me. Thank you. Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 11, 2016 Share Posted November 11, 2016 FYI... preventAutoStart works great... If you are using the Current BabylonExporter.Entititesyou will need to add it to the .cs class. Or wait for the PR that exposes preventAutoStart to the external exporters like 3ds max and unity3d 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.