Types - Merge Meshes should allow AbstractMeshes


  • Bug repro on playground: interesting-stallman-uv0yp - CodeSandbox (I hope codesandbox is ok as well)
  • Expected result: Mesh.mergeMeshes allows meshes with the type AbstractMesh[] and returns the merged Nullable<AbstractMesh>
  • Current result: Only Mesh[] as the first argument is allowed and also only returns Nullable<Mesh> instead of Nullable<AbstractMesh> in this case

Affected line (not sure if others are affected): Babylon.js/mesh.ts at b30471324767f110855268108645f1c9bb895683 · BabylonJS/Babylon.js · GitHub

We want to merge only meshes with geometries. Merging non geometry mesh (aka AbstractMesh) does not make sense to me

1 Like