INNER CODE UNIT · TypeScript
createControls
LBALab/lba2remake · src/controls/index.ts:11
export function createControls(
vr: boolean,
game: Game,
elem: HTMLElement,
sceneManager: SceneManager,
renderer: Renderer
) {
const params = getParams();
let controls;
if (vr) {
controls = [
new VRControls(sceneManager, game, renderer),
];
} else if (params.mobile) {
controls = [
makeFirstPersonTouchControls(game),
new GamepadControls(params, sceneManager, game),
];