Configuration Options
MouseView.js allows you to configure the overlay and aperture, this page gives you an overview of how to do this and what you can configure.
Checkout Functions for an overview of the methods for controlling MouseView.js.
#
Setting attributesYou can set multiple different attributes of the aperture and the overlay
Attributes Example
#
All attributesSetting | Description | Accepted Types | Default |
---|---|---|---|
Aperture | |||
mouseview.params.apertureSize | Size of the viewing aperture in pixels or percentage of screen width. | Number-Integer (pixels) or | β5%β |
String (βx%β) | |||
mouseview.params.apertureGauss | Standard Deviation for Gaussian edge. | Number-Integer (pixels) | 10 |
Overlay | |||
mouseview.params.overlayColour | Colour of overlay. | String containing CSS Keyword, hexadecimal, or HSL code. | βblackβ |
mouseview.params.overlayAlpha | Transparency of overlay. | Number-Decimal (0-1). | 0.8 |
mouseview.params.overlayGaussian | Standard Deviation for Gaussian blurring of overlay. | Number-Integer (pixels) | 20 |
mouseview.params.overlayGaussianFunc | Function that will be run when the Gaussian overlay has been generated. | JavaScript arrow function. β() => {}β | () => {console.log('overlay generated')} |
mouseview.params.overlayGaussianInterval | Millisecond Interval for the Gaussian blur overlay to be regenerated. Passing 0 means it will only update on window resize and page scroll. | Number-Integer or Float (milliseconds) | 0 |
Recording | |||
mouseview.timing.sampleRate | Desired target sample rate. Target because timing can be screen refreshes can be variable. | Number-Integer or Float (milliseconds) | 16.66 (one refresh at 50Hz) |