Trillion AR Widget
This is Trillion AR Widget that allow you to integrate Trillion SDK in your site. For more information please visit https://trillion.jewelry
How to use:
Install a library:
npm install trillion-widget --save
yarn add trillion-widget
You need to create an empty div element for widget initialization.
For example:
<div id="trillion-widget"></div>
Using in your js code:
import {TrillionWidgetApp} from "trillion-widget"
const elem = document.getElementById('trillion-widget')
const twa = new TrillionWidgetApp(elem)
twa.setJewelryID('demo-pendant-ar')
twa.refresh()
For typescript:
const elem = document.getElementById('trillion-widget') as HTMLElement