... we can see that the DrawRenderer class is using mesh._state.hash, which does not exist and is undefined.
This makes different meshes with different computed _state.drawHash properties get assigned the same renderer, and produce that for example you cannot set different billboard flags to the different meshes (all of them will be rendered with the same billboard flag becuase the first mesh to arrive will dictate how other meshes behave).
The solution is as simple as (in DrawRenderer' class) changing...
In the following piece of code...
https://github.com/xeokit/xeokit-sdk/blob/6d449ebe58500f0b60b4e30a5c46e3db047d74ba/src/viewer/scene/mesh/Mesh.js#L214-L233
... we can see that the drawHash of the
Mesh
class is stored inside_state.drawHash
.If we now look at...
https://github.com/xeokit/xeokit-sdk/blob/6d449ebe58500f0b60b4e30a5c46e3db047d74ba/src/viewer/scene/mesh/draw/DrawRenderer.js#L29-L38
... we can see that the
DrawRenderer
class is usingmesh._state.hash
, which does not exist and is undefined.This makes different meshes with different computed
_state.drawHash
properties get assigned the samerenderer
, and produce that for example you cannot set different billboard flags to the different meshes (all of them will be rendered with the same billboard flag becuase the first mesh to arrive will dictate how other meshes behave).The solution is as simple as (in
DrawRenderer'
class) changing...... to...