You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Ibrendie

Trainee

  • "Ibrendie" started this thread

Posts: 68

Location: The Netherlands

  • Send private message

1

Sunday, April 5th 2015, 7:54pm

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.

This post has been edited 2 times, last edit by "Ibrendie" (Apr 22nd 2015, 10:51pm)


Ibrendie

Trainee

  • "Ibrendie" started this thread

Posts: 68

Location: The Netherlands

  • Send private message

2

Tuesday, April 7th 2015, 1:50pm

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

Source code

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] ?

Ibrendie

Trainee

  • "Ibrendie" started this thread

Posts: 68

Location: The Netherlands

  • Send private message

3

Wednesday, April 8th 2015, 3:37pm

Can anyone please help?

benji33

Intermediate

Posts: 244

Location: France

Occupation: Senior Software engineer

  • Send private message

4

Wednesday, April 8th 2015, 3:38pm

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

Ibrendie

Trainee

  • "Ibrendie" started this thread

Posts: 68

Location: The Netherlands

  • Send private message

5

Wednesday, April 8th 2015, 3:42pm

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.

Ibrendie

Trainee

  • "Ibrendie" started this thread

Posts: 68

Location: The Netherlands

  • Send private message

6

Wednesday, April 8th 2015, 4:08pm

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

Source code

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>


Source code

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

Source code

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

Intermediate

Posts: 244

Location: France

Occupation: Senior Software engineer

  • Send private message

7

Wednesday, April 8th 2015, 4:54pm

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

Ibrendie

Trainee

  • "Ibrendie" started this thread

Posts: 68

Location: The Netherlands

  • Send private message

8

Wednesday, April 8th 2015, 6:14pm

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.

Ibrendie

Trainee

  • "Ibrendie" started this thread

Posts: 68

Location: The Netherlands

  • Send private message

9

Tuesday, April 21st 2015, 10:44pm

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.

Ibrendie

Trainee

  • "Ibrendie" started this thread

Posts: 68

Location: The Netherlands

  • Send private message

10

Wednesday, April 22nd 2015, 10:50pm

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

Solution:

Source code

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