eye-analysis
Version:
Eye Analysis - Browser-based eye tracking and screen recording library for research and experiments
39 lines (36 loc) • 1.04 kB
JavaScript
var __defProp = Object.defineProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: (newValue) => all[name] = () => newValue
});
};
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
// interaction.ts
var _interactionState, interactionState;
var init_interaction = __esm(() => {
_interactionState = {};
if (typeof globalThis !== "undefined") {
if (!globalThis.__eyeAnalysisInteractionState) {
globalThis.__eyeAnalysisInteractionState = _interactionState;
}
}
interactionState = new Proxy(_interactionState, {
get(target, prop) {
const globalState = globalThis.__eyeAnalysisInteractionState || target;
return globalState[prop];
},
set(target, prop, value) {
const globalState = globalThis.__eyeAnalysisInteractionState || target;
globalState[prop] = value;
return true;
}
});
});
init_interaction();
export {
interactionState
};