Jump to content

apply renderingGroupId to all meshes


²Digitalgames
 Share

Recommended Posts

Hello, 

 

i need to apply renderingGroupId= 1 ; to all meshes loaded in one babylon scene. 

BABYLON.SceneLoader.ImportMesh("", "scenes/", "InterfaceObjects.babylon", scene, function (newMeshes) {            var InterfaceMeshes = newMeshes            InterfaceMeshes.renderingGroupId = 1;});

I want to avoid calling newMeshes[0] ,newMeshes[1] ...and so on and apply to the whole array of meshes. Is that possible ?

 

Link to comment
Share on other sites

Most of the arrays used in BabylonJS are the regular JavaScript arrays.

I find Mozilla's pages very helpful - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array

 

The SmartArray (implemented in Babylon.js) is seldom used. You can find the API here - http://doc.babylonjs.com/classes/2.2/SmartArray

It is a wrapper around the regular JS Array to add a bit more functionality. 

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