Created
July 2, 2023 16:49
-
-
Save javascripter/4e4e20e9024a33592437648b718c763d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/module/reanimated2/js-reanimated/JSReanimated.js b/lib/module/reanimated2/js-reanimated/JSReanimated.js | |
index 694d3c42de9534fabe364253485f68d048dbd6ef..1e21296edcc81be5540bb8ffb1fb42dae9ddc556 100644 | |
--- a/lib/module/reanimated2/js-reanimated/JSReanimated.js | |
+++ b/lib/module/reanimated2/js-reanimated/JSReanimated.js | |
@@ -3,6 +3,9 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ | |
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } | |
import { NativeReanimated } from '../NativeReanimated/NativeReanimated'; | |
import { SensorType } from '../commonTypes'; | |
+ | |
+const requestAnimationFrame = globalThis.requestAnimationFrame || globalThis.setImmediate; | |
+ | |
export default class JSReanimated extends NativeReanimated { | |
constructor() { | |
super(false); | |
diff --git a/src/reanimated2/js-reanimated/JSReanimated.ts b/src/reanimated2/js-reanimated/JSReanimated.ts | |
index c70d0df69143b837e676e0cd1677435d35f78623..6c57022748618663ddba05f0066c6ec9193567b1 100644 | |
--- a/src/reanimated2/js-reanimated/JSReanimated.ts | |
+++ b/src/reanimated2/js-reanimated/JSReanimated.ts | |
@@ -7,6 +7,7 @@ import { | |
} from '../commonTypes'; | |
import { WebSensor } from './WebSensor'; | |
+const requestAnimationFrame = globalThis.requestAnimationFrame || globalThis.setImmediate; | |
export default class JSReanimated extends NativeReanimated { | |
nextSensorId = 0; | |
sensors = new Map<number, WebSensor>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment