Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.
Can we have somme documentation for this
Quoted
* new actions for looping / repeating actions:
- for(startaction, condition, nextaction, loopaction)
- asyncfor(startaction, condition, nextaction, loopaction)
- loop(condition, loopaction)
- asyncloop(condition, loopaction)
|
|
Quellcode |
1 |
for(startaction, condition, nextaction, loopaction) |
|
|
Quellcode |
1 |
for(set(i,0), i LT 10, inc(i), trace(i)); |
|
|
Quellcode |
1 |
asyncfor(startaction, condition, nextaction, loopaction) |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 |
<pictures> <pic name="p1" url="image.jpg" /> </picture> <action name="add_pictures"> for(set(i,0), i LT pictures.pic.count, add_pic(i)); </action> <action name="add_pic"> addplugin(pictures.pic[%1].name); set(plugin[pictures.pic[%1]].url, pictures.pic[%1].url); </action> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<picture> <pic name="test_1" /> <pic name="test_2" /> </picture> <action name="add_menu_items"> for(set(i,0), i LT picture.pic.count, inc(i), test(i)); </action> <action name="test"> txtadd(test_name, 'plugin_', get(picture.pic[%1].name)); set(testvar, %1); trace(%1, get(picture.pic[%1].name), get(test_name)); <!-- not working --> trace(get(picture.pic[0].name)); <!-- working --> trace(get(picture.pic[get(testvar)].name)); <!-- not working --> </action> |
|
|
Quellcode |
1 |
for(set(i,0), i LT 10, inc(i), trace(i)); |
right, some actions are first checking if there is a variable with that name and if then they use the content of the variable, and if not then they just use the name of the variable,
Zitat
trace already has something build in to convert 1 to get(i) automaticly, and if i doesnt exists it just traces i?
some actions have that behavior because they exists before the get() was introduced, and because it makes the usage easier in some situations,can't that be the default behaviour of actions too? or is this because of some backwards compatibility?
I feel that is for let the player as small as posible
Zitat
krpano 1.0.8.14 viewer release candidate 3 (2011-05-20)
Changes/Fixes (compared to the last pre-release from 2011-04-11)
# krpano.swf & krpanoiphone.js
* new actions for looping / repeating actions:
- for(startaction, condition, nextaction, loopaction)
- asyncfor(startaction, condition, nextaction, loopaction)
- loop(condition, loopaction)
- asyncloop(condition, loopaction)
* new Math object for mathematical constants and actions:
- Math.PI
- Math.abs(var) or Math.abs(result,v)
- Math.acos(var) or Math.acos(result,v)
- Math.asin(var) or Math.asin(result,v)
- Math.atan(var) or Math.atan(result,v)
- Math.atan2(result,a,b)
- Math.ceil(var) or Math.ceil(result,v)
- Math.cos(var) or Math.cos(result,v)
- Math.exp(var) or Math.exp(result,v)
- Math.floor(var) or Math.floor(result,v)
- Math.log(var) or Math.log(result,v)
- Math.max(var,var2) or Math.max(result,...vars)
- Math.min(var,var2) or Math.min(result,...vars)
- Math.pow(var,var2) or Math.pow(result,v1,v2)
- Math.round(var) or Math.round(result,v)
- Math.sin(var) or Math.sin(result,v)
- Math.sqrt(var) or Math.sqrt(result,v)
- Math.tan(var) or Math.tan(result,v)
* Removing of all InOut and OutIn tweentypes - they were typically not
needed and the removing saves a lot of swf and js filesize.
... Surely due to the adding of the looping actions and maths features...
?really?Oops, just read on the release notes that they were removed on purpose. Is there some way to get them back? I use them a lot for "non-blocking" camera control
|
|
Quellcode |
1 |
<plugin url="moretweentypes.swf" alturl="moretweentypes.js" preload="true" /> |
right, therefore there are the plugins to extend the viewer with additional features that were not core features, but here I really thought these tween types were not really used and removing them could save a lot of space, but I want to keep the viewer also as upward-compatible as possible of course, so maybe in the next version they or at least some of the removed tweens will be back...That makes me think that if it could not be more adequate making the player light and the enhanced features as external files (included files) instead of making an compromise between features and lightweight... Don't you think so?
