You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,13 @@
1
1
## Next
2
2
3
+
## v1.4.0
4
+
5
+
- Add zooming via the following four methods. All four methods supported animated transition just like `draw()`.
6
+
1.`scatterplot.zoomToLocation(target, distance)` for zooming to a specific point location
7
+
2.`scatterplot.zoomToArea(rectangle)` for zooming to an area specified by a rectangular bounding box
8
+
3.`scatterplot.zoomToPoints(pointIndices)` for zooming to a set of points
9
+
4.`scatterplot.zoomToOrigin()` for zooming to the origin
10
+
3
11
## v1.3.2
4
12
5
13
- Add `scatterplot.isSupported` and `renderer.isSupported` as read-only properties to expose if all GL extensions are supported and enabled in the user's browser (#90)
Copy file name to clipboardExpand all lines: README.md
+123-5Lines changed: 123 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ You can encode a point data value in multiple ways. For instance, as you can see
122
122
123
123
**Why can't I specify a range function instead of a map?** Until we have implemented enough scale functions in the shader it's easier to let _you_ pre-compute the map. For instance, if you wanted to encode a continuous values on a log scale of point size, you can simply do `pointSize: Array(100).fill().map((v, i) => Math.log(i + 1) + 1)`.
124
124
125
-
For a complete example see [example/index.js](example/index.js)and [example/size-encoding.js](example/size-encoding.js).
Now whenever you pan or zoom, the domains of `xScale` and `yScale` will be updated according to your current view. Note, the ranges are automatically set to the width and height of your `canvas` object.
192
192
193
-
For a complete example with D3 axes see [example/axes.js](example/axes.js).
To make sense of two different states of points, it can help to show an animation by transitioning the points from their first to their second location. To do so, simple `draw()` the new points as follows:
Sometimes it can be useful to programmatically zoom to a set of points. In regl-scatterplot you can do this with the `zoomToPoints()` method as follows:
Zoom to a specific location, specified in normalized device coordinates. This function is similar to [`scatterplot.lookAt()`](#scatterplot.lookAt), however, it allows to smoothly transition the camera position.
462
+
463
+
**Arguments:**
464
+
465
+
-`target` the camera target given as a `[x, y]` tuple.
466
+
-`distance` the camera distance to the target given as a number between `]0, Infinity]`. The smaller the number the closer moves the camera, i.e., the more the view is zoomed in.
467
+
-`options`[optional] is an object with the following properties:
468
+
-`transition`[default: `false`]: if `true`, the camera will smoothly transition to its new position
469
+
-`transitionDuration`[default: `500`]: the duration in milliseconds over which the transition should occur
470
+
-`transitionEasing`[default: `cubicInOut`]: the easing function, which determines how intermediate values of the transition are calculated
0 commit comments