calling renderer.state.reset() before/after renderer.render(scene, camera) might help to keep them happy with each other, also you will need to turn renderer.autoClear off and think when to clear the canvas.
well obviously you will need to ctrl+f in your codepen code their reqAnimFrame function and call it from 3js animation loop instead of passing it to reqAnimFrame directly.
also the part where webgl context is created, you will have to get it from the renderer (or pass it to the renderer)