In the canvas example, when I passed canvas to a canvas method for drawing animations that I had encapsulated, it didn't show up

  • In the canvas example, passing canvas to a canvas method for drawing animations that I have encapsulated won't show up. However, I can use the canvas in the web page to pass it to the encapsulated method, and it will work

    Hi all who can tell me why?

    • New
    • Official Post

    Hi,

    everytime the canvas content changes, also the canvas.currentTime variable should be increased.
    With that krpano will know that the related WebGL texture needs to be updated with the canvas in the next frame.

    See this line in the original example:

    Code
    // increase the 'video-time' to force a redraw
    canvas.currentTime++;


    Best regards,
    Klaus

  • Hi,

    everytime the canvas content changes, also the canvas.currentTime variable should be increased.
    With that krpano will know that the related WebGL texture needs to be updated with the canvas in the next frame.

    See this line in the original example:

    Code
    // increase the 'video-time' to force a redraw
    canvas.currentTime++;


    Best regards,
    Klaus

    Hi Klaus


    My current problem is not that the canvas is not updated, but that I need to create a Creating WebGL 2.0 context in my YuCanvasAnimte.createSDK.

    Looking forward to your answer*thumbsup*

  • Oh oh, let me put it another way. If a model animation is loaded in the form of a hotspot in the space, and this animation is ultimately a character model rendered using canvas webgl, can a plugin like krpano no longer use the canvas inside krpano in the example for continuation?

    And how to use it?
    Is there an API?
    And what exactly do you want to do?

    • New
    • Official Post

    If you want to integrate another WebGL-based renderer into krpano, please have a look at the Open Source version of the krpano ThreeJS Plugin:

    krpano.com - Plugins - ThreeJS

    But note - therefore you would definitely need 3D coding knowledge and also know the exact APIs of that renderer, just 'setting a canvas somehow somewhere' will not work!

Participate now!

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