@novorender/api / ControllerInput
Class: ControllerInput
Defined in: @novorender/src/web_app/controller/input.ts:13
The input source of camera controllers.
Remarks
This class abstract away input gestures, such as mouse, keyboard and touch event into a unified model.
It does this by defining a set of axes that represents an imagined gamepad/joystick input device for each class of input gestures.
The assumption is that each of these axes may be bound to a pair of keyboard keys, e.g. A
and D
, or some input position coordinate, e.g. the mouse x
position for left/right motion.
All of these axes are updated independently, i.e. it is possible to move a camera with both keyboard and mouse simultaneously.
It is up to each camera controller to scale and apply each of these axes into an actual motion of the camera.
Accessors
hasShift
Get Signature
get hasShift(): boolean;
Defined in: @novorender/src/web_app/controller/input.ts:99
Whether the shift key is currently pressed or not.
Returns
boolean
height
Get Signature
get height(): number;
Defined in: @novorender/src/web_app/controller/input.ts:84
Return the client height of the input domElement.
Returns
number