You are not logged in.

arous

Beginner

  • "arous" started this thread

Posts: 3

Location: Ukraine

  • Send private message

1

Tuesday, June 2nd 2015, 9:29pm

Current Scene Group

Hello!

With krpano I know the name of the current scene:

Source code

1
var sceneName = getPanotourInstance().get("xml.scene");


Please tell me, how I can find out the name of the current scene group?
Thanks.

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

2

Wednesday, June 3rd 2015, 1:01pm

if group is scene attribute than try: get(scene(get(xml.scene)).group;

Posts: 1,082

Location: Russia, Kaliningrad

  • Send private message

3

Thursday, June 4th 2015, 9:28am

Hi!
you can get scene array via javascript

Source code

1
2
3
4
5
var krpano  = document.getElementById("krpanoSWFObject");
var scenes = krpano.get("scene");
for (var i = 0; i < scenes.count; i++) {
     console.log(scenes.getItem(i).title);
}

this way you can get any attribute of scene tag group or whatever
Only thing is important thet you can get xml arrays after xml complete only

Hope it helps

Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

arous

Beginner

  • "arous" started this thread

Posts: 3

Location: Ukraine

  • Send private message

4

Thursday, June 4th 2015, 6:27pm

Yes! Its working *smile*

Source code

1
console.log(scenes.getItem(i).group);