gyro2 plugin usage

  • Hi

    I have a very basic beginners' question.
    I have never used any plugins.
    Now I am trying to get the gyro2 plugin work with my existing panoramas, but cannot make it work.
    I get the error "No gyroscope available..." message.

    I guess that it means that krpano cannot find the gyro2.js, right?
    But I have the gyro2.js in the same location as the panorama .xml file.
    in the xml file I have url="gyro2.js" in the <plugin> tag, but it does not work anyway (see my xml in the following!)

    Any ideas?

    Thanks,
    /MH


    <krpano version="1.19-pr16">
    <include url="general2.xml"/>
    <include url="skin/defaultskin.xml"/>
    <plugin name="gyro" devices="html5" url="gyro2.js" enabled="false" onavailable="gyro_available_info();" onunavailable="gyro_not_available_info();" softstart="1"/>
    <action name="gyro_available_info">
    set(layer[infotext].html, 'Gyroscope available, press the gyro button...'); set(layer[gyrobutton].visible, true);
    </action>
    <action name="gyro_not_available_info" xautorun.flash="onstart">
    set(layer[infotext].html, 'No gyroscope available...');
    </action>
    <view limitfov="true" fovmax="125" fovmin="45" maxpixelzoom="1.0" architectural="0.4" fov="70" hlookat="0" vlookat="0"/>
    <preview url="../flashmedia/galerie_apollon.tiles/preview.jpg"/>
    <image>
    <cube url="../flashmedia/galerie_apollon.tiles/pano_%s.jpg"/>
    <mobile>
    <cube url="../flashmedia/galerie_apollon.tiles/mobile_%s.jpg"/>
    </mobile>
    </image>
    <layer name="bottombar" type="container" bgcolor="0x000000" bgalpha="0.5" align="leftbottom" width="100%" height="40">
    <layer name="infotext" type="text" background="false" border="false" enabled="false" html="" css="text-align:left; color:#FFFFFF; font-family:Arial; font-size:14px; font-weight:bold;" align="left" x="10" height="100%" vcenter="true"/>
    <layer name="gyrobutton" url="gyroicon.png" scale="0.5" align="right" x="10" visible="false" onclick="switch(plugin[gyro].enabled);"/>
    </layer>
    </krpano>

  • Try:

    Add keep="true" to the gyro plugin code
    And
    Perhaps also the path is wrong..
    plugins/gyro2.js
    ??

    On which device you test?
    Tuur *thumbsup*

  • Hi,

    Added keep="true" to the gyro plugin to no avail.
    As I had mentioned I had gyro2.js in the same directory as the xml file, that's why the path should not been wrong, but anyways, I created a directory called "plugins" and moved the gyro2.js to there, also changed the path to "url=plugins/gyro2.js", just to test it but it did not help either :(

    I am using this on a Samsung Galaxy S10, is there any known issues with that specific phone?

    Otherwise I am puzzled why this does not work.
    Feel free to check this out with any panorama on my site using a mobile phone.

    Regards,
    /MH
    http://www.stockholm360.net

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!