mylingo3d
Version:
Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor
13 lines • 394 B
JavaScript
import { containerBounds } from "../../engine/renderLoop/renderSetup";
export default (clientX, clientY) => {
const rect = containerBounds[0];
clientX -= rect.x;
clientY -= rect.y;
return [
(clientX / rect.width) * 2 - 1,
-(clientY / rect.height) * 2 + 1,
clientX,
clientY
];
};
//# sourceMappingURL=normalizeClientPosition.js.map