To reproduce :
- Open dev tool to see the number of colors logged in the console
- Click on the sphere or the ground to change some colors
- The number of colors become
undefined
in the console.
Description :
mesh.getVerticesData(VertexBuffer.ColorKind)
is defined (L 59) until a call tomesh.geometry.updateVerticesDataDirectly(BABYLON.VertexBuffer.ColorKind, data)
(L 49) is made.- Even if
mesh.getVerticesData(VertexBuffer.ColorKind)
isundefined
we can still callmesh.geometry.updateVerticesDataDirectly
successfully.