react-native-reanimated
Version:
More powerful alternative to Animated library for React Native.
20 lines (19 loc) • 742 B
JavaScript
;
import { IS_JEST } from "./common/index.js";
import { initSvgCssSupport } from "./css/svg/index.js";
import { getStaticFeatureFlag } from "./featureFlags/index.js";
export function initializeReanimatedModule(_ReanimatedModule) {
initializeWebGlobals();
if (getStaticFeatureFlag('EXPERIMENTAL_CSS_ANIMATIONS_FOR_SVG_COMPONENTS')) {
initSvgCssSupport();
}
}
function initializeWebGlobals() {
if (globalThis._getAnimationTimestamp === undefined) {
globalThis._getAnimationTimestamp = () => performance.now();
}
if (IS_JEST || !globalThis.requestAnimationFrame) {
globalThis.requestAnimationFrame = callback => setTimeout(() => callback(performance.now()), 0);
}
}
//# sourceMappingURL=initializers.js.map