<commit_before><!DOCTYPE html>
<html>
	<head>
		<meta charset=utf-8>
		<title>My first Three.js app</title>
		<style>
			body { margin: 0; }
			canvas { width: 100%; height: 100% }
		</style>
	</head>
	<body>
		<script src="js/three.min.js"></script>
		<script src="three.js/examples/js/controls/OrbitControls.js"></script>
		<script>
			// Our Javascript will go here.
			var scene = new THREE.Scene();
			var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );

			var renderer = new THREE.WebGLRenderer();
			renderer.setSize( window.innerWidth, window.innerHeight );
			document.body.appendChild( renderer.domElement );

			var orbit = new THREE.OrbitControls( camera, renderer.domElement );
			orbit.enableZoom = false;

			var material = new THREE.MeshPhongMaterial({
					color: 0x00ff00,
					emissive: 0x002200,
					side: THREE.DoubleSide,
					shading: THREE.FlatShading
				});

//			var geometry = new THREE.BoxGeometry( 15, 15, 15 );

			for(var i = 0; i < 6; i++) {
				var geometry = new THREE.Geometry();

				var width = 2;
				var height = 10;
				var halfWidth = width / 2;

				geometry.vertices.push(
					new THREE.Vector3( -halfWidth,  0,  0),
					new THREE.Vector3(  halfWidth,  0,  0),
					new THREE.Vector3( -halfWidth,  height,  0),
					new THREE.Vector3(  halfWidth,  height,  0)
				);

				geometry.faces.push( 
					new THREE.Face3(0,1,2),
					new THREE.Face3(1,2,3)
				 );

				geometry.rotateZ((2 * Math.PI / 6) * i);

	//			geometry.computeBoundingSphere();

				var mesh = new THREE.Mesh( geometry, material );
				scene.add( mesh );
			}

			var ambientLight = new THREE.AmbientLight( 0x000000 );
			scene.add( ambientLight );

			var lights = [];
			lights[0] = new THREE.PointLight( 0xffffff, 1, 0 );
			lights[1] = new THREE.PointLight( 0xffffff, 1, 0 );
			lights[2] = new THREE.PointLight( 0xffffff, 1, 0 );

			lights[0].position.set( 0, 200, 0 );
			lights[1].position.set( 100, 200, 100 );
			lights[2].position.set( -100, -200, -100 );

			scene.add( lights[0] );
			scene.add( lights[1] );
			scene.add( lights[2] );

			camera.position.z = 30;

			function render() {
				requestAnimationFrame( render );

//				mesh.rotation.x += 0.005;
//				mesh.rotation.y += 0.005;

				renderer.render( scene, camera );
			}
			render();

			<commit_msg>Some initial experiments in snow flake generation<commit_after><!DOCTYPE html>
<html>
	<head>
		<meta charset=utf-8>
		<title>My first Three.js app</title>
		<style>
			body { margin: 0; }
			canvas { width: 100%; height: 100% }
		</style>
	</head>
	<body>
		<script src="js/three.min.js"></script>
		<script src="three.js/examples/js/controls/OrbitControls.js"></script>
		<script>
			// Our Javascript will go here.
			var scene = new THREE.Scene();
			var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );

			var renderer = new THREE.WebGLRenderer();
			renderer.setSize( window.innerWidth, window.innerHeight );
			document.body.appendChild( renderer.domElement );

			var orbit = new THREE.OrbitControls( camera, renderer.domElement );
			orbit.enableZoom = true;

			var material = new THREE.MeshPhongMaterial({
					color: 0x00ff00,
					emissive: 0x002200,
					side: THREE.DoubleSide,
					shading: THREE.FlatShading
				});
			
			var lineMaterial = new THREE.LineBasicMaterial({
					color: 0xffffff,
					transparent: true,
					opacity: 0.5
				});

			var flake = new THREE.Object3D();
			
			function createBranch(width, height, depth) {
				var branch = new THREE.Object3D();
				var halfWidth = width / 2;
				var geometry = new THREE.Geometry();
				
				geometry.vertices.push(
					new THREE.Vector3( -halfWidth,  0,  0),
					new THREE.Vector3(  halfWidth,  0,  0),
					new THREE.Vector3( -halfWidth,  height,  0),
					new THREE.Vector3(  halfWidth,  height,  0)
				);

				geometry.faces.push( 
					new THREE.Face3(0,1,2),
					new THREE.Face3(1,2,3)
				 );
				
				branch.add(new THREE.Mesh( geometry, material ));
				branch.add(new THREE.LineSegments( geometry, lineMaterial ))
				
				if(depth) {
					var subBranch = createBranch(width/4, height/4, depth -1);
					subBranch.translateY(height);
					var subBranch2 = subBranch.clone();
					subBranch.rotateZ(2 * Math.PI / 6);
					subBranch2.rotateZ(-2 * Math.PI / 6);
					branch.add(subBranch);
					branch.add(subBranch2);
				}
				
				return branch;
			};
			
			var width = 2;
			var height = 10;
			var branch = createBranch(width, height, 1);
			flake.add( branch );

			for(var i = 1; i < 6; i++) {
				branch = branch.clone();
				branch.rotateZ(2 * Math.PI / 6);
				flake.add( branch );

	//			geometry.computeBoundingSphere();

			}

			scene.add(flake);
			
			var ambientLight = new THREE.AmbientLight( 0x000000 );
			scene.add( ambientLight );

			var lights = [];
			lights[0] = new THREE.PointLight( 0xffffff, 1, 0 );
			lights[1] = new THREE.PointLight( 0xffffff, 1, 0 );
			lights[2] = new THREE.PointLight( 0xffffff, 1, 0 );

			lights[0].position.set( 0, 200, 0 );
			lights[1].position.set( 100, 200, 100 );
			lights[2].position.set( -100, -200, -100 );

			scene.add( lights[0] );
			scene.add( lights[1] );
			scene.add( lights[2] );

			camera.position.z = 30;

			function render() {
				requestAnimationFrame( render );

				flake.rotation.x += 0.005;
				flake.rotation.y += 0.005;

				renderer.render( scene, camera );
			}
			render();

			
{'fraction_non_alphanumeric': 0.14768552534900808, 'fraction_numerical': 0.045187362233651725, 'mean_word_length': 2.7917827298050137, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 33, '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': '6554714', 'n_tokens_mistral': 2529, 'n_tokens_neox': 1875, 'n_words': 451}