flekschas / regl-scatterplot

Scalable WebGL-based scatter plot library build with Regl
https://flekschas.github.io/regl-scatterplot/
MIT License
194 stars 24 forks source link

feat: Ability to pass `scaleBounds` to camera #160

Closed insertmike closed 1 year ago

insertmike commented 1 year ago

It would be very nice if we can provide scaleBounds argument to camera, to limit the zoom-in and out.

flekschas commented 1 year ago

You can set the camera's scale bounds as follows:

scatterplot.get('camera').setScaleBounds([1, 10]);
flekschas commented 1 year ago

See https://github.com/flekschas/dom-2d-camera#api and https://github.com/flekschas/camera-2d#api for the camera API docs