I am building an interactive map based on a texture from svg file.
My initial setup was to use Three.Geometry with PointsMaterial.
Results can be viewed here https://codepen.io/stopyransky/pen/rNNXOzv.
Map animates and renders vertices in right positions.
Later I realised that i will need to have per-vertex color so I had to change to Three.BufferGeometry and assign to it BufferAttributes for position and color manually. Once i did it, scene renders without errors, but the vertices are totally in wrong positions.
Here is sketch with BufferGeometry: https://codepen.io/stopyransky/pen/abzoQKG
I have tried to switch into ShaderMaterial and looking at source code from this example:
Unfortunately shader (trimmed to minimum features) is not rendering anything.
Please help to understand how to switch to BufferGeometry in this case. What am I missing so vertices render in correct positions and colors?
Should i move to ShaderMaterial in this case or it is not needed ?