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.

Kabkee

Trainee

  • "Kabkee" started this thread

Posts: 82

Location: South Korea

Occupation: South Korea

  • Send private message

1

Tuesday, November 6th 2018, 12:59pm

set and copy hotspot, itself

I'm currious why it's not working the following codes :(
Only tween(hotspot[%1].alpha, 0.1, 2); is working.

any idea why it is??


Source code

1
2
3
4
5
6
7
8
9
10
11
12
if(hotspot[%1],
	set(hs, hotspot[%1]);
);
tween(hs.alpha, 0.1, 2);

OR


if(hotspot[%1],
	copy(hs, hotspot[%1]);
);
tween(hs.alpha, 0.1, 2);



I think it could be relative to Global, Local variable concepts.
The variable, hs, is used in other action.

If I set hs usage limited in a certain action, it's enough to set its scope is local?
Please help me understand. Thank you for your explanation.

2

Tuesday, November 13th 2018, 6:20pm

Klaus, please, I'm adding to Kabkee request also:

Can you shed some light into the action's scope?
When scope=localonly the

Source code

1
     copy(hs, global.hotspot[myhotspot]);

creates the hs object, which we can use further as
set(hs.visible, false);
...
But when scope=local the

Source code

1
  copy(hs, global.hotspot[myhotspot]);

does not create any hs object.

Am I missing a point of the scope?
Thank you,

Pavel

spacerywirtualne

Professional

Posts: 919

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

3

Tuesday, November 13th 2018, 6:53pm

Hi
I'm currious why it's not working the following codes :(
Only tween(hotspot[%1].alpha, 0.1, 2); is working.


Try this code.

Source code

1
2
3
4
if(hotspot[%1],
	copy(hs, hotspot[%1]);
);
callwith(hs, tween(alpha, 0.1, 2));


Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

4

Tuesday, November 13th 2018, 7:10pm

not sure tween works with objects

remember tween can accept multiple properties and values separated with |
( example hotspot[%1].alpha|hotspot[%1].rotate, 1|90 )
so these are strings which get parsed and hs.alpha is nothing if parsed as string
you need hotspot[%1].alpha

in this sense i doubt that the callwith solution works...

spacerywirtualne

Professional

Posts: 919

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

5

Tuesday, November 13th 2018, 8:52pm

in this sense i doubt that the callwith solution works...
I use this method for long time and work ok ... *smile*



Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

6

Tuesday, November 13th 2018, 10:32pm

well on second thought... you're right of course :)
it works because in this scope you can use the owners properties directly (scale, alpha, rotate, etc, etc)
*thumbup*
but the args are still strings, you cant use an object

Kabkee

Trainee

  • "Kabkee" started this thread

Posts: 82

Location: South Korea

Occupation: South Korea

  • Send private message

7

Wednesday, November 14th 2018, 2:42am

Quoted


Try this code.

Source code

1
2
3
4
if(hotspot[%1],
	copy(hs, hotspot[%1]);
);
callwith(hs, tween(alpha, 0.1, 2));


Piotr
I never thought this kind of way.
I will try this later. Thanks.

By the way, I'm just telling....
It's sometimes not working changing some attributes for example,
tween( hs.scale, 1, null, null, action() ); is not working
tween( hs.alpha, 1, null, null, action() ); is working :(

Have any similar experience?
*rolleyes*

spacerywirtualne

Professional

Posts: 919

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

8

Wednesday, November 14th 2018, 9:48am

By the way, I'm just telling....
It's sometimes not working changing some attributes for example,
tween( hs.scale, 1, null, null, action() ); is not working
tween( hs.alpha, 1, null, null, action() ); is working :(

Have any similar experience?
I had problems with some parameters, e.g. ox and oy. The solution was to earlier declare these values in the plugin or hotspot. But that was some time ago in previous versions of KRpano.


regards
Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

Kabkee

Trainee

  • "Kabkee" started this thread

Posts: 82

Location: South Korea

Occupation: South Korea

  • Send private message

9

Wednesday, November 14th 2018, 10:36am


I had problems with some parameters, e.g. ox and oy. The solution was to earlier declare these values in the plugin or hotspot. But that was some time ago in previous versions of KRpano.


regards
Piotr
Thank you for sharing, Piotr.
:)

And..
I got a chance to peer your site and the example - https://cms4vr.com/projects/sculptor/
Very Impressive.

One thing that I'd like to comment is that
It would be better if Autorotate is off when an user clicks the 'HELP' icon.
When the instruction is coming up and showing how-to, krpano idle time is run out and autorotate is started unexpectedly.
Though so, cms4vr.com seems to be a great service. Good *thumbup*

Kabkee Moon.

spacerywirtualne

Professional

Posts: 919

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

10

Wednesday, November 14th 2018, 10:42am

nd..
I got a chance to peer your site and the example - https://cms4vr.com/projects/sculptor/
Very Impressive.

One thing that I'd like to comment is that
It would be better if Autorotate is off when an user clicks the 'HELP' icon.
When the instruction is coming up and showing how-to, krpano idle time is run out and autorotate is started unexpectedly.
Though so, cms4vr.com seems to be a great service. Good

Of course, you are right.
Thank you for your valuable comments. *smile*

I will immediately fix all the templates and I will make their new versions available as soon as possible, of course for free. *thumbup*

best regards
Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

Kabkee

Trainee

  • "Kabkee" started this thread

Posts: 82

Location: South Korea

Occupation: South Korea

  • Send private message

11

Wednesday, November 14th 2018, 10:55am

Of course, you are right.
Thank you for your valuable comments. *smile*

I will immediately fix all the templates and I will make their new versions available as soon as possible, of course for free. *thumbup*

best regards
Piotr


I'd like to try out your service :)
I just have followed cms4vr facebook.
I wish to hear good news from you so soon by facebook page. *thumbsup*

Kabkee