src/core/engines/ogl/ogl.js
/**
     * Initialize ogl for use with WebXR.
     */
Initialize ogl for use with WebXR.
Initialize ogl for use with WebXR .
init() {
        renderer = new Renderer({
            alpha: true,
            canvas: document.querySelector('#application'),
            dpr: window.devicePixelRatio,
            webgl: 2
        });
        gl = renderer.gl;
        gl.clearColor(0, 0, 0, 0);
        scene = new Transform();
        this.setupEnvironment(gl);
        window.addEventListener('resize', () => this.resize(gl), false);
        this.resize();
        document.addEventListener('click', this._handleEvent);
        checkGLError(gl, "OGL init end");
    }
init ( ) { renderer = new Renderer ( { alpha : true , canvas : document . querySelector ( '#application' ) , dpr : window . devicePixelRatio , webgl : 2 } ) ; gl = renderer . gl ; gl . clearColor ( 0 , 0 , 0 , 0 ) ; scene = new Transform ( ) ; this . setupEnvironment ( gl ) ; window . addEventListener ( 'resize' , ( ) => this . resize ( gl ) , false ) ; this . resize ( ) ; document . addEventListener ( 'click' , this . _handleEvent ) ; checkGLError ( gl , "OGL init end" ) ; }
Initialize ogl for use with WebXR.
Initialize ogl for use with WebXR .