@onirix/webar-debug-module
v1.0.0
Published
Help debugging errors in WebAR experiences running in Onirix Studio
Downloads
4
Readme
Onirix WebAr debug
This module helps us to debug the Onirix Studio WebAR experiences. By simply instantiating an OnirixWebARDebugModule object, it starts capturing all the traces generated by the browser's console object. These traces are stored and can be downloaded from the UI.
We can also connect the module with the EmbedSDK and automatically capture all the events that occur within the experience.
Install && usage
Include this code on the Onirix Studio online code editor:
import OnirixWebARDebugModule from "https://unpkg.com/@onirix/[email protected]/dist/ox-webar-debug-module.esm.js"
const onirixWebARDebug = new OnirixWebARDebugModule();
If you want to connect the module with the EmbedSDK, you can do it by calling the setEmbedSDK
function.
import OnirixEmbedSDK from "https://unpkg.com/@onirix/[email protected]/dist/ox-embed-sdk.esm.js";
import OnirixWebARDebugModule from "https://unpkg.com/@onirix/[email protected]/dist/ox-webar-debug-module.esm.js"
const embedSDK = new OnirixEmbedSDK();
const onirixWebARDebug = new OnirixWebARDebugModule();
onirixWebARDebug.setEmbedSDK(embedSDK);
embedSDK.connect();
You can also view the latest console trace in the UI. Just call showTrace
function to enable / disable it.
onirixWebARDebug.showTrace(true);