first working commit just flipped
This commit is contained in:
2878
src/main.ts
Normal file
2878
src/main.ts
Normal file
File diff suppressed because it is too large
Load Diff
44
src/nipplejs.d.ts
vendored
Normal file
44
src/nipplejs.d.ts
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
declare module 'nipplejs' {
|
||||
interface JoystickData {
|
||||
angle: {
|
||||
degree: number;
|
||||
radian: number;
|
||||
};
|
||||
distance: number;
|
||||
force: number;
|
||||
position: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
pressure: number;
|
||||
}
|
||||
|
||||
interface JoystickOptions {
|
||||
zone?: HTMLElement;
|
||||
mode?: 'static' | 'semi' | 'dynamic';
|
||||
position?: { left: string; top: string };
|
||||
color?: string;
|
||||
size?: number;
|
||||
threshold?: number;
|
||||
fadeTime?: number;
|
||||
multitouch?: boolean;
|
||||
maxNumberOfNipples?: number;
|
||||
dataOnly?: boolean;
|
||||
restJoystick?: boolean;
|
||||
restOpacity?: number;
|
||||
lockX?: boolean;
|
||||
lockY?: boolean;
|
||||
}
|
||||
|
||||
interface JoystickManager {
|
||||
on(event: 'start' | 'end', callback: () => void): void;
|
||||
on(event: 'move', callback: (evt: any, data: JoystickData) => void): void;
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
function create(options: JoystickOptions): JoystickManager;
|
||||
|
||||
export default {
|
||||
create
|
||||
};
|
||||
}
|
||||
1251
src/style.css
Normal file
1251
src/style.css
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user