You are not logged in.


Saturday, May 6th 2017, 8:51am

Conditionally loading styles

In my XML I have 3 styles defined

<style name="spot1" url="%$basepath%/img/pin1.png" distorted="false" scale="0.10" />
<style name="spot2" url="%$basepath%/img/pin2.png" distorted="false" scale="0.10" />
<style name="spot3" url="%$basepath%/img/pin3.png" distorted="false" scale="0.10" />

And my hotpost is referring to the first style spot1

<hotspot name="pin_d42a6e3b_0" title="Shower" ath="-53.028" atv="-15.984" linkedscene="" onclick="hotspotClicked()" onloaded="hotspotLoaded()" preload="true" style="spot1" edge="topleft" />

How can I conditional apply style spot2 for mobile devices and style spot3 when in WebVR mode?


Thursday, May 24th 2018, 7:20pm

You can make the 3 are called = and place it in an if you put the device, also if they change the resolution can do with:

<events onresize="";/>

You put another condition and you already have it, comment if you need more help.