Skip to content

Commit 418652c

Browse files
committed
Update to reflect recent changes
1 parent 64c0ecc commit 418652c

1 file changed

Lines changed: 22 additions & 31 deletions

File tree

README.md

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,10 @@ For a complete example see [example/index.js](example/index.js).
9494

9595
**Returns:** a new scatterplot instance.
9696

97-
**Options:** is an object that accepts the following properties:
97+
**Options:** is an object that accepts any of the [settable properties](scatterplot.set). Additionally, you can set the following properties:
9898

9999
- `regl` a Regl instance to be used for rendering.
100-
- `background` background color of the scatterplot.
101-
- `backgroundImage` background image for the scatterplot. This can either be a URL or a [regl texture object](https://github.com/regl-project/regl/blob/gh-pages/API.md#textures). The latter can be created with [`scatterplot.createTextureFromUrl`](#scatterplot.createTextureFromUrl).
102-
- `canvas` canvas element.
103-
- `colors` colormap.
104-
- `pointSize` size of the points.
105-
- `pointSizeSelected` additional size of the points when being selected. I.e., if set to `0` selected and deselect points have the same size.
106-
- `pointOutlineWidth` width of the point outline when a point is being selected.
107-
- `width` width of the canvas element.
108-
- `height` height of the canvas element.
109-
- `target` location that the camera should look at.
110-
- `distance` distance of the camera to the target.
111-
- `rotation` rotation of the camera around the target.
112-
- `view` view matrix defining `target`, `distance`, and `rotation`. When given `target`, `distance`, and `rotation` are ignored.
100+
- `canvas` background color of the scatterplot.
113101

114102
<a name="createRegl" href="#createRegl">#</a> <b>createRegl</b>(<i>canvas</i>)
115103

@@ -168,27 +156,30 @@ scatterplot.draw([]);
168156

169157
| Name | Type | Default | Constraints | Settable | Nullifiable |
170158
| ----------------- | --------------- | ---------------------------------- | -------------------------------------- | -------- | ----------- |
171-
| canvas | object | `document.createElement('canvas')` | | `true` | `false` |
172-
| regl | object | `createRegl(canvas)` | | `true` | `false` |
159+
| canvas | object | `document.createElement('canvas')` | | `false` | `false` |
160+
| regl | object | `createRegl(canvas)` | | `false` | `false` |
173161
| version | string | | | `false` | `false` |
174-
| width | number | `300` | > 0 | `true` | `false` |
175-
| height | number | `200` | > 0 | `true` | `false` |
176-
| aspectRatio | number | `1.0` | > 0 | `true` | `false` |
177-
| background | string or array | rgba(0,0,0,1) | hex, rgb, rgba | `true` | `false` |
162+
| width | integer | `300` | > 0 | `true` | `false` |
163+
| height | integer | `200` | > 0 | `true` | `false` |
164+
| aspectRatio | float | `1.0` | > 0 | `true` | `false` |
165+
| backgroundColor | string or array | rgba(0, 0, 0, 1) | hex, rgb, rgba | `true` | `false` |
178166
| backgroundImage | function | `null` | Regl texture | `true` | `true` |
167+
| cameraTarget | tuple | `[0, 0]` | | `true` | `false` |
168+
| cameraDistance | float | `1` | > 0 | `true` | `false` |
169+
| cameraRotation | float | `0` | | `true` | `false` |
179170
| colorBy | string | `null` | `category` or `value` | `true` | `true` |
180-
| opacity | number | `1` | > 0 | `true` | `false` |
181-
| pointColor | number | `[0.66, 0.66, 0.66, 1]` | single value or list of hex, rgb, rgba | `true` | `false` |
182-
| pointColorActive | number | `[0, 0.55, 1, 1]` | single value or list of hex, rgb, rgba | `true` | `false` |
183-
| pointColorHover | number | `[1, 1, 1, 1]` | single value or list of hex, rgb, rgba | `true` | `false` |
184-
| pointOutlineWidth | number | `2` | >= 0 | `true` | `false` |
185-
| pointSize | number | `6` | > 0 | `true` | `false` |
186-
| pointSizeSelected | number | `2` | >= 0 | `true` | `false` |
187-
| lassoColor | array | rgba(0, 0.667, 1, 1) | hex, rgb, rgba | `true` | `false` |
188-
| lassoMinDelay | number | 15 | >= 0 | `true` | `false` |
189-
| lassoMinDist | number | 4 | >= 0 | `true` | `false` |
171+
| opacity | float | `1` | > 0 | `true` | `false` |
172+
| pointColor | quadruple | `[0.66, 0.66, 0.66, 1]` | single value or list of hex, rgb, rgba | `true` | `false` |
173+
| pointColorActive | quadruple | `[0, 0.55, 1, 1]` | single value or list of hex, rgb, rgba | `true` | `false` |
174+
| pointColorHover | quadruple | `[1, 1, 1, 1]` | single value or list of hex, rgb, rgba | `true` | `false` |
175+
| pointOutlineWidth | integer | `2` | >= 0 | `true` | `false` |
176+
| pointSize | integer | `6` | > 0 | `true` | `false` |
177+
| pointSizeSelected | integer | `2` | >= 0 | `true` | `false` |
178+
| lassoColor | quadruple | rgba(0, 0.667, 1, 1) | hex, rgb, rgba | `true` | `false` |
179+
| lassoMinDelay | integer | 15 | >= 0 | `true` | `false` |
180+
| lassoMinDist | integer | 4 | >= 0 | `true` | `false` |
190181
| showRecticle | boolean | `false` | `true` or `false` | `true` | `false` |
191-
| recticleColor | array | rgba(1,1,1,.5) | hex, rgb, rgba | `true` | `false` |
182+
| recticleColor | quadruple | rgba(1, 1, 1, .5) | hex, rgb, rgba | `true` | `false` |
192183

193184
**Notes:**
194185

0 commit comments

Comments
 (0)