gre / webgltexture-loader

load & cache various kind of WebGLTexture with an extensible and loosely coupled system
11 stars 12 forks source link

Unimodules has been replaced by Expo #34

Open Lemon-King opened 2 years ago

Lemon-King commented 2 years ago

With the most recent release of Expo43 unimodules has been removed: https://blog.expo.dev/whats-new-in-expo-modules-infrastructure-7a7cdda81ebc Is there any plan to migrate webgltexture-loader away from unimodules?

barthap commented 2 years ago

I just use the patch-package for this. Here's the patches/webgltexture-loader-expo+1.0.0.patch file:

diff --git a/node_modules/webgltexture-loader-expo/lib/DeprecatedExpoGLObjectTextureLoader.js b/node_modules/webgltexture-loader-expo/lib/DeprecatedExpoGLObjectTextureLoader.js
index e63bd28..8820c4d 100644
--- a/node_modules/webgltexture-loader-expo/lib/DeprecatedExpoGLObjectTextureLoader.js
+++ b/node_modules/webgltexture-loader-expo/lib/DeprecatedExpoGLObjectTextureLoader.js
@@ -7,7 +7,7 @@ exports.default = void 0;

 var _webgltextureLoader = require("webgltexture-loader");

-var _core = require("@unimodules/core");
+var _core = require("expo-modules-core");

 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

diff --git a/node_modules/webgltexture-loader-expo/src/DeprecatedExpoGLObjectTextureLoader.js b/node_modules/webgltexture-loader-expo/src/DeprecatedExpoGLObjectTextureLoader.js
index d4c15da..d4b5fa5 100644
--- a/node_modules/webgltexture-loader-expo/src/DeprecatedExpoGLObjectTextureLoader.js
+++ b/node_modules/webgltexture-loader-expo/src/DeprecatedExpoGLObjectTextureLoader.js
@@ -3,7 +3,7 @@ import {
   globalRegistry,
   WebGLTextureLoaderAsyncHashCache
 } from "webgltexture-loader";
-import { NativeModulesProxy } from "@unimodules/core";
+import { NativeModulesProxy } from "expo-modules-core";

 const neverEnding = new Promise(() => {});