From 8b6991b024bd0c12d4424d19f72c6b6d0b6ec5ee Mon Sep 17 00:00:00 2001 From: Tim Oxley Date: Fri, 3 Nov 2017 17:00:49 +0800 Subject: [PATCH 1/2] Support 12 image stereo cubemap format in prefetch --- ReactVR/js/Views/Prefetch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactVR/js/Views/Prefetch.js b/ReactVR/js/Views/Prefetch.js index 3d7f08847..8d66eb7d8 100644 --- a/ReactVR/js/Views/Prefetch.js +++ b/ReactVR/js/Views/Prefetch.js @@ -54,7 +54,7 @@ export default class RCTPrefetch extends RCTBaseView { if (Array.isArray(uri)) { // Cubemap, check proper format - if (uri.length !== 6 || !uri[0].uri) { + if ((uri.length !== 6 && uri.length !== 12) || !uri[0].uri) { console.warn( 'Prefetch expected cubemap source in format [{uri: http..}, {uri: http..}, ... ]' ); From cc5430b279ea1aee0aef07bce9c01187de8c6470 Mon Sep 17 00:00:00 2001 From: Tim Oxley Date: Wed, 29 Nov 2017 16:34:48 +0800 Subject: [PATCH 2/2] Support stereo cubemaps in Prefetch uriKey. --- ReactVR/js/Views/Prefetch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactVR/js/Views/Prefetch.js b/ReactVR/js/Views/Prefetch.js index 8d66eb7d8..1be702e33 100644 --- a/ReactVR/js/Views/Prefetch.js +++ b/ReactVR/js/Views/Prefetch.js @@ -82,7 +82,7 @@ export default class RCTPrefetch extends RCTBaseView { static uriKey(uri) { if (Array.isArray(uri)) { // Cubemap, check proper format - if (uri.length === 6) { + if (uri.length === 6 || uri.length === 12) { const urls = uri.map(RCTPrefetch.getUri); return urls.join(','); } else {