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
Installing
Using npm:
npm install trillion-widget --save
Using yarn:
yarn add trillion-widget
How to use:
You need to create an empty div element for widget initialization.
For example:
<div id="trillion-widget"></div>
Then, 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
Instance methods
twa#refresh()
twa#setJewelryID(sku)
twa#getJewelryID()
twa#setIsVisible(isVisible)
twa#getIsVisible()
twa#setJewelryType(type)
twa#getJewelryType()
twa#setUsePerformanceCheck(use)
twa#getUsePerformanceCheck()