<commit_before>	var V3LI = {} || V3LI;

	var THREE, renderer, scene, camera, controls;
	var geometry, material, mesh;

	V3LI.addLibrariesTab = function() {
		var tab = JA.menu.appendChild( document.createElement( 'div' ) );
		tab.title = 'View available libraries';
		tab.innerHTML =
			'<a href=# onclick=JA.toggleTab(V3LI.libraries); ><p class=button >' +
				'<i class="fa fa-paw"></i> Libraries & Tabs...' +
			'</p></a>'; 

		V3LI.libraries = JA.menu.appendChild( document.createElement( 'div' ) );
		V3LI.libraries.style.cssText = 'cursor: auto; display: none; ' ;
		V3LI.libraries.innerHTML =
			'<input type=radio name=fileOpen id=openOver checked /> Overwrite current view<br>' +
			'<input type=radio name=fileOpen id=openAppend /> Append to current view<br>' +

			'<p><input type=checkbox id=chkMeier onchange=JA.toggleTab(V3TM.threejsModelsTab.parentElement); > Three.js Example Models<br>' +
			'Over 100..</p>' +

			'<p><input type=checkbox id=chkMeier onchange=JA.toggleTab(V3CO.controlsTab.parentElement);JA.toggleTab(V3JM.JurgenMeier.parentElement); > Jurgen Meier Gallery<br>' +
			'170+ Parametric equations that create 3D objects</p>' +

			'<p><input type=checkbox id=chkGeometry onchange=JA.toggleTab(JAGE.geometryTab.parentElement); > Geometry<br>' +
			'Edit position, rotation and scale of the selected element</p>' +
			'<p style=text-align:right; >' +
				'<a class=button href=JavaScript:JA.toggleTab(V3LI.libraries); >Close</a> ' +
			'</p>' +
		'';
	};

	V3LI.updateIframe = function( fileList, index, basepath, filename ) {
		if ( !V3LI.ifr ) {
			V3LI.ifr = document.body.appendChild( document.createElement( 'iframe' ) );
			V3LI.ifr.height = window.innerHeight;
			V3LI.ifr.width = window.innerWidth;
			V3LI.ifr.style.cssText = 'border-width: 0; position: absolute; ';
		}

		var extension = filename.split( '.' ).pop().toLowerCase();
		if ( openOver.checked === true ) {
			V3LI.ifr.onload = function() {
				JAPR.setRandomGradient();

				app = V3LI.ifr.contentWindow;
	//			JA.body = V3FR.ifr.contentDocument;

				THREE = app.THREE;
//				THREE.ImageUtils.crossOrigin = 'anonymous';
				renderer = app.renderer;
				scene = app.scene;
				camera = app.camera;
				controls = app.controls;

				V3LI.loadFile( basepath, filename );
				divMsg1.innerHTML = fileList[ index ][1];

				renderer.shadowMapEnabled = true;
				renderer.shadowMapSoft = true;

				chkLightAmbient.checked = true;
				JALI.toggleLightAmbient();

				chkLightCamera.checked = true;
				JALI.toggleLightCamera();

				chkLightPosition.checked = true;
				JALI.toggleLightPosition();

	//			JAPR.setRandomGradient();

			};

			if ( extension === 'html' ) {
				V3LI.ifr.src = basepath + filename;
			} else {
				V3LI.ifr.src = 'boilerplate-simple.html';
			}
		} else {
			V3LI.loadFile( basepath, filename );
			divMsg1.innerHTML = fileList[ index ][1];
		}

	};


	function requestFile( fname ) {
		var xmlhttp = new XMLHttpRequest();
		xmlhttp.crossOrigin = "Anonymous"; 
		xmlhttp.open( 'GET', fname, false );
		xmlhttp.send( null );
		return xmlhttp.responseText;
	}

	V3LI.loadFile = function ( basepath, filename ) {

		var scr, reader, contents, fname, loader, result;
		var loaderBase = '../../../three.js/examples/';

//		var filename = fileList[ index ][0];
		var extension = filename.split( '.' ).pop().toLowerCase();

		switch ( extension ) {
			case 'html' :
// console.log( basepath, filename);
				// V3LI.ifr.src = basepath + filename;
				scene.select = scene.children[0];

				break;
			case 'babylon':

				var reader = new FileReader();
				reader.addEventListener( 'load', function ( event ) {

					var contents = event.target.result;
					var json = JSON.parse( contents );

					var loader = new THREE.BabylonLoader();
					var scene = loader.parse( json );

					editor.setScene( scene );

				}, false );
				reader.readAsText( file );

				break;

			case 'ctm':

					var scr = document.body.appendChild( document.createElement( 'script' ) );
					scr.src = basepath + 'js/loaders/ctm/lzma.js';
<commit_msg>Update v3li-libraries.js<commit_after>	var V3LI = {} || V3LI;

	var THREE, renderer, scene, camera, controls;
	var geometry, material, mesh;

	V3LI.addLibrariesTab = function() {
		var tab = JA.menu.appendChild( document.createElement( 'div' ) );
		tab.title = 'View available libraries';
		tab.innerHTML =
			'<a href=# onclick=JA.toggleTab(V3LI.libraries); ><p class=button >' +
				'<i class="fa fa-paw"></i> Libraries & Tabs...' +
			'</p></a>'; 

		V3LI.libraries = JA.menu.appendChild( document.createElement( 'div' ) );
		V3LI.libraries.style.cssText = 'cursor: auto; display: none; ' ;
		V3LI.libraries.innerHTML =
			'<input type=radio name=fileOpen id=openOver checked /> Overwrite current view<br>' +
			'<input type=radio name=fileOpen id=openAppend /> Append to current view<br>' +

			'<p><input type=checkbox id=chkMeier onchange=JA.toggleTab(V3TM.threejsModelsTab.parentElement); > Three.js Example Models<br>' +
			'Over 100..</p>' +

			'<p><input type=checkbox id=chkMeier onchange=JA.toggleTab(V3CO.controlsTab.parentElement);JA.toggleTab(V3JM.JurgenMeier.parentElement); > Jurgen Meier Gallery<br>' +
			'170+ Parametric equations that create 3D objects</p>' +

			'<p><input type=checkbox id=chkGeometry onchange=JA.toggleTab(JAGE.geometryTab.parentElement); > Geometry<br>' +
			'Edit position, rotation and scale of the selected element</p>' +
			'<p style=text-align:right; >' +
				'<a class=button href=JavaScript:JA.toggleTab(V3LI.libraries); >Close</a> ' +
			'</p>' +
		'';
	};

	V3LI.updateIframe = function( fileList, index, basepath, filename ) {
		if ( !V3LI.ifr ) {
			V3LI.ifr = document.body.appendChild( document.createElement( 'iframe' ) );
			V3LI.ifr.height = window.innerHeight;
			V3LI.ifr.width = window.innerWidth;
			V3LI.ifr.style.cssText = 'border-width: 0; position: absolute; ';
		}

		var extension = filename.split( '.' ).pop().toLowerCase();
		if ( openOver.checked === true ) {
			V3LI.ifr.onload = function() {
				JAPR.setRandomGradient();

				app = V3LI.ifr.contentWindow;
	//			JA.body = V3FR.ifr.contentDocument;

				THREE = app.THREE;
//				THREE.ImageUtils.crossOrigin = 'anonymous';
				renderer = app.renderer;
				scene = app.scene;
				camera = app.camera;
				controls = app.controls;

				V3LI.loadFile( basepath, filename );
				divMsg1.innerHTML = fileList[ index ][1];

				renderer.shadowMapEnabled = true;
				renderer.shadowMapSoft = true;

				chkLightAmbient.checked = true;
				JALI.toggleLightAmbient();

				chkLightCamera.checked = true;
				JALI.toggleLightCamera();

				chkLightPosition.checked = true;
				JALI.toggleLightPosition();

scene.select = scene.children[0];
	//			JAPR.setRandomGradient();

			};

			if ( extension === 'html' ) {
				V3LI.ifr.src = basepath + filename;
			} else {
				V3LI.ifr.src = 'boilerplate-simple.html';
			}
		} else {
			V3LI.loadFile( basepath, filename );
			divMsg1.innerHTML = fileList[ index ][1];
		}

	};


	function requestFile( fname ) {
		var xmlhttp = new XMLHttpRequest();
		xmlhttp.crossOrigin = "Anonymous"; 
		xmlhttp.open( 'GET', fname, false );
		xmlhttp.send( null );
		return xmlhttp.responseText;
	}

	V3LI.loadFile = function ( basepath, filename ) {

		var scr, reader, contents, fname, loader, result;
		var loaderBase = '../../../three.js/examples/';

//		var filename = fileList[ index ][0];
		var extension = filename.split( '.' ).pop().toLowerCase();

		switch ( extension ) {
			case 'html' :
console.log( basepath, filename);
				// V3LI.ifr.src = basepath + filename;
				// scene.select = scene.children[0];

				break;
			case 'babylon':

				var reader = new FileReader();
				reader.addEventListener( 'load', function ( event ) {

					var contents = event.target.result;
					var json = JSON.parse( contents );

					var loader = new THREE.BabylonLoader();
					var scene = loader.parse( json );

					editor.setScene( scene );

				}, false );
				reader.readAsText( file );

				break;

			case 'ctm':

					var scr = document.body.appendChild( document.createElement( 'script' ) );
					scr.src = basepath + 'js/loaders/ctm/lzma.js';

{'fraction_non_alphanumeric': 0.1542050337630448, 'fraction_numerical': 0.010067526089625536, 'mean_word_length': 3.4344039194338594, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, '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': '1772911', 'n_tokens_mistral': 3250, 'n_tokens_neox': 2778, 'n_words': 575}