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.

Kev-in-spain

Intermediate

  • "Kev-in-spain" started this thread

Posts: 148

Location: Barcelona

Occupation: VR Photographer

  • Send private message

1

Friday, September 14th 2012, 11:36am

tween plugin blur radius

Hi all,
I feel a bit foolish asking this question, as I'm sure the answer must be very simple, but I have reached the boundries of my limited knowledge and searched the forum to no avail.
I'm trying to create a very simply action to reveal a logo at the start of a tour. I have blurred the plugin(a .png file) using 'effect="blur(20)" and, as the plugin is revealed, I want the blur to clear.
Here is the relevant code:
<action name="startup">
if(startscene === null, copy(startscene,scene[0].name));
loadscene(get(startscene), null, MERGE);
logo());
</action>

<action name="logo">
tween(plugin[logo].alpha,1,2);
tween(plugin[logo].blur,0,2);
</action>

<plugin name="logo" url="plugins/logo.png" align="center" keep="true" alpha="0" scale="0.5" effect="blur(20)" devices="all"
onloaded="if(isdesktop,mul(scale,1.5));"
onclick="go()"/>

In my searches around the forum I have seen the line of code tween(plugin[.....].blur,... so I assume the action is possible so, what could be the reason for this not working?

2

Friday, September 14th 2012, 2:07pm

Hi,

only the Flash textfield plugin has a 'blur' setting, the normal plugin elements not, and in HTML5 there is currently no cross-browser possibility for that.

For clearing the blur, just set the 'effect' attribute back to an empty string ("") or to null.

A possibility for tweening the blur, would be too tween a custom 'blur' variable and use the 'updatecall' to dynamically reconstruct the 'effect' setting (by using the txtadd() action).

Here a small example, where the blur will be changed in the mouse over/out events:

Source code

1
2
3
4
5
6
<plugin name="blurtest"
   	...
   	blur="0"
   	onover="tween(blur, 8, 0.5, default, null, txtadd(effect,'blur(',get(blur),')') );"
   	onout="tween(blur, 0, 0.5, default, null, txtadd(effect,'blur(',get(blur),')') );"
   	/>


Best regards,
Klaus

Kev-in-spain

Intermediate

  • "Kev-in-spain" started this thread

Posts: 148

Location: Barcelona

Occupation: VR Photographer

  • Send private message

3

Friday, September 14th 2012, 3:44pm


<plugin name="blurtest"
...
blur="0"
onover="tween(blur, 8, 0.5, default, null, txtadd(effect,'blur(',get(blur),')') );"
onout="tween(blur, 0, 0.5, default, null, txtadd(effect,'blur(',get(blur),')') );"
/>


Hi Klaus, this is definitely the effect I am looking for but, are you saying that there is no way to put it into an action?
EDIT:
Ok... for anyone that's interested, I've found a workaround to create the effect I was after.
Here's the code:

<action name="startup">
if(startscene === null, copy(startscene,scene[0].name));
loadscene(get(startscene), null, MERGE);
);
</action>

<action name="logo">
set(plugin[logo].visible,true);
tween(plugin[logo].alpha,1,3);
tween(view.fov,85,6);
</action>

<action name="go">
tween(plugin[logo].alpha,0,2,,
set(plugin[logo].visible,false);
set(autorotate.enabled,true)));
</action>

<plugin name="logo" url="plugins/logo.png" align="center" keep="true" visible="false" alpha="0" scale="0.5" devices="all" blur="200"
onloaded="logo();if(isdesktop,mul(scale,1.5)); tween(blur, 0, 3, default, null, txtadd(effect,'blur(',get(blur),')') );"
onclick="go(); tween(blur,200, 3, default, null, txtadd(effect,'blur(',get(blur),')') );"/>

And here's what it does:

http://www.360examples.net/jubany_2/tour.html

This post has been edited 1 times, last edit by "Kev-in-spain" (Sep 14th 2012, 6:09pm)


4

Saturday, September 15th 2012, 9:10am

Hi,
are you saying that there is no way to put it into an action?
no - I'm not saying that! - you can use such code wherever you want
it doesn't matter if a code was written into an <action> or into an attribute...


nice!

best regards,
Klaus

Kev-in-spain

Intermediate

  • "Kev-in-spain" started this thread

Posts: 148

Location: Barcelona

Occupation: VR Photographer

  • Send private message

5

Thursday, September 20th 2012, 7:39pm

Thanks Klaus.

Is there any way to get this effect to work on an idevice?

6

Friday, September 21st 2012, 12:06pm

Hi,

at the moment not,
but maybe in future, when css filtes become available in the most major browsers and perform good,

best regards,
Klaus