<commit_before>function update()
{	

	//Views
	controls.update();
	switch(selected_view){
		case "Earth"://Earth
			camera.position = earth.position.clone().normalize().multiplyScalar(getCamDistance());
			break;
		case "Sun"://Sun
			camera.position = sun.position.clone().normalize().multiplyScalar(getCamDistance());
			break;
		case "S/C-XYZ"://Spacecraft
			camera.position = init_sc_dir_xyz.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_xyz.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Rear"://Spacecraft
			camera.position = init_sc_dir_rear.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_rear.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Front"://Spacecraft
			camera.position = init_sc_dir_front.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_front.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Top"://Spacecraft
			camera.position = init_sc_dir_top.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_top.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Bottom"://Spacecraft
			camera.position = init_sc_dir_bottom.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_bottom.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Left"://Spacecraft
			camera.position = init_sc_dir_left.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_left.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Right"://Spacecraft
			camera.position = init_sc_dir_right.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_right.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		default:
			break;
	}
	camera.lookAt(scene.position);

	//Ligts
	light.position.set(camera.position.x,camera.position.y,camera.position.z);
	if ( keyboard.pressed("z") ) 
	{ 
		// do something
	}
	var delta = clock.getDelta();
	
	if(show_spacecraft && sc_show_eng_texture){
		customUniforms2.time.value += delta;
	}
	
	//-----------------------------------------------------------------------------------------------------------------------
	//			ANDROID STATS UPDATE
	//-----------------------------------------------------------------------------------------------------------------------
	if(show_fps){
		stats.update();
		fps_update_counter=fps_update_counter+1;
		if(fps_update_counter>fps_update_skips){
			fps_update_counter=0;	<commit_msg>bugfix<commit_after>function update()
{	

	//Views
	controls.update();
	switch(selected_view){
		case "Earth"://Earth
			camera.position = earth.position.clone().normalize().multiplyScalar(getCamDistance());
			break;
		case "Sun"://Sun
			camera.position = sun.position.clone().normalize().multiplyScalar(getCamDistance());
			break;
		case "S/C-XYZ"://Spacecraft
			camera.position = init_sc_dir_xyz.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_xyz.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Rear"://Spacecraft
			camera.position = init_sc_dir_rear.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_rear.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Front"://Spacecraft
			camera.position = init_sc_dir_front.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_front.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Top"://Spacecraft
			camera.position = init_sc_dir_top.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_top.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Bottom"://Spacecraft
			camera.position = init_sc_dir_bottom.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_bottom.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Left"://Spacecraft
			camera.position = init_sc_dir_left.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_left.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		case "S/C-Right"://Spacecraft
			camera.position = init_sc_dir_right.clone().applyQuaternion(spacecraft.quaternion.clone().normalize()).multiplyScalar(getCamDistance());
			camera.up = init_sc_up_right.clone().applyQuaternion(spacecraft.quaternion.clone().normalize());
			break;
		default:
			break;
	}
	camera.lookAt(scene.position);

	//Ligts
	light.position.set(camera.position.x,camera.position.y,camera.position.z);
	/*if ( keyboard.pressed("z") ) 
	{ 
		// do something
	}*/
	var delta = clock.getDelta();
	
	if(show_spacecraft && sc_show_eng_texture){
		customUniforms2.time.value += delta;
	}
	
	//-----------------------------------------------------------------------------------------------------------------------
	//			ANDROID STATS UPDATE
	//-----------------------------------------------------------------------------------------------------------------------
	if(show_fps){
		stats.update();
		fps_update_counter=fps_update_counter+1;
		if(fps_update_counter>fps_update_skips){
			fps_update_counter=0;	
{'fraction_non_alphanumeric': 0.22525934464021077, 'fraction_numerical': 0.0009879795817553103, 'mean_word_length': 3.6190114068441064, 'pattern_counts': {'":': 18, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7179496', 'n_tokens_mistral': 2062, 'n_tokens_neox': 1891, 'n_words': 176}