<commit_before><!doctype html>
<html>
	<head>
		<title>My first Three.js app</title>
		<style>
			body { margin: 0; }
			canvas { width: 100%; height: 100% }
		</style>
	</head>
	<body>
		<script src="javascript/three.min.js"></script>
		
		<script src="javascript/VRControls.js"></script>

		<script src="javascript/VREffect.js"></script>
		
		<script>

		/*
		Setup three.js WebGL renderer
		*/
		var renderer = new THREE.WebGLRenderer( { antialias: true } );

		/*
		Append the canvas element created by the renderer to document body element.
		*/
		document.body.appendChild( renderer.domElement );

		/*
		Create a three.js scene
		*/
		var scene = new THREE.Scene();

		/*
		Create a three.js camera
		*/
		var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 10000 );

		/*
		Apply VR headset positional data to camera.
		*/
		var controls = new THREE.VRControls( camera );

		/*
		Apply VR stereo rendering to renderer
		*/
		var effect = new THREE.VREffect( renderer );
		effect.setSize( window.innerWidth, window.innerHeight );

		/*
		Create 3d objects
		*/
		var geometry = new THREE.BoxGeometry( 20, 26.27, 20 );

		var materials = [
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p1.jpg' )}),
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p2.jpg' )}),
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p3.jpg' )}),
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p4.jpg' )}),
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p5.jpg' )}),
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p5.jpg' )})		
		];


		var cube = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial( materials ) );

		/*
		Position cube mesh
		*/
		cube.position.z = -20;

		/*
		Add cube mesh to your three.js scene
		*/
		scene.add( cube );

		/*
		Request animation frame loop function
		*/
		function animate() {
			/*
			Apply rotation to cube mesh
			*/
			cube.rotation.y += 0.01;

			/*
			Update VR headset position and apply to camera.
			*/
			controls.update();

			/*
			Render the scene through the VREffect.
			*/
			effect.render( scene, camera );

			requestAnimationFrame( animate );
		}

		/*
		Kick off animation loop
		*/
		animate();

		/*
		Listen for double click event to enter full-screen VR mode
		*/
		document.body.addEventListener( 'dblclick', function() {
			effect.setFullScreen( true );
		});

		/*
		Listen for keyboard event and zero positional sensor on appropriate keypress.
		*/
		function onkey(event) {
	    event.preventDefault();

	    if (event.keyCode == 90) { // z
	    	controls.zeroSensor();
	    } else if (event.keyCode == 37) { // Left 
			console.log('Left!');
		} else if (event.keyCode == 39) { // Right
			console.log('Right!');
		}
	  };<commit_msg>We're now moving<commit_after><!doctype html>
<html>
	<head>
		<title>My first Three.js app</title>
		<style>
			body { margin: 0; }
			canvas { width: 100%; height: 100% }
		</style>
	</head>
	<body>
		<script src="javascript/three.min.js"></script>
		
		<script src="javascript/VRControls.js"></script>

		<script src="javascript/VREffect.js"></script>
		
		<script>

		/*
		Setup three.js WebGL renderer
		*/
		var renderer = new THREE.WebGLRenderer( { antialias: true } );

		/*
		Append the canvas element created by the renderer to document body element.
		*/
		document.body.appendChild( renderer.domElement );

		/*
		Create a three.js scene
		*/
		var scene = new THREE.Scene();

		/*
		Create a three.js camera
		*/
		var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 10000 );

		/*
		Apply VR headset positional data to camera.
		*/
		var controls = new THREE.VRControls( camera );

		/*
		Apply VR stereo rendering to renderer
		*/
		var effect = new THREE.VREffect( renderer );
		effect.setSize( window.innerWidth, window.innerHeight );

		/*
		Create 3d objects
		*/
		var geometry = new THREE.BoxGeometry( 20, 26.27, 20 );

		var materials = [
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p1.jpg' )}),
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p2.jpg' )}),
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p3.jpg' )}),
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p4.jpg' )}),
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p5.jpg' )}),
			new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture( 'resources/p5.jpg' )})		
		];


		var cube = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial( materials ) );

		/*
		Position cube mesh
		*/
		cube.position.z = -20;

		/*
		Add cube mesh to your three.js scene
		*/
		scene.add( cube );

		/*
		Request animation frame loop function
		*/
		function animate() {
			/*
			Apply rotation to cube mesh
			*/
			//cube.rotation.y += 0.01;

			/*
			Update VR headset position and apply to camera.
			*/
			controls.update();

			/*
			Render the scene through the VREffect.
			*/
			effect.render( scene, camera );

			requestAnimationFrame( animate );
		}

		/*
		Kick off animation loop
		*/
		animate();

		/*
		Listen for double click event to enter full-screen VR mode
		*/
		document.body.addEventListener( 'dblclick', function() {
			effect.setFullScreen( true );
		});

		/*
		Listen for keyboard event and zero positional sensor on appropriate keypress.
		*/
		function onkey(event) {
	    event.preventDefault();

        var moveValue = 0.2;
	    if (event.keyCode == 90) { // z
	    	controls.zeroSensor();
	    } else if (event.keyCode == 37) { // Left 
			cube.position.x = cube.position.x - moveValue;
	    } else if (event.keyCode == 38) { // Up 
			cube.position.y = cube.position.y + moveValue;
		} else if (event.keyCode == 39) { // Right
			cube.position.x = cube.position.x + moveValue;
	    } else if (event.keyCode == 40) { // Down 
			cube.position.y = cube.position.y - moveValue;
		}
	  };
{'fraction_non_alphanumeric': 0.13917610372558673, 'fraction_numerical': 0.01444280321680617, 'mean_word_length': 2.9726205997392436, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '2799941', 'n_tokens_mistral': 2389, 'n_tokens_neox': 1942, 'n_words': 507}