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.

- SZIKRA -

Beginner

  • "- SZIKRA -" started this thread

Posts: 34

Location: Hungary, Szeged

  • Send private message

1

Sunday, July 5th 2009, 11:21pm

VrSubject rotate in krpano

I think that, make a vrsubject in the krpano.


If the mouse ondown and move x, y then the vr subject rotate, till then the mouse give up. Then the subject rotate back.


*thumbsup*


I rty this with a photo on a nikon camera.

It not so god... What are you think about this?...

Source code

1
2
3
4
5
6
7
8
9
10
11
12
           ath="13.07956797394661" atv="44.88434798597017"

        
        crop="0|0|333|285"
        onovercrop=""
        ondown="set(control.mousetype, moveto);set(cursors arrow_l, action(b));"
        />

set(hotpot[fenykepezo].crop,0|285|333|285);
....
..
. ?



this is the png witch I trying:

http://www.joszegeden.eu/vrsubject/fenykepezo_crop.png

- SZIKRA -

Beginner

  • "- SZIKRA -" started this thread

Posts: 34

Location: Hungary, Szeged

  • Send private message

2

Tuesday, July 7th 2009, 9:22am

I thought, it is en interest question... *mellow*

3

Tuesday, July 7th 2009, 12:30pm

Hi,

letting the object rotate by changing the crop are would be possible,
but using the mouse to rotate it currently not,

I prepared quickly two examples with your image:

here the object rotates always:
HTML: http://krpano.com/examples/108b8/examples/vrobj/vrobj1.html
XML: http://krpano.com/examples/108b8/examples/vrobj/vrobj1.xml

and here only when the mouse hovers it:
HTML: http://krpano.com/examples/108b8/examples/vrobj/vrobj2.html
XML: http://krpano.com/examples/108b8/examples/vrobj/vrobj2.xml


here the code to let the object rotate:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<hotspot name="vrobj"
         url="fenykepezo_crop.png"
         ath="0" 
         atv="0"
         zoom="true"

         crop="0|0|333|285"
         
         frame="0"
         lastframe="20"
         frameheight="285"
         
         onloaded="animate();"
         />

<action name="animate">
  inc(frame,1,get(lastframe),0);
  mul(ypos,frame,frameheight);
  txtadd(crop,'0|',get(ypos),'|333|285');

  delayedcall(0.1, animate() );
</action>


I used three custom variables:
"frame" - for the current(first) frame (0-based)
"lastframe" - the number of the last frame
"frameheight" - the height of one frame in pixels

after the image was loaded the "animate" action was called,
in this action the "frame" number was increased and looped from "0" to "lastframe",
then the crop y-position was calculated - ypos = frame x frameheight,
and finally the "crop" attribute was build by connecting these texts: '0|' + get(ypos) + '|333|285' together

this was the code for the next frame,
to animate it the same action was called after a short delay again,



best regards,
Klaus

4

Tuesday, July 7th 2009, 12:51pm

Yessssssssssss !!!!!

you ever got a solution......

thanx and felicitations *thumbsup*

- SZIKRA -

Beginner

  • "- SZIKRA -" started this thread

Posts: 34

Location: Hungary, Szeged

  • Send private message

5

Tuesday, July 7th 2009, 6:57pm

Thaks Klaus/


But ... " but using the mouse to rotate it currently not, "

Why not? *blink*

If the object "ondown" I listen the mouse moving , x, y coordinatas and the objekt move left, or right.

I hope you see me.

Can I use the : Follow Mouse Plugin

mousefollov source code?....

This is en example for the moving, what I think.:

http://www.adoriginal.ro/portfolio/?article_hid=31


*g*

6

Wednesday, July 8th 2009, 2:54pm

Hi,

yes, with a plugin it would be possible of course
there you have every freedom to track the mouse and control something,

I have just mean with xml only it's currently not possible to listen for the mouse x/y coordinates

best regards,
Klaus

7

Friday, March 4th 2011, 7:50am

Hi,

yes, with a plugin it would be possible of course
there you have every freedom to track the mouse and control something,

I have just mean with xml only it's currently not possible to listen for the mouse x/y coordinates

best regards,
Klaus
Hi Klaus, and If foto http://krpano.com/examples/108b8/example…kepezo_crop.png
over height 8191 pixels. What are you think?

8

Friday, March 4th 2011, 10:21am

Hi,

Quoted

over height 8191 pixels
in this case it will not work, that a limitation from the Flashplayer,
the size of a single image that the Flashplayer can process is limited,

best regards,
Klaus