rotate one direction forever

  • Hello

    It is a poor solution from me..... but I cant find better....

    I would like make a plugin, witch roll into one direction, every onclick...

    The question is that: How can I roll the plugin one direction withouth the million row...

    I hope, see me somebody *smile*

    Example:



    onclick="call(onclickA);"
    onclickA="action(naphold_114_hold);set(onclick,call(onclickB));"
    onclickB="action(naphold_114_nap);set(onclick,call(onclickC));"
    onclickC="action(naphold_114_naphold);set(onclick,call(onclickD));"
    onclickD="action(naphold_114_naphold_vegso);set(onclick,call(onclickA));"
    .
    .
    .
    ......




    <action name="naphold_114_hold">

    tween(plugin[naphold_114].rotate, 180,2);
    loadpano(_DSC0303_iccafe_esti_hdr_expo.xml,null, KEEPALL,ZOOMBLEND(1,1));
    </action>

    <action name="naphold_114_nap">
    tween(plugin[naphold_114].rotate, 360,2);
    loadpano(DSC_0114_ingatlan_cafe.xml,null, KEEPALL,ZOOMBLEND(1,1));
    </action>


    <action name="naphold_114_naphold">
    tween(plugin[naphold_114].rotate, 540,2);
    loadpano(_DSC0303_iccafe_esti_hdr_expo.xml,null, KEEPALL, ZOOMBLEND(1,1));

    </action>

    <action name="naphold_114_naphold_vegso">
    tween(plugin[naphold_114].rotate, 720,2);
    loadpano(DSC_0114_ingatlan_cafe.xml,null, KEEPALL, ZOOMBLEND(1,1));

    </action>

  • In beta 7 a function "inc" was added...

    reference link: https://krpano.com/examples/108b7…1.0.8-beta7.txt

    Zitat

    - inc(var,byvalue*,max*,min*)
    - dec(var,byvalue*,min*,max*)
    - increase/decrease values (with saturation)
    - byvalue - add/sub this value to the var, default=1
    - max - max limit, when reaching it, the var will be set to min
    - min - min limit, when reaching it, the var will be set to max

    The same release gave you the ability to tween to a variable...

    Zitat

    - tween() action
    - can now be used also with percents(%) values
    - to tween to the value of a other variable
    - use the '$' prefix to refer the value of a variable
    - e.g. - tween(varA, $varB);

    And according to this thread it should work in the latest beta release.

    so something like this might work (untested)

    I had to say MIGHT work since I haven't tested it... and you may have to play with some different values in the inc function. The "trace(vara);" is an optional item... and is just for debugging. If you push the O key (not zero) you will get the info box and that is where the "trace" items are shown. This way you can see what vara is doing as you click the plugin.

    Hope this gets you on the right path.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!