fenomas Posted June 28, 2015 Share Posted June 28, 2015 In case anyone else finds this useful:https://github.com/andyhall/mesh-particle-system This is a particle system loosely modeled on the standard one, but which renders as a standard mesh (with no alpha blending, and compositing correctly with transparent meshes). Renamed a little to not overlap with Jerome's much more exciting system. API is on the GH page. It's mostly done - still needs a dispose(), a way to manually emit particles, and maybe a disposeOnFinish or something, but mostly ready to use. Edited to add: It slows down a little if you go over 30-40K particles. jahow, Temechon and jerome 3 Quote Link to comment Share on other sites More sharing options...
jerome Posted June 28, 2015 Share Posted June 28, 2015 Real nice : straight forward, simple and powerful enough to deal dozens of thousands real particles ! I like it ! Quote Link to comment Share on other sites More sharing options...
jahow Posted June 28, 2015 Share Posted June 28, 2015 Well done fen, simple and lean Thanks. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 29, 2015 Share Posted June 29, 2015 Hey Andy you should reference it in our babylonjs/extensions repos Quote Link to comment Share on other sites More sharing options...
fenomas Posted June 30, 2015 Author Share Posted June 30, 2015 Updated to add missing features, and fixed a few bugs (it now works with parented cameras and whatnot). This should be production ready, as far as I can tell. Hey Andy you should reference it in our babylonjs/extensions repos What's that, and how would I do it? Quote Link to comment Share on other sites More sharing options...
jerome Posted June 30, 2015 Share Posted June 30, 2015 @Andy : I like your code, so clean and clever https://github.com/andyhall/mesh-particle-system/blob/master/index.js#L344I think you should use IdentyToRef() here instead of Identity() as Identity() creates a new matrix instance each frame. This would lower the GC activity. Quote Link to comment Share on other sites More sharing options...
fenomas Posted June 30, 2015 Author Share Posted June 30, 2015 Thanks! I think you should use IdentyToRef() here instead of Identity() as Identity() creates a new matrix instance each frame. This would lower the GC activity. In theory, yeah, but generally JS VMs deal very well with objects like this that don't outlive their context. BJS already creates hundreds/thousands of temporary objects like this each frame, so I figured it was clearer for temp variables to just be temporary. Of course if the difference is detectable I'd change it. (I haven't checked.) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 30, 2015 Share Posted June 30, 2015 You can put your code here: https://github.com/BabylonJS/Extensions And even write doc in the extensions part of the doc 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.