<commit_before><!DOCTYPE html>
<html lang="en">
	<head>
		<title>three.js webgl - svg loader</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
		<style>
		body {
			color: #ffffff;
			font-family: Monospace;
			font-size: 13px;
			text-align: center;
			font-weight: bold;
			background-color: #000000;
			margin: 0px;
			overflow: hidden;
		}

		#info {
			position: absolute;
			top: 0px;
			width: 100%;
			padding: 5px;
		}

		a {
			color: #ffffff;
		}
		</style>
	</head>

	<body>

		<div id="container"></div>
		<div id="info">
			<a href="http://threejs.org" target="_blank" rel="noopener">three.js</a> - SVGLoader
		</div>

		<script type="text/javascript" src="../build/three.js"></script>
		<script src="js/controls/OrbitControls.js"></script>
		<script src="js/loaders/SVGLoader.js"></script>
		<script src="js/libs/stats.min.js"></script>
		<script src='js/libs/dat.gui.min.js'></script>

		<script>

			var renderer, stats, scene, camera, gui, currentURL;

			init();
			animate();

			//

			function init() {

				var container = document.getElementById( 'container' );

				//

				camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 1, 1000 );
				camera.position.set( 0, 0, 200 );

				//

				renderer = new THREE.WebGLRenderer( { antialias: true } );
				renderer.setPixelRatio( window.devicePixelRatio );
				renderer.setSize( window.innerWidth, window.innerHeight );
				container.appendChild( renderer.domElement );

				//

				var controls = new THREE.OrbitControls( camera, renderer.domElement );
				controls.screenSpacePanning = true;

				//

				stats = new Stats();
				container.appendChild( stats.dom );

				//

				window.addEventListener( 'resize', onWindowResize, false );

				document.body.addEventListener( 'dblclick', function ( event ) {

					var group = scene.children[ 1 ];
					group.traverse( function ( child ) {

						if ( child.material ) child.material.wireframe = ! child.material.wireframe;

					} );

				} );

				currentURL = 'models/svg/tiger.svg';

				loadSVG( currentURL );

				createGUI();

			}

			function createGUI() {

				if ( gui ) {
					gui.destroy();
				}

				guiData = {

					currentURL: currentURL

				};

				gui = new dat.GUI( { width: 350 } );

				gui.add( guiData, 'currentURL', {

					"Tiger": 'models/svg/tiger.svg',
					"Hexagon": 'models/svg/hexagon.svg',
					"Test 1": 'models/svg/tests/1.svg',
					"Test 2": 'models/svg/tests/2.svg',
					"Test 3": 'models/svg/tests/3.svg',
					"Test 4": 'models/svg/tests/4.svg',
					"Test 5": 'models/svg/tests/5.svg',
					"Test 6": 'models/svg/tests/6.svg',
					"Test 7": 'models/svg/tests/7.svg',
					"Test 8": 'models/svg/tests/8.svg'

				} ).name( 'SVG File' ).onChange( function ( value ) {

					currentURL = value;

					loadSVG( currentURL );

				} );

			}

			function loadSVG( url ) {

				//

				scene = new THREE.Scene();
				scene.background = new THREE.Color( 0xb0b0b0 );

				//

				var helper = new THREE.GridHelper( 160, 10 );
				helper.rotation.x = Math.PI / 2;
				scene.add( helper );

				//

				var loader = new THREE.SVGLoader();
				loader.load( url, function ( paths ) {

					var group = new THREE.Group();
					group.scale.multiplyScalar( 0.25 );
					group.position.x = - 70;
					group.position.y = 70;
					group.scale.y *= - 1;

					for ( var i = 0; i < paths.length; i ++ ) {

						var path = paths[ i ];

						var material = new THREE.MeshBasicMaterial( {
							color: path.color,
							side: THREE.DoubleSide,
							depthWrite: false
						} );

						var shapes = path.toShapes( true );

						for ( var j = 0; j < shapes.length; j ++ ) {

							var shape = shapes[ j ];

							var geometry = new THREE.ShapeBufferGeometry( shape );
							var mesh = new THREE.Mesh( geometry, material );

							group.add( mesh );

						}

					}

					scene.add( group );

				} );

			}

			function onWindowResize() {

				camera.aspect = window.innerWidth / window.innerHeight;
				camera.updateProjectionMatrix();

				renderer.setSize( window.innerWidth, window.innerHeight );

			}

			function animate() {

				requestAnimationFrame( animate );

				render();
				stats.update();

			}

			function render() {

				renderer.render( scene, camera );

			}

		</script>

	</body>
