@neurodyn/react-model-viewer 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +11 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7077,13 +7077,17 @@ function buildNativeArUrl(glbUrl, usdzUrl, objectType, ios = isIOSDevice()) {
7077
7077
  const verticalPlacement = 'wall' === objectType || 'ceiling' === objectType ? '&enable_vertical_placement=true' : '';
7078
7078
  return `intent://arvr.google.com/scene-viewer/1.0?file=${encodeURIComponent(new URL(glbUrl).toString())}&resizable=false${verticalPlacement}&mode=ar_preferred#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;end;`;
7079
7079
  }
7080
- function launchDirectAr(options, openAppClipInNewTab = false) {
7081
- if ('advanced' === options.experience && isSupportedAppClipDevice()) {
7082
- const appClipUrl = buildAppClipUrl(options.appClipBundleId, options.tinuuid, options.hostname, options.hid);
7083
- if (openAppClipInNewTab) window.open(appClipUrl, '_blank');
7084
- else window.location.assign(appClipUrl);
7085
- return;
7086
- }
7080
+ function navigateToAppClip(url) {
7081
+ try {
7082
+ if (window.top && window.top !== window) {
7083
+ window.top.location.href = url;
7084
+ return;
7085
+ }
7086
+ } catch {}
7087
+ window.location.assign(url);
7088
+ }
7089
+ function launchDirectAr(options) {
7090
+ if ('advanced' === options.experience && isSupportedAppClipDevice()) return void navigateToAppClip(buildAppClipUrl(options.appClipBundleId, options.tinuuid, options.hostname, options.hid));
7087
7091
  const link = document.createElement('a');
7088
7092
  const image = document.createElement('img');
7089
7093
  link.rel = 'ar';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@neurodyn/react-model-viewer",
3
3
  "type": "module",
4
- "version": "0.0.11",
4
+ "version": "0.0.12",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },