A FocalPointController is an extension of Controller that provides a simple way to move a Camera Urbject
around a fixed point with mouse events.
See also: Controller, Camera
Constructors
Variables
Public Variables
| controlFace: HTMLElement | Window |
The HTML element that will be used to listen for user inputs. |
| focalPoint: Vector |
The focal point in 3D space for the controller. The Camera will always be looking directly
at this point. See also: Vector, Camera
|
| friction: number |
The amount of friction that slows down the Camera movement over time. Expected range: [0, 1]
|
| maxDist: number |
The maximum distance in units that the camera can be from the focalPoint. |
| minDist: number |
The minimum distance in units that the camera can be from the focalPoint. |
| sensitivity: number |
The sensitivity multiplier of mouse movements for the controller. |
| zoomMultiplier: number |
The zoom multiplier of mouse wheel movements for the controller. |
Private Variables
| dist: number |
The current distance of the Camera from the focalPoint. |
| dMouse: Vector |
The relative mouse distance from its last position when move() was called. See also:
Vector
|
| mousePressed: boolean |
The state of a mouse button being pressed. |
| timer: Stats |
The Stats object used to find the time since the last move() call. See also: Stats
|
| velocity: Vector |
The Current mouse "velocity" that is effecting the controller rotation. See also: Vector
|
Functions
Home
Copyright © 2020 Trevor Richard