English
Appearance
English
Appearance
While running, Kivicube displays three kinds of status UI by default:
The host page can either keep the default UI or take over with properties and events.
await kivicubeIframePlugin.openKivicubeScene(iframe, {
sceneId,
hideDownload: true,
});iframe.addEventListener('downloadAssetProgress', (event) => {
const progress = event.detail;
updateProgressBar(progress);
});await kivicubeIframePlugin.openKivicubeScene(iframe, {
sceneId,
hideLoading: true,
});iframe.addEventListener('loadSceneStart', () => {
showLoading();
});
iframe.addEventListener('loadSceneEnd', () => {
hideLoading();
});In Image AR and Basic AR/Gyroscope scenes, the default scan UI is shown until a target is recognized.
await kivicubeIframePlugin.openKivicubeScene(iframe, {
sceneId,
hideScan: true,
});iframe.addEventListener('loadSceneEnd', () => {
showScanHint();
});
iframe.addEventListener('tracked', () => {
hideScanHint();
});
iframe.addEventListener('lostTrack', () => {
showScanHint();
});Once you hide the default UI, the host page takes responsibility for: