ORBITTOUR API

ORBITTOUR embedded at web page exposes API object that provides some useful methods to customise ORBITTOUR behaviour.

To get access to ORBITTOUR API object you have to define global JavaScript function and pass its name to ORBITTOUR’s embed script:

<script type="text/javascript">
    window['my_orbit_init'] = function(orbittour_api){
        // do something with API object
    }
</script>
<script type="text/javascript" src="//orbitvu.co/001/dSz54kMJ7rHKtC6E2YBHpf/2/orbittour/468/script?external_init=my_orbit_init"></script>

The function will be called after ORBITTOUR is initialized.

Available API methods are:

handle_resize

Manually inform ORBITTOUR that it should recalculate its dimensions. Useful when you change the size of container element with some other script. Sample usage:

$('#orbit-container').css('width', 500); 
orbittour_api.handle_resize();

This method is called automatically when browser window is resized

enable_mousewheel

Proxy method to ORBITVU VIEWER API. This will enable VIEWER zoom on a mouse wheel. This method switches mousewheel parameter to ‘yes’:

orbittour_api.enable_mousewheel();

disable_mousewheel

Proxy method to ORBITVU VIEWER API. This will disable VIEWER zoom on a mouse wheel. This method switches mousewheel parameter to ‘no’:

orbittour_api.disable_mousewheel()

setScene

Proxy method to ORBITVU VIEWER API setScene method:

orbittour_api.setScene({scale: 0.5});

getScene

Proxy method to ORBITVU VIEWER API getScene method:

let scene = orbittour_api.getScene();