Jump to content

Mesh particle system


fenomas
 Share

Recommended Posts

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. ;)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.)

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...