This demo shows how you can change the position and content of annotation.
Clara.io demo resources:
Visit Base Scenevar sceneId = 'ba27edd2-8037-47e8-ab71-112e52053fac';
var api = claraplayer('player');
var wireframeModes = ['Normal Render', 'With Wireframe', 'Only Wireframe'];
var wireframeModeSelect = document.getElementById('wireframeModes');
api.sceneIO.fetchAndUse(sceneId).then(function() {
wireframeModes.map(function(mode, i) {
wireframeModeSelect.options[i] = new Option(mode, mode);
});
document
.getElementById('baseScene')
.setAttribute('href', 'https://clara.io/view/' + sceneId);
wireframeModeSelect.onchange = changeHandler;
});
function changeHandler() {
var mode = 0;
if (wireframeModeSelect.value === 'Normal Render') mode = 0;
else if (wireframeModeSelect.value === 'With Wireframe') mode = 1;
else if (wireframeModeSelect.value === 'Only Wireframe') mode = 2;
api.player.setWireframeMode(mode);
}