Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
trillion-widget
Advanced tools
This is Trillion AR Widget that allow you to integrate Trillion SDK in your site. For more information please visit https://trillion.jewelry
Using npm:
npm install trillion-widget
Using yarn:
yarn add trillion-widget
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 trillionWidget = new TrillionWidgetApp()
trillionViewer.init(elem)
trillionWidget.setJewelryID('demo-pendant-ar')
trillionWidget.setJewelryType('necklace')
trillionWidget.refresh()
For typescript:
const elem = document.getElementById('trillion-widget') as HTMLElement
trillionWidget#init()
- Create widget on the provided HTML elementtrillionWidget#refresh()
- reload widget after changing parameterstrillionWidget#setJewelryID(sku)
- Set the id(SKU) of the jewelry to loadtrillionWidget#getJewelryID()
- Get the id(SKU) of the uploaded jewelrytrillionWidget#setJewelryGroup(sku[])
- Set a group of jewelry.
If set, the widget shows selector with all elements of the group and ignores jewelry from setJewelryID
By default, widget will load first element of the grouptrillionWidget#getJewelryGroup()
- Get a group of jewelrytrillionWidget#setIsVisible(isVisible)
- Set widget visibletrillionWidget#getIsVisible()
- Get widget visibletrillionWidget#setJewelryType(type)
- Set the jewelry type (earrings, ring, necklace) to loadtrillionWidget#getJewelryType()
- Get the uploaded jewelry typetrillionWidget#setUsePerformanceCheck(use)
- use performance checktrillionWidget#getUsePerformanceCheck()
- use performance checkuse this pattern:
unpkg.com/:package@:version/:file
For example:
import {TrillionWidgetApp} from "https://unpkg.com/trillion-widget@0.2.17/build-lib/trillion-widget.js"
FAQs
Trillion AR Widget
The npm package trillion-widget receives a total of 609 weekly downloads. As such, trillion-widget popularity was classified as not popular.
We found that trillion-widget demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.