English
Appearance
English
Appearance
Related reference: Scene API / Camera and Photo Capture
The Web plugin supports both "specify the camera when opening for the first time" and "switch the camera while running".
Use the cameraPosition property:
await kivicubeIframePlugin.openKivicubeScene(iframe, {
sceneId,
cameraPosition: 'front',
});Available values:
frontbackThe default is back.
The advanced API provides:
const next = await api.switchCamera('front');
console.log(next); // 'front' or 'back'Please note:
switchCamera() is currently available only on scene SceneApi; collection support will be added laterweb3d, the method throws immediately because that mode does not depend on a real cameraSo it is best suited to Image AR and Basic AR/Gyroscope scenes.