UNPKG

@rbuljan/gamepad

Version:

Multi-touch gamepad with buttons and joystick for JavaScript games, apps, IOT

14 lines 730 B
export const createElement = (tag, prop) => Object.assign(document.createElement(tag), prop); export const TAU = Math.PI * 2; export const normalize = (rad) => rad - TAU * Math.floor(rad / TAU); export const userSelectNoneForAllBrowsers = { userSelect: "none", "-webkit-touch-callout": "none" /* iOS Safari */, "-webkit-user-select": "none" /* Safari */, "-khtml-user-select": "none" /* Konqueror HTML */, "-moz-user-select": "none" /* Old versions of Firefox */, "-ms-user-select": "none" /* Internet Explorer/Edge */, "user-select": "none" /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */, }; //# sourceMappingURL=utils.js.map