You are not logged in.

61

Wednesday, April 10th 2013, 7:17pm

Greetings!
If somebody would help me - i will be very pleased. I shortened radar code to one sentence:

Source code

1
<events onviewchange="action(onviewchange);"/><action name="onviewchange">set(plugin[plugin].x, view.hlookat)</action>

(the scale of rotation doesn't matters right now)
I was going to do something like this:

BUT!
I don't know how to loop this compass stripe - it goes away from the screen and that's all.
Hope someone will help me to avoid this annoying defect.

360boy

Intermediate

Posts: 221

Location: Mexico City

Occupation: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Send private message

62

Monday, April 15th 2013, 4:04am

Three solutions:

1) Reset the plugin position when view.hlookat reaches 360/-360, add some lines like this to your action:

if(view.vlookat GT 360, set(plugin[plugin].x,0);
if(view.vlookat LT -360, set(plugin[plugin].x,0);

This will work but maybe the reseting of the plugin position would generate some kind of flicker.

2) Little more complicated, use a chain of two plugins masked by another one and alternate it's positions depending on which direction the rotation is. When user rotates right the second image appears at the end of the first one and when second image finishes first one appears at the end of the second one, same for the other direction. Your compass would see as a continuous line in any direction and after any number of turns. I don't visualize completely the code here but it must not be that hard, if you're stuck post your advance to see how can it be modified.

3) Got get a baseball bat and show technology who's the boss... (use this one wisely ;-))

Hope they work for you.

Cheers!

Luis

This post has been edited 2 times, last edit by "360boy" (Apr 15th 2013, 4:19am)


360boy

Intermediate

Posts: 221

Location: Mexico City

Occupation: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Send private message

63

Monday, April 15th 2013, 4:21am

By the way this post doesn't belong here, post it in main "Krpano panorama viewer" forum so you get more help, this forum is just for feature requests of the krpano viewer.

Regards

Luis

Similar threads