lingo3d
Version:
Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor
18 lines • 596 B
JavaScript
import DefaultMethod from "../interface/utils/DefaultMethod";
export const getRuntimeValue = (target, key) => {
if (target.runtimeData && key in target.runtimeData)
return target.runtimeData[key];
return target[key];
};
export const setRuntimeValue = (target, defaults, key, value) => {
if (target.runtimeData && key in target.runtimeData) {
target.runtimeData[key] = value;
return;
}
if (defaults[key] instanceof DefaultMethod) {
target[key](value);
return;
}
target[key] = value;
};
//# sourceMappingURL=getRuntimeValue.js.map