Jump to content

Wanted: The Story of mesh.getEmittedParticleSystems()


Wingnut
 Share

Recommended Posts

Hi gang!

 

Hey, does anyone know the reasoning/purpose behind mesh.getEmittedParticleSystems() and mesh.getHierarchyEmittedParticleSystems()?

 

I understand WHAT they do, but who needs this?  Why?  Does anyone know?  These two functions "feel" dirty to me... like they don't belong.  Does anyone else feel this?  Should I care about this feeling?  :)

 

I don't know if the same mesh can be used for multiple VLS/godray emitters, but if so, then we should have parallel functions like...

 

mesh.getEmittedVLSSystems() and mesh.getHierarchyEmittedVLSSystems(), yes?

 

And what about clones and instances?

 

mesh.getClones() and mesh.getHierarchyClones()

 

and...

 

mesh.getInstances() and mesh.getHierarchyInstances()

 

There may be even more funcs that could be in-parallel, too.

 

Thinkin'.  I'm thinkin' we should say goodbye to those "list which particleSystems I am an emitter-for" functions.  They don't feel right.  :)

 

Thoughts, anyone?  thx

 

Addenda:  mesh.getChildren() is in the same flavor, eh?  Do we need a mesh.getHierarchyChildren() ... so we can find the grand-children and great-grand-children?  hmm.  Returned in arrays of arrays of arrays, maintaining its heirarchy?  I'm scared!  I've never liked methods that go out asking everymesh "which of you has referred to me somehow?".  Feels back-referenc-ish, whatever that means.  It feels like the user should write those "searchers" in his/her code, and they should not be part of the framework code.  Or it belongs in Tools, or something.

Link to comment
Share on other sites

  • 3 weeks later...

mesh.getInstances() and mesh.getHierarchyInstances()

 

When I try mesh.getInstances(), I get an error message of this type :  mesh.getInstances is not a function.

 

I looked in the docs for "getInstances" - found nothing.

 

So, am I correct in assuming there is no such function of this type that will allow me to get instanced meshes??

 

cheers, gryff :)

Link to comment
Share on other sites

http://playground.babylonjs.com/#21ST7D

line 35... sphere.getInstances()... working fine!  Why couldn't you find it?  What's wrong with you?!  ;)

I'm just having fun, of course.  I created a getInstances() in line 3, as everyone can plainly see.  (I'm entertained by the little things, ya know?)

Alright G!  Ya found mesh.instances property... well done.  That'll work.

When I mentioned mesh.getClones() and mesh.getHierarchyClones() and mesh.getInstances() and mesh.getHierarchyInstances(), I was sort of saying "Why aren't they there?  Where are they?"  Yep, we (I) didn't consider the possibility of it being a good ol' fashioned property and not having a getter function. 

Sorry for leading you on a wild goose chase with my comment.  I was dreaming and speculating.  :)

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