Skip to main content

Mouse

A helper to easily get the real position of the mouse in the Three.js canvas to work with tools like the raycaster, even if it has been transformed through CSS or doesn't occupy the whole screen.

Implements​

Properties​

onDisposed​

readonly onDisposed: Event<unknown>

Disposable.onDisposed

Implementation of​

Disposable . onDisposed

Accessors​

position​

get position(): Vector2

The real position of the mouse or touch of the Three.js canvas.

Returns​

Vector2


rawPosition​

get rawPosition(): Vector2

The raw position of the mouse or touch of the Three.js canvas.

Returns​

Vector2

Methods​

dispose()​

dispose(): void

Disposable.dispose

Returns​

void

Implementation of​

Disposable . dispose