• Use the skin configuration to select number of nodes to skip
• Components for both Simplex and Silhouette skins
The idea behind this was from a support e-mail.
The user wanted to be able to skip 10 nodes at a time as they had a self hosted Street View like tour and had a node every couple of meters.
Using the hotspots viewers could visit every node, but then wanted a button to advance the viewer faster through the tour.
How to use:
Download the file and double click, when asked, add to Pano2VR in your desired category.
Using the Skin Configuration button the new components can be set to jump nodes.
Example, setting the value to 2 will mean each time the button is clicked it will skip 2 nodes, so 1, 3, 5.
When the value is 1 then they both appear and work in the same way as the packaged Next and Prevues buttons.
But when set to 2 and above the tool tips now indicate how many nodes will be skipped.
Thats it and your ready to go!
Under the hood stuff if you want to go there
How it works:
There is a numbered Variable in the skin that is set to expose, this then allows the value to be adjusted using the Skin Configuration button.
The "Next" button uses a Go To URL action that uses JavaScript:
Code: Select all
javascript:
var nodes=player.getNodeIds();
var ind=nodes.indexOf(player.getCurrentNode());
ind=(ind + player.getVariableValue("opt_jump")) % nodes.length;
player.openNext("{" + nodes[ind] + "}","$fwd");
The "Prevues" button also use a Go To URL action and JavaScript:
Code: Select all
javascript:
var nodes=player.getNodeIds();
var ind=nodes.indexOf(player.getCurrentNode());
ind=(ind + nodes.length - player.getVariableValue("opt_jump")) % nodes.length
player.openNext("{" + nodes[ind] + “}","$fwd");
Hopki