diff --git a/public/index.html b/public/index.html index 67dcf4f53e2c70ce11d9d72b7f964bdb303a429c..1d8210b3dc09afa71ffc4fb6fa14a567fc9aeaf1 100644 --- a/public/index.html +++ b/public/index.html @@ -38,6 +38,22 @@ const cube = new THREE.Mesh(new THREE.BoxBufferGeometry(0.2, 0.2, 0.2), material cube.position.set(1, 1, 1); scene.add(cube); +// Set up the WebGLRenderer, which handles rendering to the session's base layer. +const renderer = new THREE.WebGLRenderer({ + alpha: true, + preserveDrawingBuffer: true, + canvas: canvas, + context: gl +}); +renderer.autoClear = false; + +// The API directly updates the camera matrices. +// Disable matrix auto updates so three.js doesn't attempt +// to handle the matrices independently. +const camera = new THREE.PerspectiveCamera(); +camera.matrixAutoUpdate = false; + + } </script> </body>