@overreact/engine
Advanced tools
| import { GamepadAxisName, GamepadButtonName } from "./types"; | ||
| export declare const STANDARD_BUTTON_MAPPING: Record<GamepadButtonName, number>; | ||
| export declare const STANDARD_AXIS_MAPPING: Record<GamepadAxisName, number>; | ||
| export declare const STANDARD_BUTTON_UNMAPPING: Record<number, GamepadButtonName>; |
| import React from "react"; | ||
| import { GamepadAxisName, GamepadButtonName } from "../types"; | ||
| type GamepadContextProps = { | ||
| isButtonDown: (index: number, button: GamepadButtonName) => boolean; | ||
| getButtonAxis: (index: number, negative: GamepadButtonName, positive: GamepadButtonName) => number; | ||
| getAnalogAxis: (index: number, axis: GamepadAxisName) => number; | ||
| down: React.MutableRefObject<Set<GamepadButtonName>>; | ||
| isButtonDown: (index: number | null, button: GamepadButtonName) => boolean; | ||
| getButtonAxis: (index: number | null, negative: GamepadButtonName, positive: GamepadButtonName) => number; | ||
| getAnalogAxis: (index: number | null, axis: GamepadAxisName) => number; | ||
| vibrate: (index: number | null, duration: number, magnitude: number) => void; | ||
| }; | ||
| export declare const GamepadContext: React.Context<GamepadContextProps>; | ||
| export {}; |
@@ -0,5 +1,8 @@ | ||
| /// <reference types="react" /> | ||
| export declare const useGamepad: () => { | ||
| isButtonDown: (index: number, button: import("..").GamepadButtonName) => boolean; | ||
| getButtonAxis: (index: number, negative: import("..").GamepadButtonName, positive: import("..").GamepadButtonName) => number; | ||
| getAnalogAxis: (index: number, axis: import("..").GamepadAxisName) => number; | ||
| down: import("react").MutableRefObject<Set<import("..").GamepadButtonName>>; | ||
| isButtonDown: (index: number | null, button: import("..").GamepadButtonName) => boolean; | ||
| getButtonAxis: (index: number | null, negative: import("..").GamepadButtonName, positive: import("..").GamepadButtonName) => number; | ||
| getAnalogAxis: (index: number | null, axis: import("..").GamepadAxisName) => number; | ||
| vibrate: (index: number | null, duration: number, magnitude: number) => void; | ||
| }; |
| import { GamepadButtonMap, Prop } from "../types"; | ||
| export declare const useGamepadButtonMap: (index: Prop<number | null>, map: GamepadButtonMap, active?: Prop<boolean>) => void; | ||
| export declare const useGamepadButtonMap: (index: Prop<number | null>, map: Prop<GamepadButtonMap>, active?: Prop<boolean>) => void; |
+1
-1
| { | ||
| "name": "@overreact/engine", | ||
| "version": "0.26.1", | ||
| "version": "0.27.0", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./dist/engine.umd.cjs", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
932630
0.35%22966
0.48%