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.

bulp

Intermediate

  • "bulp" started this thread

Posts: 388

Location: Malaysia

  • Send private message

1

Monday, March 23rd 2009, 5:08am

special button for 'drag2d' or drag3d' mousemode

id try this code

<plugin name="mousebtn" url="./navbutton/btn_star.jpg" align="bottom" edge="center" y="40" x="-200" blendmode="screen" onhover="showtext(Game mode ON/OFF);" onover="set(blendmode,add);" onout="set(blendmode,screen);" onclick="switch(mousetype,drag2d);" />

and this button should be 1 button only, just like on/off for fullscreen button


<plugin name="littleplanet" url="../navbutton/btn_home.jpg" align="bottom" edge="center" y="20" x="+120" blendmode="screen" onhover="showtext(Little Planet);" onover="set(blendmode,add);" onout="set(blendmode,screen);" onclick="action(littleplanet);" />

<plugin name="fisheyeview" url="../navbutton/btn_home.jpg" align="bottom" edge="center" y="20" x="+160" blendmode="screen" onhover="showtext(Fisheye View);" onover="set(blendmode,add);" onout="set(blendmode,screen);" onclick="action(fisheyeview);" />


im failed... *g*</plugin></plugin>

www.maya360.com/sample.html

This post has been edited 2 times, last edit by "bulp" (Mar 23rd 2009, 5:35am)


2

Monday, March 23rd 2009, 8:59am

Hi,

if you want just one button, try this:

Source code

1
<plugin ... onclick="switch(control.mousetype, drag2d, drag3d);" />


the full path to the variable must be set - "control.mousetype"
and the values between it should switch - "drag2d" and "drag3d"



best regards,
Klaus

bulp

Intermediate

  • "bulp" started this thread

Posts: 388

Location: Malaysia

  • Send private message

3

Tuesday, March 24th 2009, 9:16am

Mr Klaus.... Thanks for the script... it works great....


so this script also hv to modify like this?

Source code

1
<plugin name="littleplanet" url="../navbutton/btn_home.jpg" align="bottom" edge="center" y="20" x="+120" blendmode="screen" onhover="showtext(Little Planet on / off);" onover="set(blendmode,add);" onout="set(blendmode,screen);" onclick="switch(control.view, littleplanet, fisheyeview);" /> 



hehe.. *confused*

This post has been edited 2 times, last edit by "bulp" (Mar 24th 2009, 9:39am)


4

Wednesday, March 25th 2009, 12:18am

sorry, your code will not work

the fisheye and littleplanet view is not a simple view setting,
it's a variance of several combined parameters (fisheye,stereographic,vlookat,fov)

add a user defined variable for the button (e.g. "viewmode"),
change the value of this variable (e.g. "planet" or "fisheye") with switch on every click,
and depending on the current value call a action for the change the
view settings (for the view changing actions have a look at the little planet example)

Source code

1
2
3
4
<plugin ...
       viewmode="planet"
       onclick="switch(viewmode, planet, fisheye); if(viewmode == planet, action(littleplant), action(fisheye));"
       />


note - krpano 1.0.8 is needed for this!

best regards,
Klaus

bulp

Intermediate

  • "bulp" started this thread

Posts: 388

Location: Malaysia

  • Send private message

5

Wednesday, March 25th 2009, 1:44am

that script didnt work...

Source code

1
<plugin name="littleplanet" ..... viewmode="planet"        onclick="switch(viewmode, planet, fisheyeview); if(viewmode == planet, action(littleplanet), action(fisheyeview));"        />


even if i change the fisheye to fisheyeview also didnt work...

Source code

1
<plugin ... onclick="switch(control.mousetype, drag2d, drag3d);" />


can i add on on more type here?... the 'moveto'
i mean all the 3 mousetype setting in 1 button..

*smile*

6

Wednesday, March 25th 2009, 6:05pm

even if i change the fisheye to fisheyeview also didnt work...
Hi, did you use version 1.0.8 and have included the <actions> for "littleplanet" and "fisheyeview"?
I'm not sure at the moment how they are named in the littleplanet example,
maybe the names differ a little bit,

Quoted

can i add on on more type here?... the 'moveto'
i mean all the 3 mousetype setting in 1 button..
in the next release (1.0.8 beta 7, should be ready soon) you can use as many values in the
switch function as you want, then it switch trough all gives values
e.g.

Source code

1
switch(control.mousetype, drag2d, drag3d, moveto);


best regards,
Klaus

bulp

Intermediate

  • "bulp" started this thread

Posts: 388

Location: Malaysia

  • Send private message

7

Friday, March 27th 2009, 7:10am

... hehe... yes i did use version 1.0.8 beta and have include those action code.... id changed the name few times also still cant...


hurm... when is the due date for version 1.0.8 beta 7 gonna be release? cant wait since the 'hotspot' missing is a big issue...

anyway thank you very much Mr Klaus..