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:

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

  • 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.:

    Code
    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

  • 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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!