@learn-hunger/visual-gestures
Version:
VisualGestures.js is a package that empowers users to effortlessly control the cursor, including actions such as hover, click, drag, and drop, through precise finger movements in the air.
69 lines • 2.2 kB
JavaScript
import { EHandLandmarks, EVgMouseEvents } from "../utilities/vg-constants";
export class DefaultConfig {
constructor() {
this.cursor = this.setCursor();
this.cursorContainer = document.body;
this.pointer = EHandLandmarks.INDEX_TIP;
this.cursorPosition = { x: 0.5, y: 0.5, z: 0.5 };
this.deltaLandmark = { x: 0, y: 0, z: 0 };
this.flickeringThreshold = 15;
}
setCursor() {
return {
showCursor: true,
baseURI: window.location.href,
default: {
path: "pointer_move.png",
scale: 1,
showCursor: true,
},
[]: {
path: "pointer_move.png",
scale: 1,
showCursor: true,
},
[]: {
path: "pointer_move.png",
scale: 1,
showCursor: true,
},
[]: {
path: "pointer_enter.png",
scale: 1,
showCursor: true,
},
[]: {
path: "pointer_move.png",
scale: 1,
showCursor: true,
},
[]: {
path: "pointer_move.png",
scale: 1,
showCursor: true,
},
[]: {
path: "pointer_move.png",
scale: 1,
showCursor: true,
},
[]: {
path: "pointer_move.png",
scale: 1,
showCursor: true,
},
[]: {
path: "pointer_drag.png",
scale: 1,
showCursor: true,
},
};
}
static get instance() {
if (!DefaultConfig.defaultConfig) {
DefaultConfig.defaultConfig = new DefaultConfig();
}
return DefaultConfig.defaultConfig;
}
}
//# sourceMappingURL=defalut-config.js.map