Sie sind nicht angemeldet.

Zephyr

Profi

  • »Zephyr« ist der Autor dieses Themas

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

1

Samstag, 12. November 2016, 00:15

hotspots in seperate file

Hi All,

Is it possible to have hotspots in a different file than where your scenes are located? My goal is to generate the hotspots serverside, but leave the tour.xml intact from the droplet.

Quellcode

1
2
3
4
5
6
7
8
9
10
<!-- tour.xml -->
<include url="all_hotspots.xml" />

<scene name="test">
...
</scene>

<scene name="test2">
...
</scene>


I tried adding a parent="test" or parent="scene[test]" to the hotspot, Anyone got other ideas. I would be nice if I wouldnt resort to addhotspot onxmlcomplete or something, because I'm not sure if thats the most efficient way (parsing xml nodes on load seems to me, being more efficient, but maybe Im wrong)

Thanks

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

2

Samstag, 12. November 2016, 09:11

Hi Zephyr,

Generating them on the fly works perfect.
Onnewscene and with some smart naming of the hotspots, i had the hotspot coordinates and destination from excel.
A smart action with some for loop should be enough.
I had no performance issues on desktop or mobiles.
Works perfect!

Hope it helps
Tuur *thumbsup*

Zephyr

Profi

  • »Zephyr« ist der Autor dieses Themas

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

3

Samstag, 12. November 2016, 13:04

Thanks Arthur, I was afraid it would be slower than regular xml parsing.

What would be faster/more performant you think?

Javascript krpano.call('addhotspot(stuff)") or through krpano actions?

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

4

Samstag, 12. November 2016, 13:21

mmm.. i am not sure about that..
I also think it depends on how many hotspots you will have in the current scene if it makes a real difference.

i will make a small example in just xml.

Tuur *thumbsup*

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

jordi

Profi

Beiträge: 583

Wohnort: Barcelona

Beruf: creating ideas & coding them

  • Nachricht senden

6

Montag, 14. November 2016, 13:53

Try with Javascript actions directly in XML
everpano.com step beyond 360