Javascript programming with DevalVR  (example code)

 

This example shows all functions explained in Javascript programming page.

Select an image to view:

  
QTVR file             QTVR file             JPEG file

Invert panorama ON / OFF (only third image)
 
Get current filename

 

Full screen (ESC to close fullscreen)

 document.PLUGINNAME.fullscreen=1;

tilt=10 pan=90 zoom = 1.4 ............

 document.PLUGINNAME.Command('rotcamera',10,90,0);
 document.PLUGINNAME.Command('zoomcamera',1.4,0,0);

tilt=-90 pan=0 zoom= 1.0 ..............

 document.PLUGINNAME.Command('rotcamera',-90,0,0);
 document.PLUGINNAME.Command('zoomcamera',1.0,0,0);

PAN camera 20 degrees .................

 document.PLUGINNAME.Command('rotcamera'
                        ,document.PLUGINNAME.rotationx
                        ,document.PLUGINNAME.rotationy+20
                        ,0);

Viewfinder ON / OFF .......................

 document.PLUGINNAME.Commands("menu","viewfinder");

Autoplay ON / OFF ..........................

 document.PLUGINNAME.Commands("menu","play");

 

To call the plugin functions from links, this example uses the next syntax in the links:

<A href= "Javascript:FunctionName() ">Link text</A>

This is the Javascript code of this example page: