You are not logged in.

1

Tuesday, August 18th 2020, 2:28pm

with javascript, load 2 scenes

Hello,
I have a problem with a javascript code.

I have 2 div and several different scenes (in the same .xml file)
I want to place in the krpanoSceneD object the same scene as in krpanoSceneG, but with a fixed zoom of 10x in order to visualize it in my 2nd div.



varhlookat = krpanoSceneG.get("view.hlookat");
varvlookat = krpanoSceneG.get("view.vlookat");
varfov = krpanoSceneG.get("view.fov") /10;
varkrpanoSceneNum = krpanoSceneG.get("xml.scene");
krpanoSceneD.set("xml.scene", krpanoSceneNum);
krpanoSceneD.set("view.hlookat", hlookat );
krpanoSceneD.set("view.vlookat", vlookat );
krpanoSceneD.set("view.fov", fov );
My code above works except for :
krpanoSceneD.set("xml.scene", krpanoSceneNum);

I can't make the scene change.

can you help me?
A very big thank you
Vincent

This post has been edited 1 times, last edit by "Barras" (Aug 18th 2020, 2:42pm)


2

Wednesday, August 19th 2020, 10:59am

Hi,

for changing the scene call the loadscene action:
https://krpano.com/docu/actions/#loadscene

E.g.

Source code

1
krpanoSceneD.call("loadscene('"+krpanoSceneNum+"');");


Best regards,
Klaus

3

Monday, August 24th 2020, 8:38pm

Thanks for yur help Klaus
Best regards *thumbsup*

Vincent