Sie sind nicht angemeldet.

1

Sonntag, 5. April 2015, 19:54

Blend one pano image to another after some time *SOLVED*

Is it possible to change a <image></image> after some time to another <image></image>?

I thought this could be done with the delayedcall action.

E.g. I have a hotspot and want to "transition from one <image> to another <image> with the onclick event of the hotspot.

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Ibrendie« (22. April 2015, 22:51)


2

Dienstag, 7. April 2015, 13:50

I know tried the following Tween code on a hotspot, but nothing happens:

Quellcode

1
onclick="tween(image.cube.url,'panos/kuchlerhaus/aussen.tiles/pano_%s.jpg');


I also tried without single quotes.

Does the image.cube.url variable need a specific id or something? Like image.cube.url[image_id] ?

3

Mittwoch, 8. April 2015, 15:37

Can anyone please help?

benji33

Fortgeschrittener

Beiträge: 244

Wohnort: France

Beruf: Senior Software engineer

  • Nachricht senden

4

Mittwoch, 8. April 2015, 15:38

Load a new scene with loadscene or a new panorama with loadpano with blending option ?

5

Mittwoch, 8. April 2015, 15:42

Load a new scene with loadscene or a new panorama with loadpano with blending option ?
Thanks for your reply benji, but I don't think that's going to work. What I want to achieve is "substitute" one pano image for another one e.g. in the WebVR example substitute the intro pano for another one while maintaining all other aspects of the krpano_xml file.

I know I can keep hotspots etc with the keep="true" parameter.

So, actually my question is how can I transition from the intro image to let's say an intro2 image.

6

Mittwoch, 8. April 2015, 16:08

What I tried now is the following code with load scene in the WebVR example:

Quellcode

1
	<!-- the intro pano -->	<view fovtype="VFOV" fov="90" fovmin="40" fovmax="150" />	<preview url="panos/intro/preview.jpg" />	<image>		<cube url="panos/intro/pano_%s.jpg" />		<cube url="panos/intro/mobile_%s.jpg" devices="iOS" />	</image>        <scene name="test123">        <view fovtype="VFOV" fov="90" fovmin="40" fovmax="150" />        <preview url="panos/intro2/preview.jpg" />        <image>            <cube url="panos/intro2/pano_%s.jpg" />            <cube url="panos/intro/mobile_%s.jpg" devices="iOS" />        </image>                    </scene>


Quellcode

1
<!-- start button -->	<hotspot name="start" distorted="true"	         url="texts.png" crop="80|450|690|100"	         ath="0" atv="0"	         depth="4000"	         vr_timeout="2000"	         zorder="99"	         onclick="set(enabled,false); tween(ty|alpha, 8000|0.0, 2.5, easeInQuint, removehotspot(start)); delayedcall(5, loadscene(test123,null,MERGE|KEEPVIEW|KEEPMOVING,BLEND(5));); delayedcall(2.0,start_vr());"	         alpha="0.0"	         onloaded="if(vr_start_done === true, removehotspot(start); start_vr(); , tween(alpha,1); );"	         />



and also

Quellcode

1
<!-- start button -->	<hotspot name="start" distorted="true"	         url="texts.png" crop="80|450|690|100"	         ath="0" atv="0"	         depth="4000"	         vr_timeout="2000"	         zorder="99"	         onclick="set(enabled,false); tween(ty|alpha, 8000|0.0, 2.5, easeInQuint, removehotspot(start)); delayedcall(5, loadscene(test123,null,KEEPVIEW|KEEPHOTSPOTS|KEEPMOVING,BLEND(5));); delayedcall(2.0,start_vr());"	         alpha="0.0"	         onloaded="if(vr_start_done === true, removehotspot(start); start_vr(); , tween(alpha,1); );"	         />



In the first code sample the hotspots are all removed, even though I use the recommended MERGE method.

In the second code sample the hotspots are removed after they are loaded and then again fade in.

Sorry to say so, but the krpano documentation is really obscure, even though it isn't all that hard. A javadoc style documentation would be better imho.

benji33

Fortgeschrittener

Beiträge: 244

Wohnort: France

Beruf: Senior Software engineer

  • Nachricht senden

7

Mittwoch, 8. April 2015, 16:54

MERGE keep only elements with keep="true" attribute.
On loadscene action the MERGE flag usage will remove all "non keep" elements.

8

Mittwoch, 8. April 2015, 18:14

Ah oke, I didn't know that.

Still even with removing MERGE and e.g. only using KEEPALL|KEEPHOTSPOTS the hotspots are first removing and then re-added to the scene.

I just don't understand the underlying rational of krpano I guess.

9

Dienstag, 21. April 2015, 22:44

Up..

Anyone know how to achieve something similar to the slider blend example, but without the slider part? Just a blend from one pano to another over some time period?

Thanks.

10

Mittwoch, 22. April 2015, 22:50

I found a way to blend from one pano to another after some time. Actually it was easier then I thought.

Solution:

Quellcode

1
delayedcall(5, loadscene(scene2, null, MERGE, BLEND(10) ); );


5 means AFTER 5 seconds start the loading of the next scene

10 means the blending duration from one scene to another scene takes 10 seconds

See also http://krpano.com/docu/actions/#loadpano.blend