Sie sind nicht angemeldet.

81

Sonntag, 27. Januar 2019, 19:32

The args[0] does not show the name of the action

Klaus,
Please note that the arguments array args[] in the action does not show the action name as documented.

Quellcode

1
2
3
4
5
<action name="my_test" scope="local">
    for(set(i,0), i LT args.length, inc(i),
            trace(' arg[', i, ']=', args[get(i)] );
        );
    </action>

The output of the call

Quellcode

1
2
3
4
5
6
my_test( first, second, third, fourth);

INFO:  arg[0]=first
INFO:  arg[1]=second
INFO:  arg[2]=third
INFO:  arg[3]=fourth

Thanks,
Pavel

83

Montag, 28. Januar 2019, 19:42

Index, Klaus,
My bad.
The krpano's action args replacing with %0, %1, %2, ...%N and in the action of type=Javascript where in both %0 and args[0] is the actionname.
I hope, that Klaus in the next releases will not remove the %0, %1, %2, ... option in the localscope.
I use it for the output formatting of the action call e.g.:

Quellcode

1
if( debugmode, trace(calc('%0' + '(' + '%1, %2, %3, %4' + ')')););

which works consistent in both global and local action with variables as arguments. I understand Klaus' recommendation on argument-to-variable-mapping. Apparently the %N substitution and non-caching in the action is done independently from the debugmode=false just because appearance of the %N signs.
Klaus, am I right?

Thank you,
Pavel

84

Montag, 28. Januar 2019, 21:51

here's a small snippet for local scope actions :)

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
<!-- debugaction(); debug logs the callers call - like action(arg1, arg2, ... ) -->
<action name="debugaction" scope="local">
	txtadd(local.out, get(parentscope.actionname), '(');
	if(parentscope.args.length GT 0,
		for(set(local.i,0), i LT parentscope.args.length, inc(i),
			txtadd(out, get(out), get(parentscope.args[get(i)]), ', ');
		);
		subtxt(out, get(out), 0, calc(out.length - 2));
	);
	txtadd(out, get(out), ')');
	debug(out);
</action>

just use it like...

Quellcode

1
2
3
<action name="test" scope="local">
	debugaction();
</action>

85

Dienstag, 29. Januar 2019, 12:39

Hi,
I hope, that Klaus in the next releases will not remove the %0, %1, %2, ... option in the localscope.
No, existing features will be normally not removed.

Apparently the %N substitution and non-caching in the action is done independently from the debugmode=false just because appearance of the %N signs.
Klaus, am I right?
Right, as soon an action code contains %NN placefolders, it's parsing-step will be not cached.
But as long you're not calling that action a hundred times per frame, it should be no problem.

here's a small snippet for local scope actions :)
Well done! ;-)

Best regards,
Klaus

86

Donnerstag, 14. Februar 2019, 19:20

Polygon Hotspots are clipped outside safearea on iPhoneX

Hi Klaus,
haven`t found a topic on this:
Polygon Hotspots are clipped on iPhone X outside the safearea.

I tried renderer css3d or webgl, but result is the same...



And safearea=false on hotspots won`t work either.
In the display settings I have safearea="h-only", but doesn`t matter if I switch to auto...
Any idea?

Best,
Steve

87

Freitag, 15. Februar 2019, 16:03

Hi,

Quoted

Polygon Hotspots are clipped on iPhone X outside the safearea.

Thanks for reporting - will be fixed in the next release.

Best regards,
Klaus

88

Montag, 18. Februar 2019, 14:18

Many Thanks for including... *thumbup*