I encountered an issue while working with a
function createControls(){ return new THREE.TrackballControls( camera,domElement );}
that was created using
THREE.TrackballControls=function(object, domElement){.....}
controls = createControls(camera, renderer.domElement);
restoreView(controls, vars);
addDefaultKeyEventListener();
After resizing the webgl container, the controls stopped functioning correctly. Specifically, there is an event where a yellow ball moves to a specific location on a plane in 3D space when the user clicks on the screen. However, after the resize event, the ball moves to a position that seems to have an offset due to the resized scale. Re-defining the controls variable results in a crash.
How can I update the controls with new camera and renderer.domElement input variables?