|
|
Source code |
1 |
set(scene[0].name, 'scene0'); set(scene[0].content, <preview url="panos/bisque/bisque_marble01.tiles/preview.jpg" /> <image> <cube url="panos/bisque/bisque_marble01.tiles/pano_%s.jpg" /> </image> ); |
|
|
Source code |
1 |
scene.createarrayitem('scene0');
|
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.com|
|
Source code |
1 |
set(scene[NAME].content, '...'); |
|
|
Source code |
1 |
scene.sortby(customattributename); |
you can generate the tour from an array, so dynamically generate a new tour depending on variables, it's about flexibility.Why would you want/need to add a scene dynamically?
Location: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comLocation: Netherlands
Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.com|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<action name="loadfirstscenefromotherxml" type="Javascript"><![CDATA[
krpano.loadFile("othertour.xml", function(loader)
{
var xmlstring = String(loader.data);
var i_scenebegin = xmlstring.indexOf(">", xmlstring.indexOf("<scene")) + 1;
var i_scenend = xmlstring.indexOf("</scene>", i_scenebegin);
var scene_xml = xmlstring.slice(i_scenebegin, i_scenend);
krpano.set("scene[test].content", scene_xml);
});
]]></action>
|