# `ActivateAROptions.glbUrl`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Property of [`ActivateAROptions`](ActivateAROptions.md) · stable · since 2.0.0

```ts
glbUrl?: string;
```

The GLB Scene Viewer opens: an http(s) URL, never a `.holo` (Scene Viewer runs outside the
page, so it can't read a `blob:` URL either). Passing it always routes Android to Scene Viewer;
the in-page WebXR viewer never loads it, and Quick Look never gets it. For an encrypted
product, pass its plain twin here (the node's stored `plainGlbUrl`). An encrypted product of
several models has no twin, so `info().ar.modes` leaves Scene Viewer out; a page that passes a
merged file of the whole product shows its AR control from `info().ar.fileModes`.

**Default:** undefined (an opted-in account's in-page viewer shows a copy of the committed product; else Scene Viewer gets the product's plain twin, or the call resolves 'unsupported': spec section 5.11)

## Example

Imports: values (`has`, `validate`, the `Holo*Error` classes, the pure helpers) from `@holostep-configurators/runtime-client`, types from `@holostep-configurators/runtime-client/contract`, `/math` and `/testing` names from those entries; `boot` from the runtime module the root's `loadRuntimeAtFloor` resolves to. A type your page defines is your app's: declare it there, never import it from the package.

Compiled under the contract's strict settings (`examples/declaration/16-ActivateAROptions.glbUrl.ts`):

```ts
import type { Session } from '@holostep-configurators/runtime-client/contract';
declare const session: Session;
declare const signal: AbortSignal;
declare const arButton: HTMLButtonElement;
declare const mergedGlbUrl: string; // the page's public http(s) GLB of the whole product
const show = () => {
  const { modes, fileModes } = session.info().ar;
  arButton.hidden = modes.length === 0 && fileModes.length === 0;
};
show();
session.on('ar:modes', show, { signal });
arButton.addEventListener('click', () => void session.activateAR({ glbUrl: mergedGlbUrl }));
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `glbUrl` names no product |
| 2. A precedent | pass: [Google Scene Viewer intent (title, resizable)](https://developers.google.com/ar/develop/scene-viewer) (row `G59`); [model-viewer (ar, camera-orbit, auto-rotate)](https://modelviewer.dev/docs/) (row `G59`) |
| 3. Two apps, or labs | pass: 22 apps (ledger: app-4f16d2f6da, app-ceb4eccc72, app-fb16dd1985, app-fc07850558, app-fd09090420; fleet cross-check: app-04c2774145, app-37356bf09f, app-4762caacdc, app-4fd23bc869, app-822bb9d6aa, app-8675b3225c, app-b362a81c85, app-bcb7ef21da and 11 more) |
| 4. The cheaper fix first | decided per need in Appendix B: rows `G59` at tier stable (a member only where no rule, data, asset or app code serves the need) |