</html>
<commit_msg>Updated webgl_loader_svg.html to use data object<commit_after><!DOCTYPE html>
<html lang="en">
	<head>
		<title>three.js webgl - svg loader</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
		<style>
		body {
			color: #ffffff;
			font-family: Monospace;
			font-size: 13px;
			text-align: center;
			font-weight: bold;
			background-color: #000000;
			margin: 0px;
			overflow: hidden;
		}

		#info {
			position: absolute;
			top: 0px;
			width: 100%;
			padding: 5px;
		}

		a {
			color: #ffffff;
		}
		</style>
	</head>

	<body>

		<div id="container"></div>
		<div id="info">
			<a href="http://threejs.org" target="_blank" rel="noopener">three.js</a> - SVGLoader
		</div>

		<script type="text/javascript" src="../build/three.js"></script>
		<script src="js/controls/OrbitControls.js"></script>
		<script src="js/loaders/SVGLoader.js"></script>
		<script src="js/libs/stats.min.js"></script>
		<script src='js/libs/dat.gui.min.js'></script>

		<script>

			var renderer, stats, scene, camera, gui, currentURL;

			init();
			animate();

			//

			function init() {

				var container = document.getElementById( 'container' );

				//

				camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 1, 1000 );
				camera.position.set( 0, 0, 200 );

				//

				renderer = new THREE.WebGLRenderer( { antialias: true } );
				renderer.setPixelRatio( window.devicePixelRatio );
				renderer.setSize( window.innerWidth, window.innerHeight );
				container.appendChild( renderer.domElement );

				//

				var controls = new THREE.OrbitControls( camera, renderer.domElement );
				controls.screenSpacePanning = true;

				//

				stats = new Stats();
				container.appendChild( stats.dom );

				//

				window.addEventListener( 'resize', onWindowResize, false );

				document.body.addEventListener( 'dblclick', function ( event ) {

					var group = scene.children[ 1 ];
					group.traverse( function ( child ) {

						if ( child.material ) child.material.wireframe = ! child.material.wireframe;

					} );

				} );

				currentURL = 'models/svg/tiger.svg';

				loadSVG( currentURL );

				createGUI();

			}

			function createGUI() {

				if ( gui ) {
					gui.destroy();
				}

				guiData = {

					currentURL: currentURL

				};

				gui = new dat.GUI( { width: 350 } );

				gui.add( guiData, 'currentURL', {

					"Tiger": 'models/svg/tiger.svg',
					"Hexagon": 'models/svg/hexagon.svg',
					"Test 1": 'models/svg/tests/1.svg',
					"Test 2": 'models/svg/tests/2.svg',
					"Test 3": 'models/svg/tests/3.svg',
					"Test 4": 'models/svg/tests/4.svg',
					"Test 5": 'models/svg/tests/5.svg',
					"Test 6": 'models/svg/tests/6.svg',
					"Test 7": 'models/svg/tests/7.svg',
					"Test 8": 'models/svg/tests/8.svg'

				} ).name( 'SVG File' ).onChange( function ( value ) {

					currentURL = value;

					loadSVG( currentURL );

				} );

			}

			function loadSVG( url ) {

				//

				scene = new THREE.Scene();
				scene.background = new THREE.Color( 0xb0b0b0 );

				//

				var helper = new THREE.GridHelper( 160, 10 );
				helper.rotation.x = Math.PI / 2;
				scene.add( helper );

				//

				var loader = new THREE.SVGLoader();
				loader.load( url, function ( paths ) {

					var group = new THREE.Group();
					group.scale.multiplyScalar( 0.25 );
					group.position.x = - 70;
					group.position.y = 70;
					group.scale.y *= - 1;

					for ( key in paths['paths'] ) {

						var path = paths['paths'][ key ];

						var material = new THREE.MeshBasicMaterial( {
							color: path.color,
							side: THREE.DoubleSide,
							depthWrite: false
						} );

						var shapes = path.toShapes( true );

						for ( var j = 0; j < shapes.length; j ++ ) {

							var shape = shapes[ j ];

							var geometry = new THREE.ShapeBufferGeometry( shape );
							var mesh = new THREE.Mesh( geometry, material );

							group.add( mesh );

						}

					}

					scene.add( group );

				} );

			}

			function onWindowResize() {

				camera.aspect = window.innerWidth / window.innerHeight;
				camera.updateProjectionMatrix();

				renderer.setSize( window.innerWidth, window.innerHeight );

			}

			function animate() {

				requestAnimationFrame( animate );

				render();
				stats.update();

			}

			function render() {

				renderer.render( scene, camera );

			}

		</script>

	</body>
</html>

{'fraction_non_alphanumeric': 0.15885947046843177, 'fraction_numerical': 0.015953835709436523, 'mean_word_length': 2.474449685534591, 'pattern_counts': {'":': 20, '<': 68, '<?xml version=': 0, '>': 65, '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': '7366346', 'n_tokens_mistral': 4011, 'n_tokens_neox': 2936, 'n_words': 636}