![]() |
|
|
|
|
|
||||||||||
|
| User list | Rules | You are not logged in.
I notice if I enable the gyro feature for iOS tours, when the tour loads the gyro mode is automatically enabled and there doesn't seem to be an option to disable it?
Is it possible to have a gyro On/Off button in the navigation toolbar somehow?
Offline
It can be done, but as far as I know, you have to edit the xml to achieve it.
http://test.anra.org/gyrotest (this url is for my testing, so it will not be available indefinitely)
You'll need to have a couple of images to use as buttons:
http://test.anra.org/gyrotest/builddata … nabled.png
http://test.anra.org/gyrotest/builddata … sabled.png
and you'll need to add a couple of buttons to the menu section of the xml:
<plugin name="gyroOFF" align="bottom" blendmode="normal" crop="0|0|65|65" customColor="true" height="prop" keep="true" onclick="switch(plugin[gyro].enabled);set(plugin[gyroOFF].visible,false); set(plugin[gyroON].visible,true);" onout="" onover="" onovercrop="0|65|65|65" url="builddata/graphics/menu/menu-gyro-enabled.png" visible="" width="40" x="200" y="10"/>
<plugin name="gyroON" align="bottom" blendmode="normal" crop="0|0|65|65" customColor="true" height="prop" keep="true" onclick="switch(plugin[gyro].enabled);set(plugin[gyroON].visible,false); set(plugin[gyroOFF].visible,true);" onout="" onover="" onovercrop="0|65|65|65" url="builddata/graphics/menu/menu-gyro-disabled.png" visible="false" width="40" x="200" y="10"/>and you may also want to add something to the firstloadcompleteadedaction to hide the button on devices where it doesn't make sense:
<action name="firstloadcompleteaction">
if(plugin[data].firstPanoHasBeenPlayed==false,
set(plugin[data].firstPanoHasBeenPlayed,true);
set(autorotate.enabled,false);
);
<!--hide gyro button if we're not on an html5 device-->
<!-- this really should be something like "if(plugin[gyro].available==false,", but I can't get it to work-->
if(ishtml5==false,
set(plugin[gyroOFF].visible,false);
);
</action>Hope that helps. I'll update if I figure out how to get the button to hide properly.
Offline
ok, this makes a bit more sense, but I'm still not sure that it would hide the gyro button on devices that are html5, but don't have a gyro, such as the first gen iPad or some android phones. Anyone care to test?
http://test.anra.org/gyrotest
first, make both the enabled and disabled buttons hidden to start:
<plugin name="gyroOFF" align="bottom" blendmode="normal" crop="0|0|65|65" customColor="true" height="prop" keep="true" onclick="switch(plugin[gyro].enabled);set(plugin[gyroOFF].visible,false); set(plugin[gyroON].visible,true);" onout="" onover="" onovercrop="0|65|65|65" url="builddata/graphics/menu/menu-gyro-enabled.png" visible="false" width="40" x="200" y="10"/>
<plugin name="gyroON" align="bottom" blendmode="normal" crop="0|0|65|65" customColor="true" height="prop" keep="true" onclick="switch(plugin[gyro].enabled);set(plugin[gyroON].visible,false); set(plugin[gyroOFF].visible,true);" onout="" onover="" onovercrop="0|65|65|65" url="builddata/graphics/menu/menu-gyro-disabled.png" visible="false" width="40" x="200" y="10"/>Then, only make the disable button visible, if the gyro plugin reports that it is "enabled"
<action name="firstloadcompleteaction">
if(plugin[data].firstPanoHasBeenPlayed==false,
set(plugin[data].firstPanoHasBeenPlayed,true);
set(autorotate.enabled,false);
);
<!--show gyro button if we're on an html5 device that supports it-->
if(plugin[gyro].enabled==true,
set(plugin[gyroOFF].visible,true);
);
</action>Offline
Jeremiah thank you very much for the feedback (I didn't get an alert to a reply to my post so I've only just seen it now) but I will definitely give this a try and see how it works.
I've just tested your link http://test.anra.org/gyrotest and it works perfectly. No gyro buttons shown on PC using Chrome but view on iPhone and Gyro button appears and works! Thank you very much.
I've never edited my xml code before but I'll definitely be trying this. It would be nice if it was the default output from PTP with the iOS output selected or if I could create a custom theme/template that included this. I have a custom HTML template but IIRC you can't create an XML template?
Offline
It looks like you can create enough of an xml template for this purpose. They're in the templates folder under "menu".
If you wanted to fully integrate the function, you would have to make changes in the "themes" folder as well.
I will probably need to set some of this up for myself, and I would be happy to share, but it will most likely be after Christmas before I will have time.
Offline
Jeremiah wrote:
I will probably need to set some of this up for myself, and I would be happy to share, but it will most likely be after Christmas before I will have time.
That's very kind of you and I'd love it if you could share that with me. ![]()
Offline
Ok, I'm still not 100% happy with this, but it seems to be working. You do need to make sure you've activated the gyroscope plugin, and the iPhone viewer when generating the tour, or this may do something weird. I have not tested it.
files are in this zip: http://dl.dropbox.com/u/554596/ptp-gyro-template.zip
they need to be put into the templates folder like this:
Then just select the 2D-Gyro theme, and the Navigation + FullScreen + Rotation + Gyroscope control bar template.
Let me know if it works for you.
Thanks,
Jeremiah
Offline
Hi there,
Jeremiah, thanks for the info so far, seems to be the only thread here on the subject. First time creating the gyro function and felt it would be obvious to have a enable/disable function. I downloaded your templates pack, just trying to locate where to add it in. I'm on a mac, tried to 'show contents' to put it in there, but no such folder. Where is the resources folder? Some help would be great thanks.
I wonder, in the end, did you manage to get it up and running well? The sample gyro tour is not there anymore. Thanks.
G
Offline
I'm still using the gyro button. You can see it on any of the monitoring sites here:
http://www.anra.org/divisions/water_qua … ing_sites/
The templates folder is accessible from within panotour under the edit menu.
Offline
Jeremiah wrote:
The templates folder is accessible from within panotour under the edit menu.
Here:
Offline
Hi there,
Thanks Jeremiah for your very swift reply and apologies for my very delayed thanks. Great, just opened PTP up and located it, thanks a bundle. The simplest things, sometimes!
Just had a look on the iPad with one of your examples and came up fine (you must have got a bit wet for some of them!). I'm sure PTP will include this feature soon. Makes sense. Good on you for developing it though. Again, many thanks.
Graeme
Offline
Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
|
CHOOSING KOLOR Why choose Kolor? Which solution to choose? Download a trial Where can I buy? Education |
SOFTWARE Autopano Pro Autopano Giga Panotour Panotour Pro XnView |
ACCESSORIES Training DVD Panobook PROJECTS Paris 26 Gigapixels Yosemite 17 Gigapixels |
COMMUNITY Forums YouTube channel Google+ |
COMPANY Blog About Kolor Resellers Contact Visit us |
PRESS Press center Press review TOOLS My account |
