API

Interface ICameraInput<Tcamera>

This is the contract to implement in order to create a new input class. Inputs are dealing with listening to user actions and moving the camera accordingly.

interface ICameraInput<Tcamera extends Camera> {
    camera: Nullable<Tcamera>;
    checkInputs?: () => void;
    attachControl(noPreventDefault?: boolean): void;
    detachControl(): void;
    getClassName(): string;
    getSimpleName(): string;
}

Type Parameters

Implemented by

Index
camera: Nullable<Tcamera>

Defines the camera the input is attached to.

checkInputs?: () => void

Update the current camera state depending on the inputs that have been used this frame. This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.