Sie sind nicht angemeldet.

1

Sonntag, 5. Juli 2009, 23:21

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?...

Quellcode

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

2

Dienstag, 7. Juli 2009, 09:22

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

3

Dienstag, 7. Juli 2009, 12:30

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:

Quellcode

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

Dienstag, 7. Juli 2009, 12:51

Yessssssssssss !!!!!

you ever got a solution......

thanx and felicitations *thumbsup*

5

Dienstag, 7. Juli 2009, 18:57

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

Mittwoch, 8. Juli 2009, 14:54

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

Freitag, 4. März 2011, 07:50

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

Freitag, 4. März 2011, 10:21

Hi,

Zitat

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