cleanup webglrenderer

directly use _distance instead of using another variable and then copy the variable