Logic Block Triggers
Triggers are start of events for a condition of a logic block.
The trigger is based on the width of the player.
The trigger is based on the height of the player.
The trigger is based on the player’s aspect ratio. This is helpful when you want to detect the player’s orientation.
For example, if you want to check if the player is in landscape orientation (the player’s width is greater than its height), the expression would look like this:
|Player Aspect Ratio||>||1|
For portrait orientation, when the width is less than the height, it would be:
|Player Aspect Ratio||<||1|
And for a square aspect ratio, use
|Player Aspect Ratio||=||1|
The trigger is based on the player being in Fullscreen or not.
This trigger will be based on the current view mode: Continuous or Drag Mode. The view mode refers to how the panorama rotates when the user interacts with it.
For Object2VR and triggering its current view state.
|Poly Mode||=||Show Current|
Use this trigger to initiate the logic block based on the mobile device being used (iOS, iPadOS, and Android).
One example of use would be to hide tooltips when a mobile device is being used.
|Mouse Over Parent||=||True||AND|
Use Has Touch for touch events. A touch event will trigger the logic block whereas Is Mobile will be triggered the moment the device detected.
This trigger will detect if the gyroscope on a mobile device is available. Some mobile devices will not allow access to the gyro. For example, you can use this trigger to show a text box that explains access to the device’s gyro is not allowed.
Another example is to use with a gyro button so that on a device where the Gyro is not accessible, like the Oculus Go, it won’t appear.
★ The gyrocscope will only work if the project is hosted on a secure site.
This trigger will react to the gyro’s status (on or off). See: Gyro skin action.
Checks to see if VR is available or if the viewing device supports VR.
Checks to see if the player is currently in VR mode.
This trigger is used to detect if a browser allows the auto-playback of sound. It has three states or values:
- Not Permitted
When used in a splash screen, for example, this trigger can be activated when a user interacts with the splash screen and the browser can be tested. If the browser allows sounds, then the player will change value to Permitted and sounds will start to play. Learn more.
Trigger based on the player’s current language.
When the mouse hovers over an element it will trigger an event.
When the mouse clicks on or presses down on an element it will trigger an event. For a touch device, this event happens when the element is tapped or touched.
Add this trigger to an element that is a child of a parent. When the mouse hovers over the element’s parent, it will trigger an event. An example of use is to show/hide hotspot tooltips, where the text box for the tooltip is the child of the hotspot template.
Add this trigger to an element that is a child of a parent. When the mouse clicks or pressed down on the element’s parent, it will trigger an event.
The trigger is based on the angle of rotation for the pan movement (left/right).
The trigger is based on the angle of rotation for the tilt movement (up/down).
The trigger is based on the angle of view (zoom).
Use this trigger to control skin elements depending on if the view is or is not in a certain projection.
With this trigger, you can create an event if the panorama is currently auto-rotating (true) or not (false).
Is Tour will react to a project being a tour or not. If the project has a single node it is false; for a project with multiple nodes it is true.
Use Node Count to trigger an action based on the number of nodes in a tour. For example, you could choose to use different menus based on the number of nodes prescent.
If the panorama has tags, this trigger will be based on the defined tags.
Node ID will react to the specified ID of a tour node. Node IDs can be found in the tooltip box when the mouse hovers over the node in the Tour Browser. But, first, be sure to have Show internal node ID selected in Pano2VR’s advanced settings.
As an example, you could use this trigger to hide buttons for certain nodes in a tour. Select a button in the skin. In the Visible setting, add a Logic Block. Use Node ID as the trigger,
= for Comparison and the value would be the node ID of the node that should have the button hidden.
If the project has a map (sources from the Tour Map), this trigger will activate and can hide and show skin maps.
If the project has a floor plan, the trigger will activate and can hide and show skin maps.
If the current node is located on any floor plan, this trigger will activate and can hide and show skin maps.
This trigger will react to background sounds, pinned sounds, and pinned videos. For example, you can show or hide an element or component if a pinned element has sound. Note that this does affect media added to the skin or as assets.
★ If an element or video panorama should not trigger
Has Sounds, then set its level to
This trigger reacts to the number of defined point hotspots. For example, this can be used to toggle a Show/Hide Hotspots button if no hotspots are in the project. See
material_index.ggsk for reference.
This trigger reacts to the number of translations added to a project. This can be used, for example, to show or hide a Translation button based on the number of languages added to the project. Note, that the project’s default language is not taken into account. See
material_dart.ggsk for reference.
The trigger is based on if the panorama is loading or not.
The trigger is based on the tiles being loaded.
The trigger is based on the element being active or not. The Timer element uses a logic block and it can be used to hide elements in the skin. For example, adding an element as a child to the Timer will allow the timer to hide the element after it times out. Once the timer is no longer active, the element attached to it will hide.
This trigger is based on a node being visited (or viewed) or not. An example of use would be to apply this to a graphic that indicates to the user they have already visited a node in a tour.
The visited state can be cleared from a tour by adding a button with the action, Go to URL and entering
These triggers will only be available if a table type cloner has been added to the skin. They can be applied to children of cloners and react to the properties of the current cloned instance.
A trigger based on the number of nodes in a category.
This trigger is based on the index of a cloned element in a cloner. The first element has an index of 0, the second has an index of 1, etc.
A trigger based on tags used in the cloner table.
A trigger that uses the title added to the cloner table.
These triggers are available for elements that are children of Hotspot Templates These are useful for showing or hiding hotspots when they enter a specific angle of view.
For example, to show Hotspots when they enter the center of the screen, add a logic block to Alpha:
Triggered when a hotspot template enters the defined area of the player along the X axis. Define the area by using two conditions. For example to create an area of 10% of the player:
|Hotspot Player X (%)||>||45||And|
|Hotspot Player X (%)||<||55|
Triggered when a hotspot template enters the defined area of the player along the Y axis. Define the area by using two conditions. For example to create an area of 10% of the player:
|Hotspot Player Y (%)||>||45||And|
|Hotspot Player Y (%)||<||55|
Triggered when a hotspot template reaches the defined from the edges of the player. If you want trigger a hotspot template when it is, for example, less than 10% away from the player’s edge, then you’d enter
Hotspot Distance from Edge (%) < 10%.
|Hotspot Distance from Edge (%)||<||10|
Use the Host trigger to show and hide skin elements based on the project’s host location. Add the hosting domain to Value.
This way, you can change an element’s attribute depending on which domain the project is served from which means you can create domain locks, or change colors based on domain or if you use a mobile domain, you can show and hide certain elements just for mobile displays.
To show an element based on a specified domain, deselect Visible and add a logic block:
The Operating System trigger reacts to the chosen operating system. Choose from the list in the value column.
✭ If you’re having issues with the is Mobile trigger on Android, try using this trigger instead.
The Browser trigger will react to the chosen browser. For the value, choose from a list of browsers.
Use this trigger to change an element’s parameter based on the browser’s current appearance or theme. Choose from Dark or Light.
Any variables that have been added to the skin properties will be listed here. Variables can also be used as values. Right-click in the Value column to choose the variable.
Placeholders for hotspots and user data can be used as triggers within logic blocks. This means the logic block can detect user data and hotspot entries. They can also be used as Values. Right-click in the Value column to choose the placeholder.
$(hs)= hotspot title
$(hd)= hotspot description
$(hu)= hotspot URL
$(ht)= hotspot target
$(hDm)distance in meters
$(hDk)distance in kilometers
$(hDf)distance in feet
$(hDmi)distance in miles
$(hDy)distance in yards
$(ut)= user data title
$(ud)= user data description
$(ua)= user data author
$(ue)= user data date/time
$(uc)= user data copyright
$(us)= user data source
$(ui)= user data information
$(uo)= user data comment
$(lat)= user data latitude
$(lng)= user data longitude
$(un)= user data custom node ID
$(upt)= user data title
$(upd)= user data description
$(upa)= user data author
$(upe)= user data date/time
$(upc)= user data copyright
$(ups)= user data source
$(ui)= user data information
$(upo)= user data comment
A hotspot template may have a text box that displays a tooltip for the hotspot title. But, there may be an instance where the title is missing. For instance, if you have a tour and some nodes have titles missing, then you’ll see an inconsistency in the tooltips; some will be populated, others will be empty. To prevent this, you can use placeholders as triggers in a Visible logic block that will hide the text box altogether if nothing is detected in the User Data’s Title field.
Add a text field as a child to a hotspot template. In the text field’s appearance parameters, add a logic block to the Visible setting (which is selected) and create the following expression
|hotspot title $(hs)||=|
This states that if the title text field of a hotspot is empty, then the text box should not be visible.