Page 1 of 1

Query Component

Posted: Tue Oct 03, 2023 8:30 pm
by Hopki
This component allows you to add a query at the end of a URL to set a variable value on output open.

Pano2VR uses variables to do many things, please see this page: LINK
As an example you may want a virtual tour to display a company logo, but depending on where the tour is hosted display different logo.


Download the component for your build, Pano2VR 6 or 7.

url_query_v6.ggskc
(22.85 KiB) Downloaded 1837 times
url_query_v7.ggskc
(22.76 KiB) Downloaded 1898 times

Double-click the component, and Pano2VR will open and ask which category or create a new category to add the component to Pano2VR's component tool box.


How it works:
Add variables to a skin, the attached example is using var1, var2 and var3
Var1 is a numbered variable, var2 is a text variable and var3 is a boolean, true/false variable.
You can add many variables to the URL stringing them together using the "&".

1.png
1.png (100.67 KiB) Viewed 128811 times

In the example, var2 is a text variable, but entering "red", "green" or "blue" will also change the background colour of the text boxes as well as changing the text colour to white.

2.png
2.png (85.65 KiB) Viewed 128811 times

You can also just use one or two of the variables in the query, for example, var1 and var3.
This would look like

/index.html?var1=120&var3=true

Download the working project
query_project.zip
(36.07 KiB) Downloaded 1911 times