Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

1

Montag, 2. März 2020, 10:00

Drag layer function in plugin interface

Hi,

i am playing/learning to use the plugin interface a bit more/better. (with all the setter and getter stuff etc.
Until now i mostly used it for some plain js and transfer scripts.

I particularly have one issue now and that is to make the 'drag layer' action work and/or rewrite in js.

original xml action:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
	<action name="dragpoly">
		copy(drag_currentx, x);
		copy(drag_currenty, y);
		copy(drag_stagex, mouse.stagex);
		copy(drag_stagey, mouse.stagey);
		indexoftxt(align_contains_right, get(align), 'right');
		indexoftxt(align_contains_bottom, get(align), 'bottom');
		calc(drag_align_x, align_contains_right GE 0 ? -1 : +1);
		calc(drag_align_y, align_contains_bottom GE 0 ? -1 : +1);
		asyncloop(pressed,
			calc(x, drag_currentx + (mouse.stagex - drag_stagex)*drag_align_x);
			calc(y, drag_currenty + (mouse.stagey - drag_stagey)*drag_align_y);
           
            screentosphere(x, y, athh, atvv);
            
            trace(get(athh));
            updatescreen ();
		  );
	</action>


i tried a lot but i can't get it to work.
What am i missing?

I think my biggest problem is in the asyncloop part.. not sure though..
I'll try to prepare an example.

Tuur *thumbsup*

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Tuur« (2. März 2020, 12:32)