Skip to content

Instantly share code, notes, and snippets.

View exreplay's full-sized avatar

Florian Weber exreplay

View GitHub Profile
@exreplay
exreplay / PointerLockControls.ts
Last active February 18, 2024 01:27
ThreeJS PointerLockControls with touch support
/* eslint-disable camelcase */
import { Camera, Euler, EventDispatcher, Vector3 } from 'three';
const _changeEvent = { type: 'change' };
const _lockEvent = { type: 'lock' };
const _unlockEvent = { type: 'unlock' };
const _PI_2 = Math.PI / 2;
class PointerLockControls extends EventDispatcher {
@exreplay
exreplay / .eslintrc.js
Last active November 17, 2021 16:07
nuxt3 generate eslint globals
// eslint-disable-next-line @typescript-eslint/no-var-requires
const globals = require('.nuxt/eslint-globals');
// @ts-check
/** @type {import('eslint').Linter.Config} */
module.exports = {
...globals,
//... other rules
};