HTML <model> element does not render

Hi, I'm trying to play with all the Web-related features mentioned in https://developer.apple.com/videos/play/wwdc2023/10279/ on visionOS simulator. While Quick Look and WebXR work as expected, adding a <model> element to my demo page does not result in anything rendered. I'm using this model from the developer page, and the simple HTML code below:

<body>
  <model style="width: 400px; height: 300px" interactive>
    <source src="models/sneaker.usdz" type="model/vnd.usdz+zip">
  </model>
  <div>aaa</div>
</body>

This would leave the 400x300 blank area before the <div>, with or without the type="model/vnd.usdz+zip" part. However the resource is loaded successfully according to the Inspector. And I did turn on the flags:

Any help would be much appreciated!

If there is a demo page for this feature to work, e.g. in Safari tests, I would love to try it.

I can confirm, it doesn't work right now. With this example,

https://raw.githack.com/immersive-web/model-element/main/examples/index.html

in macOS M1 I get a blank rectangle:

and in visionOS I get the image fallback:

I do see that model.constructor is HTMLModelElement, and model.getCamera() eventually gives the error

Unhandled Promise Rejection: undefined

so the API is there, just not working yet It is experimental behind a flag, so the WebKit team may still be ironing out the details.

For reference in case the above example stops being available or changes, this example is permanently available since time of writing:

https://rawcdn.githack.com/immersive-web/model-element/ed579b5ad3fdca3bca2805e182624a23d367b534/examples/assets/FlightHelmet.usdz

Thanks for the tryout and info!

I get the same issue. Don't even get the image fallback on VisionOS with the flags enabled.

Same here, except the promise is forever pending

HTML &lt;model&gt; element does not render
 
 
Q