AR XR Builder
by @listenlin
Use when building, embedding, customizing, or troubleshooting AR/XR experiences with the Kivicube Web Plugin, including WebAR/Web3D H5 pages, landing pages,...
clawhub install kivicube-web-plugin-ar-xr-builder📖 About This Skill
name: kivicube-web-plugin-ar-xr-builder description: Use when building, embedding, customizing, or troubleshooting AR/XR experiences with the Kivicube Web Plugin, including WebAR/Web3D H5 pages, landing pages, event pages, product showcases, sceneId or collectionId setup, Vue/React wrappers, SceneApi runtime control, camera, autoplay, permissions, CORS, and compatibility. Also match Chinese requests such as 开发AR体验、XR体验、WebAR活动页、H5落地页、营销页、3D展示页、接入Kivicube Web插件、扫码识别、云识别、拍照分享。
Kivicube Web Plugin AR/XR Builder
Kivicube Web Plugin is an iframe-based integration layer for published scenes and collections used to build AR and XR experiences. The host page owns the iframe, page UI, and event listeners; Kivicube owns the inner experience and exposes a public runtime bridge through iframe-plugin.js. Use this skill from an external integrator's point of view: public script URL, public events, public open props, framework wrappers, and public SceneApi.
Common trigger phrases this skill should match well:
Architecture Model
Host page HTML/CSS/JS
-> load https://www.kivicube.com/lib/iframe-plugin.js
-> open a scene or collection into an Key split:
iframe embed: fastest path, no plugin events, no runtime API.SceneApi.ready.detail.api is not a stable collection runtime API. If you need per-scene runtime hooks inside a collection, read references/patterns.md and references/integration.md for sceneReady.Common Task Map
| Task | Public entry point |
| --- | --- |
| Plain embed with no customization | direct iframe embed with a published scene or collection URL |
| Open a scene manually | openKivicubeScene() |
| Open a collection manually | openKivicubeCollection() |
| Auto-open before DOMContentLoaded | iframe id + scene-id or collection-id |
| Keep framework components in control of DOM attrs | openKivicubeScene(..., false) / openKivicubeCollection(..., false) |
| Start from Vue 3 or React | references/examples.md framework examples |
| React to loading or scan progress | iframe events: downloadAssetProgress, loadSceneStart, tracked, lostTrack |
| Get the runtime API | iframe ready event, then event.detail.api |
| Find or move an object | getObject(), setPosition(), setRotation(), setScale() |
| Add runtime content | createImage(), createGltfModel(), createVideo(), then add() |
| Clean up runtime objects | remove(), destroyObject(), destroyKivicubeScene() |
| Switch camera or take a photo | switchCamera(), takePhoto() |
| Forward host clicks into the scene | dispatchTouchEvent() |
| Skip cloud recognition | skipCloudar() |
| Diagnose permissions, autoplay, or CORS failures | references/troubleshooting.md |
Mode Selection
SceneApi immediately; collection runtime control is narrower and event-driven.Key Conventions
openKivicubeScene() and openKivicubeCollection() as async. This matters most when modifyIframe=false is used in framework wrappers.hide-start, scene-id, or similar attrs later does nothing until the scene or collection is opened again.SceneApi methods should be awaited.three.js objects. Never mutate handle.position or similar fields directly.loadSceneEnd is usually the safest point for bulk object queries, runtime additions, and event registration that depend on scene content already existing.destroyKivicubeScene() or destroyKivicubeCollection() before reusing the iframe for another scene or collection.hideStart is high risk for autoplay and permission flows. Prefer branded host UI that still preserves an explicit user gesture.image2d-tracking, cloud-ar, and web3d. Do not present face-ar, body-ar, landmark, plane, roam, audio APIs, or custom animation APIs as part of the stable Web plugin surface.Minimal Path
Then branch by need:
references/integration.mdreferences/patterns.mdreferences/scene_objects_reference.mdreferences/media_animation_reference.mdreferences/rendering_camera_reference.mdreferences/examples.mdreferences/best_practices.mdreferences/troubleshooting.mdAPI Scope
Treat the public Kivicube Web plugin surface as the source of truth:
event.detail.api on scene pages and call async SceneApi methods