The cursor component lets us interact with entities through clicking and gazing.
|fuse||Whether cursor is fuse-based. Default value: |
|fuseTimeout||How long to wait (in milliseconds) before triggering a fuse-based click event. Default value: 1500|
The cursor is a specific application of the raycaster component in that it
When the mouse clicks, the closest visible entity intersecting the cursor, if any, will emit a click event. Note the cursor component only applies the raycasting behavior. To provide a shape or appearance to the cursor, you could apply the geometry and material components.
|click||Emitted on both cursor and intersected entity if a currently intersected entity is clicked (whether by mouse or by fuse).|
|fusing||Emitted on both cursor and intersected entity when fuse-based cursor starts counting down.|
|mousedown||Emitted on both cursor and intersected entity (if any) on mousedown on the canvas element.|
|mouseenter||Emitted on both cursor and intersected entity (if any) when cursor intersects with an entity.|
|mouseleave||Emitted on both cursor and intersected entity (if any) when cursor no longer intersects with previously intersected entity.|
|mouseup||Emitted on both cursor and intersected entity (if any) on mouseup on the canvas element.|