Jump to content

Why is there a name required for many Object creation ?


GrosSacASacs
 Share

Recommended Posts

Hi GSAS!  Yes, take a look here...

http://doc.babylonjs.com/classes/2.3/Scene

Now use your browser's "search this page" feature... for 'byName'.  You'll see that there are many "byName" methods.  If your project doesn't need any getMeshByName calling, then mesh names are not important for any other reason.  You can have many mesh with the same name... in a scene.  Under nearly ALL circumstances, it doesn't matter.

When using a loop to produce an array of meshes, many people add the loop's indexer to each mesh name... like this:

http://playground.babylonjs.com/#2JKYWK#1

Perhaps others will have different opinions, though.  I may have forgotten some issues, but I don't think so.

You can also add tags to scene items, and use our powerful get-by-tags system.  It is MUCH more versatile than getByName or getById methods. 

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