Create big tour with globally actions or PHP?

  • Hello,
    I´m thinking about creating a big virtual tour with about 100 Panos. The main point is how to handle global things like hotspot, <image>-parameters and so on. Because if I want to change something in the structure I don´t want to change it in every scene.

    I thought about making global-actions for things like adding hotspots:

    Code
    addhotspot(hs1,style1,25.0,-100.0,scene-bathroom);

    But what´s for example with the <image>-node.
    Some years ago it was like:

    Code
    <image>
    <left/>
    <front/>
    <right/>
    ...
    </image>

    nowadays the shorter way is:

    Code
    <image>
    <cube>
    <mobile/>
    </image/>

    So what if I want to change those things in all the scenes. Can I also set these parameters with an action or better use PHP to create xml-files dynamically?

    Best regards,
    Marc

  • Hi,

    Image tags can't be set with global actions, they need to be defined in the xml before load, but on the other hand, you wont have to change them often. A trick I could recommend is using styles alot. This way a hotspot only needs an atv and atv and a location.

    Code
    <hotspot ath="0" atv="0" scene="test" style="hotspot_style" />
    <style name="hotspot_style" onclick="loadscene(get(scene))"/>

    Depending on your skillelvel with PHP. On projects where the xml changes a lot, I tend to write a parser. I start off dropping my panos on the droplet and upload it. Next I run my parser that runs through the tour.xml and reads out all the scene tags, view tags, hotspots etc Once thats done I can output it in any form I want, even JSON. Other benefits is, you could easily minify your tour or generate zip files for easy download. PHP has my preference, but it takes a bit time to setup for the first time.

  • Hi,


    Just as note - both image syntax are still working of course and basically it doesn't matter which syntax is used - the <cube> one is only a nicer/shorter one.
    And the <image> related settings are typically not changing... (unless you change the image itself)

    Best regards,
    Klaus

Jetzt mitmachen!

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