Sie sind nicht angemeldet.

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.

1

Samstag, 4. April 2009, 17:40

Sync krpano viewer with our plugin rendering 3D objects - need to remove the lag

Hello,

We are using a 3D rendering plugin (similar to Away3D, Papervision) to render 3D objects inside panos rendered using your software. Everything is working nicely, but as we pan around using the mouse, the 3D rendering lags behind.

We are polling the krpano for current hlookat and vlookat direction using timer similar to radar plugin example. Browsing through the documentation and forums I have found the "freezeview" command. Could you provide more documentation or examples for this command, please?

Would we use it in the polling method:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
function pollLookDirection()
{
   if (krpano view direction is different from 3D camera view direction) {
 	krpano.call("freezeview(true)");
 	// update 3D camera view direction, lets the 3D library render object
   } else {
 	// both krpano and 3D library are looking in the same direction, there is no lag or movement
// maybe call this after the rendering is done, not here.
 	krpano.call(freezeview(false)"); 
   }
}


Other than this we believe you have done a great job, waiting for 1.0.9 to be released.

2

Mittwoch, 8. April 2009, 15:20

Hi,

in the 1.0.8 beta 7 version, there is a new event - "onviewchange"
this can be used now for an more accurate view updating

you assign your own as3 function to it, e.g.:

Quellcode

1
2
3
4
5
6
7
8
krpano.set("events.onviewchange", myviewchange);

...

function myviewchange():void
{
  ...
}


what's the reason why you use "freezeview()" ?
this function saves the current view to an internal bitmap and renders only this,
this is good for sildeshows on top of the viewer to save performance
but not so good for a frequently change

best regards,
Klaus

3

Mittwoch, 15. April 2009, 21:57

Excellent, the "events.onviewchange" works.

Now we hit another snag. For some of the photo effects that we do for transitions, we usually grab the panorama view and then manipulate it as a bitmap. Now our SWF is embedded into krpano as a plugin and grabbing the krPano's image causes security exception.

# tempFrameData.draw(parent, new Matrix(1, 0, 0, 1, 0, 0));

Is there something we could do to grab the current view rendered by the krpano in our plugin code?

Gleb

4

Donnerstag, 16. April 2009, 22:58

Hi,

do you have the google maps plugin included?

because google maps doesn't allow drawing it to a bitmap,
maybe this is the problem...

best regards,
Klaus

Ähnliche Themen