Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

WebKit 7 min read Announcement mediumAdept

A step into the spatial web: The HTML model element in Apple Vision Pro

visionOS 26 enables the HTML `model` element by default in Safari on Apple Vision Pro, rendering USDZ 3D assets stereoscopically inline within web pages. The API exposes a `ready` Promise for load completion and a `stagemode="orbit"` attribute for built-in pinch-and-drag rotation. It also offers an `entityTransform` property that takes a `DOMMatrix` for custom translate/rotate/scale, plus `boundingBoxCenter`/`boundingBoxExtents` for fitting content. Lighting is controlled via an `environmentmap` attribute pointing to equirectangular HDR/EXR images with an `environmentMapReady` Promise, and animations use a media-like API (`play()`, `pause()`, `currentTime`, `playbackRate`, `autoplay`, `loop`).

Assumes: HTML and DOM APIsJavaScript Promisesbasic 3D transforms

Related posts

  • Introducing spatial CSS: A developer preview

    WebKit mediumAdept

    Safari on visionOS 27.3 ships a developer preview of the proposed spatial CSS API, which routes 3D scene composition through declarative CSS built around the `<model>` element. `spatial: portal` turns a container into a shared 3D space where child models are moved with true 3D `transform`, snapped together via `position-anchor` and `position-context: anchor` against named empties exported from tools like Blender, and lit with reusable `@environment-map` rules using equirectangular HDR images. `portal-action: orbit` lets users rotate the scene, and `requestVolumetricScene()` pops the portal out into a live-linked volumetric scene in the user's space. Because it is plain CSS, spatial layouts can respond to media queries and be animated or transitioned like any other property. The preview is enabled via the CSS Portals feature flag, and WebKit is asking developers for feedback.

  • Try out your website in the spatial web

    WebKit mediumAdept

    Websites generally need no special changes to work in Safari on visionOS, which runs the same WebKit engine. To test and debug them, install the visionOS simulator via Xcode 15 or Xcode 16 beta and attach Safari's Web Inspector on macOS to it, or pair a physical Apple Vision Pro with the Mac using a one-time PIN and inspect pages remotely. Feature flags in visionOS 1.2 let developers preview WebXR and the <model> element ahead of visionOS 2.

  • What the iPhone Duo means for web development

    Mux mediumAdept

    Safari on the foldable iPhone Duo exposes the Device Posture API and Viewport Segments API behind WebKit feature flags. They let pages detect a folded posture via `navigator.devicePosture` or `@media (device-posture: folded)` and position content per screen segment with `env(viewport-segment-*)` variables. Using these plus a flagged Fullscreen API, a Netflix-style folded video player was built from Video.js v10 components, with video on the top half and tiled controls on the bottom. A blurred, mirrored reflection is drawn by copying frames to a small canvas via requestVideoFrameCallback, since -webkit-box-reflect doesn't work on video in iOS Safari. In practice it needs three feature flags on iOS, and Chromium on a Pixel Fold clips fullscreen content to the top half, so the design isn't shippable today.

  • News from WWDC23: WebKit Features in Safari 17 beta

    WebKit mediumAdept

    Safari 17 beta brings 88 web features. Mac users can add any website to the Dock as a web app: cookies are copied over and web push and badging are supported. The release also adds experimental <model> and WebXR (immersive-vr with hand tracking) for Vision Pro, JPEG XL and HEIC image support, image-set() type arguments, and the power-efficient Managed Media Source API for adaptive streaming. HTML gains the popover attribute and <hr> in <select>, CSS gains @counter-style and expanded font-size-adjust, and each feature comes with code examples showing usage and fallbacks.

  • A Linear spin on Liquid Glass

    Linear mediumAdept

    Linear rebuilt its own version of Apple's Liquid Glass for its iOS app rather than adopting the iOS 26 APIs, gaining a customizable, expandable tab bar and support for iOS 18 users. The material is a single SwiftUI view modifier that stacks a UIVisualEffectView Gaussian blur, a gradient, and a shader-computed specular highlight. The highlight comes from a signed distance field of the rounded rectangle, turned into a normal map lit by a moving light source and composited with a Plus Lighter blend. The team also replicated variable edge blur and Increase Contrast behavior, and deliberately skipped refraction because it needs pixel data unavailable to third parties and hurts legibility in dense professional UIs.

The quest for software engineering knowledge.

Look:
Layout: