How to set custom style value in VR mode?

  • Hi,

    I have my hotspot defined as

    <hotspot name="pin_d42a6e3b_3" title="" ath="150.08399" atv="45.324" linkedscene="" onclick="hotspotClicked()" preload="true" style="infospot1" edge="topleft" />

    and the style infospot1 defined as

    <style name="infospot1" url="%$basepath%/img/info.png" distorted="false" scale="0.2" />


    I want to set a custom scale factor of 0.6 in the style above in VR mode (when following condition is true)

    (device.mobile AND webvr.isenabled)


    How do I set scale value conditionally in my krpano XML?
    Thanks

  • Hi

    Maybe try a this small piece of code:

    Add a tag var to you style:

    <style name="infospot1" url="%$basepath%/img/info.png" distorted="false" scale="0.2" tag="vr_manipulate" />

    and:

    Code
    <plugin name="WebVR"         
    	onentervr="...;change_scale()"        
    	onexitvr="...;change_scale()"        />


    Best regards
    Piotr

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!