Sie sind nicht angemeldet.

1

Donnerstag, 11. April 2013, 09:19

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:

Quellcode

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


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

Quellcode

1
2
3
4
5
6
<image>
<left/>
<front/>
<right/>
...
</image>


nowadays the shorter way is:

Quellcode

1
2
3
4
<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

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

2

Donnerstag, 11. April 2013, 22:07

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.

Quellcode

1
2
<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.

3

Freitag, 12. April 2013, 09:42

Hello Zephyr,
thank you, yes I think I will manage it with styles and action as good as possible.
my skillevel in PHP isn´t enough for managing it :)

Marc

4

Freitag, 12. April 2013, 10:18

Hi,

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

nowadays the shorter way is:
<image>
<cube>
<mobile/>
</image/>

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

5

Freitag, 12. April 2013, 10:46

thank you klaus, I know,it´s just because of saving space (download-time) and it was just an example :)

Marc

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

6

Samstag, 13. April 2013, 18:57

If you try to save space. You could use my minify tool (see my signature). Alsoo there's a use who made a npm and textmate script to minify. Could easily save 50% of the xml file.

7

Samstag, 13. April 2013, 19:29

ahh thynk you, that´s great!