English
Appearance
English
Appearance
Body AR corresponds to the body type.
It is mainly used for body tracking and virtual try-on experiences, such as clothing, accessories, body stickers, or 3D content bound to body posture.
A typical flow is:
tracked fires once a body is detectedlostTrack fires when the body is lostBody AR does not rely on a recognition image. The "scanning" here is closer to a "please step back so your whole body is in frame" prompt.
Body AR can use either the front or rear camera depending on your use case:
cameraPosition: 'front'Example:
await kivicubeIframePlugin.openKivicubeScene(iframe, {
sceneId,
cameraPosition: 'front',
});If the scene configuration allows camera switching, you can also use switchCamera() to switch between front and rear during the experience.
The most commonly used events in a Body AR scene are:
readydownloadAssetProgressloadSceneEndsceneStarttrackedlostTrackerrorAmong them:
sceneStart means the scene has started running and the find-person guidance is showntracked means a body has been detected; the default scan UI hides and photo capture becomes availablelostTrack means a body is not being stably detected in the current frameYou can hide the default scan UI with the hideScan property, then render your own body-detection prompt on the host layer.
For example:
await kivicubeIframePlugin.openKivicubeScene(iframe, {
sceneId,
hideScan: true,
});
iframe.addEventListener('sceneStart', () => {
showBodyGuide('Please step back so your whole body is in frame');
});
iframe.addEventListener('tracked', () => {
hideBodyGuide();
});
iframe.addEventListener('lostTrack', () => {
showBodyGuide('Step back a little and keep your whole body fully in frame');
});Rather than a generic "scanning", Body AR works better with explicit posture prompts such as "Please keep your shoulders and full body visible" or "Please move to a better-lit spot".
Body AR adds a default body-occlusion / garment-fitting model inside the scene to help align virtual clothing with the full body.
The host page does not need to manage this default model directly. You usually only need to watch:
tracked / lostTrack statesBody AR supports the rotate and scale gestures configured in the scene.
Currently, gestures mainly act on the body content object, so designing the core experience around dragging objects is not recommended. Preferred interaction patterns are:
cameraPosition: 'front' first; otherwise the user may need someone else to film them.sceneStart / tracked / lostTrack.tracked has fired at least once, to avoid saving a frame where fitting is incomplete.