Sie sind nicht angemeldet.

1

Dienstag, 26. September 2023, 14:48

onloadcomplete lookto

Hi. Can someone tell me if there is a better way to do this. I want to rotate a scene to it's startup view onloadcomplete.

I can do it via <events onloadcomplete="delayedcall(1,lookto(-74.425,6.879,120));" /> where I am manually putting in the hlookat, vlookat and fov values.

But rather than manually inputting I have been trying to replace the variables with something like <events onloadcomplete="delayedcall(1,lookto(get.hlookat, get.vlookat, get.fov));" /> but this isn't working. What am I doing wrong?


My scene code is this

<scene name="scene_Arrangement_Room" title="Arrangement Room" thumburl="panos/Arrangement_Room.tiles/thumb.jpg" lat="" lng="" alt="" heading="">
<control bouncinglimits="calc:image.cube ? true : false" />
<view hlookat="-74.425" vlookat="6.879" fovtype="MFOV" fov="120.000" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
<preview url="panos/Arrangement_Room.tiles/preview.jpg" />
<image>
<cube url="panos/Arrangement_Room.tiles/%s/l%l/%0v/l%l_%s_%0v_%0h.jpg" multires="512,640,1280,2688,5376" />
</image>
<events onloadcomplete="delayedcall(1,lookto(-74.425,6.879,120));" />
<hotspot name="spot1" style="skin_hotspotstyle" ath="-30.846" atv="6.802" linkedscene="scene_reception" linkedscene_hoffset="292.22" use3dtransition="true" />
</scene>

Thanks for any help
Thomas

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

2

Dienstag, 26. September 2023, 14:59

**never mind **
I was on mobile and couldn't see all code..

edit:
You could put all that data in an array and pick it up on need, or buffer it to a var.
Depends a bit on the project I would say.

Tuur *thumbsup*

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Tuur« (26. September 2023, 15:57)


3

Dienstag, 26. September 2023, 18:14

Hmm, thanks Arthur. That's a little beyond my knowledge. I am hoping there is a way to pass the hlookat, hlookat and fov parameters to the scene once it has loaded. I thought that "get" code would work here but I guess I don't understand it properly.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »thomasmcvea« (26. September 2023, 18:31)


Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

4

Dienstag, 26. September 2023, 23:49

Do you want it only for that scene or for more / all?

Tuur *thumbsup*

5

Freitag, 29. September 2023, 12:52

Hi Arthur

All scenes.

I can manually input the variables (hlookat, vlookat, fov) via the onloadcomplete event call, after I set the startup view for each scene using krpano tools but was hoping for something less copy and paste. A tour of 20+ scenes would be alot of copy and pasting :)

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

6

Freitag, 29. September 2023, 14:35

Hi Thomas,

I think this should work.
https://www.virtualtuur.com/krpano/121/b…ersceneviews/1/

xml:
https://www.virtualtuur.com/krpano/121/b…iews/1/tour.xml


bit dirty, but I think quite useful.

Hope it helps,
Tuur *thumbsup*

edit: some sloppy-ness fixed
#buffer #scenes #views

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Tuur« (30. September 2023, 23:43)


7

Freitag, 29. September 2023, 17:30

Oh thanks Arthur. I'm out on location atm but will check this out. Your skills are well known in krpano so I'm sure it's great