|
|
Quellcode |
1 2 3 4 |
<krpano> <include url="tour.xm" /> <include url="hotspots.xml /> </krpano> |
|
|
Quellcode |
1 2 3 4 5 6 7 |
<scene name='test'> <view fov="90" /> </scene> <scene name="test"? <hotspot url="poin.png" ath="0" /> </scene> |
|
|
Quellcode |
1 |
<hotspot parent="scene[test]" /> |
Benutzerinformationen überspringen
Beruf: software engineer, author of krpano syntax highlighting, bundler and style guide
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comHi Zephyr,
long time no see!
I think the only option is to get it all from an array.. with js or krpano.
Tuur![]()
Made a quick check.
Overriding seems to not work this way. Scene code is kept in one big string and interpreted at scene load.
So when we have two scenes with same names but different code, krpano will load the one with more latter declaration.
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.com|
|
Quellcode |
1 2 |
var sceneXML = 'loadxml(<krpano>' + krpano.get('scene[get(xml.scene)].content') + krpano.get('data[hotspots].content') + '</krpano>, , MERGE)'
krpano.call('loadxml(' + sceneXML +" )')
|
Benutzerinformationen überspringen
Beruf: software engineer, author of krpano syntax highlighting, bundler and style guide
Thanks for trying it out :)
Do you know if its possible not to load a xml using embedpano, but rather add scenes and images on runtime with javascript?
hm sorry... but ...
does simple merging not work ?
tour.xml
<include name="hotspots" url="hotspots.xml" keep="true" />
<scene name="test">
</scene>
hotspots.xml
<scene name="test">
<hotspot name="myhotspot" ... />
</scene>
Made a quick check.
Overriding seems to not work this way. Scene code is kept in one big string and interpreted at scene load.
So when we have two scenes with same names but different code, krpano will load the one with more latter declaration.
|
|
Quellcode |
1 2 3 4 5 |
<scene name="scene_02"
title="get:i18n.scene_02.key[title].txt"
...
<include url="%HTMLPATH%/vtour/panotags/in_scene_02.xml" />
</scene>
|
|
|
Quellcode |
1 2 3 4 5 6 7 |
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<krpano>
<hotspot name="tg_190511_19420944" style="panotag_hotspot_style" title="Knieža RASTISLAV" subtitle="820 - 870" note="get:i18n.scene_02.key[tg_190511_19420944].note" scenename="scene_02" ath="0.0043" atv="-0.1488" tagsize="0.069">
<point ath="0.0043" atv="-0.1488"/>
</hotspot>
...
</krpano>
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »pur« (19. März 2020, 20:56)