-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experiment(native): implement missing Blob/URL/fetch APIs #2982
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 450774f:
|
This should not be needed, Metro may be tree-shaking effectful code wrongly.
This reverts commit e91192f.
Looks great. Are you tested it on Android release mode. |
Are you have plans to make some kind of prerelease npm tag with this fixes. Or please say when it will be released?) |
It seems patching Blob will break existing |
Can you detail here or create an issue? I've been upstreaming that in particular to react-native and didn't harden |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@react-three/fiber](https://github.com/pmndrs/react-three-fiber) | [`8.13.0` -> `8.14.4`](https://renovatebot.com/diffs/npm/@react-three%2ffiber/8.13.0/8.14.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@react-three%2ffiber/8.14.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@react-three%2ffiber/8.14.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@react-three%2ffiber/8.13.0/8.14.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@react-three%2ffiber/8.13.0/8.14.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>pmndrs/react-three-fiber (@​react-three/fiber)</summary> ### [`v8.14.4`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.14.4) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.14.3...v8.14.4) #### What's Changed - fix(native): amend BlobManager over globals by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/3030](https://github.com/pmndrs/react-three-fiber/pull/3030) #### New Contributors - [@​lin-stephanie](https://github.com/lin-stephanie) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/3024](https://github.com/pmndrs/react-three-fiber/pull/3024) **Full Changelog**: pmndrs/react-three-fiber@v8.14.3...v8.14.4 ### [`v8.14.3`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.14.3) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.14.2...v8.14.3) #### What's Changed - fix(native): drop fsstat for react-native-web by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/3023](https://github.com/pmndrs/react-three-fiber/pull/3023) **Full Changelog**: pmndrs/react-three-fiber@v8.14.2...v8.14.3 ### [`v8.14.2`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.14.2) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.14.1...v8.14.2) #### What's Changed - perf(native): don't double encode assets by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2996](https://github.com/pmndrs/react-three-fiber/pull/2996) - fix(useLoader): loosen Loader onError signature by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/3011](https://github.com/pmndrs/react-three-fiber/pull/3011) **Full Changelog**: pmndrs/react-three-fiber@v8.14.1...v8.14.2 ### [`v8.14.1`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.14.1) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.14.0...v8.14.1) #### What's Changed - fix(native): prefer local uri for fs by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2993](https://github.com/pmndrs/react-three-fiber/pull/2993) **Full Changelog**: pmndrs/react-three-fiber@v8.14.0...v8.14.1 ### [`v8.14.0`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.14.0): 8.14.0 [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.9...v8.14.0) ##### What's Changed - experiment(native): implement missing Blob/URL/fetch APIs by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2982](https://github.com/pmndrs/react-three-fiber/pull/2982) - feat(native): use PanResponder for react-native-web by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2985](https://github.com/pmndrs/react-three-fiber/pull/2985) **Full Changelog**: pmndrs/react-three-fiber@v8.13.9...v8.14.0 ### [`v8.13.9`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.9) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.8...v8.13.9) #### What's Changed - fix(native): TextureLoader should remain consistent with FileLoader by [@​l3utterfly](https://github.com/l3utterfly) in [https://github.com/pmndrs/react-three-fiber/pull/2986](https://github.com/pmndrs/react-three-fiber/pull/2986) #### New Contributors - [@​l3utterfly](https://github.com/l3utterfly) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2986](https://github.com/pmndrs/react-three-fiber/pull/2986) **Full Changelog**: pmndrs/react-three-fiber@v8.13.8...v8.13.9 ### [`v8.13.8`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.8) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/8.13.7...v8.13.8) #### What's Changed - fix(useLoader): dispose loaders by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2984](https://github.com/pmndrs/react-three-fiber/pull/2984) #### New Contributors - [@​GmBodhi](https://github.com/GmBodhi) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2976](https://github.com/pmndrs/react-three-fiber/pull/2976) **Full Changelog**: pmndrs/react-three-fiber@8.13.7...v8.13.8 ### [`v8.13.7`](https://github.com/pmndrs/react-three-fiber/releases/tag/8.13.7) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.6...8.13.7) #### What's Changed - fix(Canvas): pass scene prop by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2975](https://github.com/pmndrs/react-three-fiber/pull/2975) #### New Contributors - [@​GabeDahl](https://github.com/GabeDahl) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2968](https://github.com/pmndrs/react-three-fiber/pull/2968) **Full Changelog**: pmndrs/react-three-fiber@v8.13.6...8.13.7 ### [`v8.13.6`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.6) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.5...v8.13.6) #### What's Changed - fix: harden XR init against Renderer shim by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2947](https://github.com/pmndrs/react-three-fiber/pull/2947) #### New Contributors - [@​hood](https://github.com/hood) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2898](https://github.com/pmndrs/react-three-fiber/pull/2898) - [@​Sargsian](https://github.com/Sargsian) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2922](https://github.com/pmndrs/react-three-fiber/pull/2922) - [@​myznikovgleb](https://github.com/myznikovgleb) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2935](https://github.com/pmndrs/react-three-fiber/pull/2935) **Full Changelog**: pmndrs/react-three-fiber@v8.13.5...v8.13.6 ### [`v8.13.5`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.5) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.4...v8.13.5) #### What's Changed - fix(types): remove reference to [@​types/webxr](https://github.com/types/webxr) by [@​Methuselah96](https://github.com/Methuselah96) in [https://github.com/pmndrs/react-three-fiber/pull/2919](https://github.com/pmndrs/react-three-fiber/pull/2919) - fix(types): harden colors overload since r153 by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2931](https://github.com/pmndrs/react-three-fiber/pull/2931) **Full Changelog**: pmndrs/react-three-fiber@v8.13.4...v8.13.5 ### [`v8.13.4`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.4) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/@react-three/fiber@8.13.3...v8.13.4) ##### What's Changed - fix: safely diff instances by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2906](https://github.com/pmndrs/react-three-fiber/pull/2906) ##### New Contributors - [@​bhouston](https://github.com/bhouston) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2896](https://github.com/pmndrs/react-three-fiber/pull/2896) **Full Changelog**: pmndrs/react-three-fiber@v8.13.2...v8.13.4 ### [`v8.13.3`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.3) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/@react-three/fiber@8.13.2...@react-three/fiber@8.13.3) #### What's Changed - fix: revert nestable portals, up suspend-react by [@​drcmda](https://github.com/drcmda) in [`05187c2`](https://github.com/pmndrs/react-three-fiber/commit/05187c22fcac8d480120ffe1133ebe85049cb552) **Full Changelog**: pmndrs/react-three-fiber@v8.13.2...v8.13.3 ### [`v8.13.2`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.2) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.1...@react-three/fiber@8.13.2) #### What's Changed - fix: update suspend-react by [@​drcmda](https://github.com/drcmda) in [`95e71ae`](https://github.com/pmndrs/react-three-fiber/commit/95e71ae00e8ede868b9584891e8e9b04d54d0f4e) **Full Changelog**: pmndrs/react-three-fiber@v8.13.1...v8.13.2 ### [`v8.13.1`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.1) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.0...v8.13.1) #### What's Changed - docs: update links to legacy react docs by [@​ninofiliu](https://github.com/ninofiliu) in [https://github.com/pmndrs/react-three-fiber/pull/2858](https://github.com/pmndrs/react-three-fiber/pull/2858) - fix(core): unlink primitives on dispose by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2877](https://github.com/pmndrs/react-three-fiber/pull/2877) - fix(core): portals should be nestable by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2746](https://github.com/pmndrs/react-three-fiber/pull/2746) #### New Contributors - [@​ninofiliu](https://github.com/ninofiliu) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2858](https://github.com/pmndrs/react-three-fiber/pull/2858) **Full Changelog**: pmndrs/react-three-fiber@v8.13.0...v8.13.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ziyadedher/ziyadedher). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Hi, @CodyJasonBennett – My apologies for a slightly off-topic question but how are you rendering this on an iOS Simulator? I thought it was necessary to use actual iOS and Android devices for testing. In fact, when I try to use the simulator, all I get is a blank screen. |
I noticed that simulator occasionally pushes frames so I reloaded the app until one was presented. |
Thanks! I'll try that myself |
Whoa, is this in? Can we do something like this now? import { RNGltf, RNCanvas } from '@react-three/fiber'
import { View } from 'react-native'
<View>
<RNCanvas>
<RNGltf src="/foo.gltf" />
</RNCanvas>
</View> Also, does this work in both iOS and Android? Is it performant? Sorry, I'm dying to use 3D in React Native. 😅 |
See https://docs.pmnd.rs/react-three-fiber/getting-started/installation#react-native. Same as web, although |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@react-three/fiber](https://github.com/pmndrs/react-three-fiber) | [`8.13.0` -> `8.14.4`](https://renovatebot.com/diffs/npm/@react-three%2ffiber/8.13.0/8.14.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@react-three%2ffiber/8.14.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@react-three%2ffiber/8.14.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@react-three%2ffiber/8.13.0/8.14.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@react-three%2ffiber/8.13.0/8.14.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>pmndrs/react-three-fiber (@​react-three/fiber)</summary> ### [`v8.14.4`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.14.4) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.14.3...v8.14.4) #### What's Changed - fix(native): amend BlobManager over globals by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/3030](https://github.com/pmndrs/react-three-fiber/pull/3030) #### New Contributors - [@​lin-stephanie](https://github.com/lin-stephanie) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/3024](https://github.com/pmndrs/react-three-fiber/pull/3024) **Full Changelog**: pmndrs/react-three-fiber@v8.14.3...v8.14.4 ### [`v8.14.3`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.14.3) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.14.2...v8.14.3) #### What's Changed - fix(native): drop fsstat for react-native-web by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/3023](https://github.com/pmndrs/react-three-fiber/pull/3023) **Full Changelog**: pmndrs/react-three-fiber@v8.14.2...v8.14.3 ### [`v8.14.2`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.14.2) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.14.1...v8.14.2) #### What's Changed - perf(native): don't double encode assets by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2996](https://github.com/pmndrs/react-three-fiber/pull/2996) - fix(useLoader): loosen Loader onError signature by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/3011](https://github.com/pmndrs/react-three-fiber/pull/3011) **Full Changelog**: pmndrs/react-three-fiber@v8.14.1...v8.14.2 ### [`v8.14.1`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.14.1) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.14.0...v8.14.1) #### What's Changed - fix(native): prefer local uri for fs by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2993](https://github.com/pmndrs/react-three-fiber/pull/2993) **Full Changelog**: pmndrs/react-three-fiber@v8.14.0...v8.14.1 ### [`v8.14.0`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.14.0): 8.14.0 [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.9...v8.14.0) ##### What's Changed - experiment(native): implement missing Blob/URL/fetch APIs by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2982](https://github.com/pmndrs/react-three-fiber/pull/2982) - feat(native): use PanResponder for react-native-web by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2985](https://github.com/pmndrs/react-three-fiber/pull/2985) **Full Changelog**: pmndrs/react-three-fiber@v8.13.9...v8.14.0 ### [`v8.13.9`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.9) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.8...v8.13.9) #### What's Changed - fix(native): TextureLoader should remain consistent with FileLoader by [@​l3utterfly](https://github.com/l3utterfly) in [https://github.com/pmndrs/react-three-fiber/pull/2986](https://github.com/pmndrs/react-three-fiber/pull/2986) #### New Contributors - [@​l3utterfly](https://github.com/l3utterfly) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2986](https://github.com/pmndrs/react-three-fiber/pull/2986) **Full Changelog**: pmndrs/react-three-fiber@v8.13.8...v8.13.9 ### [`v8.13.8`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.8) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/8.13.7...v8.13.8) #### What's Changed - fix(useLoader): dispose loaders by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2984](https://github.com/pmndrs/react-three-fiber/pull/2984) #### New Contributors - [@​GmBodhi](https://github.com/GmBodhi) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2976](https://github.com/pmndrs/react-three-fiber/pull/2976) **Full Changelog**: pmndrs/react-three-fiber@8.13.7...v8.13.8 ### [`v8.13.7`](https://github.com/pmndrs/react-three-fiber/releases/tag/8.13.7) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.6...8.13.7) #### What's Changed - fix(Canvas): pass scene prop by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2975](https://github.com/pmndrs/react-three-fiber/pull/2975) #### New Contributors - [@​GabeDahl](https://github.com/GabeDahl) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2968](https://github.com/pmndrs/react-three-fiber/pull/2968) **Full Changelog**: pmndrs/react-three-fiber@v8.13.6...8.13.7 ### [`v8.13.6`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.6) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.5...v8.13.6) #### What's Changed - fix: harden XR init against Renderer shim by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2947](https://github.com/pmndrs/react-three-fiber/pull/2947) #### New Contributors - [@​hood](https://github.com/hood) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2898](https://github.com/pmndrs/react-three-fiber/pull/2898) - [@​Sargsian](https://github.com/Sargsian) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2922](https://github.com/pmndrs/react-three-fiber/pull/2922) - [@​myznikovgleb](https://github.com/myznikovgleb) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2935](https://github.com/pmndrs/react-three-fiber/pull/2935) **Full Changelog**: pmndrs/react-three-fiber@v8.13.5...v8.13.6 ### [`v8.13.5`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.5) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.4...v8.13.5) #### What's Changed - fix(types): remove reference to [@​types/webxr](https://github.com/types/webxr) by [@​Methuselah96](https://github.com/Methuselah96) in [https://github.com/pmndrs/react-three-fiber/pull/2919](https://github.com/pmndrs/react-three-fiber/pull/2919) - fix(types): harden colors overload since r153 by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2931](https://github.com/pmndrs/react-three-fiber/pull/2931) **Full Changelog**: pmndrs/react-three-fiber@v8.13.4...v8.13.5 ### [`v8.13.4`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.4) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/@react-three/fiber@8.13.3...v8.13.4) ##### What's Changed - fix: safely diff instances by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2906](https://github.com/pmndrs/react-three-fiber/pull/2906) ##### New Contributors - [@​bhouston](https://github.com/bhouston) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2896](https://github.com/pmndrs/react-three-fiber/pull/2896) **Full Changelog**: pmndrs/react-three-fiber@v8.13.2...v8.13.4 ### [`v8.13.3`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.3) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/@react-three/fiber@8.13.2...@react-three/fiber@8.13.3) #### What's Changed - fix: revert nestable portals, up suspend-react by [@​drcmda](https://github.com/drcmda) in [`05187c2`](https://github.com/pmndrs/react-three-fiber/commit/05187c22fcac8d480120ffe1133ebe85049cb552) **Full Changelog**: pmndrs/react-three-fiber@v8.13.2...v8.13.3 ### [`v8.13.2`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.2) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.1...@react-three/fiber@8.13.2) #### What's Changed - fix: update suspend-react by [@​drcmda](https://github.com/drcmda) in [`95e71ae`](https://github.com/pmndrs/react-three-fiber/commit/95e71ae00e8ede868b9584891e8e9b04d54d0f4e) **Full Changelog**: pmndrs/react-three-fiber@v8.13.1...v8.13.2 ### [`v8.13.1`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.13.1) [Compare Source](https://github.com/pmndrs/react-three-fiber/compare/v8.13.0...v8.13.1) #### What's Changed - docs: update links to legacy react docs by [@​ninofiliu](https://github.com/ninofiliu) in [https://github.com/pmndrs/react-three-fiber/pull/2858](https://github.com/pmndrs/react-three-fiber/pull/2858) - fix(core): unlink primitives on dispose by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2877](https://github.com/pmndrs/react-three-fiber/pull/2877) - fix(core): portals should be nestable by [@​CodyJasonBennett](https://github.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/2746](https://github.com/pmndrs/react-three-fiber/pull/2746) #### New Contributors - [@​ninofiliu](https://github.com/ninofiliu) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/2858](https://github.com/pmndrs/react-three-fiber/pull/2858) **Full Changelog**: pmndrs/react-three-fiber@v8.13.0...v8.13.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ziyadedher/ziyadedher). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Fixes #1972, #2577.
Adds a fast path for data URIs in JSI, fixes for drawables in Android APK, and implements missing APIs as per the title.
Below asset is from https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Duck/glTF-Binary/Duck.glb, rendered on iOS emulator.
To recap, this issue comes from usage of
URL.createObjectUrl(new Blob([arrayBuffer], { type: 'image/png' }))
which is used byGLTFLoader
to create a valid image url from inlined buffer data. react-native does not implement theBlob
constructor fromArrayBuffer
parts, nor does itURL.createObjectURL
in the networking stack. Furthermore, only recently in 0.72 react-native implementsFileReader.readAsArrayBuffer
with facebook/react-native#36332 which is possible to polyfill for older versions. This previously necessitated patches for loaders sinceTHREE.FileLoader
moved tofetch
-- facebook/react-native#30769 (comment).I've been able to implement the missing
Blob
andURL.createObjectURL
methods as a JS polyfill in lieu of mrousavy/react-native-blob-jsi-helper (we can't ship native code), but run into the same issue as #1972 (comment) when this is requested anywhere --NSURLErrorDomain Code=-1002 "unsupported URL"
.Show code:
I notice that react-native adds special Blob handling to
XMLHttpRequest
(source) with similar mechanisms inFileReader
(facebook/react-native#22681 (comment)), but this will need to be implemented in a polyfill here since user-land code will assume functional behavior. This notably won't work for code that usesfetch
or other means likeexpo-asset
. All of these problems stem from facebook/react-native#22681, which was unfortunately closed as stale.Combining
XMLHttpRequest
withFileReader
lets me get a handle on the blob data after it's converted into a URI, with EXGL giving special treatment to{ localUri }
for image data. This correctly implements Blob up to this point, andImage.getSize
reports the right dimensions. I'm getting OOM crashes from EXGL when passing large data urls through JSI, so they're offloaded to the filesystem as a uri. Performance still needs to be measured and tweaked, but this finally solves this issue with a path to upstream fixes. Native support should remove the overhead of base64 encoding back and forth.Show code: