Pano.addHotspot(id:String,pan:Number,tilt:Number,div:DomElement)Īdd a DomElement as hotspot to the panorama. Returns the source object of a specific pinned media element. To change the visibility of a pinned image or video. Pano.changeVolume(id:String,volumen:Number)Ĭhange the volume for this element. Set the volume (between 0.0 and 1.0) for this element to a fixed value. Pano.activateSound(id:String, state:Number)Ĭheck if this media element is currently playing. To get/set the position of a currently playing sound. Pano.soundSetTime(id:String, time:Number) Toggle between play and stop the sound with this media id. Toggle between play and pause the sound with this media id. The projection can have the following values: Pano.changeProjection(projection:Number, speed:Number) This tag specifies which nodes will be considered when autorotation automatically switches nodes. Pano.toggleAutorotate(speed:Number,delay:Number,rth:Number) Pano.startAutorotate(speed:Number,delay:Number,rth:Number) tAutorotate(speed:Number,delay:Number,rth:Number) Pano.moveTo(pan:Number,tilt:Number,fov:Number,speed:Number,roll:Number,projection:Number) tDefaultView(pan:Number,tilt:Number,fov:Number) 4 – Rectilinear, 9 – Stereographic, 12 – Fisheye. Pano.changeProjection(v:Number, speed:Number) tPanTiltFov(pan:Number,tilt:Number,fov:Number) Return the current horizontal Field of View. Return the current vertical Field of View. Set the current Field of View, depending on the FoV mode.Ĭhange the current Field of View, depending on the FoV mode. Return the current Field of View, depending on the FoV mode. Pano.changeTilt(offset_in_degrees:Number) Sets the current pan angle, taking the nodes north offset into account. Return the current pan angle including the nodes north offset. Return a normalized current pan angle (between -180.0 and +180.0). Set the crossorigin attribute for all external files like the config, images, tiles and embedded videos. This is useful, if the HTML file has a different base then the xml configuration file. The base path is added to relative file names and urls. Read the node/tour configuration from a XML Document object. Read the node/tour configuration from a string. Pano.readConfigUrlAsync(url:String,callback:Function,base:String="") The base parameter defines a different base path. Read the node/tour configuration from a url. Pano.readConfigUrl(url:String,base:String="") Like: javascript: alert('Button clicked!')
PANO2VR JAVASCRIPT CODE
This lets you trigger JavaScript code by an action in the skin.įor instance, add an action to a text element, set the source to Mouse Click, the action to Go to URL, and in the URL field put javascript: Your JavaScript code.
You could, for instance, register functions to certain player events: javascript:""
PANO2VR JAVASCRIPT SKIN
This will then be executed when the skin is loaded. For instance, putting javascript:5+5 would display as 10.īut, you can misuse this to run any JavaScript code: put javascript:"" Your JavaScript code. Normally, you would use this to do simple calculations. Everything that follows the : will be put into the innerHTML of the text element. You can put JavaScript code into the text field of a Text element: There are two ways of using JavaScript in the Skin Editor: Textbox However, if you use JavaScript in the skin, you must use player as the object. Since the skin files are not minified, you can simply peek into a skin file to figure out how some things are done internally.Īll the examples below use pano as the object. The HTML5 Pano2VR player has an external API so that it can be controlled with JavaScript.