From c6c2070fed46316a05b7bbb7a266ef4a25786511 Mon Sep 17 00:00:00 2001 From: l3utterfly Date: Sun, 3 Sep 2023 17:31:22 -0700 Subject: [PATCH] fix(native): TextureLoader should remain consistent with FileLoader (#2986) --- packages/fiber/src/native/polyfills.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/fiber/src/native/polyfills.ts b/packages/fiber/src/native/polyfills.ts index 46877de33a..c3653c1beb 100644 --- a/packages/fiber/src/native/polyfills.ts +++ b/packages/fiber/src/native/polyfills.ts @@ -34,6 +34,8 @@ export function polyfills() { // There's no Image in native, so create a data texture instead const prevTextureLoad = THREE.TextureLoader.prototype.load THREE.TextureLoader.prototype.load = function load(url, onLoad, onProgress, onError) { + if (this.path) url = this.path + url + const texture = new THREE.Texture() // @ts-ignore