Downsampling of cube faces in case of iPad?!

  • Hi,

    the device detection is independent of the User agent,
    that means even when the User agent is set to iPhone the viewer will
    still detect that it is running on Desktop,

    internally the 'navigator.platform' setting of the browser is used for that,
    this setting will be always the same, regardless of the User agent,
    and I don't know if it's possible to change that too in Safari...

    but I understand what you want to do - I will add a switch to enable
    testing a certain device,

    best regards,
    Klaus

  • So how should this code look if I want only the iPhone to build the thumbs (vtour thumbs)
    LIke this or

    <action name="startup">
    loadscene(get(scene[0].name), null, MERGE);
    <!-- e.g. just for the iphone -->
    if(isphone, set(buildthumbs();
    </action>

    Hans

  • Zitat von Hans

    <action name="startup">
    loadscene(get(scene[0].name), null, MERGE);
    <!-- e.g. just for the iphone -->
    if(isphone, set(buildthumbs();
    </action>

    Hans

    <action name="startup">
    loadscene(get(scene[0].name), null, MERGE);
    <!-- e.g. just for the iphone -->
    if(isphone, set(buildthumbs()) </action>

    that should work you just need another ) there.

  • Hi,

    sorry, both codes are wrong

    this is the right code:

    Zitat

    if(isphone, buildthumbs() );


    the if is written in that way:

    first the if with an opening bracket (
    then the condition to check - either a variable or a comparisons of two variables,
    then the actions that should be executed when the condition is true,
    then optionally a comma , and the actions that should be executed when the condition is false,
    and then finally a closing bracket ) to end the if action,

    if there will follow an additional action after the if action then also a semicolon ; is needed as end mark,
    when there is no action following then the semicolon is optional,

    see also here:
    https://krpano.com/docu/actions/#syntaxandusage
    https://krpano.com/docu/actions/#if

    best regards,
    Klaus

Jetzt mitmachen!

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