gamefan Posted May 3, 2018 Share Posted May 3, 2018 Firstly, Congrats for completing 3.2 . We were looking forward to quite of a lot of features implemented here. This isn't a bug, but in my opinion I think the merge meshes should continue merging the rest of the meshes in the list when it encounters an invalid mesh instead of throwing an error. We have a model load workflow which on load finds the center and extent of the model using mergeMeshes. Few of our models have empty container like meshes that are parent of meshes that have real vertex data. And this breaks our App when vertexData.validate() throws "Positions are required". There is an easy fix for this - I made a pass before mergingMeshes like so: for (var i = 0; i < meshes.length; i++) { //only pass meshes that have valid position data if (meshes[i].getVerticesData(BABYLON.VertexBuffer.PositionKind)) clones.push(meshes[i].clone("clone" + i)); } var combinedMesh = BABYLON.Mesh.MergeMeshes(clones); This is potentially a breaking change as it works right with 3.1 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 3, 2018 Share Posted May 3, 2018 We cannot change that behavior because it could swallow an error unknown to the user AS there is an easy fix (that you found :)) I don't think we will integrate it 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.