Get html5 canvas context

  • Hi

    I'm messing around with the Three.js pluggin and I'm trying to pull canvas context but it keeps returning null. I'm wondering if there's away to get the krpano canvas context?


    Thanks

  • What I'm trying to do now is to add a new three.js scene/camera/renderer in a separate canvas/context and when I render the scene and camera it generates error THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera but when I remove embedpano() it works. Any ideas?

    Code
    camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );  camera.position.z = 500;            scene = new THREE.Scene();                          var ctx = $('#canvas2').get(0).getContext('webgl');  renderer = new THREE.WebGLRenderer({canvas:$('#canvas2').get(0), context:ctx});
                render();
    function render(){renderer.render( scene2, camera2 );
    }

Participate now!

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