Posts by cbiu

    If the imgURL path contains the "#" or "&" characters, it may not be accessible or result in an error. What is this and how can it be resolved?

    krpano.com/forum/wbb/core/index.php?attachment/4164/krpano.com/forum/wbb/core/index.php?attachment/4166/

    If the imgURL path contains the "#" or "&" characters, it may not be accessible or result in an error. What is this and how can it be resolved?

    There is a default exit callback event onexitvr in the webvr plugin. How can I add other logic to onexitvr? The scene is like this: I wrote a button, clicked to enter webvr and activated the button, and when exiting vr, I need to deactivate the button. The logic I want to add is this. The krpno I am using is version 1.22.2.
    I hope someone can help me answer, I am extremely grateful.

    Hello, I have loaded it according to your method, but I cannot render the image. I saw in the devtool of the browser that the image resources have already been loaded. Why is this

    This issue has been resolved。
    The code 'if (plugin. invideoreadyCB) plugin. onovideoreadyCB()' needs to be placed in the onload and executed after drawing the image。

    like this:

    Code
    function draw_grid() {
            var image = new Image();
            image.src = 'yourpano.jpg';
            image.onload = function () {
                var ctx = canvas_context = canvas.getContext("2d");
                ctx.drawImage(image, 0, 0, canvas_width, canvas_height);
                
                if (plugin. invideoreadyCB) plugin. onovideoreadyCB() 
            };
        }

    you can change the function draw_grid in canvas.js to insert your pano image:

    JavaScript: canvas.js
    modified draw_grid:
    
        function draw_grid() {
            var image = new Image();
            image.src = 'yourpano.jpg';
            image.onload = function () {
                var ctx = canvas_context = canvas.getContext("2d");
                ctx.drawImage(image, 0, 0, canvas_width, canvas_height);
            };
        }

    Hello, I have loaded it according to your method, but I cannot render the image. I saw in the devtool of the browser that the image resources have already been loaded. Why is this