Overview
A component that enables configuration of the proximity thresholds for raycasting against lines and points.
This is useful because the default thresholds for raycasting against lines and points is 1m, which is far too large for many applications. See
this A-Frame issue.
Schema
| Property | Description | Default |
| -------- | ------------------------------------------------------------ | ------- |
| line | The accuracy threshold (in meters) to use when raycasting against lines | 0.01 |
| points | The accuracy threshold (in meters) to use when raycasting against points | 0.01 |
Installation
Via CDN
``
`
Or via npm
`
npm install aframe-raycaster-thresholds
`
Usage
To use thresholds of 1cm rather than 1m, just set on a Entity that uses raycasting, like this:
`
`
Or to specify specific non-default thresholds (for example):
`
raycaster-thresholds="line: 0.02; points: 0.03">
``
Examples
raycaster-thresholds.html
Code
raycaster-thresholds