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.
2. - having the ability to decide whether you want a relative or absolute system of coordinate for the view, normally that would be used to make a 3d transition, so we need to easily know the direction of the axis we need to move.

Could someone please explain to us that we still do not understand. Why the variable scope is especially helpful? I have read trying to understand, but I still do not grasp the meaning and I would like to understand how to apply the concept
thanks in advance
Ramiro
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
<action name="do_crop_animation">
<!-- add attributes to the hotspot -->
registerattribute(xframes, calc((imagewidth / %1) BOR 0));
registerattribute(yframes, calc((imageheight / %2) BOR 0));
registerattribute(frames, calc(xframes * yframes));
registerattribute(frame, 0);
set(crop, '0|0|%1|%2');
setinterval(calc('crop_anim_' + name), calc(1.0 / %3),
if(loaded,
inc(frame);
if(frame GE frames, if(onlastframe !== null, onlastframe() ); set(frame,0); );
mod(xpos, frame, xframes);
div(ypos, frame, xframes);
Math.floor(ypos);
mul(xpos, %1);
mul(ypos, %2);
calc(crop, xpos + '|' + ypos + '|%1|%2');
,
clearinterval(calc('crop_anim_' + name));
);
);
</action>
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<action name="do_crop_animation" scope="local" args="framewidth, frameheight, framerate">
<!-- define local variables -->
calc(local.xframes, (caller.imagewidth /framewidth) BOR 0);
calc(local.frames, xframes * ((caller.imageheight / frameheight) BOR 0));
def(local.frame, integer, 0);
<!-- set the first frame -->
calc(caller.crop, '0|0|' + framewidth + '|' + frameheight);
<!-- do the animation -->
setinterval(calc('crop_anim_' + caller.name), calc(1.0 / framerate),
if(caller.loaded,
inc(frame);
if(frame GE frames, if(caller.onlastframe !== null, callwith(caller, onlastframe() ) ); set(frame,0); );
mod(xpos, frame, xframes);
div(ypos, frame, xframes);
Math.floor(ypos);
mul(xpos, framewidth);
mul(ypos, frameheight);
calc(caller.crop, xpos + '|' + ypos + '|' + framewidth + '|' + frameheight);
,
<!-- stop the interval when the hotspot gets removed -->
clearinterval(calc('crop_anim_' + caller.name));
);
);
</action>
|
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
Zitat
And is it now possible to change the pano-image on the fly? For example changing a 360-photo for a 360-video without loading a new scene?
: https://pame.virtualtuur.comCould someone please explain to us that we still do not understand. Why the variable scope is especially helpful? I have read trying to understand, but I still do not grasp the meaning and I would like to understand how to apply the concept
|
|
Quellcode |
1 |
set(i, 0); |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 |
<action name="test" autorun="onstart">
for(set(i, 0), i LT 3, inc(i),
test_inner_loop();
);
</action>
<action name="test_inner_loop">
for(set(i, 0), i LT 3, inc(i),
trace('hello');
);
</action>
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 |
<action name="test" autorun="onstart" scope="local">
for(set(i, 0), i LT 3, inc(i),
test_inner_loop();
);
</action>
<action name="test_inner_loop" scope="local">
for(set(i, 0), i LT 3, inc(i),
trace('hello');
);
</action>
|
No, the fisheye support is currently for pano images (btw - the fisheye support is not 'new'Is it possible to use the new "fisheye image"-support to also embed undistorted fisheye-images as hotspot or plugin/layer?
), but I was also already thinking about providing that feature also for hotspots - although there is a bit more difficult to implement, especially the hit-testing will be challenging - that would require an inverse formula for the fisheye distortion, but I think that's mathematically not possible...What's the problem with doing a loadpano/loadscene/loadxml call to change the pano image?And is it now possible to change the pano-image on the fly? For example changing a 360-photo for a 360-video without loading a new scene?
What's the problem with doing a loadpano/loadscene/loadxml call to change the pano image?
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »benji33« (27. September 2017, 10:59)
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »svb« (28. September 2017, 15:38)
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comEnter VR text show on top when first Open tour
in pr12 log not show
in pr13 log show
Additional IMAGEONLY and NOEVENTS flags for the loadpano/loadscene/loadxml actions might be a possibility for such...And it would also be a great way to include window-views for example without the need to load a new scene. Just switch to a quick 180°x180° fisheye-pano for a few seconds and return to the room WITHOUT loading all scene-elements again. The keepall-flag is just not the best way all the time :-(