<commit_before><!DOCTYPE html>
<html lang="en">
	<head>
		<title>three.js webvr - Lorenz attractor</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
		<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-06-19 -->
		<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-06-19" content="<KEY>>
		<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-06-15 -->
		<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-06-15" content="<KEY>>
		<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-06-15 -->
		<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-06-15" content="<KEY>>
		<style>
			body {
				margin: 0px;
				overflow: hidden;
			}
		</style>
	</head>
	<body>

		<script src="../build/three.js"></script>

		<script src="js/vr/WebVR.js"></script>

		<script>

			var camera, scene, renderer, x, y, z, c, geometry;

			var scale = 30;
			var multiplier = 5; // integer, increase for faster visualization

			var steps = 100000;
			var current = 1;
			var shown = 10000;

			var beta = 8/3;
			var rho = 28;
			var sigma = 10;

			var dt = .005;

			init();
			animate();

			function move() {

				geometry.attributes.position.array.copyWithin( 3 );
				geometry.attributes.color.array.copyWithin( 3 );

				if ( current < steps ) {

					var dx = sigma * ( y - x ) * dt;
					var dy = ( x * ( rho - z ) - y ) * dt;
					var dz = ( x * y - beta * z ) * dt;

					x += dx;
					y += dy;
					z += dz;

					geometry.attributes.position.set( [ x, y, z ], 0 );

					c.setHSL( current / steps, 1, .5 );
					geometry.attributes.color.set( [ c.r, c.g, c.b ], 0 );

				}

				if ( current < steps + shown ) {

					current ++;

				} else {

					current = 0;

				}

			}

			function init() {

				scene = new THREE.Scene();
				scene.position.set( 0, 0, - 1.5 * scale );

				camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 0.1, 1000 );
				camera.lookAt( 0, 0, - 1.5 * scale );

				//

				x = scale / 2 * Math.random();
				y = scale / 2 * Math.random();
				z = scale / 2 * Math.random();

				c = new THREE.Color();

				geometry = new THREE.BufferGeometry();

				var positions = new Float32Array( 3 * shown );
				for ( var i = 0; i < positions.length; i += 3 ) {

					positions.set( [ x, y, z ], i );

				}
				geometry.addAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );

				var colors = new Float32Array( 3 * shown );
				for ( var i = 0; i < positions.length; i += 3 ) {

					colors.set( [ 1, 0, 0 ], i );

				}
				geometry.addAttribute( 'color', new THREE.BufferAttribute( colors, 3 ) );

				var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );

				var line = new THREE.Line( geometry, material );
				line.frustumCulled = false; // critical to avoid blackouts!
				scene.add( line );

				//

				renderer = new THREE.WebGLRenderer( { antialias: true } );
				renderer.autoClear = false;
				renderer.setPixelRatio( window.devicePixelRatio );
				renderer.setSize( window.innerWidth, window.innerHeight );
				renderer.shadowMap.enabled = true;
				renderer.vr.enabled = true;
				document.body.appendChild( renderer.domElement );

				document.body.appendChild( WEBVR.createButton( renderer ) );

				//<commit_msg>Reduce size and reposition<commit_after><!DOCTYPE html>
<html lang="en">
	<head>
		<title>three.js webvr - Lorenz attractor</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
		<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://threejs.org, expires = 2018-06-19 -->
		<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-06-19" content="<KEY>>
		<!-- Origin Trial Token, feature = WebXR Device API, origin = https://threejs.org, expires = 2018-06-15 -->
		<meta http-equiv="origin-trial" data-feature="WebXR Device API" data-expires="2018-06-15" content="<KEY>>
		<!-- Origin Trial Token, feature = WebXR Gamepad Support, origin = https://threejs.org, expires = 2018-06-15 -->
		<meta http-equiv="origin-trial" data-feature="WebXR Gamepad Support" data-expires="2018-06-15" content="<KEY>>
		<style>
			body {
				margin: 0px;
				overflow: hidden;
			}
		</style>
	</head>
	<body>

		<script src="../build/three.js"></script>

		<script src="js/vr/WebVR.js"></script>

		<script>

			var camera, scene, renderer, x, y, z, c, geometry;

			var scale = .015; // for reducing overall displayed size
			var multiplier = 5; // integer, increase for faster visualization

			var steps = 100000;
			var current = 1;
			var shown = 10000;

			var beta = 8 / 3;
			var rho = 28;
			var sigma = 10;

			var dt = .005;

			init();
			animate();

			function move() {

				geometry.attributes.position.array.copyWithin( 3 );
				geometry.attributes.color.array.copyWithin( 3 );

				if ( current < steps ) {

					var dx = sigma * ( y - x ) * dt;
					var dy = ( x * ( rho - z ) - y ) * dt;
					var dz = ( x * y - beta * z ) * dt;

					x += dx;
					y += dy;
					z += dz;

					geometry.attributes.position.set( [ scale * x, scale * y, scale * z ], 0 );

					c.setHSL( current / steps, 1, .5 );
					geometry.attributes.color.set( [ c.r, c.g, c.b ], 0 );

				}

				if ( current < steps + shown ) {

					current ++;

				} else {

					current = 0;

				}

			}

			function init() {

				scene = new THREE.Scene();
				scene.position.set( 0, 1.5, - 1 );

				camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 0.1, 2 );
				camera.lookAt( 0, 1.5, - 1 );

				//

				x = 15 * Math.random();
				y = 15 * Math.random();
				z = 15 * Math.random();

				c = new THREE.Color();

				geometry = new THREE.BufferGeometry();

				var positions = new Float32Array( 3 * shown );
				for ( var i = 0; i < positions.length; i += 3 ) {

					positions.set( [ scale * x, scale * y, scale * z ], i );

				}
				geometry.addAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );

				var colors = new Float32Array( 3 * shown );
				for ( var i = 0; i < positions.length; i += 3 ) {

					colors.set( [ 1, 0, 0 ], i );

				}
				geometry.addAttribute( 'color', new THREE.BufferAttribute( colors, 3 ) );

				var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );

				var line = new THREE.Line( geometry, material );
				line.frustumCulled = false; // critical to avoid blackouts!
				scene.add( line );

				//

				renderer = new THREE.WebGLRenderer( { antialias: true } );
				renderer.autoClear = false;
				renderer.setPixelRatio( window.devicePixelRatio );
				renderer.setSize( window.innerWidth, window.innerHeight );
				renderer.shadowMap.enabled = true;
				renderer.vr.enabled = true;
				document.body.appendChild( renderer.domElement );

				document.body.appendChild( WEBVR.createButton( renderer ) );

				//
{'fraction_non_alphanumeric': 0.15931919642857142, 'fraction_numerical': 0.033900669642857144, 'mean_word_length': 2.635395537525355, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 53, 'https://': 6, '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': '6421569', 'n_tokens_mistral': 3104, 'n_tokens_neox': 2340, 'n_words': 648}