Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wonder-partners/ar-button

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wonder-partners/ar-button

A web component to easily display 3D models in native AR across browsers and mobile devices

  • 0.5.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

AR Button

A web-component to display a 3D model in augmented reality using the native Quick Look on iOS and Scene Viewer on Android. Heavily inspired by model-viewer and @leoncvlt/ar-button.

Quick Start

<!-- Import the component -->
<script
  type="module"
  src="https://unpkg.com/@wonder-partners/ar-button"
></script>

<!-- Default stylesheet (optional) -->
<link
  rel="stylesheet"
  href="https://unpkg.com/@wonder-partners/ar-button/styles.css"
/>

<!-- Use it like any other HTML element -->
<ar-button src="https://your.model.glb" ios-src="https://your.model.usdz">
  View in your space
</ar-button>

Attributes

srcuri (Android)

The URL to the 3D model for Android platform. Only glTF/GLB models are supported.

titlestring (Android)

A name for the model. If present, it will be displayed in the UI. The name will be truncated with ellipses after 60 characters.

fallback-urluri (Android)

When the Google app is not present on the device, this is the URL that the browser navigates to.

occlusionboolean (Android)

If present, turns on Object blending mode.

linkuri (Android, iOS)

A URL for an external webpage. If present, a button will be surfaced in the UI that intents to this URL when clicked.

ios-srcuri (iOS)

The URL to the 3D model for iOS platform. Only USDZ models are supported.

checkout-titlestring (iOS)

A name for the model. If present, it will be displayed in the UI. Only works if supplied alongside checkout-subtitle, price, and call-to-action.

checkout-subtitlestring (iOS)

If present, it will be displayed in the UI. Only works if supplied alongside checkout-subtitle, price, and call-to-action.

pricestring (iOS)

If present, it will be displayed in the UI. Only works if supplied alongside checkout-subtitle, price, and call-to-action. AR Quick Look displays the subtitle and price separated by a comma below the title. Price should include the currency symbol.

call-to-actionstring (iOS)

If present, display this text as a button the quick look default UI. Only works when supplied alongside checkout-title, checkout-subtitle and price. You should also supply an url to link (see above).

canonical-web-page-urluri (iOS)

If present, this URL will be used inside the native Share button of AR QuickLook.

allows-content-scalingint (iOS)

If set to 0, disables the pinch scaling feature. If omitted, default to 1 (pinch scaling feature enabled).

Keywords

FAQs

Package last updated on 03 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc