Is there a way to incorporate mobile device movement control for camera rotation in this demo along with the current mouse movement control? The camera rotation has been set up for mobile here, but not in conjunction with mouse movement. The following code currently controls camera rotation for the mouse:
function render() {
var timer = -0.0002 * Date.now();
camera.position.x += ( mouseX - camera.position.x ) * .05;
camera.position.y += ( - mouseY - camera.position.y ) * .05;
camera.lookAt( scene.position );
pointLight.position.x = 1500 * Math.cos( timer );
pointLight.position.z = 1500 * Math.sin( timer );
renderer.render( scene, camera );
}
The objective is to have this functionality within a scrollable div on a page. While it has been seen implemented on a single full-viewport page, it has not yet been incorporated as an element within a longer page.