İçeriğe geç

Attributes reference

Bu içerik henüz dilinizde mevcut değil.

All attributes are optional except project. Attribute changes are observed live. Updating one re-syncs the embed (and reloads the frame only when the underlying URL changes).

Attribute Values Purpose
project (or project-id) ID The published project to show. Required. Without it the element renders empty.
scene-id ID Pin a specific scene of the project.
model path Show a single model of the project by path.
Attribute Values Purpose
configurator boolean Enable option picking (parts & variations). Without it the embed is a viewer.
picker off | none | false Hide the built-in option panel while keeping the engine + SDK alive (headless).
mode headless | launcher | ar-launcher headless = same as picker="off". launcher = device-adaptive AR launcher page instead of the inline viewer.
ar-button off | none | false | 0 Hide only the built-in AR button so AR entry runs from your own button via enterAR(). controls="off" already covers it.
controls off | none | false | 0 Remove the whole built-in control surface (AR, photo, measurements, reset view) and draw your own, driven over the SDK. Named after <video controls>. getControls() and the togenar:controls event report what each control should offer.
launcher boolean Same as mode="launcher".
preview token Owner draft-preview token from the panel, so the owner can embed an unpublished project. Changing only the token swaps it inside the running frame without a reload. Never set this on public pages.
Attribute Values Purpose
lang (or locale) en | tr | ru UI language of the built-in panel and summary.
aspect 16/9, 1/1, 4/3, … Aspect-ratio sizing (default 16/9). Accepts 16:9 too.
height CSS length Fixed-height sizing. Overrides aspect.
loading lazy (default) | eager Iframe loading strategy.
allow permissions list Iframe permissions. Default: xr-spatial-tracking; fullscreen; camera; accelerometer; gyroscope.
Attribute Values Purpose
base-url URL Override the viewer origin (default https://model.togenar.com).
size-hints boolean Append the element’s pixel size to the viewer URL. Off by default because size changes would reload the frame.
na boolean Skip analytics for this impression (e.g. internal dashboards): views, AR launches, option picks and enquiries. Also skips the anonymous rendering-health summary (device class and load timings, with no identifiers).
enquire boolean Show the “Request a quote” button in the configurator summary. Off by default.
enquire-label string Rename that button (“Add to cart”, “Get a price”…).
reflection boolean Studio-style ground reflection under the product. Off by default.
page-url URL Product-page URL for AR hand-off. It is used as Quick Look’s canonical URL and the QR return target. Defaults to the embedding page’s own URL.

page-url: AR that finds its way back to your product page

Section titled “page-url: AR that finds its way back to your product page”

A desktop shopper who launches AR gets a QR code and finishes the journey on their phone, on model.togenar.com, where your page, your prices and your cart are not present. page-url (or its default, the embedding page’s own URL) travels with that QR hop:

  • The price you last pushed with setPrices() travels too, so Apple’s AR banner shows the configured price on the phone.
  • The AR banner’s canonical URL becomes your product page instead of the viewer.
  • When the shopper taps your AR call-to-action (WebAR settings → AR Add to Cart), the phone returns them to your product page with togenar_ar_cart=1 and the configured selection appended, so your page can add the exact configuration to the cart.

One condition applies. The page’s domain must be on your workspace embed allowlist (the same list that powers the domain lock). An empty allowlist keeps the whole hand-off off, which stops a forged QR from steering shoppers to a foreign site.

A soft mirror on the ground plane, the way a product is lit in a studio shot. It costs GPU time, so it is off unless you ask for it, and the viewer skips it where it would cost more than it adds.

<togenar-embed project="..." reflection></togenar-embed>

enquire: the configurator’s conversion step

Section titled “enquire: the configurator’s conversion step”

The shopper builds a configuration and uses enquire to ask for it. The viewer shows the button in the summary panel and emits an event. You fulfil it by opening your quote form, adding a cart line, or posting to your CRM.

<togenar-embed project="..." configurator enquire enquire-label="Request a quote"></togenar-embed>
document.querySelector('togenar-embed')
.addEventListener('togenar:configurator:enquire', (e) => {
// { parts: [{ partId, partLabel, variantId, label, sku, modelName }], skus, shareUrl }
openQuoteForm(e.detail);
});

It is off unless you ask for it, because the button does nothing unless your page handles the event.

If you have no cart or CRM to wire the event into, don’t use the attribute. Switch on Quote requests in the panel instead. That serves a built-in contact form and emails you the configured selection without code. The button then also appears in the standalone viewer and share links, and the event above still fires for hosts that listen.

This also makes conversion reportable. The tap happens inside the configurator, so it appears in your dashboard’s funnel. (A buy button outside the 3D player, which is the common arrangement, cannot be attributed.)

The host element exposes one CSS custom property:

togenar-embed { --togenar-embed-bg: #f4f4f6; } /* default: transparent */

The frame has border-radius: 12px and clips its content. Wrap it if you need a different radius.