New placeholders $(hat) and $(hap) do not appear to be working

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
mbb
Posts: 276
Joined: Mon Oct 19, 2009 11:42 pm

P2VR v.6b3 Win10

Went to utilize the new placeholders $(hat) and $(hap) in a hotspot action (move to view) and they had no effect. Test using static values did have an effect, so it appears these placeholders aren't working yet?

Additional note: I am looking to have the current view move to the hotspot (center it in the window) when clicking it, *before* the next node is loaded. So any node change after clicking will need to wait until the "move to view" is completed (which does not appear to work as such even with static values).
User avatar
Tony
Posts: 1341
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

mbb wrote: Thu Jul 19, 2018 10:59 am Went to utilize the new placeholders $(hat) and $(hap) in a hotspot action (move to view) and they had no effect. Test using static values did have an effect, so it appears these placeholders aren't working yet?
Hi,

They are working, here's a quick test I just did. https://s3-ap-southeast-2.amazonaws.com ... index.html

In the 'Move to View' action you need to write it like this $(*hap)/$(*hat)/70 using asterisks.


placeholdes.jpg
placeholdes.jpg (56.36 KiB) Viewed 4402 times


cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
mbb
Posts: 276
Joined: Mon Oct 19, 2009 11:42 pm

ah, the asterisks.. that explains it, thanks.

The v.6 documentation does not indicate that- it indicates "$(hap)/$(hat)/70" as the example to put into the field. Probably should be corrected.

Does node transition wait for the "move view" to be completed first before loading the next node?
Capture.JPG
Capture.JPG (28.68 KiB) Viewed 4400 times
User avatar
Tony
Posts: 1341
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

mbb wrote: Thu Jul 19, 2018 10:59 am Additional note: I am looking to have the current view move to the hotspot (center it in the window) when clicking it, *before* the next node is loaded. So any node change after clicking will need to wait until the "move to view" is completed (which does not appear to work as such even with static values).
Okay not the perfect solution but one that may be useful to you. Test output, click on the hotspot to return to original position and then fade to next node.

https://s3-ap-southeast-2.amazonaws.com ... index.html

Same project as before but this time I've added a manual timer. So you click on the hotspot, it sets activates the timer for 4 seconds, on deactivation it sends a 'Trigger Click' to the 'Pano Next' button and sets the variable value on 'vis_info_popup' to false to hide the popup info.

Maybe Hopki has a more elegant solution :-)

cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
Tony
Posts: 1341
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

mbb wrote: Thu Jul 19, 2018 12:52 pm The v.6 documentation does not indicate that- it indicates "$(hap)/$(hat)/70" as the example to put into the field. Probably should be corrected.
I think I did read something about the '*' in the documentation, I'll try to find it.
Does node transition wait for the "move view" to be completed first before loading the next node?
I can't find a way to have the node transition 'wait' until the pan and tilt parameters are at a certain value. I tried using an Action Filter with 'Execute action if.." but I couldn't get it to work.

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
Tony
Posts: 1341
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi,

Knew it was there! The use of the '*' is covered in the documentation in the section 'Placeholders in the Skin'

https://ggnome.com/doc/pano2vr/beta/using-placeholders/

Check out Hopki's video, located on the same page, as he explains the new methodology and advantages of V6 placeholder updates.

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Guys,
The asterisks brakes the place holder and the pano is moving to 0/0 and not the hotspot.
Please find attached a working project.
It uses a text variable to store the next node.
A timer that after a time out opens the node stored in the text variable. The timer is set to manual.
The point hotspot has the action to set the variable value on click that is stored in the hotspots URL.
It then sets a 2 second time out for the timer.
Then on mouse click move to view: $(hap)/$(hat)/70, with a speed of 5.
I also added a couple of text boxes so you can see what the actual pan/tilt is and what is getting stored in the text variable.
Regards,
Hopki
Attachments
MoveToView.zip
(372.45 KiB) Downloaded 163 times
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/
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Ahhh, did not explain the asterisks.
You only use this if your using a variable as a placeholder.
Example: A text variable in the skin called: visit_url.
You then set an action to change the text variable to say: http://yoursite.com
The placeholder in a button that would open the URL would be: $(*visit_url).
So the asterisks denotes its a variable and the URL will be: http://yoursite.com
Normal placeholders don't use the asterisks.
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/
User avatar
Tony
Posts: 1341
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hopki, you da man.

The speed = 5 in the Action Settings what does that relate to?

Such an elegant solution

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
Tony
Posts: 1341
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Hopki,

Okay something strange is going on.

I've downloaded the project and if I open the Output version in Firefox then when I click on the hotspot the hotspot moves and then the transition to the new node occurs.

However if I open the project file, create a new output folder and then do a build when I click on the hotspot it doesn't move but the transition to a new node does occur.

Any idea why?

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
Tony
Posts: 1341
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Hopki,

I notice in the skin.js that you are using // Pano2VR 6.0 beta4/16943 and I'm on // Pano2VR 6.0 beta3/16902 would that have a bearing on the income. I checked both skin.js files against each other and the only difference I found where 3 instances of 'hs += 'box-sizing: border-box;';'

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
Tony
Posts: 1341
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Hopki,

Okay found the issue in the skin.js

Your version 4 skin on line 370:

Code: Select all

me.player.moveTo(me.hotspot.pan,me.hotspot.tilt,"70","5");
My version 3 skin on line 368:

Code: Select all

me.player.moveTo("$(hap)","$(hat)","70","5");
If I copy your code into my version then it works.

tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Bradford and Tony,
The place holders are for beta 4 and on, I just checked and the feature was submitted after b3 was released and added to b4.
What throw me was when you said it worked using the *, but of course this only broke it to use the default view so did not think to check when it was implemented.
The good news it this will work with the next beta release :-) or copy and paste the code.
This was my fault I should of checked first but at least you know it is working.
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/
mbb
Posts: 276
Joined: Mon Oct 19, 2009 11:42 pm

Ok all good to know. thanks.

I think that a "look to hotspot" node transition may be a popular feature for others as well as myself. Perhaps it would be more useful to simply add it as an option checkbox in the "Transitions" panel?

And also on the topic of these hotspot position placeholders.. Another thing I would like build into my skin are elements (like hotspots etc) that only appear when the panorama view is centered on them (actually within 5-10 degrees or so). However there does not appear to be a way to utilize these placeholders in such a manner because the action fields that would have the values only allow integers (no variables or placeholders), and there also does not appear to be any math functions available? Eg: >($(hap)+5)
Post Reply