Next and Previous buttons that can use Tags Pano2VR pro

Post Reply
User avatar
Hopki
Gnome
Posts: 11516
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Mon Jan 18, 2021 10:35 pm

Download and double click to add to Pano2VR pro.

silhouette_next_previous_tag.ggskc
(24.21 KiB) Downloaded 64 times
simplex_next_previous_tag.ggskc
(38.22 KiB) Downloaded 67 times

This component is the same as the Next and Previous buttons but this can use Tags.
If no tag is set, then the buttons will open each node in the order of the tour browser as normal.

If a number of nodes have a tag set and the same tag is entered using the Skin Configuration button, then the tagged nodes will be opened in the order of the tour browser but skipping nodes that do not have the tag.
In this example, only nodes that contain the tag "first" will be opened.

2.png
2.png (20.54 KiB) Viewed 1357 times

The buttons are looking for the tag in a text variable called, var_tag.
This means the variable can be changed during the tour with a Set Variable Value action.
Example action:

1.png
1.png (34.15 KiB) Viewed 1357 times

Using the above example when the Next and Previous buttons are used only nodes with the tag "ground" will be opened.
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
360° Immersion
Posts: 10
Joined: Fri Apr 06, 2018 1:15 pm

Fri Apr 09, 2021 5:12 am

Wow, thank you Hopki! I was just trying to figure out how to do this. I already had an action set up to do this for a cloner so this was basically plug-and-play.

Will this component be included by default in future versions? It's super useful for larger tours.
User avatar
Hopki
Gnome
Posts: 11516
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Fri Apr 09, 2021 11:36 am

Hi,
Probably not part of the default components but they are here.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
snowlexx
Posts: 18
Joined: Fri Dec 27, 2019 5:21 pm
Location: Россия

Thu May 27, 2021 8:45 pm

Hopki wrote:
Fri Apr 09, 2021 11:36 am
Hi,
Probably not part of the default components but they are here.
Regards,
Hi, Hopki, tell me please, is it possible to save the current view when switching between nodes?

And more. In case someone needs it. I needed to switch panoramas not to the next one, but after one or two. This can be done if you change the number in the code:
javascript:
var currentNodeId = player.getCurrentNode();
var allNodesWithTag;
if (player.getVariableValue('var_tag') == '') {
allNodesWithTag = player.getNodeIds();
} else {
allNodesWithTag = player.getNodesWithTag(player.getVariableValue('var_tag'));
}
if (allNodesWithTag.length > 0) {
var currIndex = allNodesWithTag.indexOf(currentNodeId);
var nextIndex = 0;
if (currIndex != -1 && currIndex != allNodesWithTag.length - 1) {
nextIndex = currIndex + 1;
}
player.openNext('{' + allNodesWithTag[nextIndex] + '}');
}
Post Reply