regl-scatterplot icon indicating copy to clipboard operation
regl-scatterplot copied to clipboard

draw different figures instead of points

Open cherepanovic opened this issue 4 years ago • 1 comments

Hello Fritz,

could you please point me to the position where I could extend the code for other figures (at the moment only points are possible to draw), I would like to extend it for other figures such as pies and so on.

Thanks in advance!

cherepanovic avatar Sep 10 '20 14:09 cherepanovic

Unfortunately, this is not possible at the moment and I am not planning to add support for custom shapes/meshes/textures any time soon. Having said that if you're willing to flesh out a PR I am happy to integrate it (if it does not impact the general performance).

Why only dots/points? Well, I created regl-scatterplot to have a interactive scatterplot that scales to millions of points. Other types of shapes are technically possible but I suspect they will harm the overall rendering and interaction performance.

Where would I have to look to draw something other than points? Take a look at drawPoints() and the related vertex shader. We'd need a new function (maybe called drawMesh) and a new vertex shaper. Additionally, for interactivity, I suspect that the cursor/object collision check needs to be updated as well.

flekschas avatar Sep 10 '20 15:09 flekschas

Closing this issue as I don't have any plans to address different shapes any time soon. It might come in v2.

flekschas avatar Jul 29 '23 16:07 flekschas