0

Is it possible to view my GLTF and USDZ file in AR from clicking a button. I do not want to have a background poster or object preview just a button.

michaelm682
  • 11
  • 1
  • 3

2 Answers2

1
Maybe you already solved this long ago.

But here: https://modelviewer.dev/examples/model-formats.html

You can see "With only a USDZ model" it should be possible. You could make the poster an empty/transparent image.

Then edit the button ui and make the model-viewer as big as your button. https://modelviewer.dev/examples/customizing-ui.html

From what I can see that is the best thing you can do right now.

EDIT:

Whoops, actually you can just call an intent to Scene Viewer in a link then style it as a button. Or a button with some js.

https://developers.google.com/ar/develop/java/scene-viewer#3d-or-ar

Aseliot
  • 87
  • 1
  • 11
0

From @Florian 's answer above I was able to add a link to an image like this:

   <a href="assets/models/Nachos.usdz" class="external-link" >
     <img src="assets/arkits.png" />
   </a>
Dharman
  • 30,962
  • 25
  • 85
  • 135
mick1996
  • 516
  • 9
  • 31